Code for programming Flash memory

Discussion in 'VHDL' started by lyndonamsdon@hotmail.com, Jul 12, 2007.

  1. 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
    , Jul 12, 2007
    #1
    1. Advertising

  2. Guest

    On Jul 12, 3:44 am, 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.
    , Jul 12, 2007
    #2
    1. Advertising

  3. Shannon Guest

    On Jul 12, 8:40 am, wrote:
    > On Jul 12, 3:44 am, 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, Jul 13, 2007
    #3
  4. 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
    Mike Treseler, Jul 13, 2007
    #4
  5. Shannon Guest

    On Jul 13, 9:50 am, Mike Treseler <> 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!
    Shannon, Jul 13, 2007
    #5
  6. Guest

    On Jul 13, 10:11 am, Shannon <> wrote:
    > On Jul 13, 9:50 am, Mike Treseler <> 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.
    , Jul 13, 2007
    #6
  7. 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
    Mike Treseler, Jul 14, 2007
    #7
  8. On Jul 12, 6:44 am, 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
    Patrick Dubois, Jul 14, 2007
    #8
  9. Guest

    On 14 Jul, 02:57, Patrick Dubois <> wrote:
    > On Jul 12, 6:44 am, 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!
    , Jul 16, 2007
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bernie
    Replies:
    0
    Views:
    531
    Bernie
    Sep 5, 2004
  2. MiniMe
    Replies:
    0
    Views:
    438
    MiniMe
    Mar 27, 2006
  3. Jim Higson
    Replies:
    1
    Views:
    501
    Jim Higson
    Sep 21, 2004
  4. Replies:
    8
    Views:
    23,475
    SABOND21
    Feb 9, 2012
  5. Replies:
    1
    Views:
    3,551
    Guillaume Zin
    Jul 19, 2006
Loading...

Share This Page