Ah, sorry, I did misunderstand the question.
The LRM is certainly not clear on how to interpret a
hierarchical name in such scenarios. I don't think that
was really ever the intent; in fact I would support a
clarification that in this context only an "identifier"
is allowed. That makes more sense to me in terms of
intent and other interpretations of the path either
reduce to trivialities or are so exceptional in terms
of the LRM that I'd want a very thorough explanation of
why such functionality is needed and exactly how it
is interpreted.
Gord.
On 9/16/2010 1:03 AM, Daniel Mlynek wrote:
> Unfortunatelly I have form my question not the way I wanted.
> Lets start from the beginning:
> There is a syntax in LRM allowing
> 1) bind target_module : i1, i2 checker ch1(a); //simple names after :
> or
> 2) bind target_module : uut.i1, uut.i2 checker ch1(a); //hier names after
> :
>
> The 1) option is well defined it should look for all instances with listed
> names and bind a checked module into it if the instance is target_module
> type. What should happened if the instance is not of target_module type is
> controversial: -error, warning, ingore? IMHO ignore would be the best
> solution otherwise in whole design the instance name would be reserved for
> only one kind on modules
>
> The 2) case in not described in LRM at all. How should be the hierarchical
> names in instance list searched:
> A) should it be searched in $root?
> B) Should it be searched in scope where bind is placed?
> C) B and then A
> D) should it be searched in whole design for path finishing with given hier
> paths?
>
> DANiel
> -----Original Message-----
> From: owner-sv-ac@eda.org [mailto:owner-sv-ac@eda.org] On Behalf Of Gordon
> Vreugdenhil
> Sent: Wednesday, September 15, 2010 4:57 PM
> To: SV_AC List
> Subject: RE: [sv-ac] hier reference as bind target
>
>
> > From: Havlicek John-R8AAAU<r8aaau@freescale.com> > Date: Mon Sep 13
> 2010 - 11:08:23 PDT> > Hmm ... but then what is the role of the
> bind_target_scope ? It seems> it would be more useful for the hierarchical
> instance name to be> relative to the bind_target_scope.
> >
>
> It is not only more useful, but required to work that way.
>
> 23.11 is clear:
> All actual ports and parameters in the bind_instantiation refer
> to objects from the viewpoint of the bind_target_instance.
>
> That means that the starting point for any hierarchical name is the scope of
> the bind_target_instance.
>
> So, given:
>
> module top;
> if (1) begin : a
> localparam b = 1;
> end
> bind other_top hello_mod hi(a.b);
> endmodule
>
> module other_top;
> if (1) begin : a
> localparam b = 2;
> end
> endmodule
>
> module hello_mod(input int val);
> initial $display("%0d", val);
> endmodule
>
>
> You must get the value 2 displayed.
>
> Gord.
> --
> --------------------------------------------------------------------
> Gordon Vreugdenhil 503-685-0808
> Model Technology (Mentor Graphics) gordonv@model.com
>
>
-- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Sep 16 07:22:26 2010
This archive was generated by hypermail 2.1.8 : Thu Sep 16 2010 - 07:22:31 PDT