aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-20 20:06:47 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-20 20:06:47 -0700
commitaffe9c9c1ad2dd208507931f0606c23941660d6b (patch)
tree3b1a34f041a6501438ec8b294e3c43b79eeaceca
parent57493e328ad69b749619bc692130e28ab5c212ee (diff)
parentfe61dcce8b70236b29691fa56c562d17497d3567 (diff)
downloadyosys-affe9c9c1ad2dd208507931f0606c23941660d6b.tar.gz
yosys-affe9c9c1ad2dd208507931f0606c23941660d6b.tar.bz2
yosys-affe9c9c1ad2dd208507931f0606c23941660d6b.zip
Merge branch 'eddie/fix_techmap' into xaig_arrival
-rw-r--r--passes/techmap/techmap.cc2
-rw-r--r--tests/techmap/recursive.v8
-rw-r--r--tests/techmap/recursive_map.v4
-rw-r--r--tests/techmap/recursive_runtest.sh3
4 files changed, 16 insertions, 1 deletions
diff --git a/passes/techmap/techmap.cc b/passes/techmap/techmap.cc
index a6c1214a7..c4496f76f 100644
--- a/passes/techmap/techmap.cc
+++ b/passes/techmap/techmap.cc
@@ -943,7 +943,7 @@ struct TechmapPass : public Pass {
log(" instead of inlining them.\n");
log("\n");
log(" -max_iter <number>\n");
- log(" only run the specified number of iterations for each module.\n");
+ log(" only run the specified number of iterations on each module.\n");
log(" default: unlimited\n");
log("\n");
log(" -recursive\n");
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