real to time

A

Attila Csosz

Guest
Hi,

Is there a simple conversion routine in vhdl to convert real type time
data to time type data? For example: "0.001" -> "1 ms"

Thanks
Attila
 
Is there a simple conversion routine in vhdl >to convert real type time
data to time type data? For >example: "0.001" -> "1 ms"
Just multiply with the physical unit (1 sec):

variable f: real:=0.001;
variable t: time;
....

t:=f*1 sec;

(I only tried this with integers until now, but accoring to the LRM,
this should work)
Hubble.
 
On Fri, 28 Apr 2006 10:31:29 +0200, Attila Csosz <csosz33_AT@chello.hu>
wrote:

Hi,

Is there a simple conversion routine in vhdl to convert real type time
data to time type data? For example: "0.001" -> "1 ms"

Thanks
Attila
Just multiply by the appropriate time unit (in your example, 1 second).

- Brian
 

Welcome to EDABoard.com

Sponsor

Back
Top