Hi Luc,
This is not clearly defined. My take on this is since the statement appears
outside of an analog block the context of the assignment is in the digital
domain, hence this is a digital variable (refer Section 7.2.2 Contexts - LRM
2.3.1)
But some may also argue that since default domain for variables is analog (is
that even explicitly stated?) it is just as valid to treat 'x' in your case as
analog.
To clear up this ambiguity we have added the "analog initial" block (similar to
the digital "initial") to allow users to initialise variables etc. in the
analog context prior to simulation (so before initial_step blocks fire).
Hope this helps
Cheers...
Dave
On 05/06/2010 07:53 AM, Luc Rebillard wrote:
> Hello,
>
> According to the LRM, the domain of a variable (integer, real) is
> determinated by the context in which this variable
> is assigned. This recalled, I wonder what is the domain of the variable
> 'x' is the following module
>
> module test ;
>
> real x = 1.0 ;
>
> analog @(initial_step) $display("x=%f",x) ;
>
> initial $display("x=%f",x) ;
>
> endmodule
>
> Thanks,
>
> Regards,
>
> Luc
>
-- ============================================== -- It's a beautiful day -- Don't let it get away -- -- David Miller -- Design Technology (Austin) -- Freescale Semiconductor -- Ph : 512 996-7377 Fax: x7755 ============================================== -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu May 6 07:15:06 2010
This archive was generated by hypermail 2.1.8 : Thu May 06 2010 - 07:15:10 PDT