Could anybody help me as how to use $time in verilog.
I need a timestamp of start of some event and the end of the same.
for instance.
The timestamp should start at the rising edge of a signal called UP and
should end at the rising edge of the other signal DOWN.
The time is actually the diffrence between DOWN - UP.
Please help me.
Hari.
Sent via Deja.com http://www.deja.com/
Before you buy.
This should get you started....
@(posedge UP) $display("%0t : UP", $time);
@(posedge DOWN) $display("%0t : DOWN", $time);
Cheers,
Xanatos
Just a small addition, incase you don't want to diaplay you can
store the $time and make your own calculation
e.g. if you want to check the ck->out of output signal name sig you can
do something like:
integer clk_time, sig_time, sig_ck2o;
always @ (posedge clk)
clk_time = $time;
always @ (sig)
begin
sig_time = $time;
sig_ck2o = sig_time - clk_time ;
$display ("%0t SIG Have CK->Q of %d ns",$time,sig_ck2o);
end
etc
have a nice day
Illan
In article <AY_M4.143622$1C2.3...@news20.bellglobal.com>,
initial
begin
$timeformat ("-9, 0, " ns.", 5);
end
...where -9 is unit (here unit is ns.), 0 is precision after
".", the string " ns." is appended at each %t printing. 5 is
the minimum string length to print the time information.
Utku
--
I feel better than James Brown.
I also use %0t, also %0h, %0d. But still no workaround for
hexadecimal formatting for capital letters!!
Any specail reason why I would like the hex to be capiatal letter ?
maybe in 20 years from now when my eye sight want be as good but except
for that ?
Have a nice day
Illan
In article <390680A4...@netas.com.tr>,
Assuming you use diff than just use diff -i
Have a nice day
Illan
In article <3907760C...@sebringring.com>,
Assuming you use diff than just use diff -i
or you can also use tr 'a-f' 'A-F'