macro_string.sv 245 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
`define PRINT(str, num) $display(`"StrIs``str NumIs``num`");

module top;
    initial begin

        `PRINT(FOO, 0)
        `PRINT(BAR, 1)
        `PRINT(BAZ, 2)

        `PRINT(A, 1)
        `PRINT(B, 2)
        `PRINT(C, 3)

    end
endmodule