3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-11 13:40:53 +00:00

Module name scope support

This commit is contained in:
Zachary Snow 2020-08-20 20:15:08 -04:00
parent 082cbcb4c7
commit 6127f22788
2 changed files with 23 additions and 0 deletions

View file

@ -223,6 +223,10 @@ module gen_test8;
`ASSERT(A.x == 2)
`ASSERT(A.C.x == 1)
`ASSERT(A.B.x == 0)
`ASSERT(gen_test8.x == 3)
`ASSERT(gen_test8.A.x == 2)
`ASSERT(gen_test8.A.C.x == 1)
`ASSERT(gen_test8.A.B.x == 0)
end
begin : C
wire [1:0] x = 2'b01;
@ -230,12 +234,20 @@ module gen_test8;
`ASSERT(A.x == 2)
`ASSERT(A.C.x == 1)
`ASSERT(A.B.x == 0)
`ASSERT(gen_test8.x == 3)
`ASSERT(gen_test8.A.x == 2)
`ASSERT(gen_test8.A.C.x == 1)
`ASSERT(gen_test8.A.B.x == 0)
end
assign x = B.x ^ 2'b11 ^ C.x;
`ASSERT(x == 2)
`ASSERT(A.x == 2)
`ASSERT(A.C.x == 1)
`ASSERT(A.B.x == 0)
`ASSERT(gen_test8.x == 3)
`ASSERT(gen_test8.A.x == 2)
`ASSERT(gen_test8.A.C.x == 1)
`ASSERT(gen_test8.A.B.x == 0)
end
endgenerate
@ -243,4 +255,8 @@ module gen_test8;
`ASSERT(A.x == 2)
`ASSERT(A.C.x == 1)
`ASSERT(A.B.x == 0)
`ASSERT(gen_test8.x == 3)
`ASSERT(gen_test8.A.x == 2)
`ASSERT(gen_test8.A.C.x == 1)
`ASSERT(gen_test8.A.B.x == 0)
endmodule