Hello,
I am facing an issue during comparison between real variables. Timescale is 1ns/1ps. I am measuring the quadrature phase shift between two DDR clocks. The half clock period is configured to 0.667ns. And in comparison I am calculating actual clock phase shift difference using $realtime task (real ddr_clk_diff_real = $realtime - sample_ddr_clk_edge) and getting it 0.334ns. Whereas expected value I am using is 0.667ns/2 = 0.3335. I think because of timescale precision of 1ps the actual value is rounded off to 0.334 from 0.3335. I am using the precision of 0.0000001 in comparison of two real variables. Please share the solution to fix this problem.
Thanks & Regards,
Pinakin