In reply to dave_59:
Yeah, my code looks like below,
`if `NUM_OF_INS == 2
assert property (@(posedge clk) bb_seq |=> bb_exp[0] == bb_rtl[0]);
assert property (@(posedge clk) bb_seq |=> bb_exp[1] == bb_rtl[1]);
`else if `NUM_OF_INS == 1
assert property (@(posedge clk) bb_seq |=> bb_exp[0] == bb_rtl[0]);
`endif
If NUM_OF_INS==2, two assertions are compiled, and if If
NUM_OF_INS==1, only one assertion will be compiled. However, it seems SV only support directives like ifdef, but no
if, so I have no idea on how to do conditional compile according to the value of the macro.