Hi Paul, Didn't see any response to your query, but yes I think that passing 0 to a timer should mean it is a oneshot timer, hence it should fire once and only fire again when period becomes > 0 in the case of using a variable. I also think that -ve value for a period should result in a simulator warning, stating the period will be treated as 0.0. I think we should avoid ',,' to represent empty arguments. We only allow this in a couple of places, namely laplace/zi and instantiations (port lists, parameter lists). Cheers... Dave Paul Floyd wrote: > Hi > > In the the 2.2 LRM, section 6.7.5.3, nothing is explicitly stated for a > non-positive period. My interpretation is that this is the same as for a > timer with just one argument, namely a oneshot timer. In particular, a > non-positive period is necessary for a oneshot that uses a non-default > time_tol. E.g., > > @(timer(0.2)) <statements> > > would be a timer that fires once at time 0.2 with a default time_tol and > > @(timer(0.2, 0.0, 1e-6)) <statements> > > would be a timer that fires once at time 0.2 with a time_tol of 1e-6. > > Is it worth making this explicit in the LRM? And are both zero and > negative values for the period equally valid for a oneshot? > > Lastly, would syntax like > > @(timer(0.2,, 1e-6)) <statements> > > be acceptable and mean the same thing? > > I'd say no since the syntax is given as > > timer ( start_time [ , period [ , time_tol ] ] ) ; > > meaning comma and argument or nothing, not just the comma. > > Regards > Paul Floyd -- ===================================== -- 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 Fri Oct 5 11:41:08 2007
This archive was generated by hypermail 2.1.8 : Fri Oct 05 2007 - 11:41:38 PDT