Sign in

username:

password:



Not a member?

Search motoroladsp



Search tips

Subscribe to motoroladsp



motoroladsp by Keywords

56303 | 563xx | 5680 | 56805 | 5680x | 56F80 | 56F800DEMO | 56F805 | 56f807 | 56F830 | ADC | Bootloader | Codec | CodeWarrior | CW5 | CW6 | Debugger | DSP56303 | DSP56303EVM | DSP563xx | DSP5680 | DSP56800 | DSP56807 | DSP56858 | DSP56858EVM | DSP56F803 | DSP56F805 | DSP56F807 | DSP56F80x | DSP56F826 | DSP56F827 | DSP56F8xx | EVM | FFT | Flash_over_jtag | GPIO | Interrupt | Interrupts | JTAG | LCD | Linker | MCF5307 | Metrowerks | Modulus | MSCAN | PCMaster | PWM | Quad | Rif | RTOS | SDK | SPI


Discussion Groups

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Freescale DSPs | Q notation equivalent

Technical discussions about Freescale (Motorola) DSPs (including the DSP56000, DSP56300, DSP56600, 56800 DSPs).

  

Post a new Thread

Q notation equivalent - emespina - Nov 2 6:01:00 2004


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







(You need to be a member of motoroladsp -- send a blank email to motoroladsp-subscribe@yahoogroups.com )

Re: Q notation equivalent - Robert Imhoff - Nov 2 13:43:00 2004


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


______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



(You need to be a member of motoroladsp -- send a blank email to motoroladsp-subscribe@yahoogroups.com )