configuring an Altera Cyclone 3

Hi,

I have an FPGA design that works from JTAG, and now I want to burn a serial flash chip so it will configure itself at powerup. The mode pins should be right for serial self-load, and we'll be using a standard serial flash chip, an M25P16. We have a B&K USB flash burner.

I've read the Altera lit and it's not entirely clear to me, so I'd appreciate some help.

What Altera file format should I use to burn the serial flash chip? RBF? RPD? Should I tell the programmer to swap ends on bytes or words?

Thanks

John

--

John Larkin, President
Highland Technology, Inc

jlarkin at highlandtechnology dot com
http://www.highlandtechnology.com

Precision electronic instrumentation
Picosecond-resolution Digital Delay and Pulse generators
Custom laser controllers
Photonics and fiberoptic TTL data links
VME thermocouple, LVDT, synchro   acquisition and simulation
Reply to
John Larkin
Loading thread data ...

Why don't you use the Altera EPCS16 or whatever will support your size device? Connect up to the FPGA with a download socket, configure the MSEL pins as per your IO block volts - use AS mode. Use a Terasic USB Blaster, the quartus programmer and the POF file and your good to go.

- see the device programming section in the Cyclone III manual.

Andy

Reply to
Andy Bartlett

We want our production people to do this the way they do everything else: program the plugin flash chip at their device programming station, plug it into the board, test and ship. So we want to formally release a file that can be burned into the flash chip on a production basis.

I have, and it's not all clear to me. I was hoping that someone here could help, so that I didn't have to try different file formats and byte swaps until I got it to configure.

Thanks

--

John Larkin, President
Highland Technology, Inc

jlarkin at highlandtechnology dot com
http://www.highlandtechnology.com

Precision electronic instrumentation
Picosecond-resolution Digital Delay and Pulse generators
Custom laser controllers
Photonics and fiberoptic TTL data links
VME thermocouple, LVDT, synchro   acquisition and simulation
Reply to
John Larkin

L
,

One possible way is to use sof2flash utility supplied with Nios2 SDK. I generates .flash file in Motorola S3 format. Then, if you want, you can convert to intel hex or to plain binary with standard objcopy utility.

But programming the way you chose is certainly not the fastest. One of faster ways is:

1, Create small FPGA design that contains only nios2 processor and Altera's epcs component.
  1. Load it to your Cyclon with quartus programmer.
  2. Burn flash with nios2-flash-programmer utility.
Reply to
Michael S

OK, I got it to work:

Get the THING.RBF file from the Altera software. Bit-swap all the bytes and save as THING.ROM. Program that into an M25P16 serial flash chip on the B&K USB programmer. Plug that in.

I wrote a little Windows command-line bit swapper program if anybody wants it.

--

John Larkin, President
Highland Technology, Inc

jlarkin at highlandtechnology dot com
http://www.highlandtechnology.com

Precision electronic instrumentation
Picosecond-resolution Digital Delay and Pulse generators
Custom laser controllers
Photonics and fiberoptic TTL data links
VME thermocouple, LVDT, synchro   acquisition and simulation
Reply to
John Larkin

My experience on the last part is, you may just have to experiment to find out. We used a 16-bit parallel flash in byte mode once and had a CPLD read the flash in byte mode and push the data to the FPGA (Virtex 4 from Xilinx).

The problem was, there was just no information on the flash data sheet about the byte order in byte mode. So we experimented and figured out which way the data should be in the flash, writing the flash with the on board software at that point. And of course when we wanted to write the flash with a programmer, things were the opposite of the software situation... Byte swap was explicitly done in software, but somehow the flash programmer needed byte swap off to create the same flash contents.

Reply to
Anssi Saari

usually the rbf and rpd are used when you want to save the fpga image elsewhere (eg. in flash device attached to processor. processor reads the image from flash and configures the fpga). in your case the serial flash is attached directly to the fpga so the fpga should be set to active serial configuration (on boot up, fpga will read the flash and configures itself). thus, you can generate a POF for active serial and use your usb flash burner to write the POF into the flash.

there is another alternative to write into the flash which is indirect jtag programming where you can write the flash using jtag programmer.

btw, you don't really need to byte swap for altera's fpga.

Reply to
Jack Leong

I had to *bit swap* the .RBF file to get it to work.

--

John Larkin, President       Highland Technology Inc
www.highlandtechnology.com   jlarkin at highlandtechnology dot com   

Precision electronic instrumentation
Picosecond-resolution Digital Delay and Pulse generators
Custom timing and laser controllers
Photonics and fiberoptic TTL data links
VME  analog, thermocouple, LVDT, synchro, tachometer
Multichannel arbitrary waveform generators
Reply to
John Larkin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.