I am using VSS, and read from a sdf file the delay values of my cell.
Then, I am doing monitoring on my cell on a set of vectors using
"monitor event *'signal"
I am also using Verilog XL of Cadence to do the same with the lines:
" initial
begin
$monitor( $realtime , "\t \q = %b , \j = %b , \k =
%b ,
\cp = %b , \s = %b , \si = %b ,", \q , \j , \k , \cp , \s ,
\si );
end
"
As output, I get the changes of signal and the time of the change.
My problem is that both simulators round the timing value, but in an
other side, eg,
if in my sdf file I have delay=0.168, for verilog the change is done
after 0.17 ns, and
for VHDL after 0.16 ns.
How could I impose both simulator to give me the exact value of the time
without
rounding.
Thank you for your help,
Patrick
For example, If the $readtime variable has 0.168ns
`timescale 1ns/10ps gives you 0.17ns.
I propose you to test the test module below,
`timescale 1ns/100ps
module test;
reg sig;
paramter p = 1.55;
initial begin
$monitor($readtime, ,"sig=%b",sig);
#p sig = 0;
#p sig = 1;
end
endmodule
Then substitute the compiler directive with `timescale 1ns/10ps
and compare it.
Hyuk
Patrick Chouraqui 이(가) <35890525...@chipx.co.il> 메시지에서
작성하였습니다...
to avoid the rounding you have to use a timescale command:
$timeformat (-12,0," ps",0);
This command sets the maximum accuracy for the $time and $realtime varibles.
In this example it is set to pico seconds (-12), for nano seconds it would
be -9 and so on. The string ' ps' appears after the time value, if you dont
want it use "". If there are multiple timeformat commands, the last one is
valid. For more information see e.g. the cadence documentation.
regards
Ulrich