Hi,
1. In PCIe UserGuide [2.9.3 EDMA Transfer Examples] the paramSetup_pcie.aCntbCnt is called as:
paramSetup_pcie.aCntbCnt = CSL_EDMA3_CNT_MAKE(pcie_max_payload, buff_size/pcie_max_payload);
means that ACNT= pcie_max_payload , BCNT= buff_size/pcie_max_payload but With DSPC6678 the pcie_max_payload is limited as 128B.
so ACNT is also limited as 128B or I can change it, (e.g with ACNT=1024, BCNT=1) !
2. I try to evaluate the throughput performance using _CSL_tscRead () but I got a wrong result!
/** EDMA**/
_CSL_tscEnable();
printf("=============EDMA RC==============\n");
printf("Activate the Cache memory\n");
cacheinit();
printf("EDMA start\n");
pcie_read_actStatus_reg((CSL_Pciess_appRegs*)handle,&ActStatus);
Nbefore_RC=_CSL_tscRead ();
//EDMA1
printf("EDMA1 start\n");
EDMA_Transfer(0, 0,srcBuf,pcieBase,(PCIE_EXAMPLE_UINT32_SIZE*PCIE_BUFSIZE_APP));
/*test buffet OB is empty*/
pcie_read_actStatus_reg((CSL_Pciess_appRegs*)handle,&ActStatus);
while(ActStatus.obNotEmpty) pcie_read_actStatus_reg((CSL_Pciess_appRegs*)handle,&ActStatus);
Nafter_RC=_CSL_tscRead ();
Ncycle_RC=Nafter_RC-Nbefore_RC;
printf("EDMA End\n");
in order to resolve this problem, I tried to evaluate the average (100 transactions) as following:
/** EDMA**/
_CSL_tscEnable();
printf("=============EDMA RC==============\n");
printf("Activate the Cache memory\n");
cacheinit();
printf("EDMA start\n");
pcie_read_actStatus_reg((CSL_Pciess_appRegs*)handle,&ActStatus);
Nbefore_RC=_CSL_tscRead ();
printf("EDMA start\n");
int j;
for(j=0;j<100;j++){
EDMA_Transfer(0, 0,srcBuf,pcieBase,(PCIE_EXAMPLE_UINT32_SIZE*PCIE_BUFSIZE_APP));
/*test buffet OB is empty*/
pcie_read_actStatus_reg((CSL_Pciess_appRegs*)handle,&ActStatus);
while(ActStatus.obNotEmpty) pcie_read_actStatus_reg((CSL_Pciess_appRegs*)handle,&ActStatus);
}
Nafter_RC=_CSL_tscRead ();
Ncycle_RC=Nafter_RC-Nbefore_RC;
printf("EDMA End\n");
data is transfered OK but I had also a wrong measure (some time up to 12 Gbps !!!)