Add testcase
authorEddie Hung <eddie@fpgeh.com>
Sat, 23 Nov 2019 00:41:05 +0000 (16:41 -0800)
committerEddie Hung <eddie@fpgeh.com>
Sat, 23 Nov 2019 00:48:11 +0000 (16:48 -0800)
tests/various/submod.ys [new file with mode: 0644]

diff --git a/tests/various/submod.ys b/tests/various/submod.ys
new file mode 100644 (file)
index 0000000..54455b5
--- /dev/null
@@ -0,0 +1,26 @@
+read_verilog <<EOT
+module top(input a, output [1:0] b);
+wire c;
+(* submod="bar" *) sub s1(a, c);
+assign b[0] = c;
+endmodule
+
+module sub(input a, output c);
+assign c = a;
+endmodule
+EOT
+
+hierarchy -top top
+proc
+design -save gold
+submod
+flatten
+
+design -stash gate
+
+design -import gold -as gold
+design -import gate -as gate
+
+miter -equiv -flatten -make_assert -make_outputs gold gate miter
+sat -verify -prove-asserts -show-ports miter
+