Forum Discussion
Altera_Forum
Honored Contributor
15 years agoI do see the ChainCompleted/DescriptorCompleted being set to 1, thus it did claim to have done something....however I need to have an interrupt prompt me.....I can't do polling.
I have the status register at BYTE offset 0, control register at BYTE offset 16, and NextDescriptorPointer at BYTE offset 32 (as I noticed in the docs that it said the offsets were 32bit word offsets ... thus use 4 x the offset value) descriptor.Source = I set this to an Avalon Device Address where my DDR2 memory is descriptor.Destination = pcieaddresstranslated; descriptor.ActualBytesTransferred = 0; descriptor.BytesToTransfer = SgList->Elements[i].Length; descriptor.Control.OwnedByHardware = 1; descriptor.NextDescriptor = NULL; dmaControl1.bits.MaxDescriptorsToProcess = 1; dmaControl1.bits.InterruptOnChainCompleted = 1; dmaControl1.bits.InterruptOnDescriptorCompleted = 1; dmaControl1.bits.Run = 1; At this stage I am providing just 1 descriptor to the SGDMA engine. I put the descriptor into device memory using a WRITE_REGISTER call, and I set the SGRegisterMap->NextDescriptorPointer to the avalon address to find it. I use this as I want to see 1 descriptor being processed (before I makes things more complicated), and I want to be informed when it's done something. pciaddresstranslated is a PCIe Host address, where I want to transfer to. It is correctly masked with the Page Size of the Translation table, and combined with the Index number of the table entry I want to translate. I have Address Translation working properly with the Simple DMA. I just need to see the interrupt on the SGDMA. thanks for your help.