FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > VHDL

VHDL comp.lang.vhdl newsgroup / Usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-28-2006, 10:31 AM
Attila Csosz
Guest
 
Posts: n/a
Default real to time

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
Reply With Quote
  #2 (permalink)  
Old 04-28-2006, 01:15 PM
Reiner Huober
Guest
 
Posts: n/a
Default Re: real to time

>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.

Reply With Quote
  #3 (permalink)  
Old 04-28-2006, 01:58 PM
Brian Drummond
Guest
 
Posts: n/a
Default Re: real to time

On Fri, 28 Apr 2006 10:31:29 +0200, Attila Csosz <[email protected]>
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


Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
trireg's resemblance in real time gck Verilog 1 10-27-2008 09:33 PM
real time FIR implementation in FPGA raj FPGA 4 07-02-2008 10:38 AM
Real-time stimulus to a verilog DUT kb33 Verilog 2 10-01-2007 11:13 PM
Command to measure real time kb33 Verilog 1 10-31-2005 07:22 PM
Reg, Integer, Time Registers, Real [email protected] Verilog 1 03-28-2005 07:12 PM


All times are GMT +1. The time now is 12:31 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved