Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

real number implementation in vhdl

Status
Not open for further replies.

ravi33811

Newbie level 4
Joined
Feb 24, 2007
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,325
hi i have to perform real num addition.
i will use the single precision format.
can i give the input as a real num

for ex:4.5.. is this possible in vhdl

can any one help me how to convert real num into binary.. using vhdl
i am not getting how to proceed
 

if it is only one digit after comma, I will use BCD convention, in this case 4 LSB will represent your .5 and do all the math based BCD format
in case of 16 bit your max value will be 999.9
 

VHDL supports the real data type directly. No need for conversion.

However, many synthesis tools don't support real, but that's a different issue. Some tools provide various workarounds (such as core libraries) for doing floating point calculations. Or you can scale all your arithmetic algorithms so they fit conveniently into integers or fixed-point.
 

hi thanks for ur reply .
but how can u actually test it on the hardware.....
 

hi,u can look for either ip cores or look for libraries which allow u to write code for ur operations by including them,two such are available under ieee_proposed libraries.
fixed point and floating point packages.
u will find these in this board.

i hope this helped u.
 

hi can any one tell me the logic to convert real to binary.
how would u seperate the integer from the decimal value
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top