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.

converting floating point to fixed point

Status
Not open for further replies.

fireblade

Newbie level 6
Joined
Nov 1, 2006
Messages
13
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,356
what are the techniques to convert Floating point numbers to Fixed Point numbers.
 

fireblade,

What language are you trying to do this...

If is C, you can use:
float a = 2.5;
int b = (int)a; //It will retraive the integer part of the float

you can use the Ceil rotine too, it will chect the value before retreave the integer part, for example ceil(2.4) returns 2, ceil(2.6) returns 3.



fireblade said:
what are the techniques to convert Floating point numbers to Fixed Point numbers.
 

Hi,
try SystemC typecasts from floating point numbers to fixed point systemC
numbers and vice versa.
They are prety handy!
Fom more details read the last chapters of the SystemC user manual...

pmat
 

check out the matlab fixed point toolbox. it's really worth as it contains lot of inbuilt functions and also good documentation.
 

hi,
Do you want to implement it in VHDL?
 

Hi IS this requires as a part of your project you are explicitly trying for this.

bye
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top