fixed point has limited range of values depending on the number of bits being used. Floating point is able to represent a huge range (Comparitively) because it has an exponent attached. Fixed is more accurate (for the same number of bits because more bits represent the mantissa.) The errors if fixed are easy to calculate. Floating point is generally easier to implement because of the fact that there are most time libraries available with the complier. Fixed is faster to execute operations.
You can also evaluate these concepts with careful considerations into the present Digital Signal Processors, like TI and ADI's processers. Apart from the reasons explained above, one of the most important feathures of FIXED point calculation is the LOW POWER issue, which makes long-life battaries possible for mobile terminals.
hi
does anyone write HDL code or implement any unit through floating point?
because of this fact that basic function implementation is differ to fixed point.
can ne1 give me link to floating piont HDL design ?
ALU operations are easier in fixed point as the position of the decimal is fixed. Therefore to add, subtract no change is needed in decimal position whereas in floating point the decimal position floats around and shifting is needed to correctly align the decimals before two numbers can be operated upon.
Converting from int to float is easy.
set the sign according to the mostsig bit of your int. then abs your int.
set the mantissa to the value of your int (you may need to shift depending on what size int and what size float.)
Set your exp to 1.
If you are using IEEE then you will need to store with the decimal place in a particular postion I can't remeber for sure but I think that it is x.xxxxx e5 for example so that the decimal point has only one number left of it. So first divide your int by a number that will give you x.x and is 1e N and set the exp to N.
to convert the other way first decide if your value is able to be converted ie in range for int representation, that is not not 1.2 e 120.
Now multiply by 1eN where N is the value of the exp. and move your mantisa to the int discarding all after the decimal. You need to do a little work to preserve the sign.
Also note that you do not need to write this stuff there is plenty of people who have written it already. try looking at www.opencores.org.
I think that you will need to write the int to float section yourself.
here is a link to a float multiply.
**broken link removed**
I dont know if this link will work because I was logged in but it is some floating point stuff for Altera NIOS. **broken link removed**
I did try to use the bottom one but it was not finished. I am working on it but I cannot post my work, it is owned by my company.
i have the same question. when i develop a board of FFT , i met a problem . that is how can i simulate the algrithm and how can i have distinguishment of difference between fixed and floating. how can i make a conclusion on wether the result of simulatio n meet with the need of design?