Re: [sv-bc] Forward reference into struct variable

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Fri Aug 17 2007 - 14:23:33 PDT
If you mean "will this elaborate as a complete design"
my answer is "no".  "v.field" is not a select at the
time of analysis and is treated as a hierarchical name
that must resolve upwards starting from the instance
parent of "test".  Since "test" is a root, it won't resolve.

I am not entirely sure how to apply Mark's rule 7 in this case.
I don't know if "the variable candidate" decision is made purely
at parse time since this is a non-DRS.  If the variable
candidate decision is made early then Mark should agree that
this would fail.

Note that "test.v.field" would not fail of course.

Gord.

Brad Pierce wrote:
> Is the following test case legal?
> 
> 
> module test(output o);
> 
>   assign o = v.field;
>   struct { logic field; } v;
> 
>   initial begin
>      v = '{1};
>      #1 $display(o);
>   end
> 
> endmodule
> 
> 
> -- Brad
> 

-- 
--------------------------------------------------------------------
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 Fri Aug 17 14:23:52 2007

This archive was generated by hypermail 2.1.8 : Fri Aug 17 2007 - 14:24:02 PDT