Add test
authorEddie Hung <eddie@fpgeh.com>
Wed, 21 Aug 2019 03:05:16 +0000 (20:05 -0700)
committerEddie Hung <eddie@fpgeh.com>
Wed, 21 Aug 2019 03:05:16 +0000 (20:05 -0700)
tests/techmap/recursive.v [new file with mode: 0644]
tests/techmap/recursive_map.v [new file with mode: 0644]
tests/techmap/recursive_runtest.sh [new file with mode: 0644]

diff --git a/tests/techmap/recursive.v b/tests/techmap/recursive.v
new file mode 100644 (file)
index 0000000..d281b21
--- /dev/null
@@ -0,0 +1,8 @@
+module top;
+sub s0();
+foo f0();
+endmodule
+
+module foo;
+sub s0();
+endmodule
diff --git a/tests/techmap/recursive_map.v b/tests/techmap/recursive_map.v
new file mode 100644 (file)
index 0000000..9342565
--- /dev/null
@@ -0,0 +1,4 @@
+module sub;
+    sub _TECHMAP_REPLACE_ ();
+    bar f0();
+endmodule
diff --git a/tests/techmap/recursive_runtest.sh b/tests/techmap/recursive_runtest.sh
new file mode 100644 (file)
index 0000000..30c79bf
--- /dev/null
@@ -0,0 +1,3 @@
+set -ev
+
+../../yosys -p 'hierarchy -top top; techmap -map recursive_map.v -max_iter 1; select -assert-count 2 t:sub; select -assert-count 2 t:bar' recursive.v