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, > SriReceived on Wed Apr 12 04:00:18 2006
This archive was generated by hypermail 2.1.8 : Wed Apr 12 2006 - 04:00:29 PDT