aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange/examples/tests
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-04-06 10:48:04 +0100
committergatecat <gatecat@ds0.me>2021-04-30 14:15:37 +0100
commit49caad0b7b22f44039cdaaefa352fd6fea2ecf30 (patch)
treecf65fe8f8ee3538beb9a14008f69ce5f4db40b9a /fpga_interchange/examples/tests
parent0461cc8c3ac93bc525d35a15528c4711f244b9c6 (diff)
downloadnextpnr-49caad0b7b22f44039cdaaefa352fd6fea2ecf30.tar.gz
nextpnr-49caad0b7b22f44039cdaaefa352fd6fea2ecf30.tar.bz2
nextpnr-49caad0b7b22f44039cdaaefa352fd6fea2ecf30.zip
interchange/nexus: Add counter example
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'fpga_interchange/examples/tests')
-rw-r--r--fpga_interchange/examples/tests/counter/CMakeLists.txt14
-rw-r--r--fpga_interchange/examples/tests/counter/lifcl17.xdc14
-rw-r--r--fpga_interchange/examples/tests/counter/run_nexus.tcl15
-rw-r--r--fpga_interchange/examples/tests/counter/run_xilinx.tcl (renamed from fpga_interchange/examples/tests/counter/run.tcl)0
4 files changed, 41 insertions, 2 deletions
diff --git a/fpga_interchange/examples/tests/counter/CMakeLists.txt b/fpga_interchange/examples/tests/counter/CMakeLists.txt
index 38c104ff..91929f93 100644
--- a/fpga_interchange/examples/tests/counter/CMakeLists.txt
+++ b/fpga_interchange/examples/tests/counter/CMakeLists.txt
@@ -2,8 +2,18 @@ add_interchange_group_test(
name counter
family ${family}
board_list basys3 arty35t arty100t zybo
- tcl run.tcl
+ tcl run_xilinx.tcl
sources counter.v
- techmap ../../remap.v
+ techmap ../../remap_xilinx.v
output_fasm
)
+
+add_interchange_group_test(
+ name counter
+ family ${family}
+ board_list lifcl17
+ tcl run_nexus.tcl
+ sources counter.v
+ techmap ../../remap_nexus.v
+ skip_dcp
+)
diff --git a/fpga_interchange/examples/tests/counter/lifcl17.xdc b/fpga_interchange/examples/tests/counter/lifcl17.xdc
new file mode 100644
index 00000000..2031964e
--- /dev/null
+++ b/fpga_interchange/examples/tests/counter/lifcl17.xdc
@@ -0,0 +1,14 @@
+## lifcl17 pins for testing based on breakout board
+set_property PACKAGE_PIN 55 [get_ports clk]
+set_property PACKAGE_PIN 57 [get_ports rst]
+set_property PACKAGE_PIN 56 [get_ports io_led[4]]
+set_property PACKAGE_PIN 59 [get_ports io_led[5]]
+set_property PACKAGE_PIN 60 [get_ports io_led[6]]
+set_property PACKAGE_PIN 61 [get_ports io_led[7]]
+
+set_property IOSTANDARD LVCMOS33 [get_ports clk]
+set_property IOSTANDARD LVCMOS33 [get_ports rst]
+set_property IOSTANDARD LVCMOS33 [get_ports io_led[4]]
+set_property IOSTANDARD LVCMOS33 [get_ports io_led[5]]
+set_property IOSTANDARD LVCMOS33 [get_ports io_led[6]]
+set_property IOSTANDARD LVCMOS33 [get_ports io_led[7]]
diff --git a/fpga_interchange/examples/tests/counter/run_nexus.tcl b/fpga_interchange/examples/tests/counter/run_nexus.tcl
new file mode 100644
index 00000000..80150571
--- /dev/null
+++ b/fpga_interchange/examples/tests/counter/run_nexus.tcl
@@ -0,0 +1,15 @@
+yosys -import
+
+read_verilog $::env(SOURCES)
+
+synth_nexus -nolutram -nowidelut -nobram -noccu2 -nodsp
+techmap -max_iter 1 -map $::env(TECHMAP)
+
+# opt_expr -undriven makes sure all nets are driven, if only by the $undef
+# net.
+opt_expr -undriven
+opt_clean
+
+setundef -zero -params
+
+write_json $::env(OUT_JSON)
diff --git a/fpga_interchange/examples/tests/counter/run.tcl b/fpga_interchange/examples/tests/counter/run_xilinx.tcl
index ffea3b2e..ffea3b2e 100644
--- a/fpga_interchange/examples/tests/counter/run.tcl
+++ b/fpga_interchange/examples/tests/counter/run_xilinx.tcl