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

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.
This commit is contained in:
Zachary Snow 2021-03-11 13:05:04 -05:00
parent 396ad17e06
commit 640b9927fa
3 changed files with 21 additions and 1 deletions

View file

@ -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