DSPRelated.com
Forums

adt Sport and DMA

Started by shwetha shwetha October 25, 2004

Hi,

I am kind of new to this ADSP....

I am working on the ADSP BF533 EZ-kit lite example
"Audio talk through" .....

In the C code they have set the SLEN$,since the
codec(AD1836)sends 24 bits....

but then the DMA transfer is32 bit....

i don't understand this...

Also... in the chapter Sport,while talking adt this
SLEN..tells that the DMA can dump 32 bit to the TX
buffer of the SPORT of which,the SLEN (in this case
24bits) bits are transfered thor' the sport...

If it does like that,when r the remaining (32-24=8
bits) 8 bits transfered thro' the sport?

Please i am in a pathetic stage.. now at my work.. so
kindly help me to understand this....i will be very
grateful...

thanking u all in advance and eagerly waiting for the
early reply from the expertiese.....
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony





Someone more knowledgeable should correct any errors you see here. Even
though the data from the codec is 24-bits, data inside the DSP is
transferred in 32-bit words. The SLEN parameter indicates how many clocks
are needed to transfer one codec word, which is then placed in 32-bit memory.

At 08:42 AM 10/25/2004, shwetha shwetha wrote: >Hi,
>
>I am kind of new to this ADSP....
>
>I am working on the ADSP BF533 EZ-kit lite example
>"Audio talk through" .....
>
>In the C code they have set the SLEN$,since the
>codec(AD1836)sends 24 bits....
>
>but then the DMA transfer is32 bit....
>
>i don't understand this...
>
>Also... in the chapter Sport,while talking adt this
>SLEN..tells that the DMA can dump 32 bit to the TX
>buffer of the SPORT of which,the SLEN (in this case
>24bits) bits are transfered thor' the sport...
>
>If it does like that,when r the remaining (32-24=8
>bits) 8 bits transfered thro' the sport?
>
>Please i am in a pathetic stage.. now at my work.. so
>kindly help me to understand this....i will be very
>grateful...
>
>thanking u all in advance and eagerly waiting for the
>early reply from the expertiese..... >
>________________________________________________________________________
>Yahoo! India Matrimony: Find your life partner online
>Go to: http://yahoo.shaadi.com/india-matrimony >_____________________________________
>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
>
>Yahoo! Groups Links >
>

Steve Holle
Link Communications, Inc.
1035 Cerise Rd.
Billings, MT 59101



Hi,

I have been looking into making sound with my BF-533 EZ Kit lite this
week-end, so i read about SPORT, DMA, AD1836 ( and I2S ) and practiced a
little. Maybe i can share what i have understood so far. Anyone, pardon me
and please correct me if i am wrong here :-)

I'll talk about the I2S example.
Both the AD1836 codec and the SPORT were configured to deal with 24 bits
word size, and here we know each of those 24bits words actually represent
one sample.

When SPORT receives a sample from the codec, only 24 bits are exchanged
through the SPORT.
Once a 24 bits sample has been received, it is placed in the SPORT receive
FIFO.

Note that, because the "8-deep" FIFO lines are 16bits wide and that our word
(sample) size is 24bits, one sample will take 2 lines ( so our SPORT FIFO is
actually "4-deep" here). In other words, inside the FIFO, one sample will
occupy 32bits although only 24 are really meaningful to us. The 8 extra bits
were not transmitted through the SPORT, it is just some extra room in the
FIFO line that we don't use.

One of the states of the receive FIFO can look like this :

FIFO line #7 - [15:0] sample 3 Lowest 16bits
FIFO line #6 - [15:8] 8 unused bits [7:0] sample 3 Highest 8bits

FIFO line #5 - [15:0] sample 2 Lowest 16bits
FIFO line #4 - [15:8] 8 unused bits [7:0] sample 2 Highest 8bits

FIFO line #3 - [15:0] sample 1 Lowest 16bits
FIFO line #2 - [15:8] 8 unused bits [7:0] sample 1 Highest 8bits

FIFO line #1 - [15:0] sample 0 Lowest 16bits
FIFO line #0 - [15:8] 8 unused bits [7:0] sample 0 Highest 8bits

If the "secondary side" bit would not been set ( in fact, it is, in the I2S
example ), then sample 0 is left channel sample #1, sample 1 is right
channel sample #1, sample 2 is left channel sample #2, sample 3 is right
channel sample #2, sample 4 is left channel sample #3, sample 5 is right
channel sample #3 .... and so on...

Then comes the DMA.
It can be configured to do transfers of 8, 16 or 32 bits items ( not 24 bits
... ).

In the examples, it is configured to do 32 bits word exchanges between the
memory and the SPORT, that is, with the SPORT's receive/transmit FIFOs. The
8 extra bits are actually part of each 32bits exchange. We store one sample
as a 32bits integer in view of being processed, but we have to keep in mind
that only the bits [SLEN:0] actually represent the sample.

I hope that answer your question :)

May i know which example you are talking about exactly ? the I2S one or the
TDM one ?

I haven't looked into the TDM one, but for the I2S one, there are more
things going on mainly because SPORT is configured with the secondary side
bit activated for both receive and transmit.
That means SPORT transmit and received to/from both its primary and
secondary data lines at the same time (transmists to the AD1836's DSDATA1 &
DSDATA2 lines and receives from ASDATA1 & ASDATA2 lines), meaning that we
actually deal with 4 channels ( the 2 stereo ADCs and 2 first of the 3
stereo DACs ).

The receive FIFO state described above would change.
sample 0 is StereoADC1 Left channel sample #1
sample 1 is StereoADC2 Left channel sample #1
sample 2 is StereoADC1 Right channel sample #1
sample 3 is StereoADC2 Right channel sample #1
sample 4 is StereoADC1 Left channel sample #2
sample 5 is StereoADC2 Left channel sample #2
sample 6 is StereoADC1 Right channel sample #2
sample 7 is StereoADC2 Right channel sample #2
... and so on...

Cheers,
Laurent

----- Original Message -----
From: "Steve Holle" <>
To: "shwetha shwetha" <>; <>
Sent: Monday, October 25, 2004 12:06 PM
Subject: Re: [adsp] adt Sport and DMA >
>
> Someone more knowledgeable should correct any errors you see here. Even
> though the data from the codec is 24-bits, data inside the DSP is
> transferred in 32-bit words. The SLEN parameter indicates how many clocks
> are needed to transfer one codec word, which is then placed in 32-bit
memory.
>
> At 08:42 AM 10/25/2004, shwetha shwetha wrote: > >Hi,
> >
> >I am kind of new to this ADSP....
> >
> >I am working on the ADSP BF533 EZ-kit lite example
> >"Audio talk through" .....
> >
> >In the C code they have set the SLEN$,since the
> >codec(AD1836)sends 24 bits....
> >
> >but then the DMA transfer is32 bit....
> >
> >i don't understand this...
> >
> >Also... in the chapter Sport,while talking adt this
> >SLEN..tells that the DMA can dump 32 bit to the TX
> >buffer of the SPORT of which,the SLEN (in this case
> >24bits) bits are transfered thor' the sport...
> >
> >If it does like that,when r the remaining (32-24=8
> >bits) 8 bits transfered thro' the sport?
> >
> >Please i am in a pathetic stage.. now at my work.. so
> >kindly help me to understand this....i will be very
> >grateful...
> >
> >thanking u all in advance and eagerly waiting for the
> >early reply from the expertiese.....
> >
> >
> >
> >________________________________________________________________________
> >Yahoo! India Matrimony: Find your life partner online
> >Go to: http://yahoo.shaadi.com/india-matrimony
> >
> >
> >
> >
> >
> >_____________________________________
> >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
> >
> >Yahoo! Groups Links
> >
> >
> >
> >
>
> Steve Holle
> Link Communications, Inc.
> 1035 Cerise Rd.
> Billings, MT 59101 >
>
> _____________________________________
> 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
>
> Yahoo! Groups Links >



Hi,

I want to compute LOG in base 2 in few assembly instructions.

In first approximation, log2 = a*mant*mant + b*mant + c + exp2

 

Is someone who has an idea ?

 

Thanks in advance.

 


Crz gratuitement votre

Le nouveau Yahoo! Messenger est arriv! Douvrez toutes les nouveaut pour dialoguer instantanent avec vos amis. Thargez GRATUITEMENT ici !



