Sign in

Not a member? | Forgot your Password?

Search motoroladsp

Search tips

Find us on Facebook!





Subscribe to motoroladsp

Search tips

Free PDF Downloads

A Quadrature Signals Tutorial: Complex, But Not Complicated

Understanding the 'Phasing Method' of Single Sideband Demodulation

Complex Digital Signal Processing in Telecommunications

Introduction to Sound Processing

C++ Tutorial

Introduction of C Programming for DSP Applications

Fixed-Point Arithmetic: An Introduction

Cascaded Integrator-Comb (CIC) Filter Introduction

Discussion Groups

FFT Spectral Analysis Software

See Also

Embedded SystemsFPGA

Discussion Groups | Freescale DSPs | faster division in DSP56800


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

  

Post a new Thread



Is this thread worth a thumbs up?

0

faster division in DSP56800 - stefan_schaeufele - Sep 2 7:11:00 2003

Hi all,
i'm programming the DSP56807 and struggle with the common functions.
I have followed computation in integer:

Int32 counts;
Int32 position;
UInt16 ratio;
position = counts / ratio;

These function takes 14 * 10-6 sec !!!
The compiler take the ARTDIVU32UZ-function. Is there no function
which runs faster and i get the full 32-Bit?
When i compare it with a function like UInt16 = UInt32/UInt16. This
function take only 3 * 10-6 sec, but i get only 16-Bit out.

The computation with float (Int32 = Int32 * float) takes 11 * 10-6
sec, that's also too long for my application.

Has anyone an idea what i can do to get it faster?

Regards
Stefan






RE: faster division in DSP56800 - Ebersman, Howard - Sep 2 13:05:00 2003

Built in division (among other) functions are notoriously inefficient in the Motorola C Compiler.
 
In general, there are a few options:
 
Best: If the divider is a constant, you can replace it by a multiply with a different constant (1/divider).
Alternate option: Rewrite the function yourself in assembly. It should be possible to implement this operation in approximately 40 processor cycles. (32 cycles for the division shifts, plus setup and saturation/overflow detection)
Another option: If the resulting term is known to be small, fast computation can be achieved with iterative subtraction. Better yet, do this in assembly.
Yet another: If divider is a power of 2, implement as a shift of log2(divider) bits.
 
In general, there are lots of tricks that can be played if the range of possible values is limited due to the nature of the problem to be solved.
 
Best of luck,
Howard
 
-----Original Message-----
From: stefan_schaeufele [mailto:s...@bruker-axs.de]
Sent: Tuesday, September 02, 2003 3:11 AM
To: m...@yahoogroups.com
Subject: [motoroladsp] faster division in DSP56800

Hi all,
i'm programming the DSP56807 and struggle with the common functions.
I have followed computation in integer:

Int32 counts;
Int32 position;
UInt16 ratio;
position = counts / ratio;

These function takes 14 * 10-6 sec !!!
The compiler take the ARTDIVU32UZ-function. Is there no function
which runs faster and i get the full 32-Bit?
When i compare it with a function like UInt16 = UInt32/UInt16. This
function take only 3 * 10-6 sec, but i get only 16-Bit out.

The computation with float (Int32 = Int32 * float) takes 11 * 10-6
sec, that's also too long for my application.

Has anyone an idea what i can do to get it faster?

Regards
Stefan



_____________________________________
/groups.php3


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.