> 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 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Sep 15 07:57:24 2010
This archive was generated by hypermail 2.1.8 : Wed Sep 15 2010 - 07:57:42 PDT