3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-08-05 13:53:46 +00:00
yosys/tests/various/const_cmdline.ys
2026-07-31 10:31:44 +02:00

15 lines
443 B
Text

# 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
logger -expect prefix-warning "const_cmdline.ys:[0-9]+: Warning: While parsing constant `2'd7'" 1
setattr -set foo 2'd7 t:*
# multi-bit unsized const
logger -expect prefix-error "const_cmdline.ys:[0-9]+: ERROR: Failed to parse constant `8'00000101'" 1
setattr -set foo 8'00000101 t:*