mirror of
https://github.com/YosysHQ/yosys
synced 2026-06-29 20:18:53 +00:00
Fix.
This commit is contained in:
parent
1186e5af61
commit
a8b4715298
1 changed files with 7 additions and 4 deletions
|
|
@ -1,8 +1,10 @@
|
|||
read_verilog <<EOT
|
||||
design -reset
|
||||
read -vlog2k <<EOT
|
||||
module top(input g, rn, d, output reg q);
|
||||
always @* if (~rn) q <= 0; else if (g) q <= d;
|
||||
endmodule
|
||||
EOT
|
||||
hierarchy -top top
|
||||
proc
|
||||
select -assert-count 1 t:$dlatch
|
||||
logger -expect warning "is a latch of type" 1
|
||||
|
|
@ -10,24 +12,25 @@ check -nolatches
|
|||
logger -check-expected
|
||||
|
||||
design -reset
|
||||
|
||||
read_verilog <<EOT
|
||||
read -vlog2k <<EOT
|
||||
module top(input g, d, output reg q);
|
||||
always @* q = g ? d : 1'b0;
|
||||
endmodule
|
||||
EOT
|
||||
hierarchy -top top
|
||||
proc
|
||||
check -nolatches -assert
|
||||
|
||||
design -reset
|
||||
|
||||
read_verilog <<EOT
|
||||
read -vlog2k <<EOT
|
||||
module top(input g, d, output reg q, output y);
|
||||
always @* if (g) q = d;
|
||||
wire u;
|
||||
assign y = u;
|
||||
endmodule
|
||||
EOT
|
||||
hierarchy -top top
|
||||
proc
|
||||
logger -expect error "Found 1 problems in" 1
|
||||
check -latchonly -assert
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue