3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 00:55:32 +00:00

ast: Fix handling of identifiers in the global scope

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2020-04-16 10:27:59 +01:00
parent 3c4758c60e
commit 4d02505820
3 changed files with 25 additions and 2 deletions

View file

@ -0,0 +1,18 @@
read_verilog -sv <<EOT
parameter A = 10;
parameter B = A;
typedef enum {
CONST_A = A,
CONST_B = A+1
} enum_t;
module top(output [3:0] q, output [3:0] r);
assign q = 10;
assign r = CONST_B;
endmodule
EOT
hierarchy -top top
sat -verify -prove q 10 top
sat -verify -prove r 11 top