RE: suggestion

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Wed Aug 29 2007 - 00:07:26 PDT
## already has a meaning in SV. It means # of clocks. E.g., ##2 is wait
2 clocks. It can not be used in all contexts, though.
 
SV has also extended time literals so that you can add units. E.g, #
1ns.
 
But I saw a use for such functions in being able to scale to the time
units used by a different module.
 
Personally, I think that timescales are one of Verilog's greatest
misfeatures. Everytime we combine blocks which were defined with
different timescales, we have troubles.
 
Shalom


________________________________

	From: owner-verilog-ams@server.eda.org
[mailto:owner-verilog-ams@server.eda.org] On Behalf Of Kevin Cameron
	Sent: Wednesday, August 29, 2007 9:51 AM
	To: Ken Kundert
	Cc: verilog-AMS LRM Committee
	Subject: Re: suggestion
	
	

	Why bother referencing the `timescale at all?
	
	I'd probably go for a different operator e.g. '##':
	

		q = ##td d;
		  

	Kev. 
	
	Ken Kundert wrote: 

		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
		
		  



	-- 
	http://www.grfx.com
	mailto:dkc@grfx.com

	-- 
	This message has been scanned for viruses and 
	dangerous content by MailScanner <http://www.mailscanner.info/>
, 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 00:08:24 2007

This archive was generated by hypermail 2.1.8 : Wed Aug 29 2007 - 00:08:29 PDT