In reply to ella_sun:
bind:
‘literally places all code after the path, just before the endmodule line in the RTL’
Thus it has full access to the parameters, and ports, of the module that it is placed inside.
bind 'RTL_PATH module_cov #(.ENTRIES(ENTRIES), .NUM(NUM)) module_cov_inst (
.rd_q (read_q),
.rd_buf (read_buf)
);
So see if that helps any.
Oh, and don’t use `define for any kind of ‘this is my path’. How are you going to do that for multiple instances of the same module? (In other words, it does not extend into the future when you will want to do something like this for a UVM RAL register path etc.
See the %m in this thread for some clues on how to get the path (You will have to edit it to remove that tail end for the bind’ed module instance – so use
string path;
path=$sformtf("%m");
.....
and then use the factory (set_config) to pass into your verification class world…