I wanted to test the functionality of AMI using DMA with a loopback. It seems to be working with packing disabled, at least for the least significant 8 bit, otherwise not. Where might be the problem? Attached is the test code.
Could you please provide more details about your system (preferrable using a simple block diagram) and the code which you want to test ? E.g. which devices are connected to AMI0 and AMI1, what do you mean by loopback - do you initiate a read DMA from one AMI port and then a write DMA to another, how do you check that there is a failure, what do you see when the failure happens (what kind of corruption) etc.
In the end design, FPGA will be connected to both AMI0 and AMi1 where they will be used for data interface. Sent data will be written to an external constant address and received data will be read from another constant address both via DMA.
Before the FPGA is designed, I wanted to make a loopback test where sent data will be written to 0x04000001 using DMA0 and read from the same address using DMA1 as you can see from the attached code.
My first question should be if this is a valid test.
Second, at the attached code, when packing is enabled, read data is not as expected. What might I be missing?
Hope this clarifies it,
Thanks for the details. I do understand your requirement . I also understand that currently you don't have any external device connected to the AMI port of the ADSP-21469 and you want to be able to perform a loopback test by writing and simultaneously reading the same data to a particular address.
Please note that the AMI port doesn't support any such loopback feature and thus it's not recommended/guaranteed. Regarding the case, when the packing is enabled, the AMI port will perform multiple 8/16 bit AMI accesses to read/write the complete 32 bit word. In such case (e.g. in case of 8-32 bit packing), the first, second, third bytes might get overwritten by the last byte on the 8 bit bus. I guess this might be the reason why you don't see the code working with packing enabled.
Hope this helps.
Thank you Mitesh for the quick answer.
After your answer, I tried to check plain external port writes using chained DMA to the memory bank no. 1 on the eval board as can be seen from the attached code. I can't see any writes using neither plot nor two column memmory. What am I missing here?
The memory connected to the AMI bank1 on the EZ-Kit is a FLASH device. You can't directly write to it using normal DMA. You will have to follow a specific sequence of instructions to be able to program the FLASH (mentioned in the FLASH device data sheet).
Retrieving data ...