Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Code for programming Flash memory

Reply
Thread Tools

Code for programming Flash memory

 
 
lyndonamsdon@hotmail.com
Guest
Posts: n/a
 
      07-12-2007
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

 
Reply With Quote
 
 
 
 
ghelbig@lycos.com
Guest
Posts: n/a
 
      07-12-2007
On Jul 12, 3:44 am, (E-Mail Removed) 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.

 
Reply With Quote
 
 
 
 
Shannon
Guest
Posts: n/a
 
      07-13-2007
On Jul 12, 8:40 am, (E-Mail Removed) wrote:
> On Jul 12, 3:44 am, (E-Mail Removed) 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

 
Reply With Quote
 
Mike Treseler
Guest
Posts: n/a
 
      07-13-2007
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
 
Reply With Quote
 
Shannon
Guest
Posts: n/a
 
      07-13-2007
On Jul 13, 9:50 am, Mike Treseler <(E-Mail Removed)> 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!

 
Reply With Quote
 
ghelbig@lycos.com
Guest
Posts: n/a
 
      07-13-2007
On Jul 13, 10:11 am, Shannon <(E-Mail Removed)> wrote:
> On Jul 13, 9:50 am, Mike Treseler <(E-Mail Removed)> 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.

 
Reply With Quote
 
Mike Treseler
Guest
Posts: n/a
 
      07-13-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
Patrick Dubois
Guest
Posts: n/a
 
      07-14-2007
On Jul 12, 6:44 am, (E-Mail Removed) 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

 
Reply With Quote
 
lyndonamsdon@hotmail.com
Guest
Posts: n/a
 
      07-16-2007
On 14 Jul, 02:57, Patrick Dubois <(E-Mail Removed)> wrote:
> On Jul 12, 6:44 am, (E-Mail Removed) 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/board...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!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GUI Programming by hand not code with Python Code Guest Python 5 07-09-2008 11:20 AM
Corsair Flash Memory seems OUTRAGEOUS wasteful of memory space...! ship Digital Photography 3 11-19-2005 07:26 AM
Corsair Flash Memory seems OUTRAGEOUS wasteful of memory space...! ship Digital Photography 9 11-17-2005 08:07 AM
Differences between Sony Memory Stick & memory Stick Pro vs Memory Stick Duo? zxcvar Digital Photography 3 11-28-2004 10:48 PM
When programming with Visual Studio in code. What means the Label in code? Andreas Klemt ASP .Net 2 01-14-2004 06:49 AM



Advertisments