0
votes

I'm trying to bind my assertions for the module instances generated using generate for statment.

Below is my bind statement in my bind assert module:

`define NUM_BLKS 4;
genvar asrt_inst;
generate
for (asrt_inst = 0;asrt_inst < `NUM_BLKS;asrt_inst = asrt_inst+1) 
begin 
bind top.u_dut.u_blk_gen[asrt_inst].u_blk my_assert u_my_assert (
.*
);
end
endgenerate

Here, the RTL is under gen block of u_blk_gen[gen_var], and I'm trying to bind my assertion to each instance of the generated instance. The path instances of the RTL, generated using the generate block are :

  • top.u_dut.u_blk_gen[0].u_blk
  • top.u_dut.u_blk_gen1.u_blk
  • top.u_dut.u_blk_gen[2].u_blk
  • top.u_dut.u_blk_gen[3].u_blk

And with the bind statement, I get the below compile error:

bind top.u_dut.u_blk_gen[asrt_inst].u_blk my_assert u_my_assert (
                                 |
ncvlog: *E,ILLGVR (/home/user/assertion_bind.v,165|72): This genvar cannot be used in this context [12.1.3(IEEE 2001)].

Need to get rid of this issue.

Is this valid statement?

If not, is there a work around for such scenario?

Code at EDA Playground

2

2 Answers

0
votes

It would help to show the generate block in your RTL, but I think you are missing an instance name in your bind statement. It should be

bind top.u_dut.u_blk_gen[asrt_inst].instname my_assert u_my_assert (

If you are binding to all instances of a module, then you do not need an instance specific bind. You could do

bind targetname my_assert u_my_assert (
0
votes

This is a tools' support issue. Contacted the vendor(cadence), which stated that this feature is supported in latest versions of the tool.

And we need to pass -nncbind command line option.

And this feature is supported in version 15.1 on wards and it requires additional incubation license. But from 15.20.008 version on wards, it does not require additional license.