Hello, I have a quick question concerning setting up DMA for chaining. When doing a DMA from internal memory to external memory you need to setup 2-TCBs, one Source and one for Destination. In both TCBs you can give it the next TCB to execute. Now when you do a link port DMA only 1-TCB needs to be setup. How can I set that TCB up so when the DMA is finished it can call another DMA to transfer DSP memory to external memory? The link port TCB can only define one chain pointer, I need to have the link port TCB to start the SourceTCB and DestinTCB of the next DMA I want to do. Here's my code: // SETTING TCB DP REG:: ----- CHAIN POINTER --- DMA_DSP2IODAT_TCB.DP = (((long)(&DMA_DSP2SONET_SourceTCB) >> 2) & 0x7fff) DMA_DSP2SONET_SourceTCB.DP = (((long)(&DMA_SONET2DSP_SourceTCB) >> 2) & 0x7fff) DMA_DSP2SONET_DestinTCB.DP = (((long)(&DMA_SONET2DSP_DestinTCB) >> 2) & 0x7fff) The DMA_DSP2IODAT_TCB should be chained to DMA_DSP2SONET_SourceTCB and DMA_DSP2SONET_DestinTCB, or after my DMA from the link port(DMA_DSP2IODAT_TCB) I want to do a DMA from DSP memory to external memory. Any ideas how this can be done? joe
DMA Chaining on TS101
Started by ●October 19, 2004
Reply by ●October 19, 20042004-10-19
"joe" <jjlindula@hotmail.com> wrote in message news:880397ee.0410191549.3bbf5e1b@posting.google.com...> Hello, I have a quick question concerning setting up DMA for chaining. > When > doing a DMA from internal memory to external memory you need to setup > 2-TCBs, > one Source and one for Destination. In both TCBs you can give it the > next TCB to execute. Now when you do a link port DMA only 1-TCB needs > to be setup. How can I set that TCB up so when the DMA is finished it > can call another DMA to transfer DSP memory to external memory? The > link port TCB can only define one chain pointer, I need to have the > link port TCB to start the SourceTCB and DestinTCB of the next DMA I > want to do.From what I understand of the SHARCs (I don't know details of the TigerSHARCs specifically), you don't need 2 TCBs to specify a source and destination. You should be able to specify that in 1 TCB - in the 21160 for example, in a DMA between internal and external memory, you can specify the internal addresses in the IIx, IMx, ICx registers and the external addresses in the EIx, EMx, ECx registers. All of these are loaded from a single TCB. Cheers Bhaskar> > Here's my code: > > // SETTING TCB DP REG:: ----- CHAIN POINTER --- > DMA_DSP2IODAT_TCB.DP = (((long)(&DMA_DSP2SONET_SourceTCB) >> 2) > & 0x7fff) > > DMA_DSP2SONET_SourceTCB.DP = (((long)(&DMA_SONET2DSP_SourceTCB) >> 2) > & 0x7fff) > DMA_DSP2SONET_DestinTCB.DP = (((long)(&DMA_SONET2DSP_DestinTCB) >> 2) > & 0x7fff) > > The DMA_DSP2IODAT_TCB should be chained to DMA_DSP2SONET_SourceTCB and > DMA_DSP2SONET_DestinTCB, or after my DMA from the link > port(DMA_DSP2IODAT_TCB) > I want to do a DMA from DSP memory to external memory. Any ideas how > this can be done? > > joe
Reply by ●October 20, 20042004-10-20
Hi, you might want to read the silicon errata sheet before messing with DMA on the TS101 there are several silicon bugs surronding it. From what i can remember. 1. Dont DMA more that 1 channel to sdram or the DMA engine will hang 2. DMA Chaining is broken for link ports. but you would need to check that from ADI James On 19 Oct 2004, joe wrote:> Hello, I have a quick question concerning setting up DMA for chaining. > When > doing a DMA from internal memory to external memory you need to setup > 2-TCBs, > one Source and one for Destination. In both TCBs you can give it the > next TCB to execute. Now when you do a link port DMA only 1-TCB needs > to be setup. How can I set that TCB up so when the DMA is finished it > can call another DMA to transfer DSP memory to external memory? The > link port TCB can only define one chain pointer, I need to have the > link port TCB to start the SourceTCB and DestinTCB of the next DMA I > want to do. > > Here's my code: > > // SETTING TCB DP REG:: ----- CHAIN POINTER --- > DMA_DSP2IODAT_TCB.DP = (((long)(&DMA_DSP2SONET_SourceTCB) >> 2) > & 0x7fff) > > DMA_DSP2SONET_SourceTCB.DP = (((long)(&DMA_SONET2DSP_SourceTCB) >> 2) > & 0x7fff) > DMA_DSP2SONET_DestinTCB.DP = (((long)(&DMA_SONET2DSP_DestinTCB) >> 2) > & 0x7fff) > > The DMA_DSP2IODAT_TCB should be chained to DMA_DSP2SONET_SourceTCB and > DMA_DSP2SONET_DestinTCB, or after my DMA from the link > port(DMA_DSP2IODAT_TCB) > I want to do a DMA from DSP memory to external memory. Any ideas how > this can be done? > > joe >-- -------------------------- Mobile: +44 07779080838 http://www.stev.org 2:10pm up 36 min, 4 users, load average: 2.88, 3.15, 2.97
Reply by ●October 20, 20042004-10-20
"Bhaskar Thiagarajan" <bhaskart@my-deja.com> wrote in message news:<2tlp66F21if97U1@uni-berlin.de>...> "joe" <jjlindula@hotmail.com> wrote in message > news:880397ee.0410191549.3bbf5e1b@posting.google.com... > > Hello, I have a quick question concerning setting up DMA for chaining. > > When > > doing a DMA from internal memory to external memory you need to setup > > 2-TCBs, > > one Source and one for Destination. In both TCBs you can give it the > > next TCB to execute. Now when you do a link port DMA only 1-TCB needs > > to be setup. How can I set that TCB up so when the DMA is finished it > > can call another DMA to transfer DSP memory to external memory? The > > link port TCB can only define one chain pointer, I need to have the > > link port TCB to start the SourceTCB and DestinTCB of the next DMA I > > want to do. > > From what I understand of the SHARCs (I don't know details of the > TigerSHARCs specifically), you don't need 2 TCBs to specify a source and > destination. You should be able to specify that in 1 TCB - in the 21160 for > example, in a DMA between internal and external memory, you can specify the > internal addresses in the IIx, IMx, ICx registers and the external addresses > in the EIx, EMx, ECx registers. All of these are loaded from a single TCB. > > Cheers > Bhaskar > > > > > Here's my code: > > > > // SETTING TCB DP REG:: ----- CHAIN POINTER --- > > DMA_DSP2IODAT_TCB.DP = (((long)(&DMA_DSP2SONET_SourceTCB) >> 2) > > & 0x7fff) > > > > DMA_DSP2SONET_SourceTCB.DP = (((long)(&DMA_SONET2DSP_SourceTCB) >> 2) > > & 0x7fff) > > DMA_DSP2SONET_DestinTCB.DP = (((long)(&DMA_SONET2DSP_DestinTCB) >> 2) > > & 0x7fff) > > > > The DMA_DSP2IODAT_TCB should be chained to DMA_DSP2SONET_SourceTCB and > > DMA_DSP2SONET_DestinTCB, or after my DMA from the link > > port(DMA_DSP2IODAT_TCB) > > I want to do a DMA from DSP memory to external memory. Any ideas how > > this can be done? > > > > joeHello, and thanks for responding to my post. You are correct, it is much easier setting up a DMA on the older SHARCs, but the newer SHARCs have more flexibility. On the TS101 you define 2-TCB (Source, Destination) if you are doing Internal <-> External DMAs, but if you are doing a Internal <-> Link you only need 1-TCB. In each TCB you can have it chain to another TCB. I'm still trying to figure out how to set up the chain of Link Port DMA and then a DMA from internal to external memory. joe
Reply by ●October 20, 20042004-10-20
"joe" <jjlindula@hotmail.com> wrote in message news:880397ee.0410200546.5e1cea9f@posting.google.com...> "Bhaskar Thiagarajan" <bhaskart@my-deja.com> wrote in messagenews:<2tlp66F21if97U1@uni-berlin.de>...> > "joe" <jjlindula@hotmail.com> wrote in message > > news:880397ee.0410191549.3bbf5e1b@posting.google.com... > > > Hello, I have a quick question concerning setting up DMA for chaining. > > > When > > > doing a DMA from internal memory to external memory you need to setup > > > 2-TCBs, > > > one Source and one for Destination. In both TCBs you can give it the > > > next TCB to execute. Now when you do a link port DMA only 1-TCB needs > > > to be setup. How can I set that TCB up so when the DMA is finished it > > > can call another DMA to transfer DSP memory to external memory? The > > > link port TCB can only define one chain pointer, I need to have the > > > link port TCB to start the SourceTCB and DestinTCB of the next DMA I > > > want to do. > > > > From what I understand of the SHARCs (I don't know details of the > > TigerSHARCs specifically), you don't need 2 TCBs to specify a source and > > destination. You should be able to specify that in 1 TCB - in the 21160for> > example, in a DMA between internal and external memory, you can specifythe> > internal addresses in the IIx, IMx, ICx registers and the externaladdresses> > in the EIx, EMx, ECx registers. All of these are loaded from a singleTCB.> > > > Cheers > > Bhaskar > > > > > > > > Here's my code: > > > > > > // SETTING TCB DP REG:: ----- CHAIN POINTER --- > > > DMA_DSP2IODAT_TCB.DP = (((long)(&DMA_DSP2SONET_SourceTCB) >> 2) > > > & 0x7fff) > > > > > > DMA_DSP2SONET_SourceTCB.DP = (((long)(&DMA_SONET2DSP_SourceTCB) >> 2) > > > & 0x7fff) > > > DMA_DSP2SONET_DestinTCB.DP = (((long)(&DMA_SONET2DSP_DestinTCB) >> 2) > > > & 0x7fff) > > > > > > The DMA_DSP2IODAT_TCB should be chained to DMA_DSP2SONET_SourceTCB and > > > DMA_DSP2SONET_DestinTCB, or after my DMA from the link > > > port(DMA_DSP2IODAT_TCB) > > > I want to do a DMA from DSP memory to external memory. Any ideas how > > > this can be done? > > > > > > joe > > Hello, and thanks for responding to my post. You are correct, it is > much easier setting up a DMA on the older SHARCs, but the newer SHARCs > have more flexibility. On the TS101 you define 2-TCB (Source, > Destination) if you are doing Internal <-> External DMAs, but if you > are doing a Internal <-> Link you only need 1-TCB. In each TCB you can > have it chain to another TCB. I'm still trying to figure out how to > set up the chain of Link Port DMA and then a DMA from internal to > external memory.If you have 2 TCBs for a single DMA the manual has got to explain how one would set off this DMA. Knowing what I know about TCBs, it doesn't make much sense to have 2 TCBs - one each for source and destination. The only guess I can make is that you make the source point to the destination TCB and kick off the source?? So what is the flexibility of having 2 TCBs for an internal to external transfer? You can do this using 1 TCB in the old SHARCs.> > joe
Reply by ●October 20, 20042004-10-20
"Bhaskar Thiagarajan" <bhaskart@my-deja.com> wrote in message news:2tngrmF2205u0U1@uni-berlin.de...> "joe" <jjlindula@hotmail.com> wrote in message > news:880397ee.0410200546.5e1cea9f@posting.google.com... > > "Bhaskar Thiagarajan" <bhaskart@my-deja.com> wrote in message > news:<2tlp66F21if97U1@uni-berlin.de>... > > > "joe" <jjlindula@hotmail.com> wrote in message > > > news:880397ee.0410191549.3bbf5e1b@posting.google.com... > > > > Hello, I have a quick question concerning setting up DMA forchaining.> > > > When > > > > doing a DMA from internal memory to external memory you need tosetup> > > > 2-TCBs, > > > > one Source and one for Destination. In both TCBs you can give it the > > > > next TCB to execute. Now when you do a link port DMA only 1-TCBneeds> > > > to be setup. How can I set that TCB up so when the DMA is finishedit> > > > can call another DMA to transfer DSP memory to external memory? The > > > > link port TCB can only define one chain pointer, I need to have the > > > > link port TCB to start the SourceTCB and DestinTCB of the next DMA I > > > > want to do. > > > > > > From what I understand of the SHARCs (I don't know details of the > > > TigerSHARCs specifically), you don't need 2 TCBs to specify a sourceand> > > destination. You should be able to specify that in 1 TCB - in the21160> for > > > example, in a DMA between internal and external memory, you canspecify> the > > > internal addresses in the IIx, IMx, ICx registers and the external > addresses > > > in the EIx, EMx, ECx registers. All of these are loaded from a single > TCB. > > > > > > Cheers > > > Bhaskar > > > > > > > > > > > Here's my code: > > > > > > > > // SETTING TCB DP REG:: ----- CHAIN POINTER --- > > > > DMA_DSP2IODAT_TCB.DP = (((long)(&DMA_DSP2SONET_SourceTCB) >>2)> > > > & 0x7fff) > > > > > > > > DMA_DSP2SONET_SourceTCB.DP = (((long)(&DMA_SONET2DSP_SourceTCB) >>2)> > > > & 0x7fff) > > > > DMA_DSP2SONET_DestinTCB.DP = (((long)(&DMA_SONET2DSP_DestinTCB) >>2)> > > > & 0x7fff) > > > > > > > > The DMA_DSP2IODAT_TCB should be chained to DMA_DSP2SONET_SourceTCBand> > > > DMA_DSP2SONET_DestinTCB, or after my DMA from the link > > > > port(DMA_DSP2IODAT_TCB) > > > > I want to do a DMA from DSP memory to external memory. Any ideas how > > > > this can be done? > > > > > > > > joe > > > > Hello, and thanks for responding to my post. You are correct, it is > > much easier setting up a DMA on the older SHARCs, but the newer SHARCs > > have more flexibility. On the TS101 you define 2-TCB (Source, > > Destination) if you are doing Internal <-> External DMAs, but if you > > are doing a Internal <-> Link you only need 1-TCB. In each TCB you can > > have it chain to another TCB. I'm still trying to figure out how to > > set up the chain of Link Port DMA and then a DMA from internal to > > external memory. > > If you have 2 TCBs for a single DMA the manual has got to explain how one > would set off this DMA. Knowing what I know about TCBs, it doesn't makemuch> sense to have 2 TCBs - one each for source and destination. The only guessI> can make is that you make the source point to the destination TCB and kick > off the source?? So what is the flexibility of having 2 TCBs for aninternal> to external transfer? You can do this using 1 TCB in the old SHARCs.I was too curious and decided to browse the TS101 manual and I guess I can kinda see your dilemma of having 2 TCBs on your hands. I'll post more if I find anything that will be of help to you. Cheers Bhaskar> > > > > joe > >
Reply by ●October 20, 20042004-10-20
"Bhaskar Thiagarajan" <bhaskart@my-deja.com> wrote in message news:2tnlp9F21vpvuU1@uni-berlin.de...> "Bhaskar Thiagarajan" <bhaskart@my-deja.com> wrote in message > news:2tngrmF2205u0U1@uni-berlin.de... > > "joe" <jjlindula@hotmail.com> wrote in message > > news:880397ee.0410200546.5e1cea9f@posting.google.com... > > > "Bhaskar Thiagarajan" <bhaskart@my-deja.com> wrote in message > > news:<2tlp66F21if97U1@uni-berlin.de>... > > > > "joe" <jjlindula@hotmail.com> wrote in message > > > > news:880397ee.0410191549.3bbf5e1b@posting.google.com... > > > > > Hello, I have a quick question concerning setting up DMA for > chaining. > > > > > When > > > > > doing a DMA from internal memory to external memory you need to > setup > > > > > 2-TCBs, > > > > > one Source and one for Destination. In both TCBs you can give itthe> > > > > next TCB to execute. Now when you do a link port DMA only 1-TCB > needs > > > > > to be setup. How can I set that TCB up so when the DMA is finished > it > > > > > can call another DMA to transfer DSP memory to external memory?The> > > > > link port TCB can only define one chain pointer, I need to havethe> > > > > link port TCB to start the SourceTCB and DestinTCB of the next DMAI> > > > > want to do. > > > > > > > > From what I understand of the SHARCs (I don't know details of the > > > > TigerSHARCs specifically), you don't need 2 TCBs to specify a source > and > > > > destination. You should be able to specify that in 1 TCB - in the > 21160 > > for > > > > example, in a DMA between internal and external memory, you can > specify > > the > > > > internal addresses in the IIx, IMx, ICx registers and the external > > addresses > > > > in the EIx, EMx, ECx registers. All of these are loaded from asingle> > TCB. > > > > > > > > Cheers > > > > Bhaskar > > > > > > > > > > > > > > Here's my code: > > > > > > > > > > // SETTING TCB DP REG:: ----- CHAIN POINTER --- > > > > > DMA_DSP2IODAT_TCB.DP = (((long)(&DMA_DSP2SONET_SourceTCB) >> > 2) > > > > > & 0x7fff) > > > > > > > > > > DMA_DSP2SONET_SourceTCB.DP = (((long)(&DMA_SONET2DSP_SourceTCB) >> > 2) > > > > > & 0x7fff) > > > > > DMA_DSP2SONET_DestinTCB.DP = (((long)(&DMA_SONET2DSP_DestinTCB) >> > 2) > > > > > & 0x7fff) > > > > > > > > > > The DMA_DSP2IODAT_TCB should be chained to DMA_DSP2SONET_SourceTCB > and > > > > > DMA_DSP2SONET_DestinTCB, or after my DMA from the link > > > > > port(DMA_DSP2IODAT_TCB) > > > > > I want to do a DMA from DSP memory to external memory. Any ideashow> > > > > this can be done? > > > > > > > > > > joe > > > > > > Hello, and thanks for responding to my post. You are correct, it is > > > much easier setting up a DMA on the older SHARCs, but the newer SHARCs > > > have more flexibility. On the TS101 you define 2-TCB (Source, > > > Destination) if you are doing Internal <-> External DMAs, but if you > > > are doing a Internal <-> Link you only need 1-TCB. In each TCB you can > > > have it chain to another TCB. I'm still trying to figure out how to > > > set up the chain of Link Port DMA and then a DMA from internal to > > > external memory. > > > > If you have 2 TCBs for a single DMA the manual has got to explain howone> > would set off this DMA. Knowing what I know about TCBs, it doesn't make > much > > sense to have 2 TCBs - one each for source and destination. The onlyguess> I > > can make is that you make the source point to the destination TCB andkick> > off the source?? So what is the flexibility of having 2 TCBs for an > internal > > to external transfer? You can do this using 1 TCB in the old SHARCs. > > I was too curious and decided to browse the TS101 manual and I guess I can > kinda see your dilemma of having 2 TCBs on your hands. I'll post more if I > find anything that will be of help to you. > > Cheers > BhaskarSounds like you are out of luck. What you want to do cannot be done using the TS101 - you can only chain DMAs that involve internal-external transfers and in that case, you'll point the source TCBs to each other and the destination TCBs to each other (which makes sense to me). According to page 7-41 of the hardware reference, " ADSP-TS101 TigerSHARC Processor 7-41 Hardware Reference Direct Memory Access There are some restrictions on chaining DMA across DMA channels. For internal/external memory DMA transfers, cross channel DMA is not permitted. DMA processes between internal/external memory can only be chained within the same channel. Link port DMA processes, however, may be chained across channels." Cheers Bhaskar> > > > > > > > > joe > > > > > >
Reply by ●October 21, 20042004-10-21
"James Stevenson" <james@stev.org> wrote in message news:Pine.LNX.4.44.0410201413530.1639-100000@beast.stev.org...> > Hi, > > you might want to read the silicon errata sheet before messing with DMA on > the TS101 there are several silicon bugs surronding it. > > From what i can remember. > > 1. Dont DMA more that 1 channel to sdram or the DMA engine will hangI don't recall this one, but the advice to read the silicon errata is always a good one. There are some issues to take care of, as there are with pretty much any chip. At least Analog Devices publish these on their web page - ever try getting one from Intel? I'm not sure if I'm even allowed to tell you I have one, or that it was a paper copy only and hand delivered with warnings all over it not to make any copies :-) There may be performance issues for not wanting more than 1 sdram DMA active at a time, which has to do with sdram page accesses, i.e all sdram takes a hit when you change pages, so having multiple things doing accesses will often cause lots of page hits and hence performance loss.> 2. DMA Chaining is broken for link ports.This was only on some early silicon revisions, and not using chained DMAs was a work around to a problem of enabling a link receive DMA before the first word of data was received. This was corrected quite a while ago - I believe we (BittWare) only shipped a handful of TS101 boards with the silicon verison with this bug. ------ Ron Huizen BittWare
Reply by ●October 21, 20042004-10-21
"Bhaskar Thiagarajan" <bhaskart@my-deja.com> wrote in message news:2tnm9fF22dmgeU1@uni-berlin.de...> Sounds like you are out of luck. What you want to do cannot be done using > the TS101 - you can only chain DMAs that involve internal-externaltransfers> and in that case, you'll point the source TCBs to each other and the > destination TCBs to each other (which makes sense to me). According topage> 7-41 of the hardware reference, > " > ADSP-TS101 TigerSHARC Processor 7-41 > Hardware Reference > > Direct Memory Access > > There are some restrictions on chaining DMA across DMA channels. For > internal/external memory DMA transfers, cross channel DMA is notpermitted.> DMA processes between internal/external memory can only be > chained within the same channel. Link port DMA processes, however, > may be chained across channels."Bhaskar, I don't read what you did from these words from the manual. Specifically, it says you can't do cross channel DMA for internal/external but you can for links, which is opposite of what you said above, isn't it? You can certainly do chained DMAs for anything where the chain uses the same DMA channel, it's a question of what's allowed for having the next TCB in the chain use a different DMA channel. In any case, I don't think Joe can do what he wants, which I believe is to chain a memory DMA to a link DMA. I wasn't even aware you could ever chain across channels until this post. I guess I can see some use for this capability. Joe, If I wasn't so busy with TS201 developments, I'd love to take some time to dig into this farther. Of course, you can always ask ADI for help. If you don't get any reasonable response, let me know and I can ask some appropriate people for you. Based on what I've seen, I don't think you can use a chain for this, so guess you'll have to use the dma complete interrupt to kick off the memory transfer dma. ------------ Ron Huizen BittWare
Reply by ●October 21, 20042004-10-21
"Ron Huizen" <rhuizen@bittware.com> wrote in message news:10nfdqagr2m9b61@corp.supernews.com...> "Bhaskar Thiagarajan" <bhaskart@my-deja.com> wrote in message > news:2tnm9fF22dmgeU1@uni-berlin.de... > > Sounds like you are out of luck. What you want to do cannot be doneusing> > the TS101 - you can only chain DMAs that involve internal-external > transfers > > and in that case, you'll point the source TCBs to each other and the > > destination TCBs to each other (which makes sense to me). According to > page > > 7-41 of the hardware reference, > > " > > ADSP-TS101 TigerSHARC Processor 7-41 > > Hardware Reference > > > > Direct Memory Access > > > > There are some restrictions on chaining DMA across DMA channels. For > > internal/external memory DMA transfers, cross channel DMA is not > permitted. > > DMA processes between internal/external memory can only be > > chained within the same channel. Link port DMA processes, however, > > may be chained across channels." > > Bhaskar, > I don't read what you did from these words from the manual. Specifically, > it says you can't do cross channel DMA for internal/external but you canfor> links, which is opposite of what you said above, isn't it? You can > certainly do chained DMAs for anything where the chain uses the same DMA > channel, it's a question of what's allowed for having the next TCB in the > chain use a different DMA channel.My interpretation was that there are several DMA channels that one could use for a given transfer task (internal/external, link, sport, etc) and in the case of the links, you could chain link port transfers that used different channels. I also read the part where internal/external transfers couldn't do cross channel DMAs and in the OP's case there were definitely 2 channels involved - so I concluded it wasn't possible. Cheers Bhaskar> > In any case, I don't think Joe can do what he wants, which I believe is to > chain a memory DMA to a link DMA. I wasn't even aware you could everchain> across channels until this post. I guess I can see some use for this > capability. > > Joe, > If I wasn't so busy with TS201 developments, I'd love to take some time to > dig into this farther. Of course, you can always ask ADI for help. Ifyou> don't get any reasonable response, let me know and I can ask some > appropriate people for you. Based on what I've seen, I don't think youcan> use a chain for this, so guess you'll have to use the dma completeinterrupt> to kick off the memory transfer dma. > > ------------ > Ron Huizen > BittWare > >