// input value = v = 2^EXP * (1 + MANT / 2^23)
// log2(v) = EXP + log2(1 + MANT / 2^23) = EXP + log2(1+B), log2(1+B) can be approximated by a polynomial
// log2(v) = EXP + c1*B + c2*B^2 + c3*B^3 = EXP + B*(c1+B*(c2+B*c3))
// Accuracy: Maximum error = +/- 0.0047dB (0.078%)

If you don't need error checking (v<0) then take off 2 instructions
If you don't need B^3 term take off 2 more instructions

You should be able to do it in 9 cycles with the above taken off.

Alex Young
DSP software Engineer
Consultant for Philips Digital Systems Laboratories


adsp ts <a...@yahoo.fr>

27/10/04 11:15

       
        To:        a...@yahoogroups.com
        cc:        (bcc: Alex Young/LEU/PDSL/PHILIPS)
        Subject:        [adsp] ADSP-TS101 : compute LOG

        Classification:        

Hi,

I want to compute LOG in base 2 in few assembly instructions.

In first approximation, log2 = a*mant*mant + b*mant + c + exp2

 

Is someone who has an idea ?

 

Thanks in advance.

 


Crz gratuitement votre

Le nouveau Yahoo! Messenger est arriv!
Douvrez toutes les nouveaut pour dialoguer instantanent avec vos amis. Thargez GRATUITEMENT ici !

_____________________________________
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 a...@yahoogroups.com

To Post:  Send an email to a...@yahoogroups.com

To Leave: Send an email to a...@yahoogroups.com

Archives:
http://groups.yahoo.com/group/adsp

Other Groups:
http://www.dsprelated.com/groups.php3
Yahoo! Groups Links
  • To



I have tried, but I don't know how compute the MANT multiply by a float because the instruction MANT is left-adjusted in the fixed-point field ??
How can I do in assembly language ??
R0 = 2.4;;
XR1 = MANT FR0;; /* extract the mantissa */
XR2 = LOGB FR0;; /* extract the exponent */
XFR3 = R1 * R10;; /* mant x c3 */

Thanks in advance


a...@philips.com wrote:

// input value = v = 2^EXP * (1 + MANT / 2^23)
// log2(v) = EXP + log2(1 + MANT / 2^23) = EXP + log2(1+B), log2(1+B) can be approximated by a polynomial
// log2(v) = EXP + c1*B + c2*B^2 + c3*B^3 = EXP + B*(c1+B*(c2+B*c3))
// Accuracy: Maximum error = +/- 0.0047dB (0.078%)

If you don't need error checking (v<0) then take off 2 instructions
If you don't need B^3 term take off 2 more instructions

You should be able to do it in 9 cycles with the above taken off.

Alex Young
DSP software Engineer
Consultant for Philips Digital Systems Laboratories


adsp ts <a...@yahoo.fr>

27/10/04 11:15

       
        To:        a...@yahoogroups.com
        cc:        (bcc: Alex Young/LEU/PDSL/PHILIPS)
        Subject:        [adsp] ADSP-TS101 : compute LOG

        Classification:        

Hi,

I want to compute LOG in base 2 in few assembly instructions.

In first approximation, log2 = a*mant*mant + b*mant + c + exp2

Is someone who has an idea ?

Thanks in advance.

 


Crz gratuitement votre

Le nouveau Yahoo! Messenger est arriv! Douvrez toutes les nouveaut pour dialoguer instantanent avec vos amis. Thargez GRATUITEMENT ici !



You will need the FLOAT instruction to convert from fixed to
floating-point, possibly with some shifts to make everything line
up correctly.

--- adsp ts <> wrote:

> I have tried, but I don't know how compute the MANT multiply by
> a float because the instruction MANT is left-adjusted in the
> fixed-point field ??
> How can I do in assembly language ??
> R0 = 2.4;;
> XR1 = MANT FR0;; /* extract the mantissa */
> XR2 = LOGB FR0;; /* extract the exponent */
> XFR3 = R1 * R10;; /* mant x c3 */
>
> Thanks in advance > wrote:
>
> // input value = v = 2^EXP * (1 + MANT / 2^23)
> // log2(v) = EXP + log2(1 + MANT / 2^23) = EXP + log2(1+B),
> log2(1+B) can be approximated by a polynomial
> // log2(v) = EXP + c1*B + c2*B^2 + c3*B^3 = EXP +
> B*(c1+B*(c2+B*c3))
> // Accuracy: Maximum error = +/- 0.0047dB (0.078%)
>
> If you don't need error checking (v<0) then take off 2
> instructions
> If you don't need B^3 term take off 2 more instructions
>
> You should be able to do it in 9 cycles with the above taken
> off.
>
> Alex Young
> DSP software Engineer
> Consultant for Philips Digital Systems Laboratories >
> adsp ts <>
> 27/10/04 11:15 > To:
> cc: (bcc: Alex Young/LEU/PDSL/PHILIPS)
> Subject: [adsp] ADSP-TS101 : compute LOG
> Classification: > Hi,
> I want to compute LOG in base 2 in few assembly instructions.
> In first approximation, log2 = a*mant*mant + b*mant + c + exp2
>
> Is someone who has an idea ?
>
> Thanks in advance.

__________________________________




I have found a solution :
 
Extract only the 23 bits of mantissa and after Mask with 0x3F800000
 
So exemple, for 2,4 = 0x4019999A
XR0 = 23;;
XR1 = 0x3F800000;;
XR2 = 0x4019999A;;
XR3 = FEXT R2 BY R0;;    /* R2 = 0x0019999A */
XR4 = R2 OR R3;;
 
And you have extract the mantissa for the number in float : R4 = 1,2
After, it is only computation with float number.
 
You can't use the FLOAT instruction because the MANT instruction extracts the mantissa what is left-adjusted in the fixed-point field.
 
 
Thanks for your ideas and your help.
 
 
 
 
Jon Harris <j...@yahoo.com> wrote:


You will need the FLOAT instruction to convert from fixed to
floating-point, possibly with some shifts to make everything line
up correctly.

--- adsp ts wrote:

> I have tried, but I don't know how compute the MANT multiply by
> a float because the instruction MANT is left-adjusted in the
> fixed-point field ??
> How can I do in assembly language ??
> R0 = 2.4;;
> XR1 = MANT FR0;; /* extract the mantissa */
> XR2 = LOGB FR0;; /* extract the exponent */
> XFR3 = R1 * R10;; /* mant x c3 */
>
> Thanks in advance> a...@philips.com wrote:
>
> // input value = v = 2^EXP * (1 + MANT / 2^23)
> // log2(v) = EXP + log2(1 + MANT / 2^23) = EXP + log2(1+B),
> log2(1+B) can be approximated by a polynomial
> // log2(v) = EXP + c1*B + c2*B^2 + c3*B^3 = EXP +
> B*(c1+B*(c2+B*c3))
> // Accuracy: Maximum error = +/- 0.0047dB (0.078%)
>
> If you don't need error checking (v<0) then take off 2
> instructions
> If you don't need B^3 term take off 2 more instructions
>
> You should be able to do it in 9 cycles with the above taken
> off.
>
> Alex Young
> DSP software Engineer
> Consultant for Philips Digital Systems Laboratories>
> adsp ts
> 27/10/04 11:15> To: a...@yahoogroups.com
> cc: (bcc: Alex Young/LEU/PDSL/PHILIPS)
> Subject: [adsp] ADSP-TS101 : compute LOG
> Classification:> Hi,
> I want to compute LOG in base 2 in few assembly instructions.
> In first approximation, log2 = a*mant*mant + b*mant + c + exp2
>
> Is someone who has an idea ?
>
> Thanks in advance.


Crz gratuitement votre

Le nouveau Yahoo! Messenger est arriv! Douvrez toutes les nouveaut pour dialoguer instantanent avec vos amis. Thargez GRATUITEMENT ici !

Hi,

I use a ADSP-TS101 and I have a different program for each DSP of the card. So I have created four project but I don't know how I shall do to load the 4 program on the card ?

Shall I create a new project with dependenties ???

 

Thanks


Crz gratuitement votre

Le nouveau Yahoo! Messenger est arriv! Douvrez toutes les nouveaut pour dialoguer instantanent avec vos amis. Thargez GRATUITEMENT ici !


On Fri, 29 Oct 2004, adsp ts wrote:

> I use a ADSP-TS101 and I have a different program for each DSP of the
>card. So I have created four project but I don't know how I shall do to
>load the 4 program on the card ?
>
> Shall I create a new project with dependenties ???

How do you boot each processor? If one processor boots the other 3, then
you only need one project with overlays. If each processor boots
independently, you will need 4 projects.

Patience, persistence, truth,
Dr. mike