linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Getting started with Xilinx V4 PPC?
@ 2006-01-30 19:11 David Summers
  2006-01-30 20:28 ` bennett78
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: David Summers @ 2006-01-30 19:11 UTC (permalink / raw)
  To: linuxppc-embedded

I am starting a new project where I need to have a flash file system
and an ethenet interface (HTTP and FTP).  The project is a solar
physics experiment that will be launched on a sub-orbital rocket
flight this fall.  The idea is that the experiment will write data
files to the flash file system while in flight, and then I can
download the data using ethernet after the experiment returns to
earth.

I think that Linux is the way to go for this project because of the
JFFS2 filesystem and the strong networking support.  The only problem
is that I am totally new to embedded linux.

I am prototyping my system on an Avnet FX12 development board ( Specs
here: http://tinyurl.com/4gfdv ) which is pretty similar to the Xilinx
ML403 board except with less memory and no SystemACE slot.

I will eventually build my own custom board with the same Xilinx
Virtex 4 FX12 FPGA and additional flash memory and some custom
interface hardware. My background is primarily as a hardware designer,
and I am very confortable with the FPGA part of this project.   I am
comfortable as a Linux user, and I am a pretty good C coder (for a
hardware guy anyway :).  I have never built a linux system (embedded
or desktop) before, and I need some help getting started with embedded
linux.

I have already found the following websites which have been a big help so f=
ar:

http://www.klingauf.de/v2p/index.phtml
http://splish.ee.byu.edu/projects/LinuxFPGA/configuring.htm
http://www.crhc.uiuc.edu/IMPACT/gsrc/hardwarelab/docs/kernel-HOWTO.html#toc=
1

I have a few questions that I hope someone can help me with:

1. What is the best linux distribution to start out with?  I am
currently working with the 2.4 kernel code from
ppc.bkbits.net/linuxppc_2_4_devel, but I'm not sure that this version
be being updated.  (MontaVista also seems to be making it rather
difficult to download their free Linux Preview Kit, so I wouldn't mind
finding another distribution)    Does the DENX distribution have good
PPC support?  Are there any others that I should look at, or should I
just download the kernel source directly from kernel.org?


2. kernel 2.4 or 2.6?

It is my understanding that the latest version of MTD and JFFS2 have
dropped support for kernel 2.4.  I would like to use JFFS2 on a NAND
flash device, so it seems like I should use 2.6.  (Can I use JFFS2 on
a NAND device with kernel v 2.4?)

Being a complete newbie, am I biting off more that I can handle by
trying to use 2.6?

I have been lurking on the mailing list for a while, and I know that
there are several people working on 2.6.x patches for the Xilinx
virtex 4 parts.  Could someone point me to a list of the patches that
I need to get me started?  I think that the ML403 patches should work
with my board, but I don't know which ones I need to download.


Thank you for your help,

David Summers
University of Colorado

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Getting started with Xilinx V4 PPC?
  2006-01-30 19:11 David Summers
@ 2006-01-30 20:28 ` bennett78
  2006-01-31 21:07   ` David Summers
  2006-01-31  5:59 ` Peter Ryser
  2006-01-31 11:43 ` David H. Lynch Jr.
  2 siblings, 1 reply; 9+ messages in thread
From: bennett78 @ 2006-01-30 20:28 UTC (permalink / raw)
  To: David Summers; +Cc: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 4324 bytes --]

David Summers wrote:

>I am starting a new project where I need to have a flash file system
>and an ethenet interface (HTTP and FTP).  The project is a solar
>physics experiment that will be launched on a sub-orbital rocket
>flight this fall.  The idea is that the experiment will write data
>files to the flash file system while in flight, and then I can
>download the data using ethernet after the experiment returns to
>earth.
>
>I think that Linux is the way to go for this project because of the
>JFFS2 filesystem and the strong networking support.  The only problem
>is that I am totally new to embedded linux.
>  
>
Add Das U-Boot to your list as well!

>I am prototyping my system on an Avnet FX12 development board ( Specs
>here: http://tinyurl.com/4gfdv ) which is pretty similar to the Xilinx
>ML403 board except with less memory and no SystemACE slot.
>  
>
Interesting dev board.  What is the low volume price/power consumption
is for the Virtex-4?

>I will eventually build my own custom board with the same Xilinx
>Virtex 4 FX12 FPGA and additional flash memory and some custom
>interface hardware. My background is primarily as a hardware designer,
>and I am very confortable with the FPGA part of this project.   I am
>comfortable as a Linux user, and I am a pretty good C coder (for a
>hardware guy anyway :).  I have never built a linux system (embedded
>or desktop) before, and I need some help getting started with embedded
>linux.
>  
>
The ML403 is a PPC core, JTAG/COP with Xilinx gates around it, right?  
Then what
are your plans for the rest of the SOC?  DRAM controller, local bus for 
Flash, FEC,
PHY controller internal or external, timers, GPIO, Bestcom DMA?

If you are a C coder then I assume you would use Verilog I hope....VHDL 
is for
ADA programmers!

>I have already found the following websites which have been a big help so far:
>
>http://www.klingauf.de/v2p/index.phtml
>http://splish.ee.byu.edu/projects/LinuxFPGA/configuring.htm
>http://www.crhc.uiuc.edu/IMPACT/gsrc/hardwarelab/docs/kernel-HOWTO.html#toc1
>
>I have a few questions that I hope someone can help me with:
>
>1. What is the best linux distribution to start out with?  I am
>currently working with the 2.4 kernel code from
>ppc.bkbits.net/linuxppc_2_4_devel, but I'm not sure that this version
>be being updated.  (MontaVista also seems to be making it rather
>difficult to download their free Linux Preview Kit, so I wouldn't mind
>finding another distribution)    Does the DENX distribution have good
>PPC support?  Are there any others that I should look at, or should I
>just download the kernel source directly from kernel.org?
>  
>
I am pleased with the DENX distribution todate for support of MPC5200, which
is a low power PPC based SOC. The cross-compile and userland support is
also part of this distribution.

>2. kernel 2.4 or 2.6?
>
>It is my understanding that the latest version of MTD and JFFS2 have
>dropped support for kernel 2.4.  I would like to use JFFS2 on a NAND
>flash device, so it seems like I should use 2.6.  (Can I use JFFS2 on
>a NAND device with kernel v 2.4?)
>  
>
I had some trouble with MTD/JFFS2 until a switched to the cvs version of
linuxppc_2_4_devel which added a few additional flash parts and is 
working well for me under 2.4.

I think 2.6 is still pretty much bleeding edge for embedded work, IMHO.

>Being a complete newbie, am I biting off more that I can handle by
>trying to use 2.6?
>
>I have been lurking on the mailing list for a while, and I know that
>there are several people working on 2.6.x patches for the Xilinx
>virtex 4 parts.  Could someone point me to a list of the patches that
>I need to get me started?  I think that the ML403 patches should work
>with my board, but I don't know which ones I need to download.
>
>
>Thank you for your help,
>
>David Summers
>University of Colorado
>  
>
Go RAMS!

>_______________________________________________
>Linuxppc-embedded mailing list
>Linuxppc-embedded@ozlabs.org
>https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>  
>
Frank Bennett (aka CSUtennis)

*/Technical Contractor/*

/Triad Systems Engineering
200 West Mountain Avenue, Suite 103C
Ft. Collins, CO 80521
/http://www.traidsyseng.com <http://www.triadsyseng.com>


640K ought to be enough for anybody. 

-Microsoft Chairman Bill Gates, 1981





[-- Attachment #2: Type: text/html, Size: 6446 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Getting started with Xilinx V4 PPC?
  2006-01-30 19:11 David Summers
  2006-01-30 20:28 ` bennett78
