DSPRelated.com
Forums

ADSP2187 programming.

Started by Eric Chan December 4, 2000
Hello, All,
Ii am writing and debugging some DSP program on ADSP 2187. I found
a strange question , please read the following instruction :

mr = ar * my0 (us);
ar = ax1 - ay1 + c - 1, sr0 = mr0;
sr1 = mr1, mr = mx0 * my0 (ss);/* problem */

We found there is wrong operation in the third multifunction instruction.
sr1 can not get correct value from mr1after execution of the third instruction.
it is very strange. i don't know why.
Is there anybody can give me some advice about the problem. we found
that the second bit of sr1 is always wrong, for example, from 0x2 to
0x0 or from 0xb to 0x9.

--
Eric Chan <



Hi Eric Chan,

Check if multiplier is in fractional mode (in which
case ena m_mode; for integer multiplication).

Also, Pl. give initial contents of all regs.

regards,

Tarakesh. --- Eric Chan <> wrote:
> Hello, All,
> Ii am writing and debugging some DSP program on ADSP
> 2187. I found
> a strange question , please read the following
> instruction :
>
> mr = ar * my0 (us);
> ar = ax1 - ay1 + c - 1, sr0 = mr0;
> sr1 = mr1, mr = mx0 * my0 (ss);/* problem */
>
> We found there is wrong operation in the third
> multifunction instruction.
> sr1 can not get correct value from mr1after
> execution of the third instruction.
> it is very strange. i don't know why.
> Is there anybody can give me some advice about the
> problem. we found
> that the second bit of sr1 is always wrong, for
> example, from 0x2 to
> 0x0 or from 0xb to 0x9.
>
> --
> Eric Chan < >
> To Join: Send an email to > To Post: Send an email to
>
> To Leave: Send an email to > Archives: http://www.egroups.com/group/adsp
>
> Other Groups: http://www.dsprelated.com


__________________________________________________



>Check if multiplier is in fractional mode (in which
>case ena m_mode; for integer multiplication).
>
>Also, Pl. give initial contents of all regs.
>
>regards,
>
>Tarakesh. >--- Eric Chan <> wrote:
> > Hello, All,
> > Ii am writing and debugging some DSP program on ADSP
> > 2187. I found
> > a strange question , please read the following
> > instruction :
> >
> > mr = ar * my0 (us);
> > ar = ax1 - ay1 + c - 1, sr0 = mr0;
> > sr1 = mr1, mr = mx0 * my0 (ss);/* problem */
> >
> > We found there is wrong operation in the third
> > multifunction instruction.

I just happened to have an ADI FAE with me the day I saw your message. He
agreed with me that it is the correct behaviour. You need to read the
appropriate sections of the User's Manual very thoroughly. If you
subsequently use 'sr1=mr1', you get the correct value. Also, the order of
the third instruction should be reversed. The assembler does this, anyway.
At any rate, the assembler with the new release of the 16-bit tools does.

Leon

--
Leon Heller, G1HSM Tel: (work): +44 1327 357824 (mobile): +44 79 9098 1221
Email: My web page:
http://www.geocities.com/leon_heller
IRISYS Ltd: http://www.irisys.co.uk
________________________________________________________________________________\
_____
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com