Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).
Post a new Thread
Division 21065L Assembler - John Henry - Mar 30 9:04:00 2005
I have a rather embarrassing question.
I have been able to do division easily using the divq method in
assembler in previous DSPs, but I can't figure out how to do it in the
21065L assembler.
So far, I have been able to compute by hand the 1/n for a number, then
do a multiply in 21065l, but now I have numbers that change, meaning
variables instead of constants that I need to do division with.
So, if I have in DM variable a, that I need to divide by DM variable
b, can someone send me either the syntax to do this, or a quick
routine (in assembler, not C, C is easy)?
Sorry, I have figured out a lot, but this one eludes me at the moment.
Thanks,
John Henry
Sevierville, TN

(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )
Re: Division 21065L Assembler - Mike Rosing - Mar 30 9:45:00 2005
On Wed, 30 Mar 2005, John Henry wrote:
> I have a rather embarrassing question.
> I have been able to do division easily using the divq method in
> assembler in previous DSPs, but I can't figure out how to do it in the
> 21065L assembler.
> So far, I have been able to compute by hand the 1/n for a number, then
> do a multiply in 21065l, but now I have numbers that change, meaning
> variables instead of constants that I need to do division with.
> So, if I have in DM variable a, that I need to divide by DM variable
> b, can someone send me either the syntax to do this, or a quick
> routine (in assembler, not C, C is easy)?
> Sorry, I have figured out a lot, but this one eludes me at the moment.
Look in the manual for Fn = RECIPS Fx. They have a routine for doing
inversion. It works fine, I use it a lot :-)
Patience, persistence, truth,
Dr. mike

(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )
Re: Division 21065L Assembler - andor_bariska - Mar 31 11:06:00 2005
John Henry wrote:
> I have a rather embarrassing question.
> I have been able to do division easily using the divq method in
> assembler in previous DSPs, but I can't figure out how to do it in the
> 21065L assembler.
> So far, I have been able to compute by hand the 1/n for a number, then
> do a multiply in 21065l, but now I have numbers that change, meaning
> variables instead of constants that I need to do division with.
> So, if I have in DM variable a, that I need to divide by DM variable
> b, can someone send me either the syntax to do this, or a quick
> routine (in assembler, not C, C is easy)?
> Sorry, I have figured out a lot, but this one eludes me at the moment.
John, you might want to have a look here:
http://www.analog.com/processors/resources/technicalLibrary/codeExamples
.html
then select
ADSP-21xxx Applications Handbook File Area
where you will find maths, filter, graphics, etc. routines for the
SHARC processors.
Regards,
Andor

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