@ 2006-01-31  5:59 ` Peter Ryser
  2006-01-31 11:43 ` David H. Lynch Jr.
  2 siblings, 0 replies; 9+ messages in thread
From: Peter Ryser @ 2006-01-31  5:59 UTC (permalink / raw)
  To: David Summers; +Cc: linuxppc-embedded

Hi David,

you might want to have a look at the following documents beside the ones you mention in your email:
- XAPP765 (http://www.xilinx.com/bvdocs/appnotes/xapp765.pdf). This document describes on how to get started with EDK and the ML300 board. The approach for the ML403 board is the same as is for the Avnet board.
- UG080, pg. 37 (http://www.xilinx.com/bvdocs/userguides/ug082.pdf). This document contains a brief description on how to rebuild the Linux kernel for the ML403 board.

Start with rebuilding the reference design and Linux kernel for the ML403/Avnet board. All the necessary information can be found in the documents above and on  
http://www.xilinx.com/products/boards/ml403/reference_designs.htm (for the ML403 board)

At this time I recommend staying with the 2.4 Linux kernel as the support for ML300 (and the ML403 and the Avnet board) in the 2.6 kernel is very basic (UART only).

Since you only need Ethernet once the "project" returns from its flight you might want to consider to develop two hardware designs. The first one does not have Ethernet and is for the flight. The second one contains Ethernet but not some of the additional control logic and is for retrieving the data upon return. This might get you into a smaller device and I assume that size matters.

- Peter


David Summers wrote:

>I am starting a new project where I need to have a flash file system
>and an ethenet interface (HTTP and FTP).  The project is a solar
>physics experiment that will be launched on a sub-orbital rocket
>flight this fall.  The idea is that the experiment will write data
>files to the flash file system while in flight, and then I can
>download the data using ethernet after the experiment returns to
>earth.
>
>I think that Linux is the way to go for this project because of the
>JFFS2 filesystem and the strong networking support.  The only problem
>is that I am totally new to embedded linux.
>
>I am prototyping my system on an Avnet FX12 development board ( Specs
>here: http://tinyurl.com/4gfdv ) which is pretty similar to the Xilinx
>ML403 board except with less memory and no SystemACE slot.
>
>I will eventually build my own custom board with the same Xilinx
>Virtex 4 FX12 FPGA and additional flash memory and some custom
>interface hardware. My background is primarily as a hardware designer,
>and I am very confortable with the FPGA part of this project.   I am
>comfortable as a Linux user, and I am a pretty good C coder (for a
>hardware guy anyway :).  I have never built a linux system (embedded
>or desktop) before, and I need some help getting started with embedded
>linux.
>
>I have already found the following websites which have been a big help so far:
>
>http://www.klingauf.de/v2p/index.phtml
>http://splish.ee.byu.edu/projects/LinuxFPGA/configuring.htm
>http://www.crhc.uiuc.edu/IMPACT/gsrc/hardwarelab/docs/kernel-HOWTO.html#toc1
>
>I have a few questions that I hope someone can help me with:
>
>1. What is the best linux distribution to start out with?  I am
>currently working with the 2.4 kernel code from
>ppc.bkbits.net/linuxppc_2_4_devel, but I'm not sure that this version
>be being updated.  (MontaVista also seems to be making it rather
>difficult to download their free Linux Preview Kit, so I wouldn't mind
>finding another distribution)    Does the DENX distribution have good
>PPC support?  Are there any others that I should look at, or should I
>just download the kernel source directly from kernel.org?
>
>
>2. kernel 2.4 or 2.6?
>
>It is my understanding that the latest version of MTD and JFFS2 have
>dropped support for kernel 2.4.  I would like to use JFFS2 on a NAND
>flash device, so it seems like I should use 2.6.  (Can I use JFFS2 on
>a NAND device with kernel v 2.4?)
>
>Being a complete newbie, am I biting off more that I can handle by
>trying to use 2.6?
>
>I have been lurking on the mailing list for a while, and I know that
>there are several people working on 2.6.x patches for the Xilinx
>virtex 4 parts.  Could someone point me to a list of the patches that
>I need to get me started?  I think that the ML403 patches should work
>with my board, but I don't know which ones I need to download.
>
>
>Thank you for your help,
>
>David Summers
>University of Colorado
>_______________________________________________
>Linuxppc-embedded mailing list
>Linuxppc-embedded@ozlabs.org
>https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>
>  
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Getting started with Xilinx V4 PPC?
@ 2006-01-31  7:44 Paula Saameño
  0 siblings, 0 replies; 9+ messages in thread
From: Paula Saameño @ 2006-01-31  7:44 UTC (permalink / raw)
  To: linuxppc-embedded, bennett78

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

Hi!!

I was pretty new to embedded linux as well, but I can recommend you using
2.4 kernel. The 2.6 version is not fully adapted to V4 yet, since the
ethernet drivers for the Xilinx EMAC hasn't been released, neither the ones
for other specific devices.

I used 2.4_devel, and it works fine for me. My design for the FPGA is
composed by an uart, the ethernet mac, i2c, ddr memory and interrupt
controller, and the kernel 2.4 is ok making the corresponding modifications
(adding xparameters.h and the other drivers generated by EDK).

However, here are some patches for the kernel 2.6 on the ml403 and the
Xilinx reference design:

http://patchwork.ozlabs.org/linuxppc/

See January and there are 9 patches that maybe are useful for you. I got it
running on my ml403 board, but there is no network support for Xilinx yet,
and that's why I recommended you the 2.4.

Hope being helpful!
Paula

[-- Attachment #2: Type: text/html, Size: 1023 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Getting started with Xilinx V4 PPC?
  2006-01-30 19:11 David Summers
  2006-01-30 20:28 ` bennett78
  2006-01-31  5:59 ` Peter Ryser
@ 2006-01-31 11:43 ` David H. Lynch Jr.
  2006-01-31 21:17   ` David Summers
  2 siblings, 1 reply; 9+ messages in thread
From: David H. Lynch Jr. @ 2006-01-31 11:43 UTC (permalink / raw)
  To: David Summers, linuxppc-embedded


David;

I just completed a port of 2.6 to the Pico E-12 which is a Xilinx
Virtex-4 with very little hardware.

I had the advantage of a system that already had a elf loader (not
U-Boot), but not a Linux loader.
If I could load Linux as an elf file then I did not need another loader.
In the end I had to make some very trivial modifications to Pico's
loader to pass a board information structure. But otherwise the decision
to use the existing loader saved me having to port u-boot.

I also chose to boot into a ramdisk. Using the existing loader precluded
having the ramdisk as a separate file.
the intramfs feature of 2.6 allowed me to wrap the ramdisk into the same
file as the kernel. Documentation on initramfs is spartan, and somewhat
opaque. The good news was that despite the documentation initramfs
proved trivially easy to use.

After that I took the 2.6 kernel source, and litterally went through
looking for all references to the xilinx ml300.
Wherever there was an ml300 specific file I created an new one for the
pico_e12. Wherever there was an ml300 configuration option I created a
PICO_E12 one.

The E-12 had substatnitially less hardware than the ml300 (or the ml403)
so mostly I just ended up ripping code out of my private version of the
ml300 code that was transmuting into the pico_e12 code.

The next obstacle I bumped into was that the e-12 had two devices
suitable for a console - a highspeed fifo interface to a host
development system called the keyhole port, and the xilinx uartlite
serial port. Neither are supported in 2.6. I looked at the Xilinx
Uartlite 2.4 driver and it was coded substantially different from other
serial drivers. I decided not to try to port it to 2.6. I started from
scratch using the 8250 code as a base. I picked the 8250 because:
It must be the most heavily used linux serial driver and therefore I
hoped the most uptodate and well debugged.
The 8250 had boot through console IO support. Most other serial devices
require getting fairly far into the boot process before you get any output.

The really early IO proved fairly simple. Implimenting xxxx_dbg.c and
xxxx_tty.c for both the uartlite and the keyhole was fairly trivial.

Additionally the keyhole port had a "debug" feature where if you output
a single 32 bit word to one of the fifo ports it would be displayed in
hex on the host. As this could be done in an assembler macro that proved
indispensiable early on.

I was stalled for about 3 weeks trying to get the sucker into virtual
mode. In the end I had to disable Machine Check exceptions to make the
transition to virtual mode. Pico claims there is not a hardware problem,
but if I do nto disable machine checks on the e-12 it will never make
the tansition to virtual mode.

The full serial driver for the Uartlite (and Keyhole) proved more
daunting than anything else. In some ways the 8250 proved a bad choice
as a template there as there are more permutations, busses, etc
associated with the 8250 than anything else. I ended up stripping out
huge hunks of code. Eventually, I used the m32r_sio as a simpler
template. The driver was much simpler, and it had the critical features
I needed - both interupt driven and polled IO support - some
implimentations of the E12 do not include a PIC. The serial drivers took
much longer than the whole rest of the port combined - including the
machine check detour.

Just as I was finishing up the E12 port, Grant posted a set of patches
for the ml403. There were some fundimental differences at a fairly low
level between Grant's approach and mine. And I think Grant's Virtex-4
code appears to reflect more of the direction things are going, so I am
in the process of remodeling my port for the E12 on his for the ml403.
But I have not completed that.

Absent the machine check issue and having to write serial drivers thus
was atmost 2 weeks work.


BTW while you appear to be a hardware guy with alot of software
experience, I am a software guy with alot of hardware experience.


The E-12 has flash, but it uses a proprietary flash file system, and
using it would have required writing a filesystem driver - which I would
be happy to do if I got paid for it. Write performance on flash can be
extremely slow. If you are recording a significant amount of data in
realtime, you may want to skip the flash and just use a ramdisk. However
the ramdisk will not survive the system loosing power - which might be
an issue in a rocket.

If you are going to start with the 2.6 Kernel, I would get git. use it
to DL Linus's current 2.6 git repository, adn apply all of Grant's ml403
patches from the mailing list to it.
Then I would start an approach somewhat similar to what I described
above - except using Grant's ml403 as the base to create your own board
spec from instead of the ml300 that I used.
How tightly constrained are you for gates in the FPGA ?
If you are not tight, use the Xilinx 16550 serial IP and then you can
use standard Kernel 8250 dirvers (making Grant's patches work with
Uartlite is one of the things I am having trouble with) It would be my
guess that if you use the 16550 serial IP, you may be able to use
Grant's ml403 stuff asis.





David Summers wrote:

>I am starting a new project where I need to have a flash file system
>and an ethenet interface (HTTP and FTP).  The project is a solar
>physics experiment that will be launched on a sub-orbital rocket
>flight this fall.  The idea is that the experiment will write data
>files to the flash file system while in flight, and then I can
>download the data using ethernet after the experiment returns to
>earth.
>
>I think that Linux is the way to go for this project because of the
>JFFS2 filesystem and the strong networking support.  The only problem
>is that I am totally new to embedded linux.
>
>I am prototyping my system on an Avnet FX12 development board ( Specs
>here: http://tinyurl.com/4gfdv ) which is pretty similar to the Xilinx
>ML403 board except with less memory and no SystemACE slot.
>
>I will eventually build my own custom board with the same Xilinx
>Virtex 4 FX12 FPGA and additional flash memory and some custom
>interface hardware. My background is primarily as a hardware designer,
>and I am very confortable with the FPGA part of this project.   I am
>comfortable as a Linux user, and I am a pretty good C coder (for a
>hardware guy anyway :).  I have never built a linux system (embedded
>or desktop) before, and I need some help getting started with embedded
>linux.
>
>I have already found the following websites which have been a big help so far:
>
>http://www.klingauf.de/v2p/index.phtml
>http://splish.ee.byu.edu/projects/LinuxFPGA/configuring.htm
>http://www.crhc.uiuc.edu/IMPACT/gsrc/hardwarelab/docs/kernel-HOWTO.html#toc1
>
>I have a few questions that I hope someone can help me with:
>
>1. What is the best linux distribution to start out with?  I am
>currently working with the 2.4 kernel code from
>ppc.bkbits.net/linuxppc_2_4_devel, but I'm not sure that this version
>be being updated.  (MontaVista also seems to be making it rather
>difficult to download their free Linux Preview Kit, so I wouldn't mind
>finding another distribution)    Does the DENX distribution have good
>PPC support?  Are there any others that I should look at, or should I
>just download the kernel source directly from kernel.org?
>
>
>2. kernel 2.4 or 2.6?
>
>It is my understanding that the latest version of MTD and JFFS2 have
>dropped support for kernel 2.4.  I would like to use JFFS2 on a NAND
>flash device, so it seems like I should use 2.6.  (Can I use JFFS2 on
>a NAND device with kernel v 2.4?)
>
>Being a complete newbie, am I biting off more that I can handle by
>trying to use 2.6?
>
>I have been lurking on the mailing list for a while, and I know that
>there are several people working on 2.6.x patches for the Xilinx
>virtex 4 parts.  Could someone point me to a list of the patches that
>I need to get me started?  I think that the ML403 patches should work
>with my board, but I don't know which ones I need to download.
>
>
>Thank you for your help,
>
>David Summers
>University of Colorado
>_______________________________________________
>Linuxppc-embedded mailing list
>Linuxppc-embedded@ozlabs.org
>https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>  
>

-- 
Dave Lynch 						DLA Systems
Software Development:  				     Embedded Linux
717.627.3770 	dhlii@dlasys.net 	 http://www.dlasys.net:8888

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Getting started with Xilinx V4 PPC?
  2006-01-30 20:28 ` bennett78
@ 2006-01-31 21:07   ` David Summers
  0 siblings, 0 replies; 9+ messages in thread
From: David Summers @ 2006-01-31 21:07 UTC (permalink / raw)
  To: Frank Bennett; +Cc: linuxppc-embedded

> Interesting dev board.  What is the low volume price/power consumption
> is for the Virtex-4?


The price for a Virtex 4 FX12 FPGA  (10K flip flops, 648Kb Block RAM,
1 PPC405 core, dual 10/100/1G ethernet MACs, etc)  close to $200 each.
 Expensive if all you need is a processor, but I already have a lot of
custom interface logic in the FPGA so adding a few $$ extra for the
PPC core isn't a problem.  I also have the luxury of extremely small
production volumes, so component cost is dwarfed by the cost of
development.


Power is going to depend on what you put into the FPGA and how fast
you clock it.  Xilinx quotes 0.45mW/Mhz for the PPC only.  That equals
135mW at 300 Mhz.  My design will probably top out at 2W for the FPGA.

>
> If you are a C coder then I assume you would use Verilog I hope....VHDL i=
s
> for ADA programmers!

I use both, but this project will be in VHDL.  VHDL has some nice
features and seems to actually be gaining strength over Verilog.

-David

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Getting started with Xilinx V4 PPC?
  2006-01-31 11:43 ` David H. Lynch Jr.
@ 2006-01-31 21:17   ` David Summers
  2006-02-10  2:13     ` Frank Bennett
  0 siblings, 1 reply; 9+ messages in thread
From: David Summers @ 2006-01-31 21:17 UTC (permalink / raw)
  To: David H. Lynch Jr.; +Cc: linuxppc-embedded

Thanks for all of the great advice.


I think my plan is to stick with the 2.4 kernel for now until I run
into a compelling reason to switch to 2.6.  It sounds like the 2.6
support is getting very close to maturity and if I get some free time
I would love to pitch in and help.


Is anyone out there using JFFS2 on a NAND flash device in 2.4?  If
this works in 2.4 then I should be OK.  My dev board only has 4MB of
NOR flash so this is one part of the processor subsystem that I cannot
test.

-David Summers


On 1/31/06, David H. Lynch Jr. <dhlii@dlasys.net> wrote:
>
> David;
>
> I just completed a port of 2.6 to the Pico E-12 which is a Xilinx
> Virtex-4 with very little hardware.
>
> I had the advantage of a system that already had a elf loader (not
> U-Boot), but not a Linux loader.
> If I could load Linux as an elf file then I did not need another loader.
> In the end I had to make some very trivial modifications to Pico's
> loader to pass a board information structure. But otherwise the decision
> to use the existing loader saved me having to port u-boot.
>
> I also chose to boot into a ramdisk. Using the existing loader precluded
> having the ramdisk as a separate file.
> the intramfs feature of 2.6 allowed me to wrap the ramdisk into the same
> file as the kernel. Documentation on initramfs is spartan, and somewhat
> opaque. The good news was that despite the documentation initramfs
> proved trivially easy to use.
>
> After that I took the 2.6 kernel source, and litterally went through
> looking for all references to the xilinx ml300.
> Wherever there was an ml300 specific file I created an new one for the
> pico_e12. Wherever there was an ml300 configuration option I created a
> PICO_E12 one.
>
> The E-12 had substatnitially less hardware than the ml300 (or the ml403)
> so mostly I just ended up ripping code out of my private version of the
> ml300 code that was transmuting into the pico_e12 code.
>
> The next obstacle I bumped into was that the e-12 had two devices
> suitable for a console - a highspeed fifo interface to a host
> development system called the keyhole port, and the xilinx uartlite
> serial port. Neither are supported in 2.6. I looked at the Xilinx
> Uartlite 2.4 driver and it was coded substantially different from other
> serial drivers. I decided not to try to port it to 2.6. I started from
> scratch using the 8250 code as a base. I picked the 8250 because:
> It must be the most heavily used linux serial driver and therefore I
> hoped the most uptodate and well debugged.
> The 8250 had boot through console IO support. Most other serial devices
> require getting fairly far into the boot process before you get any outpu=
t.
>
> The really early IO proved fairly simple. Implimenting xxxx_dbg.c and
> xxxx_tty.c for both the uartlite and the keyhole was fairly trivial.
>
> Additionally the keyhole port had a "debug" feature where if you output
> a single 32 bit word to one of the fifo ports it would be displayed in
> hex on the host. As this could be done in an assembler macro that proved
> indispensiable early on.
>
> I was stalled for about 3 weeks trying to get the sucker into virtual
> mode. In the end I had to disable Machine Check exceptions to make the
> transition to virtual mode. Pico claims there is not a hardware problem,
> but if I do nto disable machine checks on the e-12 it will never make
> the tansition to virtual mode.
>
> The full serial driver for the Uartlite (and Keyhole) proved more
> daunting than anything else. In some ways the 8250 proved a bad choice
> as a template there as there are more permutations, busses, etc
> associated with the 8250 than anything else. I ended up stripping out
> huge hunks of code. Eventually, I used the m32r_sio as a simpler
> template. The driver was much simpler, and it had the critical features
> I needed - both interupt driven and polled IO support - some
> implimentations of the E12 do not include a PIC. The serial drivers took
> much longer than the whole rest of the port combined - including the
> machine check detour.
>
> Just as I was finishing up the E12 port, Grant posted a set of patches
> for the ml403. There were some fundimental differences at a fairly low
> level between Grant's approach and mine. And I think Grant's Virtex-4
> code appears to reflect more of the direction things are going, so I am
> in the process of remodeling my port for the E12 on his for the ml403.
> But I have not completed that.
>
> Absent the machine check issue and having to write serial drivers thus
> was atmost 2 weeks work.
>
>
> BTW while you appear to be a hardware guy with alot of software
> experience, I am a software guy with alot of hardware experience.
>
>
> The E-12 has flash, but it uses a proprietary flash file system, and
> using it would have required writing a filesystem driver - which I would
> be happy to do if I got paid for it. Write performance on flash can be
> extremely slow. If you are recording a significant amount of data in
> realtime, you may want to skip the flash and just use a ramdisk. However
> the ramdisk will not survive the system loosing power - which might be
> an issue in a rocket.
>
> If you are going to start with the 2.6 Kernel, I would get git. use it
> to DL Linus's current 2.6 git repository, adn apply all of Grant's ml403
> patches from the mailing list to it.
> Then I would start an approach somewhat similar to what I described
> above - except using Grant's ml403 as the base to create your own board
> spec from instead of the ml300 that I used.
> How tightly constrained are you for gates in the FPGA ?
> If you are not tight, use the Xilinx 16550 serial IP and then you can
> use standard Kernel 8250 dirvers (making Grant's patches work with
> Uartlite is one of the things I am having trouble with) It would be my
> guess that if you use the 16550 serial IP, you may be able to use
> Grant's ml403 stuff asis.
>
>
>
>
>
> David Summers wrote:
>
> >I am starting a new project where I need to have a flash file system
> >and an ethenet interface (HTTP and FTP).  The project is a solar
> >physics experiment that will be launched on a sub-orbital rocket
> >flight this fall.  The idea is that the experiment will write data
> >files to the flash file system while in flight, and then I can
> >download the data using ethernet after the experiment returns to
> >earth.
> >
> >I think that Linux is the way to go for this project because of the
> >JFFS2 filesystem and the strong networking support.  The only problem
> >is that I am totally new to embedded linux.
> >
> >I am prototyping my system on an Avnet FX12 development board ( Specs
> >here: http://tinyurl.com/4gfdv ) which is pretty similar to the Xilinx
> >ML403 board except with less memory and no SystemACE slot.
> >
> >I will eventually build my own custom board with the same Xilinx
> >Virtex 4 FX12 FPGA and additional flash memory and some custom
> >interface hardware. My background is primarily as a hardware designer,
> >and I am very confortable with the FPGA part of this project.   I am
> >comfortable as a Linux user, and I am a pretty good C coder (for a
> >hardware guy anyway :).  I have never built a linux system (embedded
> >or desktop) before, and I need some help getting started with embedded
> >linux.
> >
> >I have already found the following websites which have been a big help s=
o far:
> >
> >http://www.klingauf.de/v2p/index.phtml
> >http://splish.ee.byu.edu/projects/LinuxFPGA/configuring.htm
> >http://www.crhc.uiuc.edu/IMPACT/gsrc/hardwarelab/docs/kernel-HOWTO.html#=
toc1
> >
> >I have a few questions that I hope someone can help me with:
> >
> >1. What is the best linux distribution to start out with?  I am
> >currently working with the 2.4 kernel code from
> >ppc.bkbits.net/linuxppc_2_4_devel, but I'm not sure that this version
> >be being updated.  (MontaVista also seems to be making it rather
> >difficult to download their free Linux Preview Kit, so I wouldn't mind
> >finding another distribution)    Does the DENX distribution have good
> >PPC support?  Are there any others that I should look at, or should I
> >just download the kernel source directly from kernel.org?
> >
> >
> >2. kernel 2.4 or 2.6?
> >
> >It is my understanding that the latest version of MTD and JFFS2 have
> >dropped support for kernel 2.4.  I would like to use JFFS2 on a NAND
> >flash device, so it seems like I should use 2.6.  (Can I use JFFS2 on
> >a NAND device with kernel v 2.4?)
> >
> >Being a complete newbie, am I biting off more that I can handle by
> >trying to use 2.6?
> >
> >I have been lurking on the mailing list for a while, and I know that
> >there are several people working on 2.6.x patches for the Xilinx
> >virtex 4 parts.  Could someone point me to a list of the patches that
> >I need to get me started?  I think that the ML403 patches should work
> >with my board, but I don't know which ones I need to download.
> >
> >
> >Thank you for your help,
> >
> >David Summers
> >University of Colorado
> >_______________________________________________
> >Linuxppc-embedded mailing list
> >Linuxppc-embedded@ozlabs.org
> >https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> >
> >
> >
>
> --
> Dave Lynch                                              DLA Systems
> Software Development:                                Embedded Linux
> 717.627.3770    dhlii@dlasys.net         http://www.dlasys.net:8888
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Getting started with Xilinx V4 PPC?
  2006-01-31 21:17   ` David Summers
@ 2006-02-10  2:13     ` Frank Bennett
  0 siblings, 0 replies; 9+ messages in thread
From: Frank Bennett @ 2006-02-10  2:13 UTC (permalink / raw)
  To: David Summers; +Cc: David H. Lynch Jr., linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 10775 bytes --]

David Summers wrote:
> Thanks for all of the great advice.
>
>
> I think my plan is to stick with the 2.4 kernel for now until I run
> into a compelling reason to switch to 2.6.  It sounds like the 2.6
> support is getting very close to maturity and if I get some free time
> I would love to pitch in and help.
>
>
> Is anyone out there using JFFS2 on a NAND flash device in 2.4?  If
> this works in 2.4 then I should be OK.  My dev board only has 4MB of
> NOR flash so this is one part of the processor subsystem that I cannot
> test.
>   
Per my previous response: I had some trouble with MTD/JFFS2 until I 
picked up to the DENX cvs
version of  linuxppc_2_4_devel (just the MTD part) which added a few 
additional flash parts and is
working well for me under 2.4.25 (on Lite5200, MPC5200)

What about the following dev brd? Anybody porting here?
    http://www.nuhorizons.com/products/xilinx/v4/ml403/index.html
for $100 or so more?  Looks like it might have NAND flash.

Anybody got a power measurement for a configured ML403 dev board running
PPC/Linux, flash, DDR, Ethernet,etc?

Also why not put the extternal PHY controller (Serdes, collision detect, 
5b4, etc) on the FPGA?
Should then only need external magnetics & a RJ45

-Frank Bennett
> -David Summers
>
>
> On 1/31/06, David H. Lynch Jr. <dhlii@dlasys.net> wrote:
>   
>> David;
>>
>> I just completed a port of 2.6 to the Pico E-12 which is a Xilinx
>> Virtex-4 with very little hardware.
>>
>> I had the advantage of a system that already had a elf loader (not
>> U-Boot), but not a Linux loader.
>> If I could load Linux as an elf file then I did not need another loader.
>> In the end I had to make some very trivial modifications to Pico's
>> loader to pass a board information structure. But otherwise the decision
>> to use the existing loader saved me having to port u-boot.
>>
>> I also chose to boot into a ramdisk. Using the existing loader precluded
>> having the ramdisk as a separate file.
>> the intramfs feature of 2.6 allowed me to wrap the ramdisk into the same
>> file as the kernel. Documentation on initramfs is spartan, and somewhat
>> opaque. The good news was that despite the documentation initramfs
>> proved trivially easy to use.
>>
>> After that I took the 2.6 kernel source, and litterally went through
>> looking for all references to the xilinx ml300.
>> Wherever there was an ml300 specific file I created an new one for the
>> pico_e12. Wherever there was an ml300 configuration option I created a
>> PICO_E12 one.
>>
>> The E-12 had substatnitially less hardware than the ml300 (or the ml403)
>> so mostly I just ended up ripping code out of my private version of the
>> ml300 code that was transmuting into the pico_e12 code.
>>
>> The next obstacle I bumped into was that the e-12 had two devices
>> suitable for a console - a highspeed fifo interface to a host
>> development system called the keyhole port, and the xilinx uartlite
>> serial port. Neither are supported in 2.6. I looked at the Xilinx
>> Uartlite 2.4 driver and it was coded substantially different from other
>> serial drivers. I decided not to try to port it to 2.6. I started from
>> scratch using the 8250 code as a base. I picked the 8250 because:
>> It must be the most heavily used linux serial driver and therefore I
>> hoped the most uptodate and well debugged.
>> The 8250 had boot through console IO support. Most other serial devices
>> require getting fairly far into the boot process before you get any output.
>>
>> The really early IO proved fairly simple. Implimenting xxxx_dbg.c and
>> xxxx_tty.c for both the uartlite and the keyhole was fairly trivial.
>>
>> Additionally the keyhole port had a "debug" feature where if you output
>> a single 32 bit word to one of the fifo ports it would be displayed in
>> hex on the host. As this could be done in an assembler macro that proved
>> indispensiable early on.
>>
>> I was stalled for about 3 weeks trying to get the sucker into virtual
>> mode. In the end I had to disable Machine Check exceptions to make the
>> transition to virtual mode. Pico claims there is not a hardware problem,
>> but if I do nto disable machine checks on the e-12 it will never make
>> the tansition to virtual mode.
>>
>> The full serial driver for the Uartlite (and Keyhole) proved more
>> daunting than anything else. In some ways the 8250 proved a bad choice
>> as a template there as there are more permutations, busses, etc
>> associated with the 8250 than anything else. I ended up stripping out
>> huge hunks of code. Eventually, I used the m32r_sio as a simpler
>> template. The driver was much simpler, and it had the critical features
>> I needed - both interupt driven and polled IO support - some
>> implimentations of the E12 do not include a PIC. The serial drivers took
>> much longer than the whole rest of the port combined - including the
>> machine check detour.
>>
>> Just as I was finishing up the E12 port, Grant posted a set of patches
>> for the ml403. There were some fundimental differences at a fairly low
>> level between Grant's approach and mine. And I think Grant's Virtex-4
>> code appears to reflect more of the direction things are going, so I am
>> in the process of remodeling my port for the E12 on his for the ml403.
>> But I have not completed that.
>>
>> Absent the machine check issue and having to write serial drivers thus
>> was atmost 2 weeks work.
>>
>>
>> BTW while you appear to be a hardware guy with alot of software
>> experience, I am a software guy with alot of hardware experience.
>>
>>
>> The E-12 has flash, but it uses a proprietary flash file system, and
>> using it would have required writing a filesystem driver - which I would
>> be happy to do if I got paid for it. Write performance on flash can be
>> extremely slow. If you are recording a significant amount of data in
>> realtime, you may want to skip the flash and just use a ramdisk. However
>> the ramdisk will not survive the system loosing power - which might be
>> an issue in a rocket.
>>
>> If you are going to start with the 2.6 Kernel, I would get git. use it
>> to DL Linus's current 2.6 git repository, adn apply all of Grant's ml403
>> patches from the mailing list to it.
>> Then I would start an approach somewhat similar to what I described
>> above - except using Grant's ml403 as the base to create your own board
>> spec from instead of the ml300 that I used.
>> How tightly constrained are you for gates in the FPGA ?
>> If you are not tight, use the Xilinx 16550 serial IP and then you can
>> use standard Kernel 8250 dirvers (making Grant's patches work with
>> Uartlite is one of the things I am having trouble with) It would be my
>> guess that if you use the 16550 serial IP, you may be able to use
>> Grant's ml403 stuff asis.
>>
>>
>>
>>
>>
>> David Summers wrote:
>>
>>     
>>> I am starting a new project where I need to have a flash file system
>>> and an ethenet interface (HTTP and FTP).  The project is a solar
>>> physics experiment that will be launched on a sub-orbital rocket
>>> flight this fall.  The idea is that the experiment will write data
>>> files to the flash file system while in flight, and then I can
>>> download the data using ethernet after the experiment returns to
>>> earth.
>>>
>>> I think that Linux is the way to go for this project because of the
>>> JFFS2 filesystem and the strong networking support.  The only problem
>>> is that I am totally new to embedded linux.
>>>
>>> I am prototyping my system on an Avnet FX12 development board ( Specs
>>> here: http://tinyurl.com/4gfdv ) which is pretty similar to the Xilinx
>>> ML403 board except with less memory and no SystemACE slot.
>>>
>>> I will eventually build my own custom board with the same Xilinx
>>> Virtex 4 FX12 FPGA and additional flash memory and some custom
>>> interface hardware. My background is primarily as a hardware designer,
>>> and I am very confortable with the FPGA part of this project.   I am
>>> comfortable as a Linux user, and I am a pretty good C coder (for a
>>> hardware guy anyway :).  I have never built a linux system (embedded
>>> or desktop) before, and I need some help getting started with embedded
>>> linux.
>>>
>>> I have already found the following websites which have been a big help so far:
>>>
>>> http://www.klingauf.de/v2p/index.phtml
>>> http://splish.ee.byu.edu/projects/LinuxFPGA/configuring.htm
>>> http://www.crhc.uiuc.edu/IMPACT/gsrc/hardwarelab/docs/kernel-HOWTO.html#toc1
>>>
>>> I have a few questions that I hope someone can help me with:
>>>
>>> 1. What is the best linux distribution to start out with?  I am
>>> currently working with the 2.4 kernel code from
>>> ppc.bkbits.net/linuxppc_2_4_devel, but I'm not sure that this version
>>> be being updated.  (MontaVista also seems to be making it rather
>>> difficult to download their free Linux Preview Kit, so I wouldn't mind
>>> finding another distribution)    Does the DENX distribution have good
>>> PPC support?  Are there any others that I should look at, or should I
>>> just download the kernel source directly from kernel.org?
>>>
>>>
>>> 2. kernel 2.4 or 2.6?
>>>
>>> It is my understanding that the latest version of MTD and JFFS2 have
>>> dropped support for kernel 2.4.  I would like to use JFFS2 on a NAND
>>> flash device, so it seems like I should use 2.6.  (Can I use JFFS2 on
>>> a NAND device with kernel v 2.4?)
>>>
>>> Being a complete newbie, am I biting off more that I can handle by
>>> trying to use 2.6?
>>>
>>> I have been lurking on the mailing list for a while, and I know that
>>> there are several people working on 2.6.x patches for the Xilinx
>>> virtex 4 parts.  Could someone point me to a list of the patches that
>>> I need to get me started?  I think that the ML403 patches should work
>>> with my board, but I don't know which ones I need to download.
>>>
>>>
>>> Thank you for your help,
>>>
>>> David Summers
>>> University of Colorado
>>> _______________________________________________
>>> Linuxppc-embedded mailing list
>>> Linuxppc-embedded@ozlabs.org
>>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>>
>>>
>>>
>>>       
>> --
>> Dave Lynch                                              DLA Systems
>> Software Development:                                Embedded Linux
>> 717.627.3770    dhlii@dlasys.net         http://www.dlasys.net:8888
>>
>>
>>     
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>   


-- 

*/Frank Bennett
CEO/*

Mathegraphics,LLC
613 Bentley Pl
Fort Collins,CO 80526
970-229-9269 (hm) 970-402-9269 (cell)
www.mathegraphics.com <http://www.mathegraphics.com>
bennett78@digis.net <mailto:bennett78@digis.net>


[-- Attachment #2: Type: text/html, Size: 12279 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Getting started with Xilinx V4 PPC?
@ 2006-02-10  7:47 Paula Saameño
  0 siblings, 0 replies; 9+ messages in thread
From: Paula Saameño @ 2006-02-10  7:47 UTC (permalink / raw)
  To: linuxppc-embedded, bennett78

[-- Attachment #1: Type: text/plain, Size: 664 bytes --]

Hi!!

I am using ML403 right now and everything works fine with the
linuxppc_2_4_devel. My basic design has a simple UART, DDR, Ethernet, IIC
and XSysAce.
I haven't measured the power consumption yet, but I will soon. I'll let you
know when I do it.

I thought about using the internal FPGA MAC as a complete PHY. For Ethernet
over fiber it's ok, but for Ethernet over copper, we should implement the
collision detector, serder... "manually" and I don't think we had enough
space in the FPGA (XC4VFX12), since the actual design uses the 85% of
slices.
Maybe with a bigger FPGA we could do the complete design "inside".

Have a good weekend!
Paula

[-- Attachment #2: Type: text/html, Size: 735 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-02-10  7:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-10  7:47 Getting started with Xilinx V4 PPC? Paula Saameño
  -- strict thread matches above, loose matches on Subject: below --
2006-01-31  7:44 Paula Saameño
2006-01-30 19:11 David Summers
2006-01-30 20:28 ` bennett78
2006-01-31 21:07   ` David Summers
2006-01-31  5:59 ` Peter Ryser
2006-01-31 11:43 ` David H. Lynch Jr.
2006-01-31 21:17   ` David Summers
2006-02-10  2:13     ` Frank Bennett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).