Geoffrey, David is right, last_crossing() need not control the time step, it simply records the time when crossings occur, refines them using interpolation, and then reports the time of the last crossing. However, you make a good point. It does only make sense that it be in an analog context so that its argument, which could be an expression, gets evaluated on every time point. Sorry, I should have thought a bit more about this before I suggested it. -Ken Geoffrey.Coram wrote: > I thought last_crossing() controlled the timestep in the analog solver > so that the crossing could be resolved accurately. Thus, it doesn't > seem to make sense in a digital context. If the digital event happens > a long time after the crossing, the simulator may not be able to > "back up" to make an accurate measurement. > > Can you make the measurement in the analog domain, and "sample" the > result when you want it in the event-driven context? I guess this > would slow the performance if you don't need the accurate > measurement most of the time. > > -Geoffrey > > > > Ken Kundert wrote: >> All, >> Just noticed a deficiency in Verilog-AMS. I went to use >> last_crossing() to make a very accurate time measurement in an always >> block, and I could not do it. last_crossing() is only allowed in the >> analog block. It would be really helpful to also have access to it in >> the event-driven context. >> >> Comments? >> >> -Ken >> > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
This archive was generated by hypermail 2.1.8 : Thu Oct 11 2007 - 12:58:53 PDT