Skip to content

Commit

Permalink
Merge pull request #411 from Patronics/develop
Browse files Browse the repository at this point in the history
Add untested support for Sipeed Tang nano 9k, 4k, 1k and original Tang Nano boards
  • Loading branch information
Obijuan authored Sep 8, 2024
2 parents 154592d + e2a62fc commit cb991fe
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 5 deletions.
44 changes: 44 additions & 0 deletions apio/resources/boards.json
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,50 @@
"desc": "ETH4K"
}
},
"Sipeed-Tang-Nano": {
"name":"Sipeed Tang Nano",
"fpga": "GW1N-LV1QN48C6/I5",
"programmer": {
"type": "openfpgaloader_tangnano"
},
"usb": {
"vid": "0403",
"pid": "6010"
}
},
"Sipeed-Tang-Nano-1k": {
"name":"Sipeed Tang Nano 1k",
"fpga": "GW1NZ-LV1QN48C6/I5",
"programmer": {
"type": "openfpgaloader_tangnano1k"
},
"usb": {
"vid": "0403",
"pid": "6010"
}
},
"Sipeed-Tang-Nano-4k": {
"name":"Sipeed Tang Nano 4k",
"fpga": "GW1NSR-LV4CQN48PC7/I6",
"programmer": {
"type": "openfpgaloader_tangnano4k"
},
"usb": {
"vid": "0403",
"pid": "6010"
}
},
"Sipeed-Tang-Nano-9k": {
"name":"Sipeed Tang Nano 9k",
"fpga": "GW1NR-LV9QN88PC6/I5",
"programmer": {
"type": "openfpgaloader_tangnano9k"
},
"usb": {
"vid": "0403",
"pid": "6010"
}
},
"Sipeed-Tang-Nano-20k": {
"name":"Sipeed Tang Nano 20k",
"fpga": "GW2AR-LV18QN88C8/I7",
Expand Down
2 changes: 1 addition & 1 deletion apio/resources/distribution.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"tinyfpgab": ">=1.1.0,<1.2.0",
"tinyprog": ">=1.0.21,<1.1.0",
"icefunprog": ">=2.0.3,<3.0.0",
"apycula": "0.12"
"apycula": ">=0.12"
}
}
18 changes: 18 additions & 0 deletions apio/resources/fpgas.json
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,24 @@
"size": "85k",
"pack": "CSFBGA285"
},
"GW1NZ-LV1QN48C6/I5": {
"arch": "gowin",
"type": "gw1nz-1",
"size": "1k",
"pack": "QN48"
},
"GW1NSR-LV4CQN48PC7/I6": {
"arch": "gowin",
"type": "gw1ns-4",
"size": "4k",
"pack": "QN48P"
},
"GW1NR-LV9QN88PC6/I5": {
"arch": "gowin",
"type": "gw1n-9c",
"size": "9k",
"pack": "QN88P"
},
"GW2AR-LV18QN88C8/I7": {
"arch": "gowin",
"type": "gw2a-18c",
Expand Down
8 changes: 4 additions & 4 deletions apio/resources/gowin/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ for warn in VERILATOR_WARN:



# -- Size. Possible values: 20k
# -- Type. Possible values: gw2ar
# -- Size. Possible values: 1k, 4k, 9k, 20k
# -- Type. Possible values: gw1nz-1, gw1ns-4, gw1n-9c, gw2a-18c
# -- Package. Unused.


# -- Add the FPGA flags as variables to be shown with the -h scons option
vars = Variables()
vars.Add('fpga_size', 'Set the Gowin FPGA size (25k)', FPGA_SIZE)
vars.Add('fpga_type', 'Set the Gowin FPGA type (gw5a)', FPGA_TYPE)
vars.Add('fpga_size', 'Set the Gowin FPGA size (20k)', FPGA_SIZE)
vars.Add('fpga_type', 'Set the Gowin FPGA type (gw2a-18c)', FPGA_TYPE)
vars.Add('fpga_pack', 'Set the Gowin FPGA packages', FPGA_PACK)
vars.Add('fpga_model', 'Set a specific Gowin FPGA model', FPGA_MODEL)

Expand Down
16 changes: 16 additions & 0 deletions apio/resources/programmers.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,22 @@
"command": "openFPGALoader",
"args": "-c usb-blaster -v --file-type bin"
},
"openfpgaloader_tangnano": {
"command": "openFPGALoader",
"args": "-b tangnano"
},
"openfpgaloader_tangnano1k": {
"command": "openFPGALoader",
"args": "-b tangnano1k -f"
},
"openfpgaloader_tangnano4k": {
"command": "openFPGALoader",
"args": "-b tangnano4k -f"
},
"openfpgaloader_tangnano9k": {
"command": "openFPGALoader",
"args": "-b tangnano9k -f"
},
"openfpgaloader_tangnano20k": {
"command": "openFPGALoader",
"args": "-b tangnano20k -f"
Expand Down

0 comments on commit cb991fe

Please sign in to comment.