02-19-2008 08:23 AM
02-19-2008 12:08 PM
02-19-2008 12:22 PM
02-20-2008 03:43 AM
02-20-2008 08:02 AM
02-20-2008 08:09 AM
02-20-2008 11:41 AM
02-22-2008 10:36 AM
Hi Antonio
Sorry, I was thinking about your previous post and realized I may have missed your point concerning this line:
“But I have problems with the 0.99... constant which is always rounded to 1 (check the pic). I changed the variable's type and digits of precision, but it still rounds up to 1 Any suggestions?”
I’m not sure you realize that all floating pint numbers must be rescaled to do integer computation on the FPGA. You can’t just a take a number of floating point filter coefficients that range from -1.0 and 1.0 and expect to use them directly on the FPGA. The numbers must be converted to an integer before sending down to the FPGA.
For example. You have a set of number ranging from -1.0 to 1.0. Depending on the resolution you require, you can either use an I16 or and I32 data type. Using I16 data. One way of do this is to equate 1.0 with 16384 or 32767. There are two ways of looking at this. If you choose 16384, you can convert a floating point values up to 2. Actually 1.999938964844, if 16384 = 1.0000, then the largest I16 positive value (32767) will equal 1.999938964844. On the other hand, 16384 is 100000000000000 in binary. This means that when scaling a value by one, you do not change the actual binary representation of the number. The benefit of using 32767 is that you gain an extra bit of resolution in your number if you are only concerned with floating point values between -1.0 and +1.0.
You can also find more information on scaling here:
http://zone.ni.com/devzone/cda/tut/p/id/3661
Jerry
02-25-2008 09:37 AM
02-29-2008 09:19 AM