Re: talking about switch branches...

From: Sri Chandra <srikanth.chandrasekaran_at_.....>
Date: Wed Apr 12 2006 - 16:13:00 PDT
Geoffrey,


Infact i raised that ticket in relation to this issue. There has been a 
few occasions in the past when users have requested to be able to set an 
initial condition on a branch using contribution statement in initial 
step. So its more to do with initialization events but can also be 
extended to generic events.

We semantically restrict the usage of contribution statements inside 
events. This is specified in section 6.7.3 and specifies that its 
because of the discontinuity that can be generated by usage of these 
statements inside events. However, i am wondering whether we can remove 
this semantic restriction and treat the presence of contribution inside 
events as a switch branch with an unassigned source (branch flow set to 
zero)?

cheers,
Sri
PS: guess you wanted to write assignments inside the events in your 
example :-)

Geoffrey.Coram wrote:
> I am fairly sure the LRM prohibits contributions inside events.
> In fact, you (Sri) reported this as Mantis item 815.
> http://www.eda.org/mantis/bug_view_page.php?bug_id=0000815
> 
> I know many users have gotten themselves in trouble, trying to
> contribute in an event like this:
> 
>   @(cross(...,+1))
>     V(branch) <+ -1;
>   @(cross(...,-1))
>     V(branch) <+ +1;
> 
> when what they really wanted was
>   @(initial_step)
>     vout = 1;
>   @(cross(...,+1))
>     vout <+ -1;
>   @(cross(...,-1))
>     vout <+ +1;
>   V(branch) <+ vout;
> 
> that is, they expected the contribution to be "persistent."
> 
> -Geoffrey
> 
> 
> 
> Sri Chandra wrote:
>> Hi all,
>>
>> Currently we talk about switch branches only under conditional
>> statements like "if". Atleast that is the implicit reference.
>>
>> if (var)
>>    V(branch) <+ expr;
>> end
>>
>> But shouldn't the same apply to events also?
>>
>> @(cross(...))
>>    V(branch) <+ expr;
>>
>> In the above case i am assuming if the cross doesnt fire then its the
>> same as contributing zero current to the branch.
>>
>> Should the above be also treated as a switch?
>>
>> cheers,
>> Sri
> 

-- 
Srikanth Chandrasekaran
DTO, Tools Group
Freescale Semiconductors Inc.
Ph: +61-(0)8-8168 3592 Fax: x3201
Received on Wed Apr 12 16:13:06 2006

This archive was generated by hypermail 2.1.8 : Wed Apr 12 2006 - 16:13:12 PDT