Coding tip: signals with similar name

In reply to lucaskoelho:

Hi,

If you are still searching for the answer on how to write a macro then see below,

`define SWITCH_PROP(NUM)
property p_signal_NUM; \ @(posedge clk) !switch_NUM |-> enable_``NUM && !mem_read;
endproperty

Now you just need to call the define above i.e. `SWITCH_PROP(0), and so on with other 19 numbers.

Hope that helps !