投稿日時 2012/9/16 16:40
jjteoh
I’m trying to measure transmission speed from SiTCP to PC but I just can’t get it right. (I’m using 100Base-T / 100Mb/s version)
My method is as follow:
firmware:
I set USR_TX_WD to 8’b1111111.
then I set USR_TX_WE to high every 12.5 MHz.
software:
I prepare a loop of 100000.
I sample the data and downloading time from 80000th loop to 90000th loop.
as in:
for( n_loop)
{
if( loop >n && loop < N)
{
<<<<--get start_time
select( ; ; ;);
<<<<--get end_time
data_len = recv( ; ; ;);
total_data += data_len;
total_downloading_time += start_time-end_time;
}
}
avg rate = total data/total downloading time.
I always get rate <100Mb/s with this method. And if I measure the time between “recv()”, I get rate >100Mb/s.
How could that be? If anyone know how to do it, please kindly help me. Thanks in advance.
投稿日時 2012/9/18 14:29
bbtech
投稿日時 2012/9/21 19:42
jjteoh
Thank a lot!!! I will try that.