configuring an Altera Cyclone 3

J

John Larkin

Guest
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
 
"John Larkin" <jlarkin@highlandtechnology.com> wrote in message
news:3v42l7t4eij7lq6hqj0ui6vmepg744fsup@4ax.com...
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
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
 
On Fri, 2 Mar 2012 19:20:48 -0000, "Andy Bartlett"
<andyb@nospamming.net> wrote:

"John Larkin" <jlarkin@highlandtechnology.com> wrote in message
news:3v42l7t4eij7lq6hqj0ui6vmepg744fsup@4ax.com...


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


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.
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.

- see the device programming section in the Cyclone III manual.
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
 
On Mar 2, 9:40 pm, John Larkin <jlar...@highlandtechnology.com> wrote:
On Fri, 2 Mar 2012 19:20:48 -0000, "Andy Bartlett"

an...@nospamming.net> wrote:

"John Larkin" <jlar...@highlandtechnology.com> wrote in message
news:3v42l7t4eij7lq6hqj0ui6vmepg744fsup@4ax.com...

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

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.

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.



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

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 comhttp://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
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.
2. Load it to your Cyclon with quartus programmer.
3. Burn flash with nios2-flash-programmer utility.
 
On Fri, 02 Mar 2012 10:39:34 -0800, John Larkin
<jlarkin@highlandtechnology.com> wrote:

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

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
 
John Larkin <jlarkin@highlandtechnology.com> writes:

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?
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.
 
On Mar 4, 5:20 pm, Anssi Saari <a...@sci.fi> wrote:
John Larkin <jlar...@highlandtechnology.com> writes:
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?

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.
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.
 
On Thu, 8 Mar 2012 07:46:12 -0800 (PST), Jack Leong
<jacksw.leong@gmail.com> wrote:

On Mar 4, 5:20 pm, Anssi Saari <a...@sci.fi> wrote:
John Larkin <jlar...@highlandtechnology.com> writes:
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?

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.

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.
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
 

Welcome to EDABoard.com

Sponsor

Back
Top