
Technical discussions about Freescale (Motorola) DSPs (including the DSP56000, DSP56300, DSP56600, 56800 DSPs).
|
Hello! I'm trying to write a simple C filter code with less than unity coefficients. (I'm using CodeWarrior v5.5) I've initially declared all my constants and variables as float numbers, however, I found that floating point operations consumed so much more machine cycles than integer operations. What would be the best way to represent my coefficients in integer. I'm familiar with the Q notation used by Texas Instruments which is well supported by their Code Composer. However, I don't if CodeWarrior supports something like this. I don't have any problem doing Q operations in CodeWarrior since its only a matter of knowing where my decimal point is. But it would be quite tedious if I have to manually verify the value of each variable. Regards, Evan |
|
|
|
Hello Evan The Motorola Motor Control Library makes extensive use of fixed point fractional numbers which use a 16 bit integer variables to represent values between -1 and +1. The 56F83xx chips support assembler codes for multiplying these, so it makes for the same efficiency as plain integers (at least as far as my understanding of this goes). You can read about it in the DSP56800E Core Reference manual: http://www.freescale.com/files/dsp/doc/ref_manual/DSP56800ERM.pdf Good Luck! Robert On 02.11.2004, at 07:01, emespina wrote: > > Hello! > > I'm trying to write a simple C filter code with less than unity > coefficients. (I'm using CodeWarrior v5.5) > > I've initially declared all my constants and variables as float > numbers, however, I found that floating point operations consumed so > much more machine cycles than integer operations. > > What would be the best way to represent my coefficients in integer. > I'm familiar with the Q notation used by Texas Instruments which is > well supported by their Code Composer. However, I don't if > CodeWarrior supports something like this. I don't have any problem > doing Q operations in CodeWarrior since its only a matter of knowing > where my decimal point is. But it would be quite tedious if I have > to manually verify the value of each variable. > > Regards, > Evan > _____________________________________ > /groups.php3 > > Yahoo! Groups Links |