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.

How can i make floating point in RTL ?

Status
Not open for further replies.

u24c02

Advanced Member level 1
Advanced Member level 1
Joined
May 8, 2012
Messages
404
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Visit site
Activity points
4,101
Hi
I have to make floating point multiple operation in RTL.
But I'm not sure what am i do ?

like the following this.
x1 = 2421.0295312
x2 = 0.00000212

y= x1 * x1 * x(variable)

What am i do?
 

In hardware design, there is no floating-point. It is all about how "wide" you choose to define the x1 and x2 in term of bits.
Of course, you will get more precise result by expanding the bit width of the multiply factors. But the cost(speed/area) may well be too costly for a market-targeting product design to afford.

Technically speaking, you can define x1 as say 32-bit wide, and "mark" the lower 16-bit LSBs as "floating points" to represent any arithmetic value smaller than 1. The logic has to be aware of the float-point position(bit 16 in this example) anytime x1-related calculation is involved.

PS: if you are only trying to build up a behavior(like PLL) model or testbench related block, and you don't care about whether it is synthesis-able or not, then by all means use the "real" type for x1 and x2.
 

like said by layowblue, in RTL coding we only manipulate bit (0 1), so the floating point is just a mathical point of view, how you map a number into bit vector.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top