diff options
author | Zachary Snow <zach@zachjs.com> | 2021-03-11 13:05:04 -0500 |
---|---|---|
committer | Zachary Snow <zach@zachjs.com> | 2021-03-12 11:22:41 -0500 |
commit | 640b9927fae23d3127cc9ecb56ccbc8a2c66afbe (patch) | |
tree | 8f5b6ccaba28f979992946f0efda2ffdd49d74f0 /tests/verilog | |
parent | 396ad17e06a7b5fa912180540206a6560b54101f (diff) | |
download | yosys-640b9927fae23d3127cc9ecb56ccbc8a2c66afbe.tar.gz yosys-640b9927fae23d3127cc9ecb56ccbc8a2c66afbe.tar.bz2 yosys-640b9927fae23d3127cc9ecb56ccbc8a2c66afbe.zip |
sv: allow globals in one file to depend on globals in another
This defers the simplification of globals so that globals in one file
may depend on globals in other files. Adds a simplify() call downstream
because globals are appended at the end.
Diffstat (limited to 'tests/verilog')
-rw-r--r-- | tests/verilog/parameters_across_files.ys | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/verilog/parameters_across_files.ys b/tests/verilog/parameters_across_files.ys new file mode 100644 index 000000000..c53e40179 --- /dev/null +++ b/tests/verilog/parameters_across_files.ys @@ -0,0 +1,20 @@ +read_verilog -sv <<EOF +parameter Q = 1; +EOF +read_verilog -sv <<EOF +parameter P = Q; +module top( + output integer out +); + assign out = P; + always @* + assert (out == 1); +endmodule +EOF + +hierarchy +proc +flatten +opt -full +select -module top +sat -verify -seq 1 -tempinduct -prove-asserts -show-all |