Open uint69-t opened 7 months ago
UPDATE:
I was looking at https://github.com/trabucayre/openFPGALoader/issues/129, using a RBF file without compression kind of works, the light in the board make a blink and the console does not report any errors but the FPGA still does nothing. (The code is known to work since i've loaded it from Quartus II and it works, openFPGALoader seems to be very close, but for some reason it does not work yet)
I also tried loading a .cdf file like quartus_pgm does but openFPGALoader yields:
empty
write to ram
file has an unknown type:
please use rbf or svf file
or use --write-flash with: -b board_name or --fpga_part xxxx
Error: Failed to claim FPGA device: Error: wrong file
IT WORKS!!
Reading around the repo, i saw a mention of a intel.md in doc/, so i went to the first commit, found the file and noticed that SVF files are supported, it took me a while to find how to generate them (since in the old Quartus II 13.0sp1 that is the last to support the Cyclone II family, it is hidden under some settings of the device), but once i generated it, i ran:
sudo ./openFPGALoader -c usb-blaster -m /shared/blink.svf
And the console replied:
empty
write to ram
USB-BlasterI has a 24MHz fixed frequency
end of SVF file
And the board is alive and the code is working perfectly, im not sure why SVF files work and RBF dont, but it doesn't matter.
I can confirm that just adding the line:
{0x020b10dd, {"altera", "cyclone II", "EP2C5", 10}},
Will correctly add support for the Cyclone II family but i would suggest adding a little more documentation to how to generate the .svf file since its not easy.
This resource helped me: https://stackoverflow.com/a/42827113/15924727
Hi and thanks to report this family is working using svf. In your first tries you have tried to flash bitstream into SPI, but this operation requires to have a specific bitstream as a bridge JTAG<->SPI: no spiOverJtag bitsreams are availables for this family and the one for cyclone V isn't compatible. Have you try :
sudo ./openFPGALoader -c usb-blaster -m /shared/mass_blink.rbf
ie without --write-flash
: to load into memory instead of flash?
I tried both, if you check the link to the board, it has two JTAG headers, one writes to a FLASH and the other writes to the FPGA (so when power its interrupted, the FPGA is blank again) I did not managed to write to the flash, and only one JTAG header (the direct FPGA one) seems responsive, the other just reports a TDO stuck at 0 error.
As you can see in the diagram of the board PDF It uses the EPCS4SI8, it would be interesting to find a way to write the flash, but already just having the SRAM its awesome.
And abut the RBF, maybe Quartus changed something abut the standard in some version, or im not sure, both RBF and SVF load without any error, but the SVF works and RBF does not.
I'm mitigate to order this board. I have no real use for an old/obsolete device, but in other hand the behaviour is strange. In fact there is no to jtag header but only one dedicated to the FPGA, second header is to have a direct access to the flash chip. Maybe this FPGA has a different set of instructions and not understand instructions for cyclone III/IV/V ?
It might be that the Cyclone II family managed FLASH in a different way or that its a lot cheaper just plug another JTAG header just for the flash, if you connect the USB-Blaster to the FLASH JTAG, you write to the FLASH and after a reboot the FPGA will read from FLASH, but if you plug it to RAM, you work directly in the FPGA (after a reboot everything is gone). But its truly weird that a FLASH chip its connected directly to a JTAG interface since the programming process from Quartus II its exactly the same.
And i know there is not a lot of use for this old FPGAs/CPLDs, but since they are so cheap (I picked up 20 MAX II CPLDs from aliexpress for 10 USD the other day) they are interesting to build distributed systems.
Hey, im trying to add support for the classic Cyclone II (its a very very common entry board to FPGA field) This is the board that im trying to support: https://www.ebay.com/itm/355257902298?mkcid=16&mkevt=1&mkrid=711-127632-2357-0&ssspo=kebs3p_ksj2&sssrc=2047675&ssuid=&widget_ver=artemis&media=COPY
I added the line:
But running:
sudo ./openFPGALoader -c usb-blaster --write-flash blink.bit
Yields:
But if i run:
sudo ./openFPGALoader -c usb-blaster --detect
I get:I readed in another issue and i tried:
sudo ./openFPGALoader -b qmtechCycloneV -c usb-blaster --write-flash /shared/mass_blink.bit
(I know that this is not a Cyclone V but idk, i was just trying) And it loaded but i got:If anyone can give me a hint about where to look, i will test it and make the PR, i think this is a very very cheap board, you can find the basic schematics of the base board that i shared and Quartus II is free and does not require a license that i think its pretty cool.
Thanks for the time.