Skip to content

Commit a3573b5

Browse files
authored
Merge pull request #375 from diffblue/enum_with_hierarchy1
Verilog: add KNOWNBUG test for enums in module hierarchy
2 parents 9e2e50e + 66973de commit a3573b5

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
KNOWNBUG
2+
enum_with_hierarchy1.sv
3+
--bound 0
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
--
8+
Asserted values are wrong.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module sub;
2+
3+
parameter step = 1;
4+
5+
typedef enum { E0 = 0 * step, E1 = 1 * step, E2 = 2 * step } my_enumt;
6+
7+
endmodule
8+
9+
module main;
10+
11+
// The value of enum constants may differ for each module instance.
12+
sub #(1) sub1();
13+
sub #(2) sub2();
14+
15+
p1: assert property (sub1.E0 == 0 && sub1.E1 == 1 && sub1.E2 == 2);
16+
p2: assert property (sub2.E0 == 0 && sub2.E2 == 2 && sub2.E2 == 4);
17+
18+
endmodule

0 commit comments

Comments
 (0)