[sv-ac] binding checkers

From: Kulshrestha, Manisha <Manisha_Kulshrestha@mentor.com>
Date: Thu Sep 19 2013 - 22:19:53 PDT
Hi All,

LRM allows instantiating checkers in another module using bind construct. But it is not clear how it would be decided which checker to pickup.

Here is an example:

module A;

checker ch1;
....
endchecker

....
endmodule

module B;

checker ch1;
....
endchecker

bind A ch1 U1(); <===
endmodule

It is not clear which ch1 it should pick up? One in A or B? 

As per bind section, all the symbols in the port list are resolved in the target scope. What about the name of the checker?

Here is another example which is more interesting:

package p1;
checker ch1;
...
endchecker
endpackage

module A;
....
endmodule

module B;
import p1::*; <<== should this be needed for the bind to work
bind A ch1 U1(); <===
endmodule

Here is some text from the LRM:
"When an instance is bound into a target scope, the effect will be as if the instance was present at the very end
of the target scope. In other words, all declarations present in the target scope or imported into the target
scope are visible to the bound instance. Wildcard import candidates that have been imported into the scope
are visible, but a bind statement cannot cause the import of a wildcard candidate. Declarations present or
imported into $unit are not visible in the bind statement."

So, the bind statement should be effectively as if 'ch1 U1()' is written at the end of module A. But, A does not import anything from package p1 so effectively ch1 is not visible in A. Does that mean it is an error or tools should take care of this scenario? 

I would like to know what others think about these usages. 

Thanks.
Manisha

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Sep 19 22:20:10 2013

This archive was generated by hypermail 2.1.8 : Thu Sep 19 2013 - 22:20:51 PDT