Reputation: 1
How many bits does $realtime return in Verilog and Systemverilog?
Upvotes: 0
Views: 2085
Reputation: 558
From sutherland hdl quick ref. Pg 40 in the doc, 44 in your pdf viewer
http://www.sutherland-hdl.com/pdfs/verilog_2001_ref_guide.pdf
$time
$stime
$realtime
Returns the current simulation time as a 64-bit vector, a 32-bit integer or a real number, respectively.
The value returned will depend on your timescale
. i.e. if timescale is 1ns/1ps, and you have ran for 1us, you will return 1,000.000.
Upvotes: 0
Reputation: 42738
$realtime
does not return bits, it returns an double precision floating point number, which has requires 1 bit for the sign, 11 bits for the exponent, and 52-bits for the mantissa. You cannot access individual bits of a real number, so the total number of bits is irrelevant.
Upvotes: 2