You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

...
byte[] data = new byte[packetlen*packets]; 
byte[] buffer = new byte[packetlen];
... 
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
//starts test
SendFPGAcommand(ref TE_USB_FX2_USBDevice, MB_Commands.FX22MB_REG0_START_RX, TIMEOUT_MS);
test_cnt = 0;
total_cnt = 0;
for (int i = 0; i < packets; i++)
{
     packetlen = PACKETLENGTH;
     Buffer.BlockCopy(data, total_cnt, buffer, 0, packetlen);
     TE_USB_FX2.TE_USB_FX2.TE_USB_FX2_SetData(ref TE_USB_FX2_USBDevice, ref buffer, ref packetlen, PI_EP8, TIMEOUT_MS,BUFFER_SIZE);
     total_cnt += packetlen;
}
SendFPGAcommand(ref TE_USB_FX2_USBDevice, MB_Commands.FX22MB_REG0_STOP, TIMEOUT_MS);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
...
  • No labels