Compare commits

...

333 Commits

Author SHA1 Message Date
Gwenhael Goavec-Merou b76840b20d doc/FPGAs.yml: added Kintex UltraScale+ reference 2025-11-05 18:43:38 +01:00
Gwenhael Goavec-Merou 530b7a9993
Merge pull request #593 from AEW2015/master
basic PDI prog for Spartan Ultrascale+
2025-10-23 06:50:14 +02:00
Andrew E Wilson 648a4a833a basic PDI prog for Spartan Ultrascale+ 2025-10-23 06:44:19 +02:00
Gwenhael Goavec-Merou 03be134cdd
Merge pull request #591 from hennomann/patch-1
Update part.hpp to support Lattice LFE3-150EA device
2025-10-02 12:02:15 +02:00
hennomann 617cd29dff
Update part.hpp to support Lattice LFE3-150EA device
This PR adds device ID support for the Lattice ECP3 LFE3-150EA.
Previously, only the LFE3-70E was supported.

We've tested the implementation and confirmed it works as expected.
We're happy to contribute to expanding ECP3 device support!
2025-10-02 11:32:19 +02:00
Gwenhael Goavec-Merou 205e6f9ea5 spiOverJtag/build.py: fixed model value for kintex7 with ISE 2025-09-25 17:09:38 +02:00
Gwenhael Goavec-Merou f8ae76e771 spiOverJtag/build.py: added default value for pkg variable 2025-09-25 15:47:48 +02:00
Gwenhael Goavec-Merou 8694b3c295 board: added HyVision PCIe OPT01 rev.F (Kintex7 xc7k70tfbg676) 2025-09-24 16:56:46 +02:00
Gwenhael Goavec-Merou a7b72321fe spiOverJtag: added xc7k70tfbg676 variant 2025-09-24 16:48:02 +02:00
Gwenhael Goavec-Merou 8e6eb1085c spiOverJtag/build.py: simplify Kintex7 uses 2025-09-24 16:46:57 +02:00
Gwenhael Goavec-Merou 13cf0c59b9 xilinx: load_bridge: uses configBitstreamParser getFilename to print real name instead of theorical (with or without .gz) 2025-09-24 08:07:27 +02:00
Gwenhael Goavec-Merou 6935936a92 configBitstreamParser: added filename getter 2025-09-24 08:06:28 +02:00
Gwenhael Goavec-Merou 39b3ca5871 spiInterface: all methods: added a \n after command displayed (avoids unclear message when calee methods uses printxxx) 2025-09-24 08:06:06 +02:00
Gwenhael Goavec-Merou fdc9edc6cb spiOverJtag/xilinx_spiOverJtag.v: spartan3e: spi_drck -> drck 2025-09-22 10:18:24 +02:00
Gwenhael Goavec-Merou 29a5bc3515 spiOverJtag/xilinx_spiOverJtag.v: fixed code for virtex6 targets 2025-09-20 18:05:55 +02:00
Gwenhael Goavec-Merou 6df4bce1fd xilinx: allows Flash write for Xilinx Spartan3 targets 2025-09-20 17:31:32 +02:00
Gwenhael Goavec-Merou 1ccc2a0d5b spiOverJtag/xilinx_spiOverJtag.v: can't declare spi_clk for spartan3e device. Fixed sck assign for spartan3e 2025-09-20 17:30:10 +02:00
Gwenhael Goavec-Merou 5e67fee9f5 spiOverJtag/build.py: gzip file must be produces for all Xilinx devices 2025-09-17 20:16:03 +02:00
Gwenhael Goavec-Merou 06b4e2f143 spiOverJtag/xilinx_spiOverJtag.v: don't redeclares tdo for spartan3e 2025-09-17 11:55:52 +02:00
Gwenhael Goavec-Merou 1fc7539538 Prepare v1.0.0 release 2025-09-12 16:00:32 +02:00
Gwenhael Goavec-Merou e2c55f24c0 part: fixed cyclone III/IV/10 LP IDCODE (same code for all families) 2025-09-12 13:26:36 +02:00
Andy c102426b78
Add altera EP4CE30 (#584) 2025-09-08 08:34:37 +02:00
Gwenhael Goavec-Merou 2e12478a65 99-openfpgaloader.rules: added Altera usb-blasterIII rule 2025-09-03 17:34:49 +02:00
Gwenhael Goavec-Merou 19a8df433a .github/workflows/Test.yml: fixed CI with windows (msys2/setup-msys2 master looks broken) 2025-09-03 17:34:19 +02:00
Patrick Urban cfddee3611
colognechip: add bulk erase + quad enable features and simplify spi_wait overload (#582)
* colognechip: add bulk erase + quad enable features and simplify spi_wait overload

* colognechip: remove unnecessary code in `set_quad_bit` and `bulk_erase_flash`
2025-09-03 16:26:16 +02:00
Gwenhael Goavec-Merou 501d37e351
Merge pull request #581 from pu-cc/at25ql321
spiFlashdb: add AT25QL321
2025-09-03 14:38:11 +02:00
Gwenhael Goavec-Merou 26849d089b
Merge pull request #580 from pu-cc/fix-spiflash-qen
spiFlash: mask RDSR_WIP instead of RDSR_WEL while waiting for completion
2025-09-03 14:37:16 +02:00
Patrick Urban 41e4a93f80 spiFlashdb: add AT25QL321 2025-09-03 14:11:28 +02:00
Patrick Urban db64ec92cb spiFlash: mask RDSR_WIP instead of RDSR_WEL while waiting for completion 2025-09-03 13:55:31 +02:00
Gwenhael Goavec-Merou bdcdea9a2f cable: added altera usb blaster III variant 2025-08-27 18:26:17 +02:00
Gwenhael Goavec-Merou 46a0560927 display: std::endl -> \n 2025-08-26 17:51:31 +02:00
Gwenhael Goavec-Merou 850c3d74e0 progressBar: added eol for each progressBar update when no STDOUT_FILENO 2025-08-26 17:49:01 +02:00
Gwenhael Goavec-Merou 2580aed994 esp_usb_jtag: added support for https://github.com/espressif/esp-usb-bridge + small adjusts 2025-08-25 09:38:00 +02:00
Gwenhael Goavec-Merou c818641cae main: list_boards: print 'Undefined' when fpga_part or cable_name is empty 2025-08-07 11:00:49 +02:00
Gwenhael Goavec-Merou bc864100ff main: list_boards now displays fpga_part too 2025-08-07 09:53:28 +02:00
Gwenhael Goavec-Merou 6a1e0ff65e
Merge pull request #575 from 0xDRRB/master
Add Altera Cyclone 10 LP 10CL080 support
2025-07-29 09:58:31 +02:00
Denis Bodor c51c53ee33 Add Altera Cyclone 10 LP 10CL080 2025-07-28 13:27:06 +02:00
Gwenhael Goavec-Merou a53aedb137 gowin: added (undocumented) sequence to be performed when CRC Error bit is set 2025-07-20 10:23:19 +02:00
Gwenhael Goavec-Merou 42a4801180 cable: added Altera USB Blaster III (missing link in doc 2025-07-20 09:36:53 +02:00
Gwenhael Goavec-Merou 388f0b4c90 spiFlashdb: added XTX XT25F32B-S chip 2025-07-20 09:32:12 +02:00
Gwenhael Goavec-Merou 5997c202fc 99-openfpgaloader.rules: added entry for ULX3S/ULX4M (DFU mode) 2025-07-19 09:45:26 +02:00
Gwenhael Goavec-Merou b99672b69e board: added ULX4M (DFU) 2025-07-19 09:45:04 +02:00
Gwenhael Goavec-Merou 5e91e20e29
Merge pull request #571 from pu-cc/gatemate-jtag-bypass
colognechip: Simplify handling of JTAG bypass bits
2025-07-10 09:43:50 +02:00
Patrick Urban 3b932dc542 colognechip: Simplify number of jtag bypass bits 2025-07-09 16:13:18 +02:00
Gwenhael Goavec-Merou 3b1a40b798 part.hpp: MAX10: only keep size+Single(S)/Dual-supply(D). Sort between single-supply and dual-supply 2025-07-04 07:28:05 +02:00
Gwenhael Goavec-Merou 880ed6f5c9
Merge pull request #568 from csantosb/master
Document use of udev rules under GuixSystem
2025-07-03 10:52:03 +02:00
Cayetano Santos 626084947d
doc/guide/install.rst: udev rules instructions under GuixSystem. 2025-07-03 10:43:40 +02:00
Gwenhael Goavec-Merou 4bd9840e46 altera: fix Wc99-designator 2025-07-02 07:17:17 +02:00
Gwenhael Goavec-Merou b06220f71f spiOverJtag/build.py: added default value for model variable 2025-06-30 18:26:59 +02:00
Gwenhael Goavec-Merou b2aa12b582 spiFlash, spiFlashdb: added global_lock flag and uses it instead of jedec_id (#566) 2025-06-30 18:26:22 +02:00
Gwenhael Goavec-Merou afb7bbeec2
Merge pull request #565 from ziyao233/cmsisdap/avoid-memcpy-on-overlapping-buffer
cmsisDAP: Avoid memcpy() on possibly overlapping buffer
2025-06-30 10:15:35 +02:00
Yao Zi a1ea0c98fc cmsisDAP: Avoid memcpy() on possibly overlapping buffer
I observed strange cmsisDAP behavior when building openFPGALoader with
Clang/musl in release mode: CmsisDAP:display_info() shows the correct
hardware capability that supports JTAG,

	...
	firmware version : 0254
	hardware capabilities : 13
	SWO trace buffer size : NA
	...

but the detection of JTAG fails in the constructor with a strange
response sequence,

	Hardware cap 00 01 00
	JTAG init failed with: JTAG is not supported by the probe

With some digging, it's found that the CmsisDAP::xfer() method without
an instruction parameter may be called by the constructor with a rx_buff
pointer overlapping with _ll_buffer, for which memmove() instead of
memcpy() should be used. The behavior of memcpy() is undefined when dst
and src overlap.

Fixes: 53c5d35da6 ("add cmsis dap (hid) support")
Signed-off-by: Yao Zi <ziyao@disroot.org>
2025-06-28 11:53:25 +00:00
Gwenhael Goavec-Merou e3e93a394e main: SPI mode without board: check file_size (must be > 0) 2025-06-25 19:21:46 +02:00
Gwenhael Goavec-Merou dd3204a6e0 main, board: added --pins argument compatible with SPI mode 2025-06-25 19:10:13 +02:00
Gwenhael Goavec-Merou 319c08e841 latticeSSPI: uses registers struct for status 2025-06-19 09:51:44 +02:00
Gwenhael Goavec-Merou dede406ebc latticeSSPI: ECP5 driver for Slave SPI mode 2025-06-19 08:34:29 +02:00
Gwenhael Goavec-Merou 21d4fccf28 altera,libusb_ll,mcsParser: fix some compiler's warnings 2025-06-19 08:30:35 +02:00
Gwenhael Goavec-Merou 803bdfecce altera: MAX10: added --flash-sector support with arbitrary binary file 2025-06-18 18:57:26 +02:00
Gwenhael Goavec-Merou 10fbb8a153 doc/FPGAs,doc/vendors/lattice: added Lattice ECP3 2025-06-18 16:25:40 +02:00
Gwenhael Goavec-Merou 775477ba8e part: added Lattice ECP3 LFE3-70E 2025-06-18 16:20:32 +02:00
Gwenhael Goavec-Merou a7b56c3732 lattice: added ECP3 family support (SRAM only) 2025-06-18 16:20:23 +02:00
Gwenhael Goavec-Merou 3d7cb14195 README.md: added list of sponsors (hardware/boards and/or features funder) 2025-06-18 15:33:11 +02:00
Gwenhael Goavec-Merou 098cdd466a jtag: allows caller to specify tdi level in toggleClk method 2025-06-18 10:01:16 +02:00
Gwenhael Goavec-Merou f41f85b9d4 doc/cable: added arm-usb-tiny-h reference 2025-06-12 09:51:21 +02:00
Gwenhael Goavec-Merou 586d30d6eb
Merge pull request #563 from jmi2k/arm-usb-tiny-h
Add cable support for ARM-USB-TINY-H based off ARM-USB-OCD-H
2025-06-12 07:59:15 +02:00
José Miguel Sánchez García 3723bf7571 Add cable support for ARM-USB-TINY-H based off ARM-USB-OCD-H 2025-06-10 21:54:54 +02:00
Gwenhael Goavec-Merou 347088efb4 ice40: Reuses prepare_flash_access/post_flash_access as much as possible. Removed dupplicated Flash dump informations. Be coherent to status message 2025-06-08 07:20:00 +02:00
Gwenhael Goavec-Merou 2e1c7e29a4 spiFlash: cosmetic 'Read flash ' -> 'Reading' (#558) 2025-06-08 07:01:14 +02:00
Gwenhael Goavec-Merou 765ed526e3 spiFlash: dump: honour _verbose level 2025-06-04 21:38:00 +02:00
Gwenhael Goavec-Merou 32f744979c ice40: uses verbose_level for SPIFlash instead of verbose/quiet (#555) 2025-06-03 11:26:38 +02:00
Gwenhael Goavec-Merou c6d4a8bff1 device: added verbose_level attribute 2025-06-03 11:24:36 +02:00
Gwenhael Goavec-Merou 5f6c1bfcd4
Merge pull request #543 from trabucayre/spiOverJtag_v2
SpiOverJtag v2
2025-05-29 08:41:10 +02:00
Gwenhael Goavec-Merou 6c4a48f445 spiOverJtag: reworks Artix and Spartan 7 approach:
For a specific FPGA size, pins name is only a matter of package,
 internally physical pads are the same: a unique bitstream per size is
 necessary. This also simplify build.py by removing complexity to
 extract model, size and package.

 - a dict is added with supported packages per size
 - only one bitstream is produces for artix/spartan7 size, package+size bitstreams are only symlinks.
 - constraints files are also updated with BSCANE2/DRCK clocks constraints
 - the gz is produces by build.py instead of by the Makefile
 - all possibles bitstreams for XC7A/XC7S are now present.
2025-05-26 09:53:25 +02:00
Gwenhael Goavec-Merou 589b161d4e spiOverJtag/.gitignore: ignore vivado files 2025-05-26 09:53:20 +02:00
Gwenhael Goavec-Merou 03045dc407 xilinx: adapted code to support existing spiOverJtag bitstreams (v1) and new bitstreams (v2) 2025-05-26 09:53:10 +02:00
Gwenhael Goavec-Merou ba48d53409 main: added detect_flash in SPI Mode and with a manufacturer 2025-05-24 07:50:51 +02:00
Gwenhael Goavec-Merou e135f1820b ice40: added detect_flash support 2025-05-24 07:48:21 +02:00
Gwenhael Goavec-Merou 10ba59c1ec libusb_ll,ftdipp_mpsse: Bus and Device must be both == 0 to use filter or uses VID/PID 2025-05-24 07:46:58 +02:00
Gwenhael Goavec-Merou 6c4dbe94cc
Merge pull request #553 from cheyao/master
Add support for icepi zero
2025-05-23 07:27:18 +02:00
Cyao 7c423c15fd Add icepi zero to board.hpp 2025-05-23 07:02:44 +02:00
Cyao e587a7f1c7 Add icepi zero to the boards documentation 2025-05-23 07:00:34 +02:00
Gwenhael Goavec-Merou f08454926a
Merge pull request #552 from pigmoral/eg4d20
Fix the failure of old Anlogic Cable and add support for Anlogic EG4D20EG176
2025-05-23 06:57:37 +02:00
Junhui Liu 5fefbb39af Add support for MILIANKE-S200-EG4D20 and update document
Add board definition and FPGA part ID for the MILIANKE S200 EG4D20
development board. Also update related documentation and outdated URL.

Tested ok by loading bitstream to SRAM and FLASH.

Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
2025-05-22 11:05:51 +08:00
Junhui Liu 951db00617 anlogicCable: Fix wrong ANLOGICCABLE_VIDv1
ANLOGICCABLE_VIDv1 should keep the old ANLOGICCABLE_VID to compatible
with the original device.

Fixes: 4b008a0 ("anlogicCable: refresh with new VID")
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
2025-05-22 10:37:04 +08:00
Gwenhael Goavec-Merou e18c139941 spiFlashdb.hpp: disables quad mode configuration for all N25Q. It's useless because the chip is able by default to support single and quad transaction and after this configuration the flash is unable to works in single mode. 2025-05-21 10:17:10 +02:00
Gwenhael Goavec-Merou e6ee4fb99a libusb_ll: probe type -> probe_type 2025-05-15 18:18:49 +02:00
Gwenhael Goavec-Merou 392b4c61ee libusb_ll/scan: improved display by align column according to max size (#549) 2025-05-15 08:09:25 +02:00
Gwenhael Goavec-Merou 4756fc17cb
Merge pull request #548 from JN513/master
Adding support for Open Source SDR Lab Kintex-7 325t FPGA Board
2025-05-12 18:00:17 +02:00
Julio Nunes Avelar c291aade70
Adding support for Open Source SDR Lab Kintex-7 325t FPGA PCIE Development Board 2025-05-12 12:38:30 -03:00
Gwenhael Goavec-Merou 971a8db4e9 spiOverJtag: introduce a new spiOverJtag (v2) core able to work with complex JTAG chain 2025-05-11 09:13:25 +02:00
Tomserv-512 40a588fb2c
Add xcau15p (xcau15p_ffvb676) support (#547)
Co-authored-by: vbuitvydas <v.buitvydas@limemicro.com>
2025-05-10 07:02:21 +02:00
Gwenhael Goavec-Merou 4553bacb05 colognechip: performs reset after SPI Flash write 2025-05-01 16:19:05 +02:00
Gwenhael Goavec-Merou f177884d84
Merge pull request #545 from duskwuff/master
Add support for Digilent Anvyl, the Big Red Board.
2025-04-27 16:08:23 +02:00
Dusk f6afb5ab9f Add support for Digilent Anvyl, the Big Red Board.
Programming to SRAM works. Programming flash works with a renamed
spiOverJtag bitfile - cs(g)484 is different from fg(g)484, but the
configuration flash IOs all end up on the same pads in the end.
2025-04-26 23:49:24 -07:00
Gwenhael Goavec-Merou 7a509b56ee
Merge pull request #541 from bl0x/numato-neso-support
Add support for Numatolab Neso board.
2025-04-24 06:59:25 +02:00
Gwenhael Goavec-Merou 513033ad4a
Merge pull request #542 from mikegoelzer/master
Add new ECP5 board and its cable
2025-04-23 15:20:21 +02:00
Mike Goelzer ff1e77debf adds GCM board type and FT4232H interface B cable 2025-04-23 07:04:40 -06:00
Gwenhael Goavec-Merou d942c79f62 jtag: added method to retrieves number of devices in the JTAG chain 2025-04-22 18:59:19 +02:00
Bastian Löher bdeb74b61e Add support for Numatolab Neso board. Programming SRAM over USB works, when board jumpers are set for JTAG programming mode. SPI flashing does not work properly (does not boot). 2025-04-21 21:17:54 +02:00
Gwenhael Goavec-Merou 198cfbe604 ihexParser: added type 04 (Extented Linear Address Record) and 05 (Start Linear Address Record) 2025-04-21 17:47:02 +02:00
Gwenhael Goavec-Merou c97369c241 spiFlash: only uses spi_put with distinct cmd parameter 2025-04-21 07:42:26 +02:00
Gwenhael Goavec-Merou e9b8dc5e4c
Merge pull request #540 from trabucayre/esp_usb_jtag
Esp usb jtag Cable support
2025-04-20 16:51:06 +02:00
Gwenhael Goavec-Merou 77323000ed 99-openfpgaloader.rules: added rule for ESP32S3 2025-04-20 12:47:50 +02:00
Gwenhael Goavec-Merou 6c0c38d0cc esp_usb_jtag: added reference to esp32s3-jtag repository 2025-04-20 12:47:28 +02:00
Gwenhael Goavec-Merou b7967cf71a esp_usb_jtag: improves
- esp_usb_jtag: added xfer method to handle/simplify libusb_bulk_transfer calls
- src/esp_usb_jtag.cpp: simplify some operations
- src/esp_usb_jtag.cpp: writeTDI: fixed rx buffer index, added a basic code to handle end transaction
- src/esp_usb_jtag.cpp: writeTMS: store and uses _tdi & _tms
- src/esp_usb_jtag.cpp: toggleClock: re-uses _tdi/_tms
- src/esp_usb_jtag.cpp: writeTDI: ditto
- esp_usb_jtag: fixed verbosity level/be more quiet
- esp_usb_jtag: fixed writeTDI with end and tms transition: now integrated instead of distinct sequence. Fixed TDI value with tms transition. Working with ECP5
- esp_usb_jtag: added optional parameter to lower timeout error (useful when it's time to flush the device)
- esp_usb_jtag: fixed writeTDI when tx is NULL
2025-04-18 07:32:37 +02:00
Emard fa1d328b93 esp_usb_jtag: new cable
- copy dirtyjtag to esp_usb_jtag, it compiles
- copy protocol definiton, defines and private data/struct from openocd esp_usb_jtag.c
- ulx3s_esp board with esp32s3 cable
- esp_usb_jtag specify usb vid:pid in jtag.cpp
- hardcode usb interface and endpoints
- getting caps
- set chip id (not applicable for fpga)
- tms write done, untested
- cleanup and toggle clk
- 32bit counting
- setting divisor (todo read base freq)
- div range within 1-255
- base speed from descriptor
- fix doc typo with swapped tms/tdi some cleanup but it doesn't work.
2025-04-18 07:32:15 +02:00
Gwenhael Goavec-Merou bc6ba85c7f CI: Removed ubuntu-20.02 build/test 2025-04-16 07:55:59 +02:00
Gwenhael Goavec-Merou d155bf6a35
Merge pull request #538 from nexthop-ai/nate-a7-15t
Add support for Artix A7 15t
2025-04-16 06:14:55 +02:00
Gwenhael Goavec-Merou 5da3d72fad
Merge pull request #537 from pigmoral/xc7k480t-support
Add support for xc7k480t
2025-04-16 06:12:56 +02:00
Junhui Liu 68c7786f5f Add support for xc7k480t 2025-04-09 21:01:16 +08:00
Nate White 6e05a7fa25 Add support for Artix A7 15t
Tested on real hardware, connecting through Linux gpiod
2025-04-08 15:31:41 +00:00
Gwenhael Goavec-Merou 719b420a11 doc/vendors/intel.rst: fixed section/subsection for MAX10 2025-04-03 21:55:28 +02:00
Gwenhael Goavec-Merou 5bbc93e725 doc/vendors/intel.rst: improved MAX10 section 2025-04-03 21:51:25 +02:00
Gwenhael Goavec-Merou f1bc5edbd0
Merge pull request #536 from Nekitoz/addFPGA
Added support xc7a50tcsg325
2025-04-02 06:41:36 +02:00
Neo fdf24a824e add xc7a50tcsg325 2025-04-01 22:19:18 +03:00
Gwenhael Goavec-Merou a1ba0457e0
Merge pull request #535 from phdussud/master
make ENABLE_OPTIM non effective for Debug builds configuration
2025-03-30 18:54:22 +02:00
Patrick Dussud 496cd7d9a4 make ENABLE_OPTIM non effective for Debug builds configuration 2025-03-30 09:35:05 -07:00
Gwenhael Goavec-Merou ccb11ffe01
Merge pull request #534 from phdussud/master
Fix incompatibility with Lattice FPGA
2025-03-30 08:56:35 +02:00
Gwenhael Goavec-Merou 80dcb6bfce
Merge pull request #533 from FraunhoferEMI/master
Added support for Everspin MRAM (EM008LX, EM016LX, EM032LX and EM064LX)
2025-03-30 08:56:02 +02:00
Patrick Dussud 6623ceff28 Fix incompatibility with Lattice FPGA 2025-03-29 17:23:02 -07:00
Clemens Horch fd66d4a74a Added support for Everspin MRAM (EM008LX, EM016LX, EM032LX and EM064LX) 2025-03-28 09:06:02 +01:00
Gwenhael Goavec-Merou 5ced26c3f6 gowin: Improved eraseSRAM/SPI Flash prepare for Arora V devices 2025-03-26 13:14:39 +01:00
Gwenhael Goavec-Merou f7b7e77a47
Merge pull request #532 from fjullien/xc7s_fgga676
Add support for Xilinx xc7s75fgga676
2025-03-25 21:25:30 +01:00
Franck Jullien 1698d6751e part.hpp: add Xilinx xc7s75 2025-03-25 11:12:05 +01:00
Franck Jullien 2535170267 spiOverJtag: add xc7s75fgga676 2025-03-25 10:32:12 +01:00
Gwenhael Goavec-Merou f5ed5c4400
Merge pull request #529 from mer0m/master
kcu105: add support for secondary QSPI
2025-03-21 19:12:44 +01:00
Gwenhael Goavec-Merou 8435bbd43b
Merge pull request #530 from vbuitvydas/MX25L25645G
Added support for MX25L25645G FLASH memory
2025-03-21 15:05:51 +01:00
vbuitvydas b1f4c35312 Added support for MX25L25645G FLASH memory 2025-03-21 15:50:17 +02:00
Gwenhael Goavec-Merou 671224a544 mcsParser: check if _bit_data size is not larger than bitstream 2025-03-21 06:47:30 +01:00
bma 4e5fd9fabc Merge branch 'kcu105_dual_qspi' 2025-03-20 20:47:12 +01:00
bma e6d20ab6d5 doc: add kcu105 dual qspi command examples 2025-03-20 20:33:17 +01:00
bma 1c78344ca5 kcu105: add secondary qspi detection and dump 2025-03-20 20:11:02 +01:00
bma 1bb69dcf22 kcu105: add fpga package in description 2025-03-20 20:09:46 +01:00
Gwenhael Goavec-Merou 4c4f48ea93 fix to have an happy CI 2025-03-18 23:02:11 +01:00
Gwenhael Goavec-Merou 414a7259f0 altera: uses --flash-sector to only update a subset of internal flash sectors 2025-03-18 22:42:00 +01:00
Gwenhael Goavec-Merou 719697eabe common: added function to split a string to a vector by using a delimiter 2025-03-18 22:39:44 +01:00
Gwenhael Goavec-Merou 4a5a912b9d mcsParser: fixed warnings 2025-03-17 07:25:13 +01:00
Gwenhael Goavec-Merou 2ee72c0556 mcsParser: _bit_length/buffer size / addr sanity check 2025-03-17 07:19:19 +01:00
Gwenhael Goavec-Merou f86037231a altera: added max10_mem_t in max10_memory_map for 10M16SA Max10 variant 2025-03-16 08:50:13 +01:00
Gwenhael Goavec-Merou 1abb1c2453 altera: added sectors erase and UFM write
- updated max10_mem_t to have sectors erase addresses
- updated max10_flow_erase to perform a full erase or sectors per
  sectors
- added a dedicated method to perform UFM erase and write without full
  internal flash erase and with arbitrary file instead of POF
2025-03-15 07:45:16 +01:00
Marcus Comstedt 703af08c91
xvc_server: Make thread exit cleanly (#526) 2025-03-10 21:25:13 +01:00
Gwenhael Goavec-Merou b2c2ae80c0
Merge pull request #528 from mc-requtech/xvc-server-libgpiod
libgpiodJtagBitbang: add support for XVC server
2025-03-10 20:25:38 +01:00
Marcus Comstedt a39aa2d43e libgpiodJtagBitbang: add support for XVC server 2025-03-10 15:29:06 +01:00
Gwenhael Goavec-Merou 6f29d9ecd1 ftdispi: fixed ft2232_spi_wr_and_rd: buffer is empty when transaction is read-only 2025-03-09 08:37:29 +01:00
Gwenhael Goavec-Merou b9c2ab5cdc
Merge pull request #527 from mc-requtech/musl-build-fix
gowin: Fix compilation on musl
2025-03-08 06:12:53 +01:00
Marcus Comstedt 6dbde4c368 gowin: Fix compilation on musl 2025-03-07 15:38:14 +01:00
Gwenhael Goavec-Merou 3cf558ebe2 colognechip: added a workaround to drive reset pin with DirtyJTAG cable
(requires a recent DirtyJTAG firmware)
2025-03-07 07:19:39 +01:00
Gwenhael Goavec-Merou 3c7324d14d dirtyJtag: added SRST/TRST values. Added method to read/set GPIOs level 2025-03-07 07:19:14 +01:00
Gwenhael Goavec-Merou ab8d8fc0d3 gowin: Arora V: fix SRAM erase/load when flash is blank and timeout bit is set 2025-03-06 20:05:31 +01:00
Gwenhael Goavec-Merou ee8decdfe6 ftdispi: ft2232_spi_wr_and_rd: improved error messages 2025-03-02 09:11:49 +01:00
Gwenhael Goavec-Merou ecb22b2eeb ftdispi: ft2232_spi_wr_and_rd: use dedicated buffer for MPSSE command to
avoid overflow. Simplify code, improve error message (issue #524 and
2025-03-02 09:00:49 +01:00
Gwenhael Goavec-Merou 564485036e doc/boards: added alinx_ax7201/alinx_ax703 entries. 2025-02-27 06:44:52 +01:00
Gwenhael Goavec-Merou cfdb59b9e1
Merge pull request #521 from tarik-hamedovic/master
Added alinx_ax7203 and alinx_ax7201 boards
2025-02-27 06:38:00 +01:00
TarikHamedovic c0cfc0cc57 Added alinx_ax7203 and alinx_ax7201 boards 2025-02-27 04:13:42 +01:00
Gwenhael Goavec-Merou 989c8f8ccb ftdispi: lowlevel init/MPSSE configuration before pins manipulation (issue #519) 2025-02-26 19:48:42 +01:00
Gwenhael Goavec-Merou fbee81b1d0 efinix.cpp: programJTAG. Fixed IDCODE read 4 -> 32 (issue #520) 2025-02-26 19:38:10 +01:00
Gwenhael Goavec-Merou 2ff215dfff board, efinix: added SPI variant for efinix t20 BGA256 board 2025-02-24 20:33:01 +01:00
Gwenhael Goavec-Merou c6e5ec9cb0 anlogicCable: fixed typo 2025-02-24 19:42:30 +01:00
Gwenhael Goavec-Merou 7129ffb201 99-openfpgaloader.rules: update 2025-02-23 09:03:44 +01:00
Gwenhael Goavec-Merou a8d5247650 anlogicCable: added pinout + link 2025-02-23 09:00:30 +01:00
Gwenhael Goavec-Merou 4b008a0196 anlogicCable: refresh with new VID 2025-02-23 08:59:08 +01:00
Gwenhael Goavec-Merou 7ed62601c7 altera: fixed UFM: MAX10 memory is in reverse order, UFM1 is BEFORE UFM0 2025-02-16 15:30:30 +01:00
Gwenhael Goavec-Merou 5b6ccf7d0f
Merge pull request #516 from EEVengers/master
added 1.35v csg325 build and Macronix flash for Thunderscope Rev 4 Prototype board
2025-02-15 22:41:14 +01:00
Gwenhael Goavec-Merou b89e71c0b3
Merge pull request #515 from Peter-van-Tol/patch-1
Add entry about updating firmware TangNano20K
2025-02-15 22:40:17 +01:00
Peter-van-Tol 679a92ce05
Add entry about updating firmware TangNano20K 2025-02-15 22:25:18 +01:00
AEW2015 d61e147989 added 1.35v csg325 build and Macronix flash 2025-02-15 14:24:42 -07:00
Gwenhael Goavec-Merou c4d4e8db7e doc/boards.yml, src/board.py: added tangconsole entry 2025-02-15 11:39:37 +01:00
Gwenhael Goavec-Merou 79054f3fa1
Merge pull request #512 from antmicro/fix-null-values-in-stdout
Fix snprintf usage
2025-02-13 19:47:45 +01:00
Gwenhael Goavec-Merou b839792220 altera: added internal flash dump support for MAX10 devices 2025-02-02 20:50:06 +01:00
Gwenhael Goavec-Merou 5f673c6f14 altera: max_10 -> max10 2025-02-02 09:11:14 +01:00
Gwenhael Goavec-Merou ab8bed3f26 altera: max10_program: respect _verbose variable 2025-02-02 09:10:37 +01:00
Gwenhael Goavec-Merou eddb44c567 doc/FPGAs.yml: added Gowin Arora V GW5AT-60 Variant. Reorganized Gowin section 2025-02-01 12:20:08 +01:00
Gwenhael Goavec-Merou 182e30b637 part,gowin,fsparser: added Gowin Arora V GW5AT-60 Variant 2025-02-01 12:19:34 +01:00
Gwenhael Goavec-Merou 533dd1ea5f altera: cosmetic/linter 2025-02-01 08:28:17 +01:00
Gwenhael Goavec-Merou 959201a21f altera: MAX10 fully rework POF to internal flash mapping, added UFM write and note related to internal flash sections vs POF UFM/CFM sections 2025-02-01 08:14:07 +01:00
Gwenhael Goavec-Merou c3170cdfb9 altera: MAX10: added pgm_success_addr/done_bit_addr 2025-02-01 08:12:04 +01:00
Gwenhael Goavec-Merou 8e104d723c pofParser: displayHeader: improve messages 2025-02-01 08:09:59 +01:00
Gwenhael Goavec-Merou 6f42d28d5e pofParser: honour CFM1/CFM2 data pointer 2025-02-01 08:09:29 +01:00
Gwenhael Goavec-Merou 8160e716e8 pofParser: flag 0x11: added unknown section when verbose 2025-02-01 08:08:59 +01:00
Gwenhael Goavec-Merou 8f46edc8b3 pofParser: parseHeader: better message + note 2025-02-01 08:08:34 +01:00
Gwenhael Goavec-Merou 154bf5b5ec pofParser: added flag 0x13 parsing with usercode extract 2025-02-01 08:07:42 +01:00
Gwenhael Goavec-Merou 65afd7da0b pofParser: getData/getLength: check if section exists: return data/length or null/-1 2025-02-01 08:06:59 +01:00
Maciej Dudek e8d8ecc363 Fix snprintf usage
Some code used snprintf on std::string objects.
This caused unexpected behaviour where '\0' was printed to the output file.
This commit adds intermediate char* buffer which is later used to
initialize std::string. This string is later resized to the correct
expected length.

Signed-off-by: Maciej Dudek <mdudek@antmicro.com>
2025-01-24 11:48:37 +01:00
Gwenhael Goavec-Merou 5847ec2666 doc/boards.yml,src/board.hpp: fixed ac701 device code 2025-01-15 06:57:42 +01:00
Gwenhael Goavec-Merou e8e92a04e0
Merge pull request #509 from Frzoen/fix-yaml-structure-doc-intel-max-10
doc/FPGAs.yml: Fix yml structure in Intel Max 10
2025-01-14 06:46:03 +01:00
Frozen 444469707b
doc/FPGAs.yml: Fix yml structure in Intel Max 10
`Model: 10M02, 10M08` is not correct yaml structure and parsing it generated `10m02,_10m08` model instead of `10m02` and `10m08` models
2025-01-12 11:59:17 +01:00
Gwenhael Goavec-Merou b79afdcb6e
Merge pull request #508 from steward-fu/master
Add STEP-MXO2 V2 Board Support.
2025-01-11 17:49:32 +01:00
Steward Fu aff1829d76
Merge branch 'trabucayre:master' into master 2025-01-11 23:15:29 +08:00
steward-fu f4fee37cea Added STEP-MXO2_V2 board support. 2025-01-11 23:14:36 +08:00
Gwenhael Goavec-Merou 0e2e1ce13f
Merge pull request #506 from steward-fu/master
Add STEP-MAX10 V1 board support.
2025-01-11 07:57:24 +01:00
steward-fu 79cf67e964 Added STEP-MAX10 V1 support. 2025-01-10 07:39:30 +08:00
Gwenhael Goavec-Merou 867f18236e
Merge pull request #505 from steward-fu/master
Add Altera 10M02SCM153C8G Support.
2025-01-09 07:19:25 +01:00
Gwenhael Goavec-Merou 4dd1f5ca0d
Merge pull request #504 from ZhiyuanYuanNJ/patch-1
ch347jtag.cpp: Update timeout value
2025-01-09 07:18:04 +01:00
steward-fu ce92b577d5 Added 10M02SCM153C8G support. 2025-01-09 07:35:50 +08:00
ZhiYuanNJ fcaf836a40
Update ch347jtag.cpp
Update read/write timeout
2025-01-08 13:13:28 +08:00
Gwenhael Goavec-Merou c35d17477c
Merge pull request #503 from chenrui333/add-ubuntu-24
ci: add ubuntu 24
2025-01-01 18:21:50 +01:00
Rui Chen b12d5f1ae6
ci: add ubuntu 24
Signed-off-by: Rui Chen <rui@chenrui.dev>
2025-01-01 10:32:17 -05:00
Gwenhael Goavec-Merou 650c387aae CMakeLists.txt: prepare release 0.13.1 2024-12-31 22:00:48 +01:00
Gwenhael Goavec-Merou 438a875ca4
Merge pull request #502 from chenrui333/fix-version
fix: update version to patch with the release
2024-12-31 21:59:30 +01:00
Rui Chen 3024b76113
fix: update version to patch with the release
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-12-31 15:23:22 -05:00
Gwenhael Goavec-Merou 7dac3ef447 altera: first draft for max10 native support (with pof and only for internal flash) 2024-12-31 18:42:52 +01:00
Gwenhael Goavec-Merou 01039bc710 libgpiodJtagBitbang: simplify code when libgpiodv2 is used 2024-12-31 08:31:49 +01:00
Gwenhael Goavec-Merou 65a7e60454
Merge pull request #500 from vlad1k337/patch-1
Debian/Ubuntu instructions for binary installation. Update install.rst
2024-12-23 10:36:33 +01:00
vlad1k337 3bb0071ce7
Update install.rst
openFPGALoader binary is available in Debian/Ubuntu repositories
2024-12-21 09:12:24 -06:00
Gwenhael Goavec-Merou 2103316baf lattice: added support for reset method (only tested with ECP5 2024-12-19 14:59:35 +01:00
Gwenhael Goavec-Merou 318ebcab22 main.cpp: added default value for user_flash in struct arguments args 2024-12-15 16:45:39 +01:00
Gwenhael Goavec-Merou a06bae1f5e part.hpp: cosmetic 2024-12-15 16:04:20 +01:00
Gwenhael Goavec-Merou cdc4d32e32
Merge pull request #499 from lambdaconcept/gowin-gw1n9-userflash
gowin: Implement User Flash programming for GW1N9
2024-12-13 06:50:38 +01:00
Jean THOMAS 46ff6cb2eb gowin: Implement user flash programming for GW1N9 2024-12-11 12:19:07 +01:00
Jean THOMAS ffa006d0ee Add 'user-flash' CLI argument 2024-12-11 12:01:37 +01:00
Jean THOMAS a1108ca981 gowin: Add GW1N9 detection 2024-12-11 11:49:29 +01:00
Jean THOMAS 91608ca206 gowin: Use std::unique_ptr instead of manual RAII 2024-12-11 11:43:07 +01:00
Gwenhael Goavec-Merou 8f88d221dd
Merge pull request #498 from csantosb/master
doc/guide/install.rst: instructions to install under Guix
2024-12-03 07:37:10 +01:00
Cayetano Santos d3b1e62bfa
doc/guide/install.rst: instructions to install under Guix 2024-12-02 21:06:48 +01:00
Gwenhael Goavec-Merou 25d6ac7344
Merge pull request #497 from enjoy-digital/10M16SAU169C8G
src/part.hpp: Add Altera Max10 10M16SAU169C8G support (Used by LimeSD…
2024-11-27 18:21:29 +01:00
Florent Kermarrec daa91c9a41 src/part.hpp: Add Altera Max10 10M16SAU169C8G support (Used by LimeSDR Mini V1). 2024-11-26 16:02:28 +01:00
Gwenhael Goavec-Merou 7693b07f90 doc/FPGAs.yml: added Gowin GW2A-55 2024-11-26 07:26:11 +01:00
Gwenhael Goavec-Merou c0a9115be9 part.hpp: added Gowin GW2A-55 2024-11-26 07:25:30 +01:00
Gwenhael Goavec-Merou e53bfeefe3
Merge pull request #496 from schodet/vcu108
Add support for VCU108 board and Virtex UltraScale
2024-11-13 07:14:15 +01:00
Nicolas Schodet f6f48a7b27 Add support for VCU108 board and Virtex UltraScale 2024-11-12 23:51:55 +01:00
Gwenhael Goavec-Merou 0fd653e353 xilinx: replaced reverseWord by configBitstreamParser::reverse_32 2024-11-09 11:26:45 +01:00
Gwenhael Goavec-Merou e75e15bb63 configBitstreamParser: added static method to switch bits for 32bits value 2024-11-09 11:26:02 +01:00
Gwenhael Goavec-Merou 543be23d03 main,spiFlash,xilinx: fix warnings 2024-11-09 11:24:16 +01:00
Gwenhael Goavec-Merou 023e7b772d .github/workflows/Test.yml: fixed actions/checkout version 2024-11-09 09:34:53 +01:00
Gwenhael Goavec-Merou 22abafd7a9 .github/workflows/Test.yml: fixed upload-artifact version 2024-11-09 09:30:08 +01:00
Gwenhael Goavec-Merou c4c5f8b1f4
Merge pull request #485 from trabucayre/dependabot/github_actions/dot-github/workflows/actions/download-artifact-4.1.7
build(deps): bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows
2024-11-09 09:24:44 +01:00
ROOT c0faf48d46
Update Max II and Cyclone II documentation (#493)
Co-authored-by: sab <sab@debian.shadow>
2024-10-19 06:27:49 +02:00
Gwenhael Goavec-Merou d2da0eefb8
Merge pull request #491 from Tpj-root/master
Add Support for Altera Max II EPM240T100C5N Board
2024-10-17 06:16:55 +02:00
sab 7acd1f2014 Add Support for Altera Max II EPM240T100C5N Board 2024-10-16 08:53:21 -04:00
Gwenhael Goavec-Merou 29693bc090
Merge pull request #490 from G33KatWork/add-stratixv-gs-d5
Add ID and spiOverJtag bitstream for Stratix V GS D5
2024-10-10 20:39:46 +02:00
Andreas Galauner 43fcc6ce2c Add ID and spiOverJtag bitstream for Stratix V GS D5 2024-10-10 19:59:31 +02:00
Gwenhael Goavec-Merou 773a7c805d
Merge pull request #489 from mfacton/add-xc2c64a-qfn48-part
Add xc2c64a QFN48
2024-10-02 06:39:30 +02:00
Miguel Flores-Acton 406e99c93a Add xc2c64a QFN48 2024-10-01 13:45:44 -04:00
Gwenhael Goavec-Merou 08f507266b
Merge pull request #488 from NuQuantum/feature/add-support-for-zynq-xc7z030
feat: adding support for the xc7z030
2024-09-26 20:08:36 +02:00
Shareef Jalloq 9c9ce07ad8 feat: adding support for the xc7z030 2024-09-26 17:41:49 +01:00
Gwenhael Goavec-Merou ba6f0fa530
Merge pull request #486 from mer0m/master
Flash on primary qspi for Xilinx xcku040 and xcku060 based boards.
2024-09-25 07:26:58 +02:00
bma 8c03101b93 doc: add flash compatibility for Xilinx Kintex UltraScale. Tested on KCU105 primary qspi. 2024-09-25 07:25:13 +02:00
bma fd66067b4f README: update the help output 2024-09-25 07:25:03 +02:00
bma 8e67d2ee04 arguments: fix read_dna and read_xadc typo 2024-09-25 07:24:15 +02:00
bma f3a48fb3b1 spiOverJtag: add support and bitstreams for xcku040 and xcku060 2024-09-25 07:24:09 +02:00
Gwenhael Goavec-Merou abb64a6aa1 spiFlash: added S25FL128S display register 2024-09-23 07:16:23 +02:00
Gwenhael Goavec-Merou b6963ad4a9 spiFlash: added MX25L enable/disable quad + display status register 2024-09-23 07:14:23 +02:00
Gwenhael Goavec-Merou faa1fc76fc core,xilinx,device: added option/methods to enable/disable quad mode on SPI Flash 2024-09-23 07:09:30 +02:00
Gwenhael Goavec-Merou 242357c46f spiFlash: added method to enable/disable Quad mode support 2024-09-23 07:06:05 +02:00
Gwenhael Goavec-Merou 924de0a13a spiFlashdb: added quad support for S125FL 2024-09-23 07:00:56 +02:00
dependabot[bot] 2df82d8b4b
build(deps): bump actions/download-artifact in /.github/workflows
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v2...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-03 22:00:42 +00:00
Gwenhael Goavec-Merou 81422b6ca3
Merge pull request #481 from acceleratedtech/jwise/ti180-soj
efinix: add spiOverJtag support for Ti180J484
2024-08-31 08:20:04 +02:00
Joshua Wise ffd32a61d2 Efinix: do not allow untested detect_flash() non-SoJ path until someone tries it out for sure 2024-08-29 18:08:57 -04:00
Gwenhael Goavec-Merou fca69cc702 spiFlash: added configuration/nonvolatile configuration register for spansion and micron SPI Flash 2024-08-25 09:34:14 +02:00
Gwenhael Goavec-Merou 5d6daed815 spiFlashdb: added quad bit mask and corresponding register 2024-08-25 09:32:13 +02:00
Gwenhael Goavec-Merou 755802afe1 spiFlashdb: added some flash's datasheet link 2024-08-25 09:31:13 +02:00
Gwenhael Goavec-Merou 74fb048231
Merge pull request #484 from gsteiert/feature-cyc5000
adding support for cyc5000
2024-08-25 07:32:50 +02:00
Greg Steiert ad01d986c1 adding support for cyc5000 2024-08-24 21:32:00 -07:00
Gwenhael Goavec-Merou 533b5b626a spiFlashdb.hpp: reorder entries, reformat 2024-08-23 07:20:53 +02:00
Joshua Wise d6ad8ea661 doc: update Titanium to indicate support for Ti180 2024-08-19 21:37:14 -04:00
Joshua Wise 90e62e07c3 efinix: add support for flash detect and flash dump in SoJ mode 2024-08-19 21:29:30 -04:00
Joshua Wise 286b34b14d spiOverJtag: add support for Ti180J484 2024-08-19 21:29:00 -04:00
Gwenhael Goavec-Merou 084d291073 spiOverJtag: added basic efinix build script (WIP) 2024-08-19 09:57:15 +02:00
Gwenhael Goavec-Merou d6b58cdb71
Merge pull request #480 from chmousset/add-t13
[enh] added t13f256 SPI flash support
2024-08-17 16:16:18 +02:00
Charles-Henri Mousset 572b0978f6 [enh] added t13f256 SPI flash support 2024-08-17 15:41:44 +02:00
Gwenhael Goavec-Merou e751262336
Merge pull request #479 from acceleratedtech/jwise/ti180
part.hpp: add Efinix Titanium Ti180
2024-08-13 07:51:25 +02:00
Joshua Wise 5ec6eae63b part.hpp: add Efinix Titanium Ti180 2024-08-07 19:24:52 -07:00
Gwenhael Goavec-Merou 7fc222d50f spiOverJtag: added bitstream for Xilinx Spartan6 xc6slx25csg324 2024-08-03 11:01:26 +02:00
Gwenhael Goavec-Merou 9edf1edb3f board, doc: added KNJN Dragon-L PCI Express & HDMI FPGA board (Spartan6 xc6slx25tcsg324 2024-08-03 09:22:49 +02:00
Gwenhael Goavec-Merou 0d657f0f65 spiFlashdb: added TI M25P80 (0x202014) 2024-08-03 09:22:02 +02:00
Gwenhael Goavec-Merou bdaba6e7da spiOverJtag: added Xilinx Spartan6 model: 25T package: CSG324 (xc6slx25tcsg324) 2024-08-03 08:53:18 +02:00
Gwenhael Goavec-Merou 1d2b18aeaf part: Xilinx spartan6 LX25T (xc6slx25T) 2024-08-01 08:47:19 +02:00
Gwenhael Goavec-Merou 406a6baa6f spiOverJtag: Xilinx spartan7 xc7s6ftgb196 bitstream 2024-08-01 08:16:16 +02:00
Gwenhael Goavec-Merou a509a28fa6 part.hpp: Xilinx spartan7 xc7s6 variant 2024-08-01 08:14:46 +02:00
Gwenhael Goavec-Merou 768c6efcce gowin: added detect_flash/erase_flash for gw2a FPGAs 2024-07-30 08:50:34 +02:00
Gwenhael Goavec-Merou a7cb7ec050 efinix: program(): thow exception when something fails 2024-07-29 07:54:38 +02:00
Gwenhael Goavec-Merou aed4f9a263 efinix: programJTAG return type void -> bool 2024-07-29 07:54:35 +02:00
Gwenhael Goavec-Merou bba3d9f3fb efinix: programSPI return type void -> bool 2024-07-29 07:54:13 +02:00
Gwenhael Goavec-Merou a7a1a788ff spiFlash: 0x0000 is not a valid jedec id 2024-07-29 07:45:45 +02:00
Gwenhael Goavec-Merou a39524636b
Merge pull request #471 from JN513/master
Adding support for Xilinx Virtex 7 FPGA VC709 Connectivity Kit Board
2024-07-13 08:56:02 +02:00
Julio Nunes Avelar 7e4b42b795
Adding support for AMD Virtex 7 FPGA VC709 Connectivity Kit Board 2024-07-12 23:32:14 -03:00
Julio Nunes Avelar 1042b6c269
Add xc7vx690t 2024-07-12 23:19:04 -03:00
Gwenhael Goavec-Merou 58cc5033f0 spiFlash: removed unused variable (#468) 2024-07-06 08:51:28 +02:00
Gwenhael Goavec-Merou f6b6f6f9d8 spiFlash: added get_bp_mask to return default bp mask (unknown device) or compute mask based on bp_offset. Replace all manual mask compute. (#468) 2024-07-04 08:17:49 +02:00
Gwenhael Goavec-Merou 1b00940d13
Merge pull request #465 from sepotvin/master
Add support for Numato Systems Mimas A7 board.
2024-06-22 18:45:22 +02:00
Stéphane Potvin e3f315a121 Add support for Numato Systems Mimas A7 board. 2024-06-22 08:03:14 -04:00
Gwenhael Goavec-Merou ad13a22353
Merge pull request #463 from UweBonnes/master
main: In help output, show how to detect flash
2024-06-20 16:52:21 +02:00
Uwe Bonnes 53530f7316 main: In help output, show how to detect flash 2024-06-20 16:25:41 +02:00
Gwenhael Goavec-Merou a76aaacd9e
Merge pull request #462 from enjoy-digital/spiOverJtag_xc7a200tfgg676
spiOverJtag: Add xc7a200tfbg676 support (tested on hardware).
2024-06-18 15:49:12 +02:00
Florent Kermarrec dc43795798 spiOverJtag: Add xc7a200tfbg676 support (tested on hardware). 2024-06-18 15:44:33 +02:00
Christoph Metzner a341d1f441
add new device (Intel MAX10M40SCE144C8G) (#461)
* add 10M40SCE144

* change name
2024-06-13 15:09:32 +02:00
Gwenhael Goavec-Merou c468a69fc9 all devices / spiInterface / main: added method / infra to detect flash chip with --detect -f 2024-06-09 09:28:52 +02:00
Gwenhael Goavec-Merou d0dd71a28a spiFlash: display_status_reg simplify again 2024-06-09 09:26:27 +02:00
Gwenhael Goavec-Merou 36b1a7f9d9 spiFlash: read_id: display jedec ID. display_status_reg small fixes 2024-06-09 09:14:38 +02:00
Gwenhael Goavec-Merou 3ba0012a2c xilinx: added WBSTAR & BOOTSTS register read/decode. Fixed dec/hex format and padding 2024-06-04 08:45:51 +02:00
Gwenhael Goavec-Merou cb523199cc spiFlash: enable_protection/disable_protection: uses mask to only deal by bp 2024-06-03 16:18:14 +02:00
Gwenhael Goavec-Merou 2b80ce158b spiFlash: added ask before writting TB when OTP, added missing write_enable and fixed mask 2024-06-03 15:23:12 +02:00
Gwenhael Goavec-Merou be188c0223 spiFlashdb.hpp: added IS25LP256D chip support 2024-06-03 11:27:51 +02:00
Gwenhael Goavec-Merou 27abb94801
Merge pull request #459 from newaetech/xadc-vccs
xilinx: Add XADC reads of VCC registers
2024-05-24 06:33:29 +02:00
Colin O'Flynn ed492715e1 xilinx: Add XADC reads of VCC registers 2024-05-23 09:40:19 -03:00
Gwenhael Goavec-Merou 578c899327 ../src/gwu2x_jtag.cpp 2024-05-22 20:54:14 +02:00
Gwenhael Goavec-Merou 26b4516aeb added lilygo-t-fpga board (based on gwu2x #434) 2024-05-20 21:18:20 +02:00
Gwenhael Goavec-Merou 53578876d5 added support for Gowin GWU2X USB (JTAG mode) (#434) 2024-05-20 21:10:29 +02:00
Gwenhael Goavec-Merou 7e90d071d9 libusb_ll: rework. Splitted scan method -> help futur dev with a common code to detect/select usb devices 2024-05-20 16:18:50 +02:00
Gwenhael Goavec-Merou 37a0f9c03e device: fixed warning in read_registers 2024-05-20 16:16:42 +02:00
Michael Schenk 6e85edaa9a
adding support for XC2C64A-xVQ44 with ID 0x06e5e093 (#458)
* adding support for XC2C64A-xVQ44

* remove comment
2024-05-19 17:13:16 +02:00
Gwenhael Goavec-Merou 0ab549666a
Merge pull request #455 from wormyrocks/master
Add support for EP4CE6E22 and EP4CE10F17
2024-05-01 07:12:55 +02:00
Evan Kahn 66c47fe3bd Add support for EP4CE6E22 and EP4CE10F17 2024-04-30 14:51:29 -04:00
Gwenhael Goavec-Merou 11fd6e00d5
Merge pull request #453 from hansfbaier/master
Add EP4CGX150
2024-04-30 08:07:40 +02:00
Hans Baier 55b094ce00 add EP4CGX150 2024-04-27 16:18:23 +07:00
Gwenhael Goavec-Merou b69048d1ea doc/FPGAs: xcau25p 2024-04-25 17:31:12 +02:00
Gwenhael Goavec-Merou a0db38fe86
Merge pull request #452 from enjoy-digital/xcau15p
src/part.hpp: Add xcau15p support.
2024-04-25 17:26:41 +02:00
Florent Kermarrec 943a458f03 src/part.hpp: Add xcau15p support. 2024-04-25 17:17:47 +02:00
Gwenhael Goavec-Merou 4fe3d7ccc1 xilinx: added readback access to registers (stat, conf, ...) 2024-04-21 14:35:23 +02:00
Gwenhael Goavec-Merou c0db1b4c98 .github/workflows/Test.yml: test linux targets move to libhidapi-libusb0 2024-04-14 11:09:43 +02:00
Gwenhael Goavec-Merou a61eb2807a .github/workflows/Test.yml: linux targets move to libhidapi-libusb0 2024-04-14 10:15:55 +02:00
Gwenhael Goavec-Merou 2535c28e04 CMakeLists.txt: switch prio between hidapi-libusb and hidapi-hidraw: fix detection issue on WSL2 with cmsisdap (#413) 2024-04-14 08:57:12 +02:00
Gwenhael Goavec-Merou 99147efa27 board,doc: added CERN SPEC45 support 2024-03-28 22:15:17 +01:00
Gwenhael Goavec-Merou 9b35959198 part: added xilinx xc6slx45t 2024-03-28 22:14:52 +01:00
Gwenhael Goavec-Merou 7bbaef0c87 spiOverJtag: added xc6slx45tfgg48 support 2024-03-28 22:14:27 +01:00
Gwenhael Goavec-Merou b9f7925d9b doc: added xilinx xc6slx45t 2024-03-28 22:13:48 +01:00
Gwenhael Goavec-Merou 172295fb38 spiFlashdb: added M25P32 chip 2024-03-28 22:12:57 +01:00
Gwenhael Goavec-Merou 62f818cd68
Merge pull request #450 from kalata23/master
Added Zetta ZD25WQ16CSIGT
2024-03-28 22:02:21 +01:00
Gwenhael Goavec-Merou 559aaa64f7
Merge pull request #449 from uint69-t/master
Add support for the Cyclone II
2024-03-28 21:56:41 +01:00
kalata23 206795c9c7 Added Zetta ZD25WQ16CSIGT 2024-03-28 14:20:08 +02:00
uint69-t 089bc5aa4e Add support for the Cyclone II 2024-03-27 12:58:50 -03:00
Gwenhael Goavec-Merou 061bf3945d prepare sub-relase v0.12.1 2024-03-23 18:29:49 +01:00
Gwenhael Goavec-Merou 02c33271e0 lattice,xilinx: new try to fix (again) uint64_t print format 2024-03-18 06:57:59 +01:00
Gwenhael Goavec-Merou 1d276ebb9d spiFlashdb: MX25R6435F: added missing bp bit 4 2024-03-15 07:02:31 +01:00
Gwenhael Goavec-Merou 41ecac5d0c
Merge pull request #447 from pu-cc/spiflashdb-mx25r643f
spiFlashdb: add MX25R6435F and fix SPIFlash::bp_to_len
2024-03-15 07:00:12 +01:00
Gwenhael Goavec-Merou 63c19bcb95
Merge pull request #446 from pu-cc/gatemate-dirtyjtag-gpio
gatemate: fix jtag-spi-bypass with dirtyJtag
2024-03-15 06:10:38 +01:00
Patrick Urban 972ded1298 spiFlashdb: add MX25R6435F and fix SPIFlash::bp_to_len 2024-03-15 00:44:17 +01:00
Patrick Urban 7dc3ff7803 gatemate: fix jtag-spi-bypass with dirtyJtag 2024-03-15 00:13:12 +01:00
Patrick Urban e52d647d7b gatemate: fix passive spi segfaults and improve verbosity 2024-03-15 00:11:11 +01:00
Patrick Urban 5bb8ce83b3 gatemate: fix CFG_MD typos 2024-03-15 00:07:05 +01:00
Patrick Urban 2e5c35edde gatemate: remove flash reset, power_up and read_id duplicates 2024-03-14 23:31:34 +01:00
Gwenhael Goavec-Merou 2b86c07c82
Merge pull request #445 from pu-cc/gatemate-dirtyjtag-gpio
gatemate: fix unintended gpio access with dirtyJtag cables
2024-03-14 19:44:10 +01:00
Patrick Urban 1304f67f1b gatemate: fix unintended gpio access with dirtyJtag cables 2024-03-14 18:02:50 +01:00
184 changed files with 7141 additions and 1102 deletions

View File

@ -14,7 +14,7 @@ jobs:
steps:
- name: '🧰 Checkout'
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: '📓 BuildTheDocs (BTD)'
uses: buildthedocs/btd@v0
@ -27,7 +27,7 @@ jobs:
run: sudo rm -rf doc/_build/html/.git
- name: '📤 Upload artifact: HTML'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: openFPGALoader-Documentation
path: doc/_build/html
@ -38,14 +38,14 @@ jobs:
fail-fast: false
matrix:
os:
- 20
- 22
- 24
name: '🚧🐧 Ubuntu ${{ matrix.os }} | build'
runs-on: ubuntu-${{ matrix.os }}.04
steps:
- name: '🧰 Checkout'
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: '⚙️ Install dependencies'
run: |
@ -55,7 +55,7 @@ jobs:
gzip \
libftdi1-2 \
libftdi1-dev \
libhidapi-hidraw0 \
libhidapi-libusb0 \
libhidapi-dev \
libudev-dev \
pkg-config \
@ -80,7 +80,7 @@ jobs:
tar -cvzf ../ubtuntu${{ matrix.os }}.04-openFPGALoader.tgz -C dist .
- name: '📤 Upload artifact: tarball'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ubtuntu${{ matrix.os }}.04-openFPGALoader
path: ubtuntu${{ matrix.os }}.04-openFPGALoader.tgz
@ -101,7 +101,7 @@ jobs:
steps:
- name: '🧰 Checkout'
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: '⚙️ Install dependencies'
run: |
@ -122,8 +122,8 @@ jobs:
fail-fast: false
matrix:
os:
- 20
- 22
- 24
name: '🚦🐧 Ubuntu ${{ matrix.os }} | test'
runs-on: ubuntu-${{ matrix.os }}.04
steps:
@ -133,12 +133,12 @@ jobs:
sudo apt update -qq
sudo apt install -y \
libftdi1-2 \
libhidapi-hidraw0 \
libhidapi-libusb0 \
udev \
zlib1g
- name: '📥 Download artifact: package'
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4.1.7
with:
name: ubtuntu${{ matrix.os }}.04-openFPGALoader
@ -158,7 +158,7 @@ jobs:
jobs: ${{ steps.matrix.outputs.jobs }}
steps:
- id: matrix
uses: msys2/setup-msys2/matrix@main
uses: msys2/setup-msys2/matrix@a5d2c5a565c520efa5f477391e4e3f87c2e08f46
with:
systems: >-
mingw64
@ -167,7 +167,7 @@ jobs:
win:
needs: win-jobs
uses: msys2/setup-msys2/.github/workflows/PKGBUILD.yml@main
uses: msys2/setup-msys2/.github/workflows/PKGBUILD.yml@a5d2c5a565c520efa5f477391e4e3f87c2e08f46
with:
name: openFPGALoader
matrix: ${{ needs.win-jobs.outputs.jobs }}
@ -187,7 +187,7 @@ jobs:
steps:
- name: '📥 Download artifacts'
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4.1.7
with:
path: artifact

View File

@ -24,6 +24,7 @@ ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", MODE="664", GROUP="plugdev",
# anlogic cable
ATTRS{idVendor}=="0547", ATTRS{idProduct}=="1002", MODE="664", GROUP="plugdev", TAG+="uaccess"
ATTRS{idVendor}=="336c", ATTRS{idProduct}=="1002", MODE="664", GROUP="plugdev", TAG+="uaccess"
# altera usb-blaster
ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="664", GROUP="plugdev", TAG+="uaccess"
@ -35,6 +36,9 @@ ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6810", MODE="664", GROUP="plugdev",
# altera usb-blasterII - initialized
ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6010", MODE="664", GROUP="plugdev", TAG+="uaccess"
# altera usb-blasterIII
ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6022", MODE="664", GROUP="plugdev", TAG+="uaccess"
# dirtyJTAG
ATTRS{idVendor}=="1209", ATTRS{idProduct}=="c0ca", MODE="664", GROUP="plugdev", TAG+="uaccess"
@ -50,10 +54,19 @@ ATTRS{idVendor}=="0d28", ATTRS{idProduct}=="0204", MODE="664", GROUP="plugdev",
# icebreaker bitsy
ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="6146", MODE="664", GROUP="plugdev", TAG+="uaccess"
# Radiona ULX3S/ULX4M (DFU)
ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="614b", MODE="664", GROUP="plugdev", TAG+="uaccess"
# numato systems
ATTRS{idVendor}=="2a19", ATTRS{idProduct}=="1009", MODE="644", GROUP="plugdev", TAG+="uaccess"
# orbtrace-mini dfu
ATTRS{idVendor}=="1209", ATTRS{idProduct}=="3442", MODE="664", GROUP="plugdev", TAG+="uaccess"
# QinHeng Electronics USB To UART+JTAG (ch347)
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55dd", MODE="664", GROUP="plugdev", TAG+="uaccess"
# ESP32-S3 (usb-jtag bridge)
ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", MODE="664", GROUP="plugdev", TAG+="uaccess"
LABEL="openfpgaloader_rules_end"

View File

@ -1,9 +1,8 @@
cmake_minimum_required(VERSION 3.5)
# set the project name
project(openFPGALoader VERSION "0.12.0" LANGUAGES CXX)
project(openFPGALoader VERSION "1.0.0" LANGUAGES CXX)
add_definitions(-DVERSION=\"v${PROJECT_VERSION}\")
option(ENABLE_OPTIM "Enable build with -O3 optimization level" ON)
option(BUILD_STATIC "Whether or not to build with static libraries" OFF)
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
@ -12,6 +11,7 @@ else()
option(ENABLE_UDEV "use udev to search JTAG adapter from /dev/xx" ON)
endif()
option(ENABLE_CMSISDAP "enable cmsis DAP interface (requires hidapi)" ON)
option(ENABLE_GOWIN_GWU2X "enable Gowin GWU2X interface" ON)
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
option(ENABLE_LIBGPIOD "enable libgpiod bitbang driver (requires libgpiod)" ON)
option(ENABLE_REMOTEBITBANG "enable remote bitbang driver" ON)
@ -28,7 +28,7 @@ set(ISE_PATH "/opt/Xilinx/14.7" CACHE STRING "ise root directory (default: /opt/
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -Wextra ${CMAKE_CXX_FLAGS_DEBUG}")
if (ENABLE_OPTIM)
if(ENABLE_OPTIM AND NOT(CMAKE_BUILD_TYPE STREQUAL "Debug"))
set(CMAKE_CXX_FLAGS "-O3 ${CMAKE_CXX_FLAGS}")
endif()
@ -48,10 +48,10 @@ if (USE_PKGCONFIG)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBFTDI REQUIRED libftdi1)
pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
pkg_check_modules(HIDAPI hidapi-hidraw)
# if hidraw not found try with libusb
pkg_check_modules(HIDAPI hidapi-libusb)
# if libusb not found try with hidraw
if (NOT HIDAPI_FOUND)
pkg_check_modules(HIDAPI hidapi-libusb)
pkg_check_modules(HIDAPI hidapi-hidraw)
endif()
if (NOT HIDAPI_FOUND)
pkg_check_modules(HIDAPI hidapi)
@ -100,7 +100,6 @@ set(OPENFPGALOADER_SOURCE
src/efinix.cpp
src/efinixHexParser.cpp
src/fx2_ll.cpp
src/ice40.cpp
src/ihexParser.cpp
src/pofParser.cpp
src/rawParser.cpp
@ -109,8 +108,6 @@ set(OPENFPGALOADER_SOURCE
src/usbBlaster.cpp
src/epcq.cpp
src/svf_jtag.cpp
src/jedParser.cpp
src/feaparser.cpp
src/display.cpp
src/jtag.cpp
src/ftdiJtagBitbang.cpp
@ -118,12 +115,10 @@ set(OPENFPGALOADER_SOURCE
src/configBitstreamParser.cpp
src/ftdipp_mpsse.cpp
src/main.cpp
src/latticeBitParser.cpp
src/libusb_ll.cpp
src/gowin.cpp
src/device.cpp
src/jlink.cpp
src/lattice.cpp
src/progressBar.cpp
src/fsparser.cpp
src/mcsParser.cpp
@ -134,6 +129,7 @@ set(OPENFPGALOADER_SOURCE
src/xilinxMapParser.cpp
src/colognechip.cpp
src/colognechipCfgParser.cpp
src/esp_usb_jtag.cpp
)
set(OPENFPGALOADER_HEADERS
@ -151,7 +147,6 @@ set(OPENFPGALOADER_HEADERS
src/efinix.hpp
src/efinixHexParser.hpp
src/fx2_ll.hpp
src/ice40.hpp
src/ihexParser.hpp
src/pofParser.hpp
src/progressBar.hpp
@ -167,8 +162,6 @@ set(OPENFPGALOADER_HEADERS
src/fsparser.hpp
src/part.hpp
src/board.hpp
src/jedParser.hpp
src/feaparser.hpp
src/display.hpp
src/mcsParser.hpp
src/ftdipp_mpsse.hpp
@ -182,12 +175,30 @@ set(OPENFPGALOADER_HEADERS
src/gowin.hpp
src/cable.hpp
src/ftdispi.hpp
src/lattice.hpp
src/latticeBitParser.hpp
src/xilinx.hpp
src/xilinxMapParser.hpp
src/colognechip.hpp
src/colognechipCfgParser.hpp
src/esp_usb_jtag.hpp
)
# Lattice Drivers / Files parsers.
list(APPEND OPENFPGALOADER_SOURCE
src/ice40.cpp
src/lattice.cpp
src/latticeSSPI.cpp
src/feaparser.cpp
src/jedParser.cpp
src/latticeBitParser.cpp
)
list(APPEND OPENFPGALOADER_HEADERS
src/ice40.hpp
src/lattice.hpp
src/latticeSSPI.hpp
src/jedParser.hpp
src/feaparser.hpp
src/latticeBitParser.hpp
)
link_directories(
@ -218,6 +229,16 @@ target_link_libraries(openFPGALoader
${LIBFTDI_LIBRARIES}
)
# Gowin GWU2X JTAG interface
if(ENABLE_GOWIN_GWU2X)
target_sources(openFPGALoader PRIVATE src/gwu2x_jtag.cpp)
list (APPEND OPENFPGALOADER_HEADERS src/gwu2x_jtag.hpp)
add_definitions(-DENABLE_GOWIN_GWU2X=1)
message("Gowin GWU2X support enabled")
else()
message("Gowin GWU2X support disabled")
endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
# winsock provides ntohs
target_link_libraries(openFPGALoader ws2_32)

View File

@ -49,7 +49,7 @@ openFPGALoader -c cmsisdap fpga_bitstream.bit
## Usage
```
Usage: openFPGALoader [OPTION...] BIT_FILE
Usage: ./openFPGALoader [OPTION...] BIT_FILE
openFPGALoader -- a program to flash FPGA
--altsetting arg DFU interface altsetting (only for DFU mode)
@ -61,6 +61,8 @@ openFPGALoader -- a program to flash FPGA
-B, --bridge arg disable spiOverJtag model detection by
providing bitstream(intel/xilinx)
-c, --cable arg jtag interface
--status-pin arg JTAG mode / FTDI: GPIO pin number to use as a
status indicator (active low)
--invert-read-edge JTAG mode / FTDI: read on negative edge
instead of positive
--vid arg probe Vendor ID
@ -71,10 +73,13 @@ openFPGALoader -- a program to flash FPGA
--ftdi-serial arg FTDI chip serial number
--ftdi-channel arg FTDI chip channel number (channels 0-3 map to
A-D)
--detect detect FPGA
-d, --device arg device to use (/dev/ttyUSBx)
--detect detect FPGA, add -f to show connected flash
--dfu DFU mode
--dump-flash Dump flash mode
--bulk-erase Bulk erase flash
--enable-quad Enable quad mode for SPI Flash
--disable-quad Disable quad mode for SPI Flash
--target-flash arg for boards with multiple flash chips (some
Xilinx UltraScale boards), select the target
flash: primary (default), secondary or both
@ -84,11 +89,13 @@ openFPGALoader -- a program to flash FPGA
with dump-flash
--file-type arg provides file type instead of let's deduced
by using extension
--flash-sector arg flash sector (Lattice parts only)
--flash-sector arg flash sector (Lattice and Altera MAX10 parts
only)
--fpga-part arg fpga model flavor + package
--freq arg jtag frequency (Hz)
-f, --write-flash write bitstream in flash (default: false)
--index-chain arg device index in JTAG-chain
--misc-device arg add JTAG non-FPGA devices <idcode,irlen,name>
--ip arg IP address (XVC and remote bitbang client)
--list-boards list all supported boards
--list-cables list all supported cables
@ -96,7 +103,8 @@ openFPGALoader -- a program to flash FPGA
-m, --write-sram write bitstream in SRAM (default: true)
-o, --offset arg Start address (in bytes) for read/write into
non volatile memory (default: 0)
--pins arg pin config TDI:TDO:TCK:TMS
--pins arg pin config TDI:TDO:TCK:TMS or
MOSI:MISO:SCK:CS[:HOLDN:WPN]
--probe-firmware arg firmware for JTAG probe (usbBlasterII)
--protect-flash arg protect SPI flash area
--quiet Produce quiet output (no progress bar)
@ -113,10 +121,15 @@ openFPGALoader -- a program to flash FPGA
1:verbose, 2:debug
-h, --help Give this help list
--verify Verify write operation (SPI Flash only)
--xvc Xilinx Virtual Cable Functions
--port arg Xilinx Virtual Cable and remote bitbang Port
(default 3721)
--mcufw arg Microcontroller firmware
--conmcu Connect JTAG to MCU
-D, --read-dna Read DNA (Xilinx FPGA only)
-X, --read-xadc Read XADC (Xilinx FPGA only)
--read-register arg Read Status Register(Xilinx FPGA only)
--user-flash arg User flash file (Gowin LittleBee FPGA only)
-V, --Version Print program version
Mandatory or optional arguments to long options are also mandatory or optional
@ -142,3 +155,7 @@ OPENFPGALOADER_SOJ_DIR=/somewhere openFPGALoader xxxx
`OPENFPGALOADER_SOJ_DIR` must point to directory containing **spiOverJtag**
bitstreams.
## Sponsors/Partners
![Sponsors](https://github.com/user-attachments/assets/cb4efce1-ed0c-461c-bd05-9caeb440870d)

View File

@ -1,14 +1,16 @@
Anlogic:
- Description: EG4
Model: S20
URL: http://www.anlogic.com/prod_view.aspx?TypeId=10&Id=168&FId=t3:10:3
Model:
- EG4D20
- EG4S20
URL: https://www.anlogic.com/en/product/fpga/saleagle/eg4
Memory: OK
Flash: AS
- Description: SALELF 2
Model: EF2M45
URL: http://www.anlogic.com/prod_view.aspx?TypeId=12&Id=170&FId=t3:12:3
URL: https://www.anlogic.com/en/product/fpga/salelf/salelf2
Memory: OK
Flash: OK
@ -31,13 +33,17 @@ Cologne Chip:
Efinix:
- Description: Trion
Model: T8
Model:
- T8
- T13
URL: https://www.efinixinc.com/products-trion.html
Memory: NA
Flash: OK
- Description: Titanium
Model: Ti60
Model:
- Ti60
- Ti180
URL: https://www.efinixinc.com/products-titanium.html
Memory: NA
Flash: OK
@ -45,7 +51,7 @@ Efinix:
Gowin:
- Description: GW1N
- Description: LittleBee (GW1N)
Model:
- GW1N-1
- GW1N-4
@ -54,17 +60,43 @@ Gowin:
- GW1NS-2C
- GW1NSR-4C
- GW1NZ-1
- GW2A-18C
- GW5AST-138
- GW5AT-138
- GW5A-25
URL: https://www.gowinsemi.com/en/product/detail/2/
URL: https://www.gowinsemi.com/en/product/detail/46/
Memory: OK
Flash: IF / EF
Flash: IF
- Description: Arora (GW2A)
Model:
- GW2A-18C
- GW2A-55
URL: https://www.gowinsemi.com/en/product/detail/38/
Memory: OK
Flash: EF
- Description: Arora V (GW5A)
Model:
- GW5A-25
- GW5AST-138
- GW5AT-60
- GW5AT-138
URL: https://www.gowinsemi.com/en/product/detail/60/
Memory: OK
Flash: EF
Intel:
- Description: Max II(CPLD)
Model: EPM240T100C5N
URL: https://www.intel.com/content/www/us/en/support/programmable/support-resources/devices/max-ii-support.html
Memory: OK
Flash: OK
- Description: Cyclone II
Model: EP2C5T144C8N
URL: https://www.intel.com/content/www/us/en/support/programmable/support-resources/devices/cyclone-ii-support.html
Memory: OK
Flash: OK
- Description: Cyclone III
Model: EP3C16
URL: https://www.intel.com/content/www/us/en/programmable/products/fpga/cyclone-series/cyclone-iii/support.html
@ -79,6 +111,13 @@ Intel:
Memory: OK
Flash: OK
- Description: Cyclone IV GX
Model:
- EP4CGX150
URL: https://www.intel.com/content/www/us/en/products/details/fpga/cyclone/iv/gx/products.html
Memory: OK
Flash: OK
- Description: Cyclone V E
Model:
- 5CEA2
@ -98,6 +137,13 @@ Intel:
Memory: OK
Flash: NT
- Description: Stratix V GS
Model:
- 5SGSD5
URL: https://www.intel.de/content/www/de/de/products/sku/210318/stratix-v-5sgsd5-fpga/specifications.html
Memory: OK
Flash: OK
- Description: Cyclone 10 LP
Model: 10CL025
URL: https://www.intel.com/content/www/us/en/products/programmable/fpga/cyclone-10.html
@ -105,10 +151,12 @@ Intel:
Flash: OK
- Description: Max 10
Model: 10M08
Model:
- 10M02
- 10M08
URL: https://www.intel.fr/content/www/fr/fr/products/details/fpga/max/10.html
Memory: SVF
Flash: SVF
Flash: POF
Lattice:
@ -131,6 +179,12 @@ Lattice:
Memory: OK
Flash: OK
- Description: ECP3
Model: LFE3-70E
URL: https://www.latticesemi.com/Products/FPGAandCPLD/LatticeECP3
Memory: OK
Flash: TBD
- Description: ECP5
Model:
- LFE5U-12
@ -214,6 +268,7 @@ Xilinx:
- xc7k325t
- xc7k410t
- xc7k420t
- xc7k480t
URL: https://www.xilinx.com/products/silicon-devices/fpga/kintex-7.html#productTable
Memory: OK
Flash: OK
@ -237,6 +292,7 @@ Xilinx:
- Description: Artix UltraScale+
Model:
- xcau15p
- xcau25p
URL: https://www.xilinx.com/products/silicon-devices/fpga/artix-ultrascale-plus.html
Memory: OK
@ -250,7 +306,15 @@ Xilinx:
- xcku115
URL: https://www.xilinx.com/products/silicon-devices/fpga/kintex-ultrascale.html#productTable
Memory: OK
Flash: NA
Flash: OK (primary)
- Description: Kintex UltraScale+
Model:
- xcku3p
- xcku5p
URL: https://www.xilinx.com/products/silicon-devices/fpga/kintex-ultrascale-plus.html#productTable
Memory: OK
Flash: OK
- Description: Virtex 6
Model:
@ -259,6 +323,13 @@ Xilinx:
Memory: OK
Flash: OK
- Description: Virtex UltraScale
Model:
- xcvu095
URL: https://www.amd.com/en/products/adaptive-socs-and-fpgas/fpga/virtex-ultrascale.html#productTable
Memory: OK
Flash: TBD
- Description: Virtex UltraScale+
Model:
- xcvu9p
@ -266,6 +337,13 @@ Xilinx:
Memory: OK
Flash: OK
- Description: Spartan UltraScale+
Model:
- xcsu35p
URL: https://www.amd.com/en/products/adaptive-socs-and-fpgas/fpga/spartan-ultrascale-plus.html#productTable
Memory: OK
Flash: TBD
- Description: Spartan 3
Model:
- xc3s200
@ -280,6 +358,7 @@ Xilinx:
- xc6slx16
- xc6slx25
- xc6slx45
- xc6slx45T
- xc6slx150T
URL: https://www.xilinx.com/products/silicon-devices/fpga/spartan-6.html
Memory: OK

View File

@ -1,7 +1,7 @@
- ID: ac701
Description: Xilinx Artix-7 FPGA AC701 Evaluation Kit
URL: https://www.xilinx.com/products/boards-and-kits/ek-a7-ac701-g.html
FPGA: Artix xc7a200t2fbg676c
FPGA: Artix xc7a200tfbg676
Memory: OK
Flash: NT
Constraints: AC701
@ -13,6 +13,20 @@
Memory: OK
Flash: OK
- ID: alinx_ax7201
Description: AX7201 FPGA Dev Board & Kit with AMD Artix 7
URL: https://www.en.alinx.com/Product/FPGA-Development-Boards/Artix-7/AX7201.html
FPGA: Artix xc7a200tsbg484
Memory: OK
Flash: OK
- ID: alinx_ax7203
Description: AX7203 FPGA Dev Board & Kit with AMD Artix 7
URL: https://www.en.alinx.com/Product/FPGA-Development-Boards/Artix-7/AX7203.html
FPGA: Artix xc7a200tfbg484
Memory: OK
Flash: OK
- ID: litex-acorn-baseboard-mini
Description: The LiteX-Acorn-Baseboards are baseboards developed around the SQRL's Acorn board (or Nite/LiteFury)
URL: https://github.com/enjoy-digital/litex-acorn-baseboard/
@ -265,6 +279,13 @@
Memory: OK
Flash: OK
- ID: cyc5000
Description: Trenz CYC5000
URL: https://shop.trenz-electronic.de/en/TEI0050-01-AAH13A-CYC5000-with-Cyclone-V-FPGA-25kLE-8-MByte-SDRAM
FPGA: Cyclone V 5CEBA2U15C8
Memory: OK
Flash: OK
- ID: c10lp-refkit
Description: Trenz c10lp-refkit
URL: https://shop.trenz-electronic.de/en/TEI0009-02-055-8CA-Cyclone-10-LP-RefKit-10CL055-Development-Board-32-MByte-SDRAM-16-MByte-Flash
@ -323,6 +344,13 @@
FPGA: MAX 10 10M50DAF484C6GES
Memory: OK
- ID: dragonL
Description: KNJN Dragon-L PCI Express & HDMI FPGA board
URL: https://www.knjn.com/FPGA-Dragon-L.html
FPGA: Spartan6 xc6slx25Tcsg324
Memory: OK
Flash: OK
- ID: ecp5_evn
Description: Lattice ECP5 5G Evaluation Board
URL: https://www.latticesemi.com/en/Products/DevelopmentBoardsAndKits/ECP5EvaluationBoard
@ -373,6 +401,13 @@
Memory: OK
Flash: NA
- ID: hyvision_opt01
Description: HyVision PCIe OPT01 rev.F
URL: NA
FPGA: Kintex7 xc7k70tfbg676
Memory: OK
Flash: OK
- ID: honeycomb
Description: honeycomb
URL: https://github.com/Disasm/honeycomb-pcb
@ -453,6 +488,13 @@
Flash: AS
Constraints: IceZumAlhambraII
- ID: icepi-zero
Description: Icepi Zero
URL: https://github.com/cheyao/icepi-zero
FPGA: ECP5 LFE5U
Memory: OK
Flash: OK
- ID: kc705
Description: Xilinx KC705
URL: https://www.xilinx.com/products/boards-and-kits/ek-k7-kc705-g.html
@ -466,7 +508,7 @@
URL: https://www.xilinx.com/products/boards-and-kits/kcu105.html
FPGA: Kintex UltraScale xcku040-ffva1156
Memory: OK
Flash: OK
Flash: OK (primary and secondary)
- ID: kcu116
Description: Xilinx KCU116
@ -496,6 +538,13 @@
Memory: OK
Flash: OK
- ID: lilygo-t-fpga
Description: Lilygo T-FPGA
URL: https://www.lilygo.cc/products/t-fpga
FPGA: Gowin GW1NSR-LV4CQN48PC6/15
Memory: OK
Flash: OK
- ID: machXO2EVN
Description: Lattice MachXO2 Breakout Board Evaluation Kit
URL: https://www.latticesemi.com/products/developmentboardsandkits/machxo2breakoutboard
@ -517,6 +566,13 @@
Memory: OK
Flash: OK
- ID: mlk-s200-eg4d20
Description: MILIANKE S200 EG4D20 Development Board
URL: https://www.milianke.com/product-item-108.html
FPGA: eagle s20 EG4D20EG176
Memory: OK
Flash: OK
- ID: mini_itx
Description: Avnet Mini-ITX Base Kit
URL: https://www.avnet.com/wps/portal/us/products/avnet-boards/avnet-board-families/mini-itx/
@ -524,6 +580,13 @@
Memory: OK
Flash: NA
- ID: mimas_a7
Description: Numato Systems Mimas A7
URL: https://numato.com/product/mimas-a7-artix-7-fpga-development-board/
FPGA: Artix xc7a50tfgg484
Memory: OK
Flash: OK
- ID: nexys_a7_50
Description: Digilent Nexys A7(Nexys 4 DDR)
URL: https://digilent.com/reference/programmable-logic/nexys-a7/start
@ -561,6 +624,13 @@
Memory: OK
Flash: NT
- ID: opensourceSDRLabKintex7
Description: Open Source SDR Lab Kintex-7 325t FPGA PCIE Development Board
URL: https://opensourcesdrlab.com/products/fpga-xilinx-kintex-7-xc7k325t-pcie-development-board-with-dual-gigabit-ethernet-ports-dual-10-gigabit-sfp-optical-communication
FPGA: Kintex7 xc7k325tffg676
Memory: OK
Flash: OK
- ID: orbtrace_dfu
Description: ORBTrace mini (dfu mode)
URL: https://store.zyp.no/product/orbtrace-mini
@ -674,6 +744,13 @@
Memory: OK
Flash: NA
- ID: SPEC45
Description: CERN Simple PCIe FMC carrier SPEC
URL: https://ohwr.org/project/spec150/wikis/home
FPGA: Spartan6 xc6slx45Tfgg484
Memory: OK
Flash: OK
- ID: SPEC150
Description: CERN Simple PCIe FMC carrier SPEC
URL: https://ohwr.org/project/spec150/wikis/home
@ -688,6 +765,13 @@
Memory: OK
Flash: OK
- ID: tangconsole
Description: Sipeed Tang Console (dock board for Tang Mega 60k or 138k SOM)
URL: https://wiki.sipeed.com/hardware/en/tang/tang-console/mega-console.html
FPGA: Gowin Arora V GW5AT-60 / GW5AT-138
Memory: OK
Flash: OK
- ID: tangnano
Description: Sipeed Tang Nano
URL: https://tangnano.sipeed.com/en/
@ -818,6 +902,13 @@
Memory: NA
Flash: OK
- ID: ulx4m_dfu
Description: Radiona ULX4M LD/LS DFU mode
URL: https://github.com/intergalaktik/ulx4m-ls
FPGA: ECP5 LFE5U
Memory: NA
Flash: OK
- ID: vec_v6
Description: Xilinx VCU118
URL: https://vmm-srs.docs.cern.ch/
@ -825,6 +916,20 @@
Memory: OK
Flash: OK
- ID: vc709
Description: AMD Virtex-7 FPGA VC709 Connectivity Kit
URL: https://www.xilinx.com/products/boards-and-kits/dk-v7-vc709-g.html
FPGA: Virtex7 xc7vx690tffg1761
Memory: OK
Flash: NA
- ID: vcu108
Description: Xilinx VCU108
URL: https://www.xilinx.com/products/boards-and-kits/vcu108.html
FPGA: Virtex UltraScale xcvu095-ffva2104
Memory: OK
Flash: TBD
- ID: vcu118
Description: Xilinx VCU118
URL: https://www.xilinx.com/products/boards-and-kits/vcu118.html
@ -939,3 +1044,24 @@
FPGA: xc7s50csga324?
Memory: OK
Flash: OK
- ID: efinix_jtag_ft2232
Description: Efinix FT2232 development boards with JTAG on port 2 (Ti180J484 EVK, etc)
URL: https://www.efinixinc.com/products-devkits-titaniumti180j484.html
FPGA: Titanium Ti180J484 (and others)
Memory: OK
Flash: NA
- ID: step-max10_v1
Description: STEP MAX10 V1
URL: https://wiki.stepfpga.com/step-max10
FPGA: Altera 10M02SCM153C8G
Memory: OK
Flash: NA
- ID: step-mxo2_v2
Description: STEP MXO2 V2
URL: https://wiki.stepfpga.com/xo2-4000hc
FPGA: Lattice LCMXO2-4000HC-4MG132CC
Memory: OK
Flash: OK

View File

@ -12,6 +12,13 @@ arm-usb-ocd-h:
URL: https://www.olimex.com/Products/ARM/JTAG/ARM-USB-OCD-H/
arm-usb-tiny-h:
- Name: Olimex ARM-USB-TINY-H adapter
Description: Low-cost high-speed ARM USB JTAG
URL: https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/
bus_blaster:
- Name: Dangerousprototypes Bus Blaster
@ -67,6 +74,13 @@ gatemate_evb_spi:
URL: https://colognechip.com/programmable-logic/gatemate/
gwu2x:
- Name: gwu2x
Description: Gowin GWUX2X
URL: https://www.gowinsemi.com/en/product/detail/55/
dfu:
- Name: DFU interface
@ -228,6 +242,11 @@ lpc-link2:
URL: https://www.nxp.com/design/microcontrollers-developer-resources/lpc-link2:OM13054
numato:
- Name: numato
Description: Embedded cable for Numato Systems Mimas-A7 board
orbtrace:
- Name: orbtrace interface
@ -276,6 +295,13 @@ usb-blasterII:
URL: https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug_usb_blstr_ii_cable.pdf
usb-blasterIII:
- Name: intel USB Blaster III interface
Description: JTAG programmer cable from intel/altera (FTDI2232 with custom VID/PID)
URL: https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug_usb_blstr_ii_cable.pdf
xvc-client:
- Name: Xilinx Virtual Cable

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -34,7 +34,7 @@ Reading the bitstream from STDIN
.. code-block:: bash
# FPGA side
nc -lp port | openFPGALoader --file-type xxx [option
nc -lp port | openFPGALoader --file-type xxx [option]
# Bitstream side
nc -q 0 host port < /path/to/bitstream.ext
@ -83,6 +83,35 @@ Writing to an arbitrary address in flash memory
With FPGA using an external SPI flash (*xilinx*, *lattice ECP5/nexus/ice40*, *anlogic*, *efinix*) option ``-o`` allows
one to write raw binary file to an arbitrary adress in FLASH.
Detect/read/write on primary/secondary flash memories
=====================================================
With FPGA using two external SPI flash (some *xilinx* boards) option ``--target-flash`` allows to select the QSPI chip.
To detect:
.. code-block:: bash
openFPGALoader -b kcu105 -f --target-flash {primary,secondary} --detect
To read the primary flash memory:
.. code-block:: bash
openFPGALoader -b kcu105 -f --target-flash primary --dump-flash --file-size N_BYTES mydump.bin
and the second flash memory:
.. code-block:: bash
openFPGALoader -b kcu105 -f --target-flash secondary --dump-flash --file-size N_BYTES --secondary-bitstream mydump.bin
To write on secondary flash memory:
.. code-block:: bash
openFPGALoader -b kcu105 -f --target-flash secondary --secondary-bitstream mySecondaryBitstream.bin
Using an alternative directory for *spiOverJtag*
================================================

View File

@ -6,6 +6,32 @@ Installing openFPGALoader
Linux
=====
Debian/Ubuntu
----------
openFPGALoader is available in the default repositories:
.. code-block:: bash
sudo apt install openfpgaloader
Guix
----------
openFPGALoader is available in the default repositories:
.. code-block:: bash
guix install openfpgaloader
To use openFPGALoader under GuixSystem without root privileges it is necessary to install the necessary udev rules. This can be done by extending ``udev-service-type`` in the ``operating-system`` configuration file with this package
.. code-block:: bash
(udev-rules-service 'openfpgaloader openfpgaloader #:groups '(\"plugdev\")
Additionally, ``plugdev`` group should be registered in the ``supplementary-groups`` field of your ``user-account``declaration. Refer to ``Base Services`` section in the manual for examples.
Arch Linux
----------
@ -33,7 +59,7 @@ openFPGALoader is available as a Copr repository:
sudo dnf copr enable mobicarte/openFPGALoader
sudo dnf install openFPGALoader
From source (Debian, Ubuntu)
From source
----------------------------
This application uses ``libftdi1``, so this library must be installed (and, depending on the distribution, headers too):

View File

@ -32,6 +32,13 @@ Check your openFPGALoader version:
If it is older than release then v0.9.0, install the most recent version (from commit `f5b89bff68a5e2147404a895c075773884077438 <https://github.com/trabucayre/openFPGALoader/commit/fe259fb78d185b3113661d04cd7efa9ae0232425>`_ or later).
Cannot flash Tang Nano 20k (issue `#251 <https://github.com/trabucayre/openFPGALoader/issues/511>`_)
====================================================================================================
Some firmware version cannot be flashed on Linux-based systems. Version 2024122312 is such an example. It seems this version was not published on the `SiPeed website <https://api.dl.sipeed.com/TANG/Debugger/onboard/BL616/>`_, however some boards sold have this firmware.
The cause of the problem is the debugger on the Tang Nano, specifically the firmware of this debugger. This firmware can be easily updated by following `these <https://wiki.sipeed.com/hardware/en/tang/common-doc/update_debugger.html>`_ steps.
Cannot flash Tang Nano 9k (issue `#251 <https://github.com/trabucayre/openFPGALoader/issues/251>`_)
===================================================================================================

14
doc/vendors/gowin.rst vendored
View File

@ -62,3 +62,17 @@ It's possible to flash external SPI Flash (connected to MSPI) in bscan mode by u
Gowin's FPGA may fails to be detected if **JTAGSEL_N** (pin 08 for *GW1N-4K*) is used as a GPIO.
To recover you have to pull down this pin (before power up) to recover JTAG interface (*UG292 - JTAGSELL_N section*).
User Flash
----------
.. ATTENTION::
User Flash support is based on reverse engineering of the JTAG protocol. This functionality should be considered
experimental as it hasn't been thoroughly tested, and may in some circumstances destroy your device.
Gowin FPGA come with extra flash space that can be read and written from the programmable logic ("User Flash"). This
flash section can also be programmed via the JTAG interface:
.. code-block:: bash
openFPGALoader --write-flash /path/to/bitstream.fs --user-flash /path/to/flash.bin

155
doc/vendors/intel.rst vendored
View File

@ -34,6 +34,14 @@ SVF and RBF files are supported.
As mentioned in ``cyclone`` handbooks, real-time decompression is not supported by FPGA in JTAG mode.
Keep in mind to disable this option.
You can have Quartus automatically generate SVF and RBF files by adding these lines to the ``qsf`` file, or include them in a ``tcl`` file in FuseSoC
.. code-block::
set_global_assignment -name ON_CHIP_BITSTREAM_DECOMPRESSION OFF
set_global_assignment -name GENERATE_RBF_FILE ON
set_global_assignment -name GENERATE_SVF_FILE ON
file load:
.. code-block:: bash
@ -47,7 +55,13 @@ with ``boardname`` = ``de0``, ``cyc1000``, ``c10lp-refkit``, ``de0nano``, ``de0n
SPI flash
---------
RPD and RBF are supported.
RPD and RBF are supported. POF is only supported for MAX10 (internal flash).
``pof`` to ``rpd``:
.. code-block:: bash
quartus_cpf -c project_name.pof project_name.rpd
``sof`` to ``rpd``:
@ -67,3 +81,142 @@ file load:
openFPGALoader -b boardname -r project_name.rbf
with ``boardname`` = ``cyc1000``, ``c10lp-refkit``.
MAX10: FPGA Programming Guide
=============================
Supported Boards:
* step-max10_v1
* analogMax
Supported File Types:
* ``svf``
* ``pof``
* ``bin`` (arbitrary binary files)
Internal Flash Organization
---------------------------
The internal flash is divided into five sections:
- ``UFM1`` and ``UFM0`` for user data
- ``CFM2``, ``CFM1``, and ``CFM0`` for storing one or two bitstreams
.. image:: ../figs/max10_flash-memory.png
:alt: max10 internal flash memory structure
Flash usage depends on the configuration mode. In all modes:
- ``CFM0`` is used to store a bitstream
- ``UFM0`` and ``UFM1`` are available for user data
- The remaining ``CFMx`` sections (``CFM1``, ``CFM2``) can be used for
additional bitstreams or user data
Using ``svf``
-------------
This method is the **simplest** (and slowest) way to load or write a bitstream.
.. note::
This method is required to load a bitstream into *SRAM*.
.. code-block:: bash
openFPGALoader [-b boardname] -c cablename the_svf_file.svf
**Parameters:**
* ``boardname``: One of the boards supported by ``openFPGALoader`` (optional).
* ``cablename``: One of the supported cables (see ``--list-cables``).
Using ``pof``
-------------
To write a bitstream into the internal flash, using a ``pof`` file is the
**fastest** approach.
.. code-block:: bash
openFPGALoader [-b boardname] [--flash-sector] -c cablename the_pof_file.pof
**Parameters:**
* ``boardname``: A board supported by ``openFPGALoader`` (optional).
* ``cablename``: One of the supported cables (see ``--list-cables``).
* ``--flash-sector``: Optional. Comma-separated list of sectors to update.
If omitted, the entire flash is erased and reprogrammed.
Accepted Flash Sectors:
* ``UFM0``, ``UFM1``: User Flash Memory sections.
* ``CFM0``, ``CFM1``, ``CFM2``: Configuration Flash Memory sectors.
**Example:**
.. code-block:: bash
openFPGALoader -c usb-blaster --flash-sector UFM1,CFM0,CFM2 the_pof_file.pof
This command updates ``UFM1``, ``CFM0``, and ``CFM2``, leaving all other
sectors unchanged.
Using an arbitrary binary file
------------------------------
Unlike Altera Quartus, it supports any binary format without limitations
(not limited to a ``.bin``).
With this feature, it's not required to provides the file at gateware build
time: it may be updated at any time without gateware modification/rebuild.
.. note:: This approach is useful to updates, for example, a softcore CPU firmware.
**Basic usage:**
.. code-block:: bash
openFPGALoader [-b boardname] -c cablename [--offset $OFFSET] the_bin_file.bin
* ``boardname``: a boards supported by ``openFPGALoader`` (optional).
* ``cablename``: One of the supported cables (see ``--list-cables``).
* ``$OFFSET``: To start writing ``$OFFSET`` bytes after *User Flash memory*
start address (optional, default: 0x00).
This command erases and writes the contents of ``the_bin_file.bin`` into
``UFM1`` and ``UFM0``. If ``--offset`` is specified, the binary content is
written starting from that offset.
Depending on the max10 configuration mode (see picture), it's possible to
extend *User Flash Memory* area by using `CFM2` and `CFM1`. This is not the
default behavior and user must explictly change this by using
`--flash-sector` argument:
* ``--flash-sector UFMx`` or ``--flash-sector CFMy`` (with x= 1 or 0 and
y = 2 or 1) to specify only one sector
* ``--flash-sector UFM1,UFM0`` is equivalent to the default behavior
* ``--flash-sector UFM1,CFM2`` to erase and update ``UFM1``, ``UFM0``
and ``CFM2`` (equivalent to ``--flash-sector UFM1,UFM0,CFM2``)
Intel/Altera (Old Boards)
=========================
.. NOTE::
* Cyclone II (FPGA) (Tested OK: EP2C5T144C8N)
* Max II (CPLD) (Tested OK: EPM240T100C5N)
Loading a Serial Vector Format (.svf)
-------------------------------------
SVF files are supported.
To load the file:
.. code-block:: bash
openFPGALoader -c usb-blaster project_name.svf

View File

@ -73,8 +73,8 @@ Bin file load:
Since it's a direct access to the flash (SPI) the ``-b`` option is required.
ECP5/Crosslink-NX
=================
ECP5/ECP3/Certus-NX/CertusPro-NX/Crosslink-NX
=============================================
SRAM
----
@ -89,6 +89,10 @@ SRAM
SPI Flash
---------
.. note::
SPI Flash write is not supported for ECP3 family.
BIT:
.. code-block:: bash

View File

@ -1,3 +1,6 @@
tmp_*
*.bit
*.rbf
vivado*.jou
vivado*.log
.Xil

View File

@ -1,36 +1,41 @@
XILINX_PARTS := xc3s500evq100 \
xc6slx9tqg144 xc6slx9csg324 \
xc6slx16ftg256 xc6slx16csg324 xc6slx45csg324 xc6slx100fgg484 \
xc6slx150tfgg484 xc6slx150tcsg484 \
xc6slx16ftg256 xc6slx16csg324 xc6slx25csg324 xc6slx45csg324 xc6slx100fgg484 \
xc6slx25tcsg324 xc6slx45tfgg484 xc6slx150tfgg484 xc6slx150tcsg484 \
xc6vlx130tff784 \
xc7a15tcpg236 \
xc7a25tcpg238 xc7a25tcsg325 \
xc7a35tcpg236 xc7a35tcsg324 xc7a35tftg256 xc7a35tfgg484 \
xc7a50tcsg324 xc7a50tfgg484 xc7a50tcpg236 xc7a75tfgg484 \
xc7a100tcsg324 xc7a100tfgg484 xc7a100tfgg676\
xc7a200tsbg484 xc7a200tfbg484 \
xc7s25csga225 xc7s25csga324 xc7s50csga324 \
xc7a12t xc7a15t xc7a25t xc7a35t xc7a50t xc7a75t xc7a100t xc7a200t \
xc7s6 xc7s15 xc7s25 xc7s50 xc7s75 xc7s100 \
xc7k70tfbg484 xc7k70tfbg676 \
xc7k160tffg676 \
xc7k325tffg676 xc7k325tffg900 \
xc7k420tffg901 \
xcku3p-ffva676 \
xc7vx330tffg1157 \
xcku040-ffva1156 xcku060-ffva1156 \
xcku5p-ffvb676 \
xcvu9p-flga2104 xcvu37p-fsvh2892
xcvu9p-flga2104 xcvu37p-fsvh2892 \
xcau15p-ffvb676
XILINX_BIT_FILES := $(addsuffix .bit.gz,$(addprefix spiOverJtag_, $(XILINX_PARTS)))
ALTERA_PARTS := 10cl025256 10cl016484 10cl055484 \
ep4ce2217 ep4ce1523 ep4ce11523 5ce223 5ce423 5ce523 5ce927
ep4ce622 ep4ce1017 ep4ce2217 ep4ce1523 ep4ce11523 ep4cgx15027 5ce215 5ce223 5ce423 5ce523 5ce927 5sgsd5
ALTERA_BIT_FILES := $(addsuffix .rbf.gz, $(addprefix spiOverJtag_, $(ALTERA_PARTS)))
BIT_FILES := $(ALTERA_BIT_FILES) $(XILINX_BIT_FILES)
EFINIX_PARTS := t8f81 t13f256 ti180j484
EFINIX_BIT_FILES := $(addsuffix .bit.gz, $(addprefix spiOverJtag_efinix_, $(EFINIX_PARTS)))
BIT_FILES := $(ALTERA_BIT_FILES) $(EFINIX_BIT_FILES) $(XILINX_BIT_FILES)
all: $(BIT_FILES)
$(XILINX_BIT_FILES) : spiOverJtag_%.bit.gz : tmp_%/spiOverJtag.bit
$(EFINIX_BIT_FILES) : spiOverJtag_efinix_%.bit.gz : tmp_efinix_%/efinix_spiOverJtag.bit
gzip -9 -c $< > $@
tmp_%/spiOverJtag.bit : xilinx_spiOverJtag.v
tmp_efinix_%/efinix_spiOverJtag.bit : efinix_spiOverJtag.v
./efinix_build.py --device $*
$(XILINX_BIT_FILES) : spiOverJtag_%.bit.gz : tmp_%/spiOverJtag.bit
tmp_%/spiOverJtag.bit : xilinx_spiOverJtag.v spiOverJtag_core.v
./build.py $*
$(ALTERA_BIT_FILES): spiOverJtag_%.rbf.gz: tmp_%/spiOverJtag.rbf

View File

@ -19,6 +19,8 @@ module spiOverJtag ();
.INTENDED_DEVICE_FAMILY ("Cyclone IV E"),
`elsif cyclonev
.INTENDED_DEVICE_FAMILY ("Cyclone V"),
`elsif stratixv
.INTENDED_DEVICE_FAMILY ("Stratix V"),
`endif
.ENHANCED_MODE (1),
.ENABLE_SHARED_ACCESS ("ON"),

View File

@ -1,6 +1,41 @@
#!/usr/bin/env python3
from edalize.edatool import get_edatool
import os
import re
from edalize.edatool import get_edatool
packages = {
"Artix": {
"xc7a12t" : ["cpg238", "csg325"],
"xc7a15t" : ["cpg236", "csg324", "csg325", "ftg256", "fgg484"],
"xc7a25t" : ["cpg238", "csg325"],
"xc7a35t" : ["cpg236", "csg324", "csg325", "ftg256", "fgg484"],
"xc7a50t" : ["cpg236", "csg324", "csg325", "ftg256", "fgg484"],
"xc7a75t" : ["csg324", "ftg256", "fgg484", "fgg676"],
"xc7a100t" : ["csg324", "ftg256", "fgg484", "fgg676"],
"xc7a200t" : ["sbg484", "fbg484", "fbg676", "ffg1156"],
},
# Added but seems not possible to use same bitstream
# for all Kintex with the same size but different package.
"Kintex 7": {
"xc7k70t" : ["fbg484", "fbg676"],
"xc7k160t" : ["fbg484", "fbg676", "ffg676"],
"xc7k325t" : ["fbg676", "ffg676", "fbg900", "ffg900"],
"xc7k355t" : ["ffg901"],
"xc7k410t" : ["fbg676", "ffg676", "fbg900", "ffg900"],
"xc7k420t" : ["ffg901", "ffg1156"],
"xc7k480t" : ["ffg901", "ffg1156"],
},
"Spartan 7": {
"xc7s6" : ["ftgb196", "cpga196", "csga225"],
"xc7s15" : ["ftgb196", "cpga196", "csga225"],
"xc7s25" : ["ftgb196", "csga225", "csga324"],
"xc7s50" : ["ftgb196", "csga324", "fgga484"],
"xc7s75" : ["fgga484", "fgga676"],
"xc7s100" : ["fgga484", "fgga676"],
},
}
if len(os.sys.argv) != 2:
print("missing board param")
@ -16,9 +51,12 @@ if not os.path.isdir(build_dir):
else:
print ("Successfully created the directory %s " % build_dir)
currDir = os.path.abspath(os.path.curdir) + '/'
files = []
currDir = os.path.abspath(os.path.curdir) + '/'
files = []
parameters = {}
pkg_name = None
pkg = None
model = ""
subpart = part[0:4].lower()
if subpart == '10cl':
@ -32,9 +70,15 @@ elif subpart[0:2] == '5c':
tool = "quartus"
files.append({'name': currDir + 'constr_cycloneV.tcl',
'file_type': 'tclSource'})
elif subpart[0:2] == '5s':
family = "Stratix V"
tool = "quartus"
files.append({'name': currDir + 'constr_cycloneV.tcl',
'file_type': 'tclSource'})
elif subpart == "xc7a":
family = "Artix"
tool = "vivado"
tool = "vivado"
model = subpart
elif subpart == "xc7v":
family = "Virtex 7"
tool = "vivado"
@ -47,9 +91,11 @@ elif subpart == "xc7k":
family = "Kintex7"
tool = "ise"
speed = -2
model = subpart
elif subpart == "xc7s":
family = "Spartan 7"
tool = "vivado"
tool = "vivado"
model = subpart
elif subpart == "xc6s":
family = "Spartan6"
tool = "ise"
@ -62,13 +108,23 @@ elif subpart == "xc6v":
family = "Virtex6"
tool = "ise"
speed = -1
elif subpart in ["xcvu", "xcku"]:
elif subpart in ["xcvu", "xcku", "xcau"]:
family = "Xilinx UltraScale"
tool = "vivado"
else:
print("Error: unknown device")
os.sys.exit()
if model in ["xc7a", "xc7s"]:
pkg = packages[family][part][0]
pkg_name = f"{model}_{pkg}"
if model in ["xc7k"]:
m = re.match(r"(xc7k\d+t)(\w+)", part)
pkg = m.group(2)
pkg_name = f"{model}_{pkg}"
if tool == "ise":
model = m.group(1)
if tool in ["ise", "vivado"]:
pkg_name = {
"xc3s500evq100" : "xc3s_vq100",
@ -76,42 +132,23 @@ if tool in ["ise", "vivado"]:
"xc6slx9csg324" : "xc6s_csg324",
"xc6slx16ftg256" : "xc6s_ftg256",
"xc6slx16csg324" : "xc6s_csg324",
"xc6slx25csg324" : "xc6s_csg324",
"xc6slx25tcsg324" : "xc6s_t_csg324",
"xc6slx45csg324" : "xc6s_csg324",
"xc6slx45tfgg484" : "xc6s_t_fgg484",
"xc6slx100fgg484" : "xc6s_fgg484",
"xc6slx150tcsg484" : "xc6s_csg484",
"xc6slx150tfgg484" : "xc6s_t_fgg484",
"xc6vlx130tff784" : "xc6v_ff784",
"xc7a15tcpg236" : "xc7a_cpg236",
"xc7a25tcpg238" : "xc7a_cpg238",
"xc7a25tcsg325" : "xc7a_csg325",
"xc7a35tcpg236" : "xc7a_cpg236",
"xc7a35tcsg324" : "xc7a_csg324",
"xc7a35tftg256" : "xc7a_ftg256",
"xc7a35tfgg484" : "xc7a_fgg484",
"xc7a50tcpg236" : "xc7a_cpg236",
"xc7a50tcsg324" : "xc7a_csg324",
"xc7a50tfgg484" : "xc7a_fgg484",
"xc7a75tfgg484" : "xc7a_fgg484",
"xc7a100tcsg324" : "xc7a_csg324",
"xc7a100tfgg484" : "xc7a_fgg484",
"xc7a100tfgg676" : "xc7a_fgg676",
"xc7a200tsbg484" : "xc7a_sbg484",
"xc7a200tfbg484" : "xc7a_fbg484",
"xc7k70tfbg484" : "xc7k_fbg484",
"xc7k70tfbg676" : "xc7k_fbg676",
"xc7k160tffg676" : "xc7k_ffg676",
"xc7k325tffg676" : "xc7k_ffg676",
"xc7k325tffg900" : "xc7k_ffg900",
"xc7k420tffg901" : "xc7k_ffg901",
"xc7vx330tffg1157" : "xc7v_ffg1157",
"xc7s25csga225" : "xc7s_csga225",
"xc7s25csga324" : "xc7s_csga324",
"xc7s50csga324" : "xc7s_csga324",
"xcvu9p-flga2104" : "xcvu9p_flga2104",
"xcku040-ffva1156" : "xcku040_ffva1156",
"xcku060-ffva1156" : "xcku060_ffva1156",
"xcvu9p-flga2104" : "xcvu9p_flga2104",
"xcvu37p-fsvh2892" : "xcvu37p_fsvh2892",
"xcku3p-ffva676" : "xcku3p_ffva676",
"xcku5p-ffvb676" : "xcku5p_ffvb676",
}[part]
"xcku3p-ffva676" : "xcku3p_ffva676",
"xcku5p-ffvb676" : "xcku5p_ffvb676",
"xcau15p-ffvb676" : "xcau15p_ffvb676",
}.get(part, pkg_name)
if tool == "ise":
cst_type = "UCF"
tool_options = {'family': family,
@ -121,35 +158,38 @@ if tool in ["ise", "vivado"]:
"xc6slx9csg324": "xc6slx9",
"xc6slx16ftg256": "xc6slx16",
"xc6slx16csg324": "xc6slx16",
"xc6slx25csg324": "xc6slx25",
"xc6slx25tcsg324": "xc6slx25t",
"xc6slx45csg324": "xc6slx45",
"xc6slx45tfgg484": "xc6slx45t",
"xc6slx100fgg484": "xc6slx100",
"xc6slx150tcsg484": "xc6slx150t",
"xc6slx150tfgg484": "xc6slx150t",
"xc6vlx130tff784": "xc6vlx130t",
"xc7k325tffg676": "xc7k325t",
"xc7k325tffg900": "xc7k325t",
"xc7k420tffg901": "xc7k420t",
}[part],
}.get(part, model),
'package': {
"xc3s500evq100": "vq100",
"xc6slx9tqg144": "tqg144",
"xc6slx9csg324": "csg324",
"xc6slx16ftg256": "ftg256",
"xc6slx16csg324": "csg324",
"xc6slx25csg324": "csg324",
"xc6slx25tcsg324": "csg324",
"xc6slx45csg324": "csg324",
"xc6slx45tfgg484": "fgg484",
"xc6slx100fgg484": "fgg484",
"xc6slx150tcsg484": "csg484",
"xc6slx150tfgg484": "fgg484",
"xc6vlx130tff784": "ff784",
"xc7k325tffg676": "ffg676",
"xc7k325tffg900": "ffg900",
"xc7k420tffg901": "ffg901",
}[part],
}.get(part, pkg),
'speed' : speed
}
else:
cst_type = "xdc"
if family == "Xilinx UltraScale":
# Artix/Spartan 7 Specific use case:
if family in ["Artix", "Spartan 7"]:
tool_options = {'part': f"{part}{pkg}-1"}
elif family == "Xilinx UltraScale":
if part in ["xcvu9p-flga2104", "xcku5p-ffvb676"]:
tool_options = {'part': part + '-1-e'}
parameters["secondaryflash"]= {
@ -161,32 +201,50 @@ if tool in ["ise", "vivado"]:
tool_options = {'part': part + '-2-e'}
elif part == "xcvu37p-fsvh2892":
tool_options = {'part': part + '-2L-e'}
elif part in ["xcku040-ffva1156", "xcku060-ffva1156"]:
tool_options = {'part': part + '-2-e'}
parameters["secondaryflash"]= {
'datatype': 'int',
'paramtype': 'vlogdefine',
'description': 'secondary flash',
'default': 1}
elif part == "xcau15p-ffvb676":
tool_options = {'part': part + '-2-e'}
else:
tool_options = {'part': part + '-1'}
cst_file = currDir + "constr_" + pkg_name + "." + cst_type.lower()
files.append({'name': currDir + 'xilinx_spiOverJtag.v',
'file_type': 'verilogSource'})
files.append({'name': cst_file, 'file_type': cst_type})
else:
full_part = {
"10cl016484": "10CL016YU484C8G",
"10cl025256": "10CL025YU256C8G",
"10cl055484": "10CL055YU484C8G",
"ep4ce11523": "EP4CE115F23C7",
"ep4ce2217" : "EP4CE22F17C6",
"ep4ce1523" : "EP4CE15F23C8",
"5ce223" : "5CEFA2F23I7",
"5ce523" : "5CEFA5F23I7",
"5ce423" : "5CEBA4F23C8",
"5ce927" : "5CEBA9F27C7",
"5cse423" : "5CSEMA4U23C6",
"5cse623" : "5CSEBA6U23I7"}[part]
"10cl016484" : "10CL016YU484C8G",
"10cl025256" : "10CL025YU256C8G",
"10cl055484" : "10CL055YU484C8G",
"ep4cgx15027": "EP4CGX150DF27I7",
"ep4ce11523" : "EP4CE115F23C7",
"ep4ce2217" : "EP4CE22F17C6",
"ep4ce1523" : "EP4CE15F23C8",
"ep4ce1017" : "EP4CE10F17C8",
"ep4ce622" : "EP4CE6E22C8",
"5ce215" : "5CEBA2U15C8",
"5ce223" : "5CEFA2F23I7",
"5ce523" : "5CEFA5F23I7",
"5ce423" : "5CEBA4F23C8",
"5ce927" : "5CEBA9F27C7",
"5cse423" : "5CSEMA4U23C6",
"5cse623" : "5CSEBA6U23I7",
"5sgsd5" : "5SGSMD5K2F40I3"}[part]
files.append({'name': currDir + 'altera_spiOverJtag.v',
'file_type': 'verilogSource'})
files.append({'name': currDir + 'altera_spiOverJtag.sdc',
'file_type': 'SDC'})
tool_options = {'device': full_part, 'family':family}
files.append({'name': currDir + 'spiOverJtag_core.v',
'file_type': 'verilogSource'})
parameters[family.lower().replace(' ', '')]= {
'datatype': 'int',
'paramtype': 'vlogdefine',
@ -204,7 +262,20 @@ backend = get_edatool(tool)(edam=edam, work_root=build_dir)
backend.configure()
backend.build()
if tool == "vivado":
if tool in ["vivado", "ise"]:
import shutil
shutil.copy("tmp_" + part + "/spiOverJtag.runs/impl_1/spiOverJtag.bit",
"tmp_" + part);
import subprocess
import gzip
# Compress bitstream.
with open(f"tmp_{part}/spiOverJtag.bit", 'rb') as bit:
with gzip.open(f"spiOverJtag_{part}.bit.gz", 'wb', compresslevel=9) as bit_gz:
shutil.copyfileobj(bit, bit_gz)
# Create Symbolic links for all supported packages.
if family in ["Artix", "Spartan 7"]:
in_file = f"spiOverJtag_{part}.bit.gz"
for pkg in packages[family][part]:
out_file = f"spiOverJtag_{part}{pkg}.bit.gz"
if not os.path.exists(out_file):
subprocess.run(["ln", "-s", in_file, out_file])

View File

@ -0,0 +1,11 @@
CONFIG VCCAUX = "2.5";
NET "sdi_dq0" LOC = T13 | IOSTANDARD = LVCMOS25;
NET "sdo_dq1" LOC = R13 | IOSTANDARD = LVCMOS25;
NET "wpn_dq2" LOC = T14 | IOSTANDARD = LVCMOS25;
NET "hldn_dq3" LOC = V14 | IOSTANDARD = LVCMOS25;
NET "csn" LOC = V3 | IOSTANDARD = LVCMOS25;
NET "sck" LOC = R15 | IOSTANDARD = LVCMOS25;
NET "sck" TNM_NET = "PRDsck";
TIMESPEC "TSsck" = PERIOD "PRDsck" 6 ns HIGH 50%;

View File

@ -2,9 +2,12 @@ set_property CFGBVS VCCO [current_design]
set_property CONFIG_VOLTAGE 3.3 [current_design]
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH {4} [current_design]
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
set_property -dict {PACKAGE_PIN K19 IOSTANDARD LVCMOS33} [get_ports {csn}];
set_property -dict {PACKAGE_PIN D18 IOSTANDARD LVCMOS33} [get_ports {sdi_dq0}];
set_property -dict {PACKAGE_PIN D19 IOSTANDARD LVCMOS33} [get_ports {sdo_dq1}];
set_property -dict {PACKAGE_PIN G18 IOSTANDARD LVCMOS33} [get_ports {wpn_dq2}];
set_property -dict {PACKAGE_PIN F18 IOSTANDARD LVCMOS33} [get_ports {hldn_dq3}];
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK}]
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK}]

View File

@ -9,3 +9,5 @@ set_property -dict {PACKAGE_PIN D19 IOSTANDARD LVCMOS33} [get_ports {sdo_dq1}];
set_property -dict {PACKAGE_PIN E19 IOSTANDARD LVCMOS33} [get_ports {wpn_dq2}];
set_property -dict {PACKAGE_PIN F19 IOSTANDARD LVCMOS33} [get_ports {hldn_dq3}];
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK}]
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK}]

View File

@ -8,3 +8,6 @@ set_property -dict {PACKAGE_PIN K17 IOSTANDARD LVCMOS33} [get_ports {sdi_dq0}];
set_property -dict {PACKAGE_PIN K18 IOSTANDARD LVCMOS33} [get_ports {sdo_dq1}];
set_property -dict {PACKAGE_PIN L14 IOSTANDARD LVCMOS33} [get_ports {wpn_dq2}];
set_property -dict {PACKAGE_PIN M14 IOSTANDARD LVCMOS33} [get_ports {hldn_dq3}];
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK}]
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK}]

View File

@ -9,3 +9,5 @@ set_property -dict {PACKAGE_PIN L17 IOSTANDARD LVCMOS33} [get_ports {sdo_dq1}];
set_property -dict {PACKAGE_PIN J15 IOSTANDARD LVCMOS33} [get_ports {wpn_dq2}];
set_property -dict {PACKAGE_PIN J16 IOSTANDARD LVCMOS33} [get_ports {hldn_dq3}];
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK]}}
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK]}}

View File

@ -0,0 +1,24 @@
set_property CFGBVS GND [current_design]
set_property CONFIG_VOLTAGE 1.8 [current_design]
set_property BITSTREAM.CONFIG.CONFIGRATE 16 [current_design]
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
set_property CONFIG_MODE SPIx4 [current_design]
set_property BITSTREAM.CONFIG.SPI_32BIT_ADDR NO [current_design]
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 [current_design]
set_property BITSTREAM.CONFIG.M1PIN PULLNONE [current_design]
set_property BITSTREAM.CONFIG.M2PIN PULLNONE [current_design]
set_property BITSTREAM.CONFIG.M0PIN PULLNONE [current_design]
set_property BITSTREAM.CONFIG.USR_ACCESS TIMESTAMP [current_design]
set_property BITSTREAM.CONFIG.UNUSEDPIN PULLDOWN [current_design]
set_property BITSTREAM.CONFIG.OVERTEMPPOWERDOWN ENABLE [current_design]
set_property -dict {PACKAGE_PIN L15 IOSTANDARD SSTL135_R} [get_ports csn]
set_property -dict {PACKAGE_PIN K16 IOSTANDARD SSTL135_R} [get_ports sdi_dq0]
set_property -dict {PACKAGE_PIN L17 IOSTANDARD SSTL135_R} [get_ports sdo_dq1]
set_property -dict {PACKAGE_PIN J15 IOSTANDARD SSTL135_R} [get_ports wpn_dq2]
set_property -dict {PACKAGE_PIN J16 IOSTANDARD SSTL135_R} [get_ports hldn_dq3]
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK]}}
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK]}}

View File

@ -9,3 +9,5 @@ set_property -dict {PACKAGE_PIN R22 IOSTANDARD LVTTL} [get_ports {sdo_dq1}]
set_property -dict {PACKAGE_PIN P21 IOSTANDARD LVTTL} [get_ports {wpn_dq2}]
set_property -dict {PACKAGE_PIN R21 IOSTANDARD LVTTL} [get_ports {hldn_dq3}]
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK}]
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK}]

View File

@ -0,0 +1,13 @@
set_property CFGBVS VCCO [current_design]
set_property CONFIG_VOLTAGE 3.3 [current_design]
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH {4} [current_design]
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
set_property -dict {PACKAGE_PIN P18 IOSTANDARD LVTTL} [get_ports {csn}]
set_property -dict {PACKAGE_PIN R14 IOSTANDARD LVTTL} [get_ports {sdi_dq0}]
set_property -dict {PACKAGE_PIN R15 IOSTANDARD LVTTL} [get_ports {sdo_dq1}]
set_property -dict {PACKAGE_PIN P14 IOSTANDARD LVTTL} [get_ports {wpn_dq2}]
set_property -dict {PACKAGE_PIN N14 IOSTANDARD LVTTL} [get_ports {hldn_dq3}]
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK}]
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK}]

View File

@ -1,6 +1,7 @@
set_property CFGBVS VCCO [current_design]
set_property CONFIG_VOLTAGE 3.3 [current_design]
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH {4} [current_design]
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
set_property -dict {PACKAGE_PIN T19 IOSTANDARD LVTTL} [get_ports {csn}]
set_property -dict {PACKAGE_PIN P22 IOSTANDARD LVTTL} [get_ports {sdi_dq0}]
@ -8,3 +9,5 @@ set_property -dict {PACKAGE_PIN R22 IOSTANDARD LVTTL} [get_ports {sdo_dq1}]
set_property -dict {PACKAGE_PIN P21 IOSTANDARD LVTTL} [get_ports {wpn_dq2}]
set_property -dict {PACKAGE_PIN R21 IOSTANDARD LVTTL} [get_ports {hldn_dq3}]
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK}]
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK}]

View File

@ -3,9 +3,11 @@ set_property CONFIG_VOLTAGE 3.3 [current_design]
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH {4} [current_design]
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
set_property -dict {PACKAGE_PIN T19 IOSTANDARD LVTTL} [get_ports {csn}]
set_property -dict {PACKAGE_PIN P18 IOSTANDARD LVTTL} [get_ports {csn}]
set_property -dict {PACKAGE_PIN R14 IOSTANDARD LVTTL} [get_ports {sdi_dq0}]
set_property -dict {PACKAGE_PIN R15 IOSTANDARD LVTTL} [get_ports {sdo_dq1}]
set_property -dict {PACKAGE_PIN P14 IOSTANDARD LVTTL} [get_ports {wpn_dq2}]
set_property -dict {PACKAGE_PIN P18 IOSTANDARD LVTTL} [get_ports {hldn_dq3}]
set_property -dict {PACKAGE_PIN N14 IOSTANDARD LVTTL} [get_ports {hldn_dq3}]
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK}]
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK}]

View File

@ -8,3 +8,6 @@ set_property -dict {PACKAGE_PIN J13 IOSTANDARD LVCMOS33} [get_ports {sdi_dq0}];
set_property -dict {PACKAGE_PIN J14 IOSTANDARD LVCMOS33} [get_ports {sdo_dq1}];
set_property -dict {PACKAGE_PIN K15 IOSTANDARD LVCMOS33} [get_ports {wpn_dq2}];
set_property -dict {PACKAGE_PIN K16 IOSTANDARD LVCMOS33} [get_ports {hldn_dq3}];
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK}]
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK}]

View File

@ -7,3 +7,6 @@ set_property -dict {PACKAGE_PIN P22 IOSTANDARD LVCMOS33} [get_ports {sdi_dq0}]
set_property -dict {PACKAGE_PIN R22 IOSTANDARD LVCMOS33} [get_ports {sdo_dq1}]
set_property -dict {PACKAGE_PIN P21 IOSTANDARD LVCMOS33} [get_ports {wpn_dq2}]
set_property -dict {PACKAGE_PIN R21 IOSTANDARD LVCMOS33} [get_ports {hldn_dq3}]
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK]}}
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK]}}

View File

@ -0,0 +1,13 @@
set_property CFGBVS VCCO [current_design]
set_property CONFIG_VOLTAGE 3.3 [current_design]
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH {4} [current_design]
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
set_property -dict {PACKAGE_PIN T19 IOSTANDARD LVTTL} [get_ports {csn}]
set_property -dict {PACKAGE_PIN P22 IOSTANDARD LVTTL} [get_ports {sdi_dq0}]
set_property -dict {PACKAGE_PIN R22 IOSTANDARD LVTTL} [get_ports {sdo_dq1}]
set_property -dict {PACKAGE_PIN P21 IOSTANDARD LVTTL} [get_ports {wpn_dq2}]
set_property -dict {PACKAGE_PIN R21 IOSTANDARD LVTTL} [get_ports {hldn_dq3}]
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK]}}
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK]}}

View File

@ -0,0 +1,13 @@
set_property CFGBVS VCCO [current_design]
set_property CONFIG_VOLTAGE 3.3 [current_design]
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH {4} [current_design]
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
set_property -dict {PACKAGE_PIN D13 IOSTANDARD LVCMOS33} [get_ports {csn}];
set_property -dict {PACKAGE_PIN C10 IOSTANDARD LVCMOS33} [get_ports {sdi_dq0}];
set_property -dict {PACKAGE_PIN C11 IOSTANDARD LVCMOS33} [get_ports {sdo_dq1}];
set_property -dict {PACKAGE_PIN B11 IOSTANDARD LVCMOS33} [get_ports {wpn_dq2}];
set_property -dict {PACKAGE_PIN A12 IOSTANDARD LVCMOS33} [get_ports {hldn_dq3}];
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK]}}
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK]}}

View File

@ -8,3 +8,6 @@ set_property -dict {PACKAGE_PIN H14 IOSTANDARD LVCMOS33} [get_ports {sdi_dq0}];
set_property -dict {PACKAGE_PIN H15 IOSTANDARD LVCMOS33} [get_ports {sdo_dq1}];
set_property -dict {PACKAGE_PIN J12 IOSTANDARD LVCMOS33} [get_ports {wpn_dq2}];
set_property -dict {PACKAGE_PIN K13 IOSTANDARD LVCMOS33} [get_ports {hldn_dq3}];
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK]}}
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK]}}

View File

@ -8,3 +8,6 @@ set_property -dict {PACKAGE_PIN K17 IOSTANDARD LVCMOS33} [get_ports {sdi_dq0}];
set_property -dict {PACKAGE_PIN K18 IOSTANDARD LVCMOS33} [get_ports {sdo_dq1}];
set_property -dict {PACKAGE_PIN L14 IOSTANDARD LVCMOS33} [get_ports {wpn_dq2}];
set_property -dict {PACKAGE_PIN M15 IOSTANDARD LVCMOS33} [get_ports {hldn_dq3}];
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK]}}
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK]}}

View File

@ -0,0 +1,13 @@
set_property CFGBVS VCCO [current_design]
set_property CONFIG_VOLTAGE 3.3 [current_design]
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH {4} [current_design]
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
set_property -dict {PACKAGE_PIN N17 IOSTANDARD LVCMOS33} [get_ports {csn}];
set_property -dict {PACKAGE_PIN M21 IOSTANDARD LVCMOS33} [get_ports {sdi_dq0}];
set_property -dict {PACKAGE_PIN M22 IOSTANDARD LVCMOS33} [get_ports {sdo_dq1}];
set_property -dict {PACKAGE_PIN N21 IOSTANDARD LVCMOS33} [get_ports {wpn_dq2}];
set_property -dict {PACKAGE_PIN N22 IOSTANDARD LVCMOS33} [get_ports {hldn_dq3}];
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK]}}
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK]}}

View File

@ -0,0 +1,13 @@
set_property CFGBVS VCCO [current_design]
set_property CONFIG_VOLTAGE 3.3 [current_design]
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH {4} [current_design]
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
set_property -dict {PACKAGE_PIN R20 IOSTANDARD LVCMOS33} [get_ports {csn}];
set_property -dict {PACKAGE_PIN N23 IOSTANDARD LVCMOS33} [get_ports {sdi_dq0}];
set_property -dict {PACKAGE_PIN N24 IOSTANDARD LVCMOS33} [get_ports {sdo_dq1}];
set_property -dict {PACKAGE_PIN P23 IOSTANDARD LVCMOS33} [get_ports {wpn_dq2}];
set_property -dict {PACKAGE_PIN R23 IOSTANDARD LVCMOS33} [get_ports {hldn_dq3}];
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK]}}
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK]}}

View File

@ -0,0 +1,13 @@
set_property CFGBVS VCCO [current_design]
set_property CONFIG_VOLTAGE 3.3 [current_design]
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH {4} [current_design]
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
set_property -dict {PACKAGE_PIN C11 IOSTANDARD LVCMOS33} [get_ports {csn}];
set_property -dict {PACKAGE_PIN B11 IOSTANDARD LVCMOS33} [get_ports {sdi_dq0}];
set_property -dict {PACKAGE_PIN B12 IOSTANDARD LVCMOS33} [get_ports {sdo_dq1}];
set_property -dict {PACKAGE_PIN D10 IOSTANDARD LVCMOS33} [get_ports {wpn_dq2}];
set_property -dict {PACKAGE_PIN C10 IOSTANDARD LVCMOS33} [get_ports {hldn_dq3}];
create_clock -period 33.000 -name jtag_tck -waveform {0.000 16.500} [get_pins {bscane2_inst/DRCK]}}
create_clock -period 33.000 -name vers_tck -waveform {0.000 16.500} [get_pins {bscane2_version/DRCK]}}

View File

@ -0,0 +1,7 @@
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
set_property CONFIG_VOLTAGE 1.8 [current_design]
# Table 1-2 from UG570
set_property CFGBVS GND [current_design]
# Primary QSPI flash
# Connection done through the STARTUPE3 block

View File

@ -0,0 +1,25 @@
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
set_property CONFIG_VOLTAGE 1.8 [current_design]
# Table 1-5 from UG917
set_property CFGBVS GND [current_design]
# Primary QSPI flash
# Connection done through the STARTUPE3 block
# sdi_dq0 - PACKAGE_PIN AC7 - QSPI0_IO0 Bank 0 - D00_MOSI_0
# sdo_dq1 - PACKAGE_PIN AB7 - QSPI0_IO1 Bank 0 - D01_DIN_0
# wpn_dq2 - PACKAGE_PIN AA7 - QSPI0_IO2 Bank 0 - D02_0
# hldn_dq3 - PACKAGE_PIN Y7 - QSPI0_IO3 Bank 0 - D03_0
# csn - PACKAGE_PIN U7 - QSPI0_CSB Bank 0 - RDWR_FCS_B_0
# sck - PACKAGE_PIN AA9 - FPGA_CCLK Bank 0 - CCLK_0
# Secondary QSPI flash
set_property PACKAGE_PIN M20 [get_ports "sdi_sec_dq0"] ;# Bank 65 VCCO - VCC1V8 - IO_L22P_T3U_N6_DBC_AD0P_D04_65
set_property IOSTANDARD LVCMOS18 [get_ports "sdi_sec_dq0"] ;# Bank 65 VCCO - VCC1V8 - IO_L22P_T3U_N6_DBC_AD0P_D04_65
set_property PACKAGE_PIN L20 [get_ports "sdo_sec_dq1"] ;# Bank 65 VCCO - VCC1V8 - IO_L22N_T3U_N7_DBC_AD0N_D05_65
set_property IOSTANDARD LVCMOS18 [get_ports "sdo_sec_dq1"] ;# Bank 65 VCCO - VCC1V8 - IO_L22N_T3U_N7_DBC_AD0N_D05_65
set_property PACKAGE_PIN R21 [get_ports "wpn_sec_dq2"] ;# Bank 65 VCCO - VCC1V8 - IO_L21P_T3L_N4_AD8P_D06_65
set_property IOSTANDARD LVCMOS18 [get_ports "wpn_sec_dq2"] ;# Bank 65 VCCO - VCC1V8 - IO_L21P_T3L_N4_AD8P_D06_65
set_property PACKAGE_PIN R22 [get_ports "hldn_sec_dq3"] ;# Bank 65 VCCO - VCC1V8 - IO_L21N_T3L_N5_AD8N_D07_65
set_property IOSTANDARD LVCMOS18 [get_ports "hldn_sec_dq3"] ;# Bank 65 VCCO - VCC1V8 - IO_L21N_T3L_N5_AD8N_D07_65
set_property PACKAGE_PIN G26 [get_ports "csn_sec"] ;# Bank 65 VCCO - VCC1V8 - IO_L2N_T0L_N3_FWE_FCS2_B_65
set_property IOSTANDARD LVCMOS18 [get_ports "csn_sec"] ;# Bank 65 VCCO - VCC1V8 - IO_L2N_T0L_N3_FWE_FCS2_B_65

View File

@ -0,0 +1,25 @@
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
set_property CONFIG_VOLTAGE 1.8 [current_design]
# Table 1-5 from UG917
set_property CFGBVS GND [current_design]
# Primary QSPI flash
# Connection done through the STARTUPE3 block
# sdi_dq0 - PACKAGE_PIN AC7 - QSPI0_IO0 Bank 0 - D00_MOSI_0
# sdo_dq1 - PACKAGE_PIN AB7 - QSPI0_IO1 Bank 0 - D01_DIN_0
# wpn_dq2 - PACKAGE_PIN AA7 - QSPI0_IO2 Bank 0 - D02_0
# hldn_dq3 - PACKAGE_PIN Y7 - QSPI0_IO3 Bank 0 - D03_0
# csn - PACKAGE_PIN U7 - QSPI0_CSB Bank 0 - RDWR_FCS_B_0
# sck - PACKAGE_PIN AA9 - FPGA_CCLK Bank 0 - CCLK_0
# Secondary QSPI flash
set_property PACKAGE_PIN M20 [get_ports "sdi_sec_dq0"] ;# Bank 65 VCCO - VCC1V8 - IO_L22P_T3U_N6_DBC_AD0P_D04_65
set_property IOSTANDARD LVCMOS18 [get_ports "sdi_sec_dq0"] ;# Bank 65 VCCO - VCC1V8 - IO_L22P_T3U_N6_DBC_AD0P_D04_65
set_property PACKAGE_PIN L20 [get_ports "sdo_sec_dq1"] ;# Bank 65 VCCO - VCC1V8 - IO_L22N_T3U_N7_DBC_AD0N_D05_65
set_property IOSTANDARD LVCMOS18 [get_ports "sdo_sec_dq1"] ;# Bank 65 VCCO - VCC1V8 - IO_L22N_T3U_N7_DBC_AD0N_D05_65
set_property PACKAGE_PIN R21 [get_ports "wpn_sec_dq2"] ;# Bank 65 VCCO - VCC1V8 - IO_L21P_T3L_N4_AD8P_D06_65
set_property IOSTANDARD LVCMOS18 [get_ports "wpn_sec_dq2"] ;# Bank 65 VCCO - VCC1V8 - IO_L21P_T3L_N4_AD8P_D06_65
set_property PACKAGE_PIN R22 [get_ports "hldn_sec_dq3"] ;# Bank 65 VCCO - VCC1V8 - IO_L21N_T3L_N5_AD8N_D07_65
set_property IOSTANDARD LVCMOS18 [get_ports "hldn_sec_dq3"] ;# Bank 65 VCCO - VCC1V8 - IO_L21N_T3L_N5_AD8N_D07_65
set_property PACKAGE_PIN G26 [get_ports "csn_sec"] ;# Bank 65 VCCO - VCC1V8 - IO_L2N_T0L_N3_FWE_FCS2_B_65
set_property IOSTANDARD LVCMOS18 [get_ports "csn_sec"] ;# Bank 65 VCCO - VCC1V8 - IO_L2N_T0L_N3_FWE_FCS2_B_65

186
spiOverJtag/efinix_build.py Executable file
View File

@ -0,0 +1,186 @@
#!/usr/bin/env python3
import argparse
import datetime
import os
import pathlib
import pprint
import re
import sys
from edalize.edatool import get_edatool
from edalize.flows.efinity import Efinity
#from xml.dom import expatbuilder
#import xml.etree.ElementTree as et
#efinity_home = os.environ["EFINITY_HOME"]
#script_path = efinity_home + "/scripts"
curr_path = os.getcwd()
efinix_pinout = {
"Trion": {
"F49": { # t4/t8
"ss_n": "G3", "cclk": "F3", "cdi0": "F2", "cdi1": "F1", "cdi2": "E2", "cdi3": "D2",
},
"F81": { # t4/t8
"ss_n": "J4", "cclk": "H4", "cdi0": "F4", "cdi1": "H3", "cdi2": "J2", "cdi3": "F3",
},
"F169": { # t13/t20
"ss_n": "L1", "cclk": "K1", "cdi0": "J1", "cdi1": "J2", "cdi2": "F1", "cdi3": "G2",
},
"F256": { # t13/t20
"ss_n": "P3", "cclk": "H3", "cdi0": "L3", "cdi1": "N1", "cdi2": "K4", "cdi3": "L2",
},
"F324": { # t20/t85/t120
"ss_n": "P15", "cclk": "N13", "cdi0": "M13", "cdi1": "N14", "cdi2": "K14", "cdi3": "K18",
},
"F400": { # t20/
"ss_n": "W18", "cclk": "W19", "cdi0": "Y17", "cdi1": "Y18", "cdi2": "P15", "cdi3": "R17",
},
"Q100": { # t13/t20
"ss_n": "24", "cclk": "26", "cdi0": "19", "cdi1": "18", "cdi2": "8", "cdi3": "14",
},
"Q144": { # t20/
"ss_n": "31", "cclk": "30", "cdi0": "29", "cdi1": "28", "cdi2": "20", "cdi3": "19",
},
"W80": { # t20/
"ss_n": "K3", "cclk": "K2", "cdi0": "J1", "cdi1": "J2", "cdi2": "F1", "cdi3": "G2",
},
},
"Titanium": {
"J484": { # ti180, ...
"ss_n": "E2", "cclk": "J2", "cdi0": "G2", "cdi1": "H2", "cdi2": "F3", "cdi3": "G3",
},
},
}
timing_models = {
"T8F81": "C2",
"T13F256": "C3",
"TI180J484": "C3",
}
def gen_isf_constr(gateware_name, build_path, device_name, family, pkg):
# Basic settings
isf_array = [
"# Device setting",
"design.set_device_property(\"1A\",\"VOLTAGE\",\"3.3\",\"IOBANK\")",
"design.set_device_property(\"1B\",\"VOLTAGE\",\"3.3\",\"IOBANK\")",
"design.set_device_property(\"1C\",\"VOLTAGE\",\"1.1\",\"IOBANK\")",
"design.set_device_property(\"2A\",\"VOLTAGE\",\"3.3\",\"IOBANK\")",
"design.set_device_property(\"2B\",\"VOLTAGE\",\"3.3\",\"IOBANK\")",
"",
]
# JTAG settings
isf_array.append("# ---------- JTAG 1 ---------")
isf_array.append("design.create_block(\"jtag_soc\", block_type=\"JTAG\")")
isf_array.append("design.assign_resource(\"jtag_soc\", \"JTAG_USER1\", \"JTAG\")")
jtag_pads = [
"CAPTURE", "DRCK", "RESET", "RUNTEST", "SEL", "SHIFT", "TCK", "TDI", "TMS", "UPDATE", "TDO"
]
for pad in jtag_pads:
isf_array.append(f"design.set_property(\"jtag_soc\", \"{pad}\", \"jtag_1_{pad}\", \"JTAG\")")
# SPI pins settings
pins = efinix_pinout.get(family).get(pkg, None)
assert pins is not None
pin_lst = [
{"name" : "csn", "dir": "out", "pin": pins["ss_n"], "io_std": "3.3 V LVTTL / LVCMOS"},
{"name" : "sck", "dir": "out", "pin": pins["cclk"], "io_std": "3.3 V LVTTL / LVCMOS"},
{"name" : "sdi_dq0", "dir": "out", "pin": pins["cdi0"], "io_std": "3.3 V LVTTL / LVCMOS"},
{"name" : "sdo_dq1", "dir": "in", "pin": pins["cdi1"], "io_std": "3.3 V LVTTL / LVCMOS"},
]
for pin_cfg in pin_lst:
name = pin_cfg["name"]
pin_loc = pin_cfg["pin"]
if pin_cfg["dir"] == "in":
isf_array.append(f"design.create_input_gpio(\"{name}\")")
else:
isf_array.append(f"design.create_output_gpio(\"{name}\")")
isf_array.append(f"design.assign_pkg_pin(\"{name}\", \"{pin_loc}\")")
isf_array.append("")
# Save ISF file
with open(os.path.join(build_dir, build_name+".isf"), "w") as fd:
fd.write("\n".join(isf_array))
if __name__ == "__main__":
parser = argparse.ArgumentParser("SpiOverJtag for Efinix devices")
parser.add_argument("--device", help="Efinix Device")
args = parser.parse_args()
assert args.device is not None
device = args.device.upper()
build_name = "efinix_spiOverJtag"
build_dir = os.path.join(curr_path, f"tmp_efinix_{device.lower()}")
timing_model = timing_models.get(device, "C3")
sources = [
{
'name': os.path.join(curr_path, "efinix_spiOverJtag.v"),
"file_type": "verilogSource",
},
{
'name': os.path.join(build_dir, "efinix_spiOverJtag.isf"),
"file_type": "ISF",
},
]
force_restart = False
t = re.compile(r"(T[I]*)(\d+)(\w\d+)")
tt = t.match(device)
if tt is None:
print("fails")
else:
(fam, size, package) = tt.groups()
assert fam in ["TI", "T"]
family = {True:"Titanium", False:"Trion"}[fam == "TI"]
if fam == "TI":
device = device.replace("TI", "Ti")
if os.path.exists(build_dir) and force_restart:
os.rmdir(build_dir)
if not os.path.exists(build_dir):
try:
os.mkdir(build_dir)
except FileExistsError:
pass
gen_isf_constr(
gateware_name = build_name,
build_path = build_dir,
device_name = device,
family = family,
pkg = package
)
tool_options = {
'part' : device,
'family' : family,
'timing' : timing_model,
}
edam = {
'name' : build_name,
'files' : sources,
'flow_options' : tool_options,
'toplevel' : 'spiOverJtag',
}
backend = Efinity(edam=edam, work_root=build_dir)
backend.configure()
backend.build()
import shutil
shutil.copy(os.path.join(build_dir, "outflow", "efinix_spiOverJtag.bit"), build_dir)

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,250 @@
`default_nettype none
/*
* JTAG: rising edge: sampling
* falling esge: update
* SPI:
*/
module spiOverJtag_core (
/* JTAG state/controls */
input wire sel,
input wire capture,
input wire update,
input wire shift,
input wire drck,
input wire tdi,
output wire tdo,
/* JTAG endpoint to version */
input wire ver_sel,
input wire ver_cap,
input wire ver_shift,
input wire ver_drck,
input wire ver_tdi,
output wire ver_tdo,
/* phys */
output reg csn,
output wire sck,
output reg sdi_dq0,
input wire sdo_dq1,
output wire wpn_dq2,
output wire hldn_dq3,
/* debug signals */
output wire [ 6:0] dbg_header1,
output wire [13:0] dbg_header,
output wire [ 3:0] dbg_hdr_cnt,
output wire [ 2:0] dbg_jtag_state,
output wire dbg_rst,
output wire dbg_clk,
output wire dbg_start_header,
output wire dbg_ver_start,
output wire dbg_ver_rst,
output wire dbg_ver_state,
output wire [15:0] dbg_ver_cnt,
output wire [39:0] dbg_ver_shft
);
/* no global reset at start time:
* reset system at capture time (before shift)
* and at update time (after shift)
*/
wire rst = ((capture | update) & sel);
/*
* if the FPGAs executing this code is somewhere in a complex
* JTAG chain first bit isn't necessary for him
* Fortunately dummy bits sent are equal to '0' -> we sent a 'start bit'
*/
wire start_header = (tdi & shift & sel);
localparam hdr_len = 16;
reg [hdr_len-1:0] header; /* number of bits to receive / send in XFER state */
reg [hdr_len-1:0] header_d;
/* Primary header with mode and length LSB
* 6:5: mode (00: normal, 01: no header2, 10: infinite loop)
* 4:0: Byte length LSB
*/
reg [ 6:0] header1;
reg [ 6:0] header1_d;
wire [ 6:0] header1_next = {tdi, header1[6:1]};
wire [ 1:0] mode = header1[1:0];
/* Secondary header with extended length */
wire [hdr_len-1:0] header_next = {tdi, header[hdr_len-1:1]};
reg [ 3:0] hdr_cnt; /* counter of bit received in RECV_HEADERx states */
reg [ 3:0] hdr_cnt_d;
/* ---------------- */
/* FSM */
/* ---------------- */
localparam IDLE = 3'b000,
RECV_HEADER1 = 3'b001,
RECV_HEADER2 = 3'b010,
XFER = 3'b011,
WAIT_END = 3'b100;
reg [2:0] jtag_state, jtag_state_d;
/*
* 1. receives 8bits (
*/
always @(*) begin
jtag_state_d = jtag_state;
hdr_cnt_d = hdr_cnt;
header_d = header;
header1_d = header1;
case (jtag_state)
IDLE: begin /* nothing: wait for the 'start bit' */
hdr_cnt_d = 6;
if (start_header) begin
jtag_state_d = RECV_HEADER1;
end
end
RECV_HEADER1: begin /* first header with 1:0 : mode, 6:2: XFER length (LSB) */
hdr_cnt_d = hdr_cnt - 1'b1;
header1_d = header1_next;
if (hdr_cnt == 0) begin
if (header1_next[1:0] == 2'b00) begin
hdr_cnt_d = 7;
header_d = {header1_next[6:2], 3'b000, 8'd0};
jtag_state_d = RECV_HEADER2;
end else begin
header_d = {8'b0, header1_next[6:2], 3'b000};
jtag_state_d = XFER;
end
end
end
RECV_HEADER2: begin /* fill a counter with 16bits (number of bits to pass to the flash) */
hdr_cnt_d = hdr_cnt - 1'b1;
header_d = header_next;
if (hdr_cnt == 0) begin
jtag_state_d = XFER;
end
end
XFER: begin
header_d = header - 1;
if (header == 1 && mode != 2'b10)
jtag_state_d = WAIT_END;
end
WAIT_END: begin /* move to this state when header bits have been transfered to the SPI flash */
// /* nothing to do: rst will move automagically state in IDLE */
end
default: begin
jtag_state_d = IDLE;
end
endcase
end
always @(posedge drck) begin
header <= header_d;
header1 <= header1_d;
hdr_cnt <= hdr_cnt_d;
end
always @(posedge drck or posedge rst) begin
if (rst) begin
jtag_state <= IDLE;
end else begin
jtag_state <= jtag_state_d;
end
end
/* JTAG <-> phy SPI */
always @(posedge drck or posedge rst) begin
if (rst) begin
sdi_dq0 <= 1'b0;
csn <= 1'b1;
end else begin
sdi_dq0 <= tdi;
csn <= ~(jtag_state == XFER);
end
end
assign sck = ~drck;
assign tdo = sdo_dq1;
assign wpn_dq2 = 1'b1;
assign hldn_dq3 = 1'b1;
/* ------------- */
/* Version */
/* ------------- */
/* no global reset at start time: reset system at capture time (before shift) */
wire ver_rst = (ver_cap & ver_sel);
/* start bit */
wire ver_start = (ver_tdi & ver_shift & ver_sel);
localparam VER_VALUE = 40'h30_30_2E_32_30; // 02.00
reg [ 6:0] ver_cnt, ver_cnt_d;
reg [39:0] ver_shft, ver_shft_d;
reg [2:0] ver_state, ver_state_d;
always @(*) begin
ver_state_d = ver_state;
ver_cnt_d = ver_cnt;
ver_shft_d = ver_shft;
case (ver_state)
IDLE: begin /* nothing: wait for the 'start bit' */
ver_cnt_d = 6;
if (ver_start) begin
ver_state_d = RECV_HEADER1;
end
end
RECV_HEADER1: begin
ver_cnt_d = ver_cnt - 1'b1;
if (ver_cnt == 0) begin
ver_state_d = XFER;
ver_cnt_d = 39;
ver_shft_d = VER_VALUE;
end
end
XFER: begin
ver_cnt_d = ver_cnt - 1;
ver_shft_d = {1'b1, ver_shft[39:1]};
if (ver_cnt == 0)
ver_state_d = WAIT_END;
end
WAIT_END: begin /* move to this state when header bits have been transfered to the SPI flash */
// /* nothing to do: rst will move automagically state in IDLE */
end
default: begin
ver_state_d = IDLE;
end
endcase
end
always @(posedge ver_drck) begin
ver_cnt <= ver_cnt_d;
ver_shft <= ver_shft_d;
end
always @(posedge ver_drck or posedge ver_rst) begin
if (ver_rst)
ver_state <= IDLE;
else
ver_state <= ver_state_d;
end
assign ver_tdo = ver_shft[0];
/* --------- */
/* debug */
/* --------- */
assign dbg_header1 = header1;
assign dbg_header = header;
assign dbg_hdr_cnt = hdr_cnt;
assign dbg_jtag_state = jtag_state;
assign dbg_rst = rst;
assign dbg_clk = ~drck;
assign dbg_start_header = start_header;
assign dbg_ver_start = ver_start;
assign dbg_ver_state = ver_state;
assign dbg_ver_cnt = ver_cnt;
assign dbg_ver_shft = ver_shft;
assign dbg_ver_rst = ver_rst;
endmodule

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More