This combination is WRONG because

  • data throughput is halved with regard to the correct combination and
  • the test will fail because it is not the way it is supposed to be used.


int RX_PACKET_LEN = 51200;//102400 for TE0320 and TE0630 modules;
int packetlen = RX_PACKET_LEN;
unsigned int packets = 600; //1200 for TE0320 and TE0630 modules;
unsigned long TIMEOUT = 1000;
byte * data;
byte * data_temp = NULL;
unsigned int total_cnt = 0;
unsigned int errors = 0;
double TheElapsedTime = 0;
PI_PipeNumber PipeNo = PI_EP6;
data = new byte [RX_PACKET_LEN*packets]; //allocate memory 
ResetFX2FifoStatus(USBDeviceList);
bool bResultDataWrite = false;
byte PipeNoHex = 0x00;
unsigned int XferSizeRead=0;
unsigned int DeviceDriverBufferSize = 102400;
CCyBulkEndPoint *BulkInEP = NULL;
TE_USB_FX2_SetData_InstanceDriverBuffer (USBDeviceList, &BulkInEP, PipeNo, TIMEOUT, DeviceDriverBufferSize);
//StopWatch timer starts
ElapsedTime.Start(); 
total_cnt = 0;
for (unsigned int i = 0; i < packets; i++)
{
     long packetlen = RX_PACKET_LEN;
     data_temp = &data[total_cnt];

     //Read USB data test starts
     SendFPGAcommand(USBDeviceList, FX22MB_REG0_START_TX);
     if (TE_USB_FX2_GetData(&BulkInEP, data_temp, packetlen))
     {
         cout << "ERROR" << endl;
         break;
     }

	//Read USB data test ends
	SendFPGAcommand(USBDeviceList, FX22MB_REG0_STOP);
	total_cnt += packetlen;
}
//StopWatch timer stops
TheElapsedTime = ElapsedTime.Stop(false);
 

 

  • No labels