Re: Accessing nature attributes

From: Sri Chandra <srikanth.chandrasekaran_at_.....>
Date: Mon Mar 06 2006 - 04:58:53 PST
David,

As far as i understand the access is always through the net name when an 
hierarchical naming convention is used (except in the case of ddt/idt 
where one uses the nature name - not hierarchical access) for getting 
the abstol.

So in your example below, only the first case would be allowed as far as 
hierarchical representation is concerned.

I agree that the BNF is very unclear, as hierarchical access in terms of 
syntax or semantics have not been clearly defined. Ofcourse, we are 
trying to stick to the rules as defined in 1364-2005 but this breaks in 
the case of accessing data inside natures and disciplines are these are 
more analog and ams concepts, which hopefully will be sorted out as part 
of LRM2.3.

Any other comments?

Regards,
Sri


David Miller wrote:
> Hello all,
> I was wondering which of these code snippets are valid ways to access 
> the abstol value of a nature.
> 
> (electrical in my example is the standard electrical discipline with 
> natures Voltage and Current)
> 
> module bb();
>   electrical a;
>   real x;
>   analog begin
>     x = a.potential.abstol;
>     x = electrical.potential.abstol;
>     x = Voltage.abstol;
>   end
> endmodule
> 
> I have gone through the BNF and I can't seem to find anything that 
> explicitly disallows the above combinations (or maybe since it is not 
> explicitly in the BNF then is is illegal). I understand that I can use 
> the nature name explicitly in ddt()/idt() to access the abstol but was 
> wondering if I could use hierarchical access like above.
> 
> Thanks for any help given.
> 
> Regards
> Dave
> 
Received on Mon Mar 6 04:59:20 2006

This archive was generated by hypermail 2.1.8 : Mon Mar 06 2006 - 05:00:17 PST