yosys/tests/various/const_cmdline.ys

16 lines
443 B
Plaintext
Raw Normal View History

2026-07-29 11:02:59 +02:00
# https://github.com/YosysHQ/yosys/issues/6009
read_verilog <<EOT
module top(output [7:0] o);
assign o = 8'hAA;
endmodule
EOT
prep -top top
# width mismatch
2026-07-29 11:14:55 +02:00
logger -expect prefix-warning "const_cmdline.ys:[0-9]+: Warning: While parsing constant `2'd7'" 1
2026-07-29 11:02:59 +02:00
setattr -set foo 2'd7 t:*
# multi-bit unsized const
2026-07-29 11:14:55 +02:00
logger -expect prefix-error "const_cmdline.ys:[0-9]+: ERROR: Failed to parse constant `8'00000101'" 1
2026-07-29 11:02:59 +02:00
setattr -set foo 8'00000101 t:*