From 9f0892159ebb88964839ea2cb5313ef1b87c624d Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 26 Aug 2020 16:20:32 +0000 Subject: flatten, techmap: don't canonicalize tpl driven bits via sigmap. For connection `assign a = b;`, `sigmap(a)` returns `b`. This is exactly the opposite of the desired canonicalization for driven bits. Consider the following code: module foo(inout a, b); assign a = b; endmodule module bar(output c); foo f(c, 1'b0); endmodule Before this commit, the inout ports would be swapped after flattening (and cause a crash while attempting to drive a constant value). This issue was introduced in 9f772eb9. Fixes #2183. --- tests/techmap/bug2183.ys | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/techmap/bug2183.ys (limited to 'tests') diff --git a/tests/techmap/bug2183.ys b/tests/techmap/bug2183.ys new file mode 100644 index 000000000..8dd09458e --- /dev/null +++ b/tests/techmap/bug2183.ys @@ -0,0 +1,11 @@ +read_verilog <