how to use realtime in vhdl

Status
Not open for further replies.

raziyeh94

Junior Member level 1
Joined
Mar 26, 2015
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
122
hello.
i want to store time as real in vhdl.how do i do it?for example delay:time:=2.3ps in vhdl. vhdl round off it to 2ps but i want 2.3ps in myopratins.
tnx
 

This will be a simulator setting so how you do it will depend on what simulator you are using. What you want to change is the minimum time step that the simulator will recognize. It appears that you are using (perhaps it is the default) a resolution of 'ps' which means that any fractional picoseconds will get truncated, hence 2.3 ps becomes 2 ps. You should be able to change the default time unit to something smaller like femtoseconds (fs) with a command line switch. With Modelsim, this would be done like this "vsim ... -t fs"

Kevin Jennings
 
Apart from allowing different scale factors, the time type is derived from a 32 bit integer in standard.vhd
In so far you have to write 2300 fs instead of 2.3 ps.
 

thanks a lot.my plroblem solved with your help.:-D.goodluck.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…