aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2020-04-16 13:48:20 +0100
committerGitHub <noreply@github.com>2020-04-16 13:48:20 +0100
commit2b57c06360fd453840aa1e3b76a410ad300ae197 (patch)
tree3f6432e5c18281c405d3ead0b12d0ff054634389 /tests
parent2f8541a92eb6a733c90170709c4c597452036ab6 (diff)
parent4d025058208f3b3096192b09371c9320610a44b8 (diff)
downloadyosys-2b57c06360fd453840aa1e3b76a410ad300ae197.tar.gz
yosys-2b57c06360fd453840aa1e3b76a410ad300ae197.tar.bz2
yosys-2b57c06360fd453840aa1e3b76a410ad300ae197.zip
Merge pull request #1943 from YosysHQ/dave/fix-1919
ast: Fix handling of identifiers in the global scope
Diffstat (limited to 'tests')
-rw-r--r--tests/various/global_scope.ys18
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