openFPGALoader/doc/lattice.md

1.8 KiB

Lattice notes

MachXO2/MachXO3

Flash memory:

.jed file is the default format generated by Lattice Diamond, so nothing special must be done to generates this file.

file load:

openFPGALoader [-b yourboard] impl1/*.jed

where yourboard may be:

  • machX02EVN
  • machXO3SK

SRAM:

To generates .bit file Bitstream file must be checked under Exports Files in Lattice Diamond left panel.

file load:

openFPGALoader [-b yourboard] impl1/*.bit

where yourboard may be:

  • machX02EVN
  • machXO3SK

iCE40

.bin is the default format generated by nextpnr, so nothing special must be done.

Since most ice40 boards uses the same pinout between FTDI and SPI flash a generic ice40_generic board is provided.

For the specific case of the iCE40HXXK-EVB where no onboard programmer is present, please use this:

FTDI iCE40HXXK-EVB
SCK (ADBUS0) Pin 9
SI (ADBUS1) Pin 8
SO (ADBUS2) Pin 7
CS (ABDUS4) Pin 10
RST (ADBUS6 Pin 6
DONE (ADBUS7) Pin 5

bin file load

openFPGALoader -b ice40_generic /somewhere/*.bin

Since it's a direct access to the flash (SPI) the -b option is required.

SRAM:

openFPGALoader [-b yourBoard] [-c yourCable] -m project_name/*.bit

By default, openFPGALoader load bitstream in memory, so the '-m' argument is optional

SPI Flash:

bit

openFPGALoader [-b yourBoard] [-c yourCable] -f project_name/*.bit # or *.bin

mcs

To generates .mcs file PROM File must be checked under Exports Files in Lattice Diamond left panel.

openFPGALoader [-b yourBoard] [-c yourCable] project_name/*.mcs