aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-08-21 09:12:56 +0200
committerGitHub <noreply@github.com>2019-08-21 09:12:56 +0200
commit7d8db1c0538552d1893849ff8c9c60b2025ec267 (patch)
treeb221eae7a5941448571f90c742ba601722133000 /tests
parent076af2e6176ecc440be7b7fa984ea5b461bb95de (diff)
parentfe61dcce8b70236b29691fa56c562d17497d3567 (diff)
downloadyosys-7d8db1c0538552d1893849ff8c9c60b2025ec267.tar.gz
yosys-7d8db1c0538552d1893849ff8c9c60b2025ec267.tar.bz2
yosys-7d8db1c0538552d1893849ff8c9c60b2025ec267.zip
Merge pull request #1314 from YosysHQ/eddie/fix_techmap
techmap -max_iter to apply to each module individually
Diffstat (limited to 'tests')
-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