Apr 18, 2007 #1 F 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.
Apr 18, 2007 #2 emanuelcsm Member level 3 Joined Feb 15, 2005 Messages 61 Helped 7 Reputation 14 Reaction score 1 Trophy points 1,288 Location Brasil Activity points 1,801 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. Click to expand...
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. Click to expand...
Apr 19, 2007 #3 pmat Member level 5 Joined Mar 26, 2007 Messages 91 Helped 15 Reputation 28 Reaction score 9 Trophy points 1,288 Location Grenoble, France, EU Activity points 1,790 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
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
Apr 19, 2007 #4 R rsrinivas Advanced Member level 1 Joined Oct 10, 2006 Messages 411 Helped 50 Reputation 100 Reaction score 11 Trophy points 1,298 Location bengalooru Activity points 3,689 check out the matlab fixed point toolbox. it's really worth as it contains lot of inbuilt functions and also good documentation.
check out the matlab fixed point toolbox. it's really worth as it contains lot of inbuilt functions and also good documentation.
Apr 19, 2007 #5 X xstal Full Member level 2 Joined Oct 12, 2006 Messages 138 Helped 20 Reputation 40 Reaction score 0 Trophy points 1,296 Location USA Activity points 2,197 hi, Do you want to implement it in VHDL?
Apr 23, 2007 #6 V vinodkumar Full Member level 5 Joined Oct 5, 2006 Messages 251 Helped 12 Reputation 24 Reaction score 3 Trophy points 1,298 Location hyderabad Activity points 2,822 Hi IS this requires as a part of your project you are explicitly trying for this. bye