Floating-point to fixed-point samples in C/C++

Started by vutruong in comp.dsp14 years ago 12 replies

Hi, I have to use C/C++ to convert the floating-point to fixed-point with 16 bit-length. I am looking for algorithm and samples in C/C++ which...

Hi, I have to use C/C++ to convert the floating-point to fixed-point with 16 bit-length. I am looking for algorithm and samples in C/C++ which show how to solve this issue. I read Randy Yates' paper at http://home.earthlink.net/~yatescr/fp.pdf. But it is not easy for me to implement. Your helps are appreciated. Thanks, Vu This message was sent using the Comp.DSP web interface on w...


is sign correlation faster than normal correlation on DSPs?

Started by Huo Jiaquan in comp.dsp14 years ago 16 replies

I'd like to have a comparison of the compelxity needed to evaluating the following two expressions: E1 = sum_(i=0)^(N-1) x_iy_i E2 =...

I'd like to have a comparison of the compelxity needed to evaluating the following two expressions: E1 = sum_(i=0)^(N-1) x_iy_i E2 = sum_(i=0)^(N-1) sign(x_i)sign(y_i) where sign(x) = 1 for x> 0 0 for x=0 -1 for x


Fixed point math

Started by Praetorian in comp.dsp14 years ago 3 replies

Hi, could anyone tell me if there is a library that I could download to do 16-bit fixed point math? I intend to use it on the TI2407, TI has the...

Hi, could anyone tell me if there is a library that I could download to do 16-bit fixed point math? I intend to use it on the TI2407, TI has the IQMath library for 32-bit fixed point but I can't find anything for 16-bit. Thanks for your help, Ashish.


Need advice - Generating LUT

Started by Mr.Bilou in comp.dsp14 years ago 7 replies

Hello All Due to a lack of memory space , I'm trying to compute my Look-up table at startup. My target is a 16bits fixed point DSP (TI...

Hello All Due to a lack of memory space , I'm trying to compute my Look-up table at startup. My target is a 16bits fixed point DSP (TI C54x). I need 16 bits sinus table I first try Taylor interpolation, but did not succeed. (May be this is best method, but if so, i should use 32 bits precision) I already implement floating point operation, and will try in this way. What other a...


Is there still something like the old 2105?

Started by Joerg in comp.dsp14 years ago 13 replies

Hello Folks, It seems the good old Analog Devices 2105 is nearly extinct. Sigh. It has been good to us. What I need now is rather simple....

Hello Folks, It seems the good old Analog Devices 2105 is nearly extinct. Sigh. It has been good to us. What I need now is rather simple. 30MIPS, 16bit fixed point, 12bit ADC if possible (or 10bits),


Practical implementation question

Started by Noway2 in comp.dsp14 years ago 8 replies

All, I am working on a project where I have designed a microprocessor board based on a fixed point DSP. So far, my experience with DSP has...

All, I am working on a project where I have designed a microprocessor board based on a fixed point DSP. So far, my experience with DSP has been almost entirely simulation based and I am presently at the stage where I am starting to apply some of the theory to the real world application. At this point, I have run into something, which I have not satisfactorilly covered in my readings and ...


Magnitude response diagram

Started by story83 in comp.dsp14 years ago 4 replies

Hello I am new in dsp and I havent understood the interpretation of a magnitude response diagram. (much less how to compare two filters i.e...

Hello I am new in dsp and I havent understood the interpretation of a magnitude response diagram. (much less how to compare two filters i.e a fixed point one and a floating point one based on their magnitute response diagrams) I asked my prof and tried to understand it from a book but I didnt find a clear example or explanation. Can anybody explain in simple words how to "read" a magnitute ...


FFT on an FPGA

Started by Satpreet in comp.dsp14 years ago 1 reply

Q: I'm making a FFT block in hardware (on an FPGA) and I need some advice on multipliers: 1. I have made a simple (Fixed point arithmetic)...

Q: I'm making a FFT block in hardware (on an FPGA) and I need some advice on multipliers: 1. I have made a simple (Fixed point arithmetic) Radix-2 Decimation-in-time butterfly block which takes in two 16-bit complex inputs and another 16-bit input twiddle factor input and produces two complex outputs. Now with any standard multiplier circuit, multiplying N bits by N bits gives 2N bit produ...


Number of Cycles taken by Fixed Point program

Started by bsdap in comp.dsp14 years ago 13 replies

Hi All, I wrote a code in floating point and then converted it to fixed point(32 bit). The final answers given by both the codes are found to...

Hi All, I wrote a code in floating point and then converted it to fixed point(32 bit). The final answers given by both the codes are found to be same. Then I tried executing both these codes on Visual DSP++ 4.0 simulator to check the reduction in cycles by Fixed point code. But to my surprise the fixed point code took more cycles than the floating point code. I found that the elementry opeati...


Fixed Point IIR implementation

Started by Fred Nach in comp.dsp14 years ago 19 replies

Hi pals, I would like to implement a IIR Biquad filter using the fixed point arithmetics... Hence to reduced the intermediate states I plan...

Hi pals, I would like to implement a IIR Biquad filter using the fixed point arithmetics... Hence to reduced the intermediate states I plan to use the following trick: s(k) = x(k) -a1*s(k-1) -a2*s(k-2) y(n) = b0*s(k) + b1*s(k-1) + b2*s(k-2) The I can compute each y, saving only 2 states (s(k-1) a?nd s(k-2))... BUT ... in order to scale my coefficients or input, I need to know what ...


fixed point - floating point newbie question

Started by K. in comp.dsp14 years ago 1 reply

hi, i have e.g. number 1 in floating point and its equivalent of 8192 in fixed point representation. what is the connection? how do you...

hi, i have e.g. number 1 in floating point and its equivalent of 8192 in fixed point representation. what is the connection? how do you calculate this exactly? another example would be -2.000125721 in floating is -16385 in fixed point. please help. thx


Division in Fixed Point

Started by Wolfgang in comp.dsp14 years ago 12 replies

Dear all, Can anyone point me to some code how to implement a division in a Fixed Point DSP ? (Just to see how it works to fit it in...

Dear all, Can anyone point me to some code how to implement a division in a Fixed Point DSP ? (Just to see how it works to fit it in mine) Thx, Wolfgang


Fixed Point: cut, round, saturation?

Started by Davy in comp.dsp14 years ago 2 replies

Hi all, I used to read FIR filter RTL implementation. I found they use a lot of cut(i.e. delete several LSB bits) , round(i.e. delete several...

Hi all, I used to read FIR filter RTL implementation. I found they use a lot of cut(i.e. delete several LSB bits) , round(i.e. delete several LSB bits), and saturate to protect the data overflow. I found they like to cut and saturate in the middle of the data path. And round at the end of the data path. Is there any book talk about Fixed Point operation? And is there any design tools...


Help to interpret impulse response of an fixed point IIR filter

Started by Marko in comp.dsp14 years ago 11 replies

I have done an impulse response of an IIR filter. The impulse response of the filter does not return to zero but stops at a level close to zero...

I have done an impulse response of an IIR filter. The impulse response of the filter does not return to zero but stops at a level close to zero (I think it?s because limitations in fraction bits). The filter is implemented in fixed point arithmetic?s. And when I make an FFT of the impulse response de 0 Hz gain is not 0 dB as I would like it to be. But when I run a step response I...


Computing x^y, sort-of quick, somewhat dirty

Started by Glenn Zelniker in comp.dsp14 years ago 12 replies

I've seen and used all the old tricks for doing ln, log2, 2^x, exp(x). I'm using an old fixed-point processor (DSP56XXX) and need to do a fast...

I've seen and used all the old tricks for doing ln, log2, 2^x, exp(x). I'm using an old fixed-point processor (DSP56XXX) and need to do a fast x^y approximation (to within a few percent) where x, y < 1. I'd like to do it directly -- i.e., no long sequence of log, add, mul, and exp operations because I'm tight on RAM/ROM (and curiously, not too tight for CPU cycles). I can only spare a


Fixed Point Library for Simulation

Started by hetaluk in comp.dsp14 years ago 1 reply

Hi, I am looking for a fixed point library for simulation and design of Digital Filters. The main requirements for the library are as...

Hi, I am looking for a fixed point library for simulation and design of Digital Filters. The main requirements for the library are as follows: 1: Variable Bit Length for representation of numbers 2: Representation of numbers in Sign Magnitude, One's and Two's Complement formats 3: Basic Arithmatic operations for the above representations. I hope there is someone out there who can point ...


integer 32bit/32bit divide code

Started by tommy in comp.dsp14 years ago 14 replies

Hi users, I am looking for 32bit/32bit divide code. Now, I am implementing the PNS random generator for MPEG4 AAC. I find some divide floating...

Hi users, I am looking for 32bit/32bit divide code. Now, I am implementing the PNS random generator for MPEG4 AAC. I find some divide floating point code in the PNS as followings: scale = 0x10000000/energy Of course, energy represents the 32bit fixed point formant. I think two variables regard as a Q0 format. Does anybody give me the divide code or explain the theory of inte...


DSP Engineer position opening in Vienna/Austria

Started by tazuki in comp.dsp13 years ago 21 replies

We are looking for a DSP Engineer who will work on the development and fixed-point implementation of audio algorithms. University degree...

We are looking for a DSP Engineer who will work on the development and fixed-point implementation of audio algorithms. University degree in signal processing is expected, working experience not necessary. Salary depends on the experience, starting at 30 000 Euro/year. The contract includes social insurance, 5 weeks vacation/year. Two Pi is providing DSP software for hearing-healthcare, profes...


Is there a sample Java code for fixedpoint FFT?

Started by Robert Hay in comp.dsp13 years ago 11 replies

Hi, I have now a Java code implementing real FFT. I need actually Java code for implementing integer (fixed-point) FFT. I mean with this that...

Hi, I have now a Java code implementing real FFT. I need actually Java code for implementing integer (fixed-point) FFT. I mean with this that the FFT accepts Java int type as input and produces Java int type as output. If there is no Java fixed-point FFT, how can I convert the existing Java real FFT to a fixed-point FFT? Would please somebody give a code example in Java. PS: I can now perfor...


DSP fixed-point math library

Started by Greg M. in comp.dsp13 years ago 1 reply

Is there fixed-point math library (preferably as inline functions or macros) such as the one defined by European Telecommunications Standards...

Is there fixed-point math library (preferably as inline functions or macros) such as the one defined by European Telecommunications Standards Institute (ETSI) and used in in GSM 06.06 and other standard vocoders - available for: 1. ADI's BlackFin? 2. IBM PowerPC? 3. Intel Pentium? 4. TI DSP? If so, please provide me with the link for download etc. Thanks, GM