Reply by Syed Moinuddin June 26, 20012001-06-26
use instruction
to switch processor to integer mode
e.g;
ENA M_MODE;
MX0 = 3;
MY0 = 4;
MR = MX0*MY0(SS);
DIS M_MODE;

answer is C (12 )
u should see the documents on fix point in ADSP users manual
----- Original Message -----
From: "dharani kumar" <>
To: <>
Sent: Tuesday, June 26, 2001 1:07 AM
Subject: [adsp] Re: Doubt Regarding Format Conversion in Fixed Point ADSP
Processors! >
> I am working with ADSP-2181 Fixed point DSP
> processor. We know that the multiplier in the ADSP
> processor accepts only 1.15 format and the result is
> given as 1.31 format in the 40-bit mr register.
>
> 1.That is if we have a the equation Z = X * Y; X and Y
> should be in 1.15 format and Z will be in 1.31 format.
>
> But I have interger data in hand i.e 16.0 format data
> my doubt is how to convert this 16.0 format data to
> 1.15 format data while doing DSP programming.
>
> 2.Another doubt is the 1.7 format can be represented
> as follow with weights: > -2^0 2^-1 2^-2 2^-3 2^-4 2^-5 2^-6 2^-7
> ------------
> | b1 | b2 | b3 | b4 | b5 | b6 | b7 | b8 |
> -----.-------
>
> If we see the above diagram the dot is just beside b1
> and if we want to convert the above 1.7 format to 2.6
> format we have to just shift the dot to right side by
> 1. But I want to know how this dot can be shifted to
> right by one in the DSP programming.
>
> 3. While coming to the 40-bit shifter in ADSP-2181 I
> want to know how exactly the output is stored in the
> shifter and what are the weights it will be holding.
>
> Somebody please clear my doubts, if possible please
> explain with figures as I have indicated above.
>
> Thanking you
>
> Dharani. >
> __________________________________________________ > _____________________________________
> Note: If you do a simple "reply" with your email client, only the author
of this message will receive your answer. You need to do a "reply all" if
you want your answer to be distributed to the entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join: Send an email to
>
> To Post: Send an email to
>
> To Leave: Send an email to
>
> Archives: http://groups.yahoo.com/group/adsp
>
> Other Groups: http://www.dsprelated.com/groups.php3 > ">http://docs.yahoo.com/info/terms/ >


Reply by Al Clark June 26, 20012001-06-26
At 01:07 AM 6/26/01 -0700, dharani kumar wrote:

 I am working with ADSP-2181 Fixed point DSP
processor. We know that the multiplier in the ADSP
processor accepts only 1.15 format and the result is
given as 1.31 format in the 40-bit mr register.

1.That is if we have a the equation Z = X * Y; X and Y
should be in 1.15 format and Z will be in 1.31 format.

But I have interger data in hand i.e 16.0 format data
my doubt is how to convert this 16.0 format data to
1.15 format data while doing DSP programming.

2.Another doubt is the 1.7 format can be represented
as follow with weights:   -2^0  2^-1   2^-2  2^-3  2^-4  2^-5  2^-6 2^-7
 ------------
|  b1 | b2  | b3   | b4  | b5  | b6  | b7  | b8 |
 -----.-------

If we see the above diagram the dot is just beside b1
and if we want to convert the above 1.7 format to 2.6
format we have to just shift the dot to right side by
1. But I want to know how this dot can be shifted to
right by one in the DSP programming.

3. While coming to the 40-bit shifter in ADSP-2181 I
want to know how exactly the output is stored in the
shifter and what are the weights it will be holding.

Somebody please clear my doubts, if possible please
explain with figures as I have indicated above.

Thanking you

Dharani.


Dharani:

When the ADSP-218x multiplies two numbers in fractional format the result is shifted by 1. This is because the result would be in 2.30 format if two 1.15 format numbers were multiplied. Since you don't need two sign bits, the result is shifted. There is also an integer mode where this shift does not occur. A bit is set in the MSTAT register for integer multiplication. Normally, DSP algorithms are designed with fractional numbers (1.15 in the 218x).

You can use other number formats as long as you remember where your decimal point is.

All of your questions are addressed in two books from ADI. I think you can download these from their website.

1. The ADSP-2100 Family Users Manual.
2. Digital Signal processing Applications Using the ADSP-2100 Family (Vol 1)

One additional comment. You don't really want to use an ADSP-2181 anymore. ADI makes a whole pin compatible family in 100 pin QFPs. These are the 2184, 2185, 2186, 2187, 2189 etc. Coding is the same.

We manufacture a small credit card sized module that uses a ADSP-2186M, an AC-97 codec, and a flashed based PIC.
There is a development package available for DSP programmers. I can email you or anyone else a datasheet.

The newer EZ-Lite boards from ADI use the newer processors as well. They use an ADI AD73322 codec which IMHO is a horrible codec. The old EZ-Lite used a 2181 and a AD1847. The AD1847 is now obsolete. You can certainly use the old EZ-Lite board for learning. 

Good Luck

Al Clark
Danville Signal Processing, Inc.
Reply by dharani kumar June 26, 20012001-06-26

I am working with ADSP-2181 Fixed point DSP
processor. We know that the multiplier in the ADSP
processor accepts only 1.15 format and the result is
given as 1.31 format in the 40-bit mr register.

1.That is if we have a the equation Z = X * Y; X and Y
should be in 1.15 format and Z will be in 1.31 format.

But I have interger data in hand i.e 16.0 format data
my doubt is how to convert this 16.0 format data to
1.15 format data while doing DSP programming.

2.Another doubt is the 1.7 format can be represented
as follow with weights: -2^0 2^-1 2^-2 2^-3 2^-4 2^-5 2^-6 2^-7
------------
| b1 | b2 | b3 | b4 | b5 | b6 | b7 | b8 |
-----.-------

If we see the above diagram the dot is just beside b1
and if we want to convert the above 1.7 format to 2.6
format we have to just shift the dot to right side by
1. But I want to know how this dot can be shifted to
right by one in the DSP programming.

3. While coming to the 40-bit shifter in ADSP-2181 I
want to know how exactly the output is stored in the
shifter and what are the weights it will be holding.

Somebody please clear my doubts, if possible please
explain with figures as I have indicated above.

Thanking you

Dharani.
__________________________________________________