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

Discussion Groups | Freescale DSPs | calculation errors ?

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

  

Post a new Thread

calculation errors ? - Christian - Dec 7 3:12:00 2005



Hello everyone

I am working with CodeWarrior 5.0.5 for DSP56800 and I experience strange
calculation errors :

1. I can't use the float library. Most of the time it works
perfectly, but once in a while I get strange calculation errors.
2. I tried to use integers only, but I get a very similar behaviour.
Works most of the time, but once in a while, an 32 bit integer division fails
and returns a too big value.

Hardware is a 56F807.

Has anyone experienced something similar ?

Christian





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

Re: calculation errors ? - citron - Feb 7 11:03:00 2006

Hello Christian,

I experience same strange calculation errors :

For exemple this 32 bit integer division fails, 0x1DDDC/0xE000 give me
0xE instead of 0x02

asm
{
move.l 	0x1DDDC,B
move.w 	0xE000,X0 
ASL 	B          ; Shift of dividend required for integer division
BFCLR 	#$0001,SR  ; Clear carry bit: required for 1st DIV instruction
REP 	16			
DIV 	X0,B       ; Form positive quotient in B0
MOVE.W 	B0,Y1      ; Save quotient in Y1	
}
 
I am working with the latest version of CodeWarrior for DSP56800 and
my hardware is a 56F8355.

Maybe my code is wrong anyone can explain me where is the problem ?

thanks

Alexandre
	--- In motoroladsp@moto..., Christian <christian.epp@...> wrote:
>
> Hello everyone
> 
> I am working with CodeWarrior 5.0.5 for DSP56800 and I experience
strange 
> calculation errors : 
> 
> 1. I can't use the float library. Most of the time it works 
> perfectly, but once in a while I get strange calculation errors.
> 2. I tried to use integers only, but I get a very similar behaviour. 
> Works most of the time, but once in a while, an 32 bit integer
division fails 
> and returns a too big value.
> 
> Hardware is a 56F807.
> 
> Has anyone experienced something similar ?
> 
> Christian
>
	


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