diff options
author | David Shah <dave@ds0.me> | 2020-04-16 10:27:59 +0100 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2020-04-16 10:30:07 +0100 |
commit | 4d025058208f3b3096192b09371c9320610a44b8 (patch) | |
tree | d5900af65a815750662cf7dcec69fb2b6df0b365 /tests/various/global_scope.ys | |
parent | 3c4758c60e33386e19049d81fd6f72c8e7f316e0 (diff) | |
download | yosys-4d025058208f3b3096192b09371c9320610a44b8.tar.gz yosys-4d025058208f3b3096192b09371c9320610a44b8.tar.bz2 yosys-4d025058208f3b3096192b09371c9320610a44b8.zip |
ast: Fix handling of identifiers in the global scope
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'tests/various/global_scope.ys')
-rw-r--r-- | tests/various/global_scope.ys | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/various/global_scope.ys b/tests/various/global_scope.ys new file mode 100644 index 000000000..8c8618e10 --- /dev/null +++ b/tests/various/global_scope.ys @@ -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 |