Hi Geoffrey, No, last_crossing() doesn't control the analog timestep. It simply uses interpolation to determine where the value crossed. That is why I commonly see it used in conjunction with cross() as well, cross will control the time step to get the crossing within tolerance, and then last_crossing() will use interpolation to get the most accurate crossing time. Dave 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 >> > -- ===================================== -- 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 Thu Oct 11 07:30:38 2007
This archive was generated by hypermail 2.1.8 : Thu Oct 11 2007 - 07:30:41 PDT