Re: talking about switch branches...

From: Sri Chandra <srikanth.chandrasekaran_at_.....>
Date: Wed Apr 12 2006 - 17:32:45 PDT
Goeffrey,

I just looked at your bugnote in the mantis item 815 with the following 
example:

   @(cross(V(clk)) begin
       V(out) <+ V(in);
    end

and in this case when the clock is not transitioning you dont want an 
open circuit. Does the user expect the branch 'out' to just retain the 
last value when the clock is not transitioning? I can see the use of 
flow of zero in the case of event not firing being useful in initial 
step. Not sure what usage is expected in the case of other events like 
cross and timer.

cheers,
Sri

Sri Chandra wrote:
> 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 17:32:53 2006

This archive was generated by hypermail 2.1.8 : Wed Apr 12 2006 - 17:32:57 PDT