3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-28 12:19:01 +00:00

write_verilog: don't assign to a reg.

Fixes #2035.
This commit is contained in:
Catherine 2024-04-03 08:01:58 +00:00 committed by Marcelina Kościelnicka
parent 040605b047
commit d9a4a42389
4 changed files with 42 additions and 8 deletions

View file

@ -0,0 +1,22 @@
# https://github.com/yosyshq/yosys/issues/2035
read_ilang <<END
module \top
wire width 1 input 0 \halfbrite
wire width 2 output 1 \r_on
process $1
assign \r_on [1:0] 2'00
assign \r_on [1:0] 2'11
switch \halfbrite [0]
case 1'1
assign \r_on [1] 1'0
end
end
end
END
proc_prune
write_verilog assign_to_reg.v
design -reset
logger -expect-no-warnings
read_verilog assign_to_reg.v