openFPGALoader
openFPGALoader copied to clipboard
Renaming a file can make download both fail and be slow
I have two files that are identical except for name:
√ Litex % cmp -l sipeed_tang_primer_20k.fs sipeed_tang_primer_20k.fs.turtleslow
√ Litex % diff sipeed_tang_primer_20k.fs sipeed_tang_primer_20k.fs.turtleslow
√ Litex %
Yet, when I program them, the times are VASTLY different and the slower one actually fails to program:
openFPGALoader -f -r -b tangprimer20k sipeed_tang_primer_20k.fs 0.56s user 3.34s system 28% cpu 13.830 total
...
openFPGALoader -f -r -b tangprimer20k sipeed_tang_primer_20k.fs.turtleslow 4.57s user 27.30s system 28% cpu 1:51.72 total
I have no idea why. Bitstreams included below.
Thanks.
√ Litex % time openFPGALoader -f -r -b tangprimer20k sipeed_tang_primer_20k.fs
empty
write to flash
Jtag frequency : requested 6.00MHz -> real 6.00MHz
Parse file Parse sipeed_tang_primer_20k.fs:
Done
DONE
after program flash: displayReadReg 00006020
Memory Erase
Done Final
Security Final
Erase SRAM DONE
Jtag probe limited to %d MHz6000000
Jtag frequency : requested 10.00MHz -> real 6.00MHz
Detail:
Jedec ID : 0b
memory type : 20
memory capacity : 17
Detail:
Jedec ID : 0b
memory type : 40
memory capacity : 17
RDSR : 0x00
WIP : 0
WEL : 0
BP : 0
TB : 0
SRWD : 0
flash chip unknown: use basic protection detection
start addr: 00000000, end_addr: 000e0000
Erasing: [==================================================] 100.00%
Done
Writing: [==================================================] 100.00%
Done
openFPGALoader -f -r -b tangprimer20k sipeed_tang_primer_20k.fs 0.56s user 3.34s system 28% cpu 13.830 total
√ Litex % time openFPGALoader -f -r -b tangprimer20k sipeed_tang_primer_20k.fs.turtleslow
empty
write to flash
Jtag frequency : requested 6.00MHz -> real 6.00MHz
Parse file DONE
after program flash: displayReadReg 00006020
Memory Erase
Done Final
Security Final
Erase SRAM DONE
Jtag probe limited to %d MHz6000000
Jtag frequency : requested 10.00MHz -> real 6.00MHz
Detail:
Jedec ID : 03
memory type : 40
memory capacity : 17
Detail:
Jedec ID : 0b
memory type : 40
memory capacity : 17
RDSR : 0x00
WIP : 0
WEL : 0
BP : 0
TB : 0
SRWD : 0
flash chip unknown: use basic protection detection
start addr: 00000000, end_addr: 006f0000
Erasing: [==================================================] 100.00%
Done
Writing: [==================================================] 100.00%
Done
openFPGALoader -f -r -b tangprimer20k sipeed_tang_primer_20k.fs.turtleslow 4.57s user 27.30s system 28% cpu 1:51.72 total
Hi,
could you try to add --file-type fs to see if the issue is fixed?
In fact openFPGALoader uses file extension or --file-type to open the file with the best file Parser.