aboutsummaryrefslogtreecommitdiffstats
path: root/tests/techmap
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-20 20:05:16 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-20 20:05:16 -0700
commitfce8dc7db20d722646cea83ca841160d3d07445e (patch)
tree832958634ea56ecb8b6571e7c2f1410535c0b597 /tests/techmap
parent193eae0c84860c65bd5dd135b7e59c0c11ea76b0 (diff)
downloadyosys-fce8dc7db20d722646cea83ca841160d3d07445e.tar.gz
yosys-fce8dc7db20d722646cea83ca841160d3d07445e.tar.bz2
yosys-fce8dc7db20d722646cea83ca841160d3d07445e.zip
Add test
Diffstat (limited to 'tests/techmap')
-rw-r--r--tests/techmap/recursive.v8
-rw-r--r--tests/techmap/recursive_map.v4
-rw-r--r--tests/techmap/recursive_runtest.sh3
3 files changed, 15 insertions, 0 deletions
diff --git a/tests/techmap/recursive.v b/tests/techmap/recursive.v
new file mode 100644
index 000000000..d281b21d8
--- /dev/null
+++ b/tests/techmap/recursive.v
@@ -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
index 000000000..934256552
--- /dev/null
+++ b/tests/techmap/recursive_map.v
@@ -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
index 000000000..30c79bf03
--- /dev/null
+++ b/tests/techmap/recursive_runtest.sh
@@ -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