Skip to content

Commit fdbbad1

Browse files
committed
Verilog: test for hierarchical identifier inside an assertion
1 parent 955c752 commit fdbbad1

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
hierarchical_identifiers3.v
3+
--module main --bound 0
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module Msubsub;
2+
3+
wire [31:0] magic_number = -1;
4+
5+
endmodule
6+
7+
module Msub;
8+
reg [31:0] out;
9+
wire x;
10+
11+
Msubsub subsub();
12+
13+
always @x out = subsub.magic_number;
14+
15+
endmodule
16+
17+
module main;
18+
wire [31:0] bin;
19+
20+
assign bin=sub.out;
21+
22+
Msub sub();
23+
24+
always assert property1: bin=='hffffffff;
25+
26+
always assert property2: sub.subsub.magic_number =='hffffffff;
27+
28+
endmodule

0 commit comments

Comments
 (0)