SiTCPに関する情報を共有するためのフォーラムです。この目的に反しない範囲で、質問、コメント、回答などご自由にご投稿ください。
This forum is for sharing information about SiTCP. Please do not hesitate to post any questions, comments or answers within the scope of this purpose.

How to measure transmission speed from SiTCP to PC

投稿日時 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

You can download from GitHub.


投稿日時 2012/9/21 19:42

jjteoh

Thank a lot!!! I will try that.

This discussion has been closed.