Scott, Would it be keying off the presence of ns? How would this work if I wanted to use a variable? Would I use #(td ns); Wouldn't that imply that s, ms, us, ns, ps, fs, etc. would all have to be keywords? -Ken Scott Cranston wrote: > What you really want is a way to specify time absolutely, correct? > > Something like #(1ns) where the 1ns is not scaled. > > That seems like a clearer way to do what you want. > > -- Scott > > >>>>> -----Original Message----- >>>>> From: owner-verilog-ams@eda.org >>>>> [mailto:owner-verilog-ams@eda.org] On Behalf Of Ken Kundert >>>>> Sent: Tuesday, August 28, 2007 11:44 PM >>>>> To: verilog-AMS LRM Committee >>>>> Subject: suggestion >>>>> >>>>> All, >>>>> It would be very handy to have access to the `timescale >>>>> value from within a model so that we can write delays in >>>>> terms of time rather than ticks. >>>>> >>>>> Just to throw something out, say $tick returns the length >>>>> of a tick in seconds. Then one can use it in the digital >>>>> portion of the model as in the following example (a d >>>>> flip-flop that implements 1n of delay regardless of how >>>>> `timescale was specified) ... >>>>> >>>>> >>>>> parameter real td = 1ns; >>>>> ... >>>>> >>>>> always @(posedge clk) begin >>>>> q = #(td/$tick) d; >>>>> end >>>>> >>>>> -Ken >>>>> >>>>> -- >>>>> This message has been scanned for viruses and dangerous >>>>> content by MailScanner, and is believed to be clean. >>>>> >>>>> > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Aug 29 10:56:14 2007
This archive was generated by hypermail 2.1.8 : Wed Aug 29 2007 - 10:56:23 PDT