3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-03-01 19:26:55 +00:00

Detect undriven and error/warn

This commit is contained in:
Gus Smith 2026-02-20 11:00:59 -08:00
parent cdc728b6f0
commit b454582f54
4 changed files with 108 additions and 5 deletions

View file

@ -0,0 +1,7 @@
module undriven_replay (
input wire in,
output wire out,
output wire undrv
);
assign out = in;
endmodule

View file

@ -0,0 +1,15 @@
$version Yosys $end
$scope module undriven_replay $end
$var wire 1 ! in $end
$var wire 1 " out $end
$var wire 1 # undrv $end
$upscope $end
$enddefinitions $end
#0
b0 !
b0 "
b1 #
#10
b1 !
b1 "
b0 #

View file

@ -0,0 +1,10 @@
read_verilog undriven_replay.v
prep -top undriven_replay
logger -expect error "Found 1 undriven signal in the replay trace" 1
sim -r undriven_replay.vcd -scope undriven_replay -q
logger -expect warning "Input trace contains undriven signal" 1
sim -r undriven_replay.vcd -scope undriven_replay -q -undriven-warn
sim -r undriven_replay.vcd -scope undriven_replay -q -no-undriven-check