Code for programming Flash memory

Guest
Hi there,

I've got a Xilinx Spartan dev board, that has an onboard Atmel Flash
memory chip (AT49BV040A). It can't be removed from the board, and is
programmed in a parrallel, byte by byte (ie not a seriel protocol).

Are there any existing chunks of VHDL for programming the Flash chip
via something like an RS232 interface? Does anyone have one for some
other development board that I could hack to work?

I'd like to program all of the chip in one go, from a bin file. I've
been searching the groups/web for some time now, and not much is
showing up.

Any ideas would be much appreciated. Thanks
 
On Jul 12, 3:44 am, lyndonams...@hotmail.com wrote:
Hi there,

I've got a Xilinx Spartan dev board, that has an onboard Atmel Flash
memory chip (AT49BV040A). It can't be removed from the board, and is
programmed in a parrallel, byte by byte (ie not a seriel protocol).

Are there any existing chunks of VHDL for programming the Flash chip
via something like an RS232 interface? Does anyone have one for some
other development board that I could hack to work?

I'd like to program all of the chip in one go, from a bin file. I've
been searching the groups/web for some time now, and not much is
showing up.

Any ideas would be much appreciated. Thanks
Your best bet would be to program it in 'C', not VHDL.

Build a PicoBlaze (or PacoBlaze) system, and port "just about any"
flash writing program.

G.
 
On Jul 12, 8:40 am, ghel...@lycos.com wrote:
On Jul 12, 3:44 am, lyndonams...@hotmail.com wrote:

Hi there,

I've got a Xilinx Spartan dev board, that has an onboard Atmel Flash
memory chip (AT49BV040A). It can't be removed from the board, and is
programmed in a parrallel, byte by byte (ie not a seriel protocol).

Are there any existing chunks of VHDL for programming the Flash chip
via something like an RS232 interface? Does anyone have one for some
other development board that I could hack to work?

I'd like to program all of the chip in one go, from a bin file. I've
been searching the groups/web for some time now, and not much is
showing up.

Any ideas would be much appreciated. Thanks

Your best bet would be to program it in 'C', not VHDL.

Build a PicoBlaze (or PacoBlaze) system, and port "just about any"
flash writing program.

G.
Huh? If I understand the OP he wants to program the Flash part
through the Spartan chip. He's (I think) looking for some VHDL code
that would take in RS232 and spit out the right protocol to stuff the
flash part. How in the world is a 'C' program going to help? Is
there a 'C' compliler out there for logic code???? Good gawd why am I
wasting my time with VHDL!

Shannon
 
Shannon wrote:

Huh? If I understand the OP he wants to program the Flash part
through the Spartan chip. He's (I think) looking for some VHDL code
that would take in RS232 and spit out the right protocol to stuff the
flash part. How in the world is a 'C' program going to help?
If the flash is not used to store the fpga image,
it is plausible that a soft core processor entity
could run a C program to bit-bang a flash programming
routine. Depends how the board is wired up.

-- Mike Treseler
 
On Jul 13, 9:50 am, Mike Treseler <mike_trese...@comcast.net> wrote:
Shannon wrote:
Huh? If I understand the OP he wants to program the Flash part
through the Spartan chip. He's (I think) looking for some VHDL code
that would take in RS232 and spit out the right protocol to stuff the
flash part. How in the world is a 'C' program going to help?

If the flash is not used to store the fpga image,
it is plausible that a soft core processor entity
could run a C program to bit-bang a flash programming
routine. Depends how the board is wired up.

-- Mike Treseler
Wacky!
 
On Jul 13, 10:11 am, Shannon <sgo...@sbcglobal.net> wrote:
On Jul 13, 9:50 am, Mike Treseler <mike_trese...@comcast.net> wrote:

Shannon wrote:
Huh? If I understand the OP he wants to program the Flash part
through the Spartan chip. He's (I think) looking for some VHDL code
that would take in RS232 and spit out the right protocol to stuff the
flash part. How in the world is a 'C' program going to help?

If the flash is not used to store the fpga image,
it is plausible that a soft core processor entity
could run a C program to bit-bang a flash programming
routine. Depends how the board is wired up.

-- Mike Treseler

Wacky!
Definitely not wacky. That's how all of the NIOS (I & II) boards made
by Altera program their flash. I would be surprised if Xilinx boards
were different.

Note to Mike: If the flash -was- used to store the FPGA image, then
the RTL to program the flash would be much harder, eh?

G.
 
ghelbig@lycos.com wrote:

Definitely not wacky. That's how all of the NIOS (I & II) boards made
by Altera program their flash. I would be surprised if Xilinx boards
were different.

Note to Mike: If the flash -was- used to store the FPGA image, then
the RTL to program the flash would be much harder, eh?
Yes, each chicken needs an egg.
Some flash or cpld has to be either
preprogrammed or programmable by
an external host.

-- Mike Treseler
 
On Jul 12, 6:44 am, lyndonams...@hotmail.com wrote:
Hi there,

I've got a Xilinx Spartan dev board, that has an onboard Atmel Flash
memory chip (AT49BV040A). It can't be removed from the board, and is
programmed in a parrallel, byte by byte (ie not a seriel protocol).

Are there any existing chunks of VHDL for programming the Flash chip
via something like an RS232 interface? Does anyone have one for some
other development board that I could hack to work?

I'd like to program all of the chip in one go, from a bin file. I've
been searching the groups/web for some time now, and not much is
showing up.

Any ideas would be much appreciated. Thanks
I think that the easiest way would be to use EDK with Microblaze to
program the flash. If you're lucky your board will come with a bsb
file (www.xilinx.com/ise/embedded/edk_bsb.htm), which can be used by
the EDK wizard to create a design without you having to write a single
line of code (VHDL or C).

Basically you use the wizard to build a system with Microblaze and the
flash interface. Then you use the menu item "Device Configuration/
Program Flash Memory". You will be asked for a bin file to load in
flash. The data will be transfered through the jtag interface and
programmed on the flash (with the application "flashwriter" running on
the Microblaze, which will all be done automatically for you).

To verify that the data was written properly, you can use the command
mrd in the debugger (XMD).

I did this recently to show a coworker this way to program a flash and
we were done in about 30 minutes (the board was from Avnet and had a
bsb file available).


Cheers,
Patrick
 
On 14 Jul, 02:57, Patrick Dubois <prdub...@gmail.com> wrote:
On Jul 12, 6:44 am, lyndonams...@hotmail.com wrote:

Hi there,

I've got a Xilinx Spartan dev board, that has an onboard Atmel Flash
memory chip (AT49BV040A). It can't be removed from the board, and is
programmed in a parrallel, byte by byte (ie not a seriel protocol).

Are there any existing chunks of VHDL for programming the Flash chip
via something like an RS232 interface? Does anyone have one for some
other development board that I could hack to work?

I'd like to program all of the chip in one go, from a bin file. I've
been searching the groups/web for some time now, and not much is
showing up.

Any ideas would be much appreciated. Thanks

I think that the easiest way would be to use EDK with Microblaze to
program the flash. If you're lucky your board will come with a bsb
file (www.xilinx.com/ise/embedded/edk_bsb.htm), which can be used by
the EDK wizard to create a design without you having to write a single
line of code (VHDL or C).

Basically you use the wizard to build a system with Microblaze and the
flash interface. Then you use the menu item "Device Configuration/
Program Flash Memory". You will be asked for a bin file to load in
flash. The data will be transfered through the jtag interface and
programmed on the flash (with the application "flashwriter" running on
the Microblaze, which will all be done automatically for you).

To verify that the data was written properly, you can use the command
mrd in the debugger (XMD).

I did this recently to show a coworker this way to program a flash and
we were done in about 30 minutes (the board was from Avnet and had a
bsb file available).

Cheers,
Patrick

Thanks for the responses. I should have been a bit clearer about the
use of Flash, it is just for storing data, not to use for programming
the Xilinx configuration on power up.

I will have a look into Patricks idea, but it seems my board vendor
(Enterpoint) doesn't have a BSB. I'm quite new to this kind of area,
so will read up about EDK.

The other possibility I found, also from Xilinx is this
http://www.xilinx.com/products/boards/s3astarter/files/s3ask_parallel_flash_programmer.pdf
Its a Flash programmer in VHDL with communications via RS232, which
seems ideal! That based on a picoblaze core and tiny uart.

Thanks for the help!
 

Welcome to EDABoard.com

Sponsor

Back
Top