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.

[SOLVED] Converting from integer to floating point (32 bits/ single) [Verilog]

Status
Not open for further replies.

chikaofili

Junior Member level 3
Joined
Jun 29, 2011
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,510
Hello,
I know there is the $realtobits and $bitstoreal. But that is for double precision.

I need help in converting from integer to floating point (single precision). Are there libraries for that in Verilog?


Thanks in advance

Chika
 

Hi,

This is library for the floating point operations: **broken link removed**.
Converting an integer to IEEE 754 is rather straightforward: wherein you need the fraction part (divide to make it a fraction), exponent and sign.

I presume your implementing this.

System C has a few more data types as well.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top