mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-01 13:08:54 +00:00
Add latch inference msg severity option.
This commit is contained in:
parent
8869ce61dc
commit
7473fcf939
4 changed files with 97 additions and 7 deletions
32
tests/proc/proc_latches.ys
Normal file
32
tests/proc/proc_latches.ys
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# warn
|
||||
read_verilog <<EOT
|
||||
module top(input g, rn, d, output reg q);
|
||||
always @* if (~rn) q <= 0; else if (g) q <= d;
|
||||
endmodule
|
||||
EOT
|
||||
logger -expect warning "Latch inferred for signal" 1
|
||||
proc
|
||||
logger -check-expected
|
||||
|
||||
design -reset
|
||||
|
||||
# auto
|
||||
read_verilog <<EOT
|
||||
module top(input g, rn, d, output reg q);
|
||||
always @* if (~rn) q <= 0; else if (g) q <= d;
|
||||
endmodule
|
||||
EOT
|
||||
logger -expect-no-warnings
|
||||
proc -latches auto
|
||||
logger -check-expected
|
||||
|
||||
design -reset
|
||||
|
||||
# error
|
||||
read_verilog <<EOT
|
||||
module top(input g, rn, d, output reg q);
|
||||
always @* if (~rn) q <= 0; else if (g) q <= d;
|
||||
endmodule
|
||||
EOT
|
||||
logger -expect error "Latch inferred for signal" 1
|
||||
proc -latches error
|
||||
Loading…
Add table
Add a link
Reference in a new issue