Hi,
I work on a c6747 board in our project, a xilinx Artix-7 FPGA connect to the c6747 via the EMIFA CS2, async mode. I write a demo program to test the emif read and write timing. It seems the write timing is right but the read timing is not right.
In my case, cpu run at 375MHz, emifa clock is 125MHz, FPGA sample clock is 40MHz. I set CE2CFG as:
wr/rd Setup -- 4 emifa clock
wr/rd Strobe -- 4 emifa clock
wr/rd Hold -- 4 emifa clock
TA -- 4 emifa clock
My test code shows below:
int i; volatile unsigned short data; while(1){ // test FPGA EMIFA interface: A[13:0] for (i = 0; i < 14; i++){ // write *((unsigned short *)(0x60000000 + (1<<(i+1)))) = (1<<(13-i)); } for (i = 0; i < 14; i++){ // read data = *((volatile unsigned short *)(0x60000000 + (1<<(i+1)))); } }
My test result shows below: the FPGA sample clock is 40 MHz in the image
It shows that the writing timing is right, but the read timing is not right. After each read, there is a long time delay. The delay reduce the read speed so much that waste a lot of cpu time.
I search "emifa read" in the forum and read many issue like this:
In this issue, Brad give an explanation, the SCR multi-level cache request cause the delay.
In this issue, Joerg Seiler said that the user can change master priority.
I also read the two wiki below:
processors.wiki.ti.com/.../AM1x_SoC_Level_Optimizations
processors.wiki.ti.com/.../AM1x_SoC_Architectural_Overview
I don't think change the master priority can solve the problem, because in my case, there is no PRU, EDMA3, EMAC, USB, LCDC, HPI, the left is DSP MDMA and DSP CFG, so I don't think change master priority can work.
Some engineer use EDMA3 to avoid this influence, but i don't want to use the EDMA3,and in my project the read address in the CS2 FPGA is not continuous.
So, is there a clearly solution for this problem? To reduce the long read delay time in a standalone program without using EDMA3.
Or is there a method to disable the cpu to cache the CS2 address region?
I really need your help to reduce the long read delay time in a standalone program without using EDMA3, as the delay waste so much cpu time in my project.
Thanks.