I'm trying to write an assertion for a module that instantiates a sub-model using a generate block.
I want to use a macro to define the path, i have tried the following:
`define PATH(i) top.sub_model_inst[(i)].sub_model_inst.signal
then using inside a property:
some_condition |-> `path(index)==0;
for (genvar i=0;i<PARAM;i++)
assert property (disable iff(reset) prop(i));
what seems to happen is that the PATH macro stays with the first iteration (so PATH will point to sub_model_inst also for the other iterations).
am I doing this wrong? if so what is the right way to do this?