Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > real numbers or integer to binary in vhdl

Reply
Thread Tools

real numbers or integer to binary in vhdl

 
 
hari
Guest
Posts: n/a
 
      04-23-2004
hi
i would like to know how to covert real numbers or integer to 16 bit
binary in vhdl.do we have any default funtions for that

thanks
hariprasath
 
Reply With Quote
 
 
 
 
Egbert Molenkamp
Guest
Posts: n/a
 
      04-23-2004
Have a look at:
http://www.eda.org/fphdl/

Egbert Molenkamp

"hari" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed) om...
> hi
> i would like to know how to covert real numbers or integer to 16 bit
> binary in vhdl.do we have any default funtions for that
>
> thanks
> hariprasath



 
Reply With Quote
 
 
 
 
Ajeetha Kumari
Guest
Posts: n/a
 
      04-23-2004
Hi Hari,
If you numeric_std package, you could do:

my_unsigned := to_unsigned(my_integer, 16);


You can cast it to a std_logic_vector, if need be.

HTH,
Ajeetha,
http://www.noveldv.com
Co-Author: Using PSL/SUGAR for Formal and Dynamic Verification 2nd Edition.

http://www.velocityreviews.com/forums/(E-Mail Removed) (hari) wrote in message news:<(E-Mail Removed). com>...
> hi
> i would like to know how to covert real numbers or integer to 16 bit
> binary in vhdl.do we have any default funtions for that
>
> thanks
> hariprasath

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Division of an integer by a real number using VHDL genlock VHDL 22 03-17-2010 03:27 PM
Detailsview shows real numbers with commata: Error converting data type nvarchar to real! Curious Trigger ASP .Net 2 09-09-2006 10:59 PM
newbe: how to print integer and real numbers? =?ISO-8859-1?Q?Sch=FCle_Daniel?= VHDL 4 06-28-2006 11:01 PM
declaring real numbers (2^15-1) and (-2^15) in vhdl hari VHDL 2 05-12-2004 09:43 PM
product of real and (integer)(after converted to real one) value - vhdl found fatal error senthil VHDL 5 01-24-2004 04:37 AM



Advertisments