trabucayre / openFPGALoader

Universal utility for programming FPGA
https://trabucayre.github.io/openFPGALoader/
Apache License 2.0
1.16k stars 249 forks source link

Programming SRAM fails on USB-Blaster with Cyclone V #129

Closed hansfbaier closed 2 years ago

hansfbaier commented 2 years ago
$ openFPGALoader -c usb-blaster --write-sram build/qmtech_5cefa2/gateware/qmtech_5cefa2.sof
write to ram
Can't program SPI flash: missing device-package information
Fail to load bridge

Also it tries to program SPI flash, when I want to program the SRAM instead.

trabucayre commented 2 years ago

There is two issue with your commandline:

  1. sof is not supported. The best way is to convert to rbf (without compression). Since sof is unknown openFPGALoader considers you want to store a binary data into flash but ;
  2. with altera/intel and xilinx SPI flash needs a bridge JTAG<->SPI: this bitstream depends on target FPGA -> you need to provides --fpga-part or simply using -b with a board name (see --list-boards).

All details (but maybe needs to be improved) are here.

Try:

$ quartus_cpf  --option=bitstream_compression=off -c build/qmtech_5cefa2/gateware/qmtech_5cefa2.sof \
                     build/qmtech_5cefa2/gateware/qmtech_5cefa2.rbf
# SRAM:
$ openFPGALoader -c usb-blaster -b qmtechCycloneV build/qmtech_5cefa2/gateware/qmtech_5cefa2.rbf
# flash:
$ openFPGALoader  -f -c usb-blaster -b qmtechCycloneV build/qmtech_5cefa2/gateware/qmtech_5cefa2.rbf
trabucayre commented 2 years ago

It's works now?

trabucayre commented 2 years ago

Can I close this issue ? Thanks

hansfbaier commented 2 years ago

Oh I lost track of this issue. I still would have to test. Thanks for the solution! Will be helpful to others too. Will reopen, if I should encounter problems.

trabucayre commented 2 years ago

Don't worry! I have to complete specific .md files and the FAQ with most common issues to help people with this type of situation. Thanks