aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/various/submod.ys26
1 files changed, 24 insertions, 2 deletions
diff --git a/tests/various/submod.ys b/tests/various/submod.ys
index 9d7dabdd7..4fb45043b 100644
--- a/tests/various/submod.ys
+++ b/tests/various/submod.ys
@@ -80,9 +80,8 @@ miter -equiv -flatten -make_assert -make_outputs gold gate miter
sat -verify -prove-asserts -show-ports miter
-
design -reset
-read_verilog -icells <<EOT
+read_verilog <<EOT
module top(input d, c, (* init = 3'b011 *) output reg [2:0] q);
(* submod="bar" *) DFF s1(.D(d), .C(c), .Q(q[1]));
DFF s2(.D(d), .C(c), .Q(q[0]));
@@ -100,3 +99,26 @@ proc
submod
dffinit -ff DFF Q INIT
check -noinit -assert
+
+
+design -reset
+read_verilog <<EOT
+module top(input d, c, output reg [2:0] q);
+(* submod="bar" *) DFF s1(.D(d), .C(c), .Q(q[1]));
+DFF s2(.D(d), .C(c), .Q(q[0]));
+DFF s3(.D(d), .C(c), .Q(q[2]));
+endmodule
+EOT
+
+hierarchy -top top
+proc
+
+submod
+flatten
+
+read_verilog <<EOT
+module DFF(input D, C, output Q);
+endmodule
+EOT
+
+check -assert