machxo2: Add test/arch/machxo2 directory (test does not pass).
authorWilliam D. Jones <thor0505@comcast.net>
Tue, 17 Nov 2020 18:01:57 +0000 (13:01 -0500)
committerMarcelina Koƛcielnicka <mwk@0x04.net>
Tue, 23 Feb 2021 16:39:58 +0000 (17:39 +0100)
Makefile
tests/arch/machxo2/.gitignore [new file with mode: 0644]
tests/arch/machxo2/logic.ys [new file with mode: 0644]
tests/arch/machxo2/run-test.sh [new file with mode: 0644]

index 1f255a5eaee749dcade88264c4affdb04a98753a..50f4f52b7e6586ecdb603dace4184a0385122d7c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -810,6 +810,7 @@ test: $(TARGETS) $(EXTRA_TARGETS)
        +cd tests/arch/ice40 && bash run-test.sh $(SEEDOPT)
        +cd tests/arch/xilinx && bash run-test.sh $(SEEDOPT)
        +cd tests/arch/ecp5 && bash run-test.sh $(SEEDOPT)
+       +cd tests/arch/machxo2 && bash run-test.sh $(SEEDOPT)
        +cd tests/arch/efinix && bash run-test.sh $(SEEDOPT)
        +cd tests/arch/anlogic && bash run-test.sh $(SEEDOPT)
        +cd tests/arch/gowin && bash run-test.sh $(SEEDOPT)
diff --git a/tests/arch/machxo2/.gitignore b/tests/arch/machxo2/.gitignore
new file mode 100644 (file)
index 0000000..1d329c9
--- /dev/null
@@ -0,0 +1,2 @@
+*.log
+/run-test.mk
diff --git a/tests/arch/machxo2/logic.ys b/tests/arch/machxo2/logic.ys
new file mode 100644 (file)
index 0000000..c5d2fb0
--- /dev/null
@@ -0,0 +1,8 @@
+read_verilog ../common/logic.v
+hierarchy -top top
+proc
+equiv_opt -assert -map +/machxo2/cells_sim.v synth_machxo2 # equivalency check
+design -load postopt # load the post-opt design (otherwise equiv_opt loads the pre-opt design)
+cd top # Constrain all select calls below inside the top module
+select -assert-count 9 t:LUT4
+select -assert-none t:LUT4 %% t:* %D
diff --git a/tests/arch/machxo2/run-test.sh b/tests/arch/machxo2/run-test.sh
new file mode 100644 (file)
index 0000000..4be4b70
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+set -eu
+source ../../gen-tests-makefile.sh
+run_tests --yosys-scripts --bash --yosys-args "-w 'Yosys has only limited support for tri-state logic at the moment.'"