yosys/tests/verilog/macro_unapplied.ys

18 lines
426 B
Plaintext

logger -expect-no-warnings
read_verilog -sv <<EOT
`define MACRO(a = 1, b = 2) initial $display("MACRO(a = %d, b = %d)", a, b)
module top;
`MACRO();
endmodule
EOT
design -reset
logger -expect error "Expected to find '\(' to begin macro arguments for 'MACRO', but instead found ';'" 1
read_verilog -sv <<EOT
`define MACRO(a = 1, b = 2) initial $display("MACRO(a = %d, b = %d)", a, b)
module top;
`MACRO;
endmodule
EOT