# How to measure transmission speed from SiTCP to PC

**URL:** <https://sitcp.bbtech.co.jp/t/topic/23>\
**Category:** SiTCPに関する質問など / Questions\
**Created:** [2019 年 5 月 20 日午前 5:22 UTC](https://sitcp.bbtech.co.jp/t/topic/23 "2019-05-20T05:22:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbtech](https://sitcp.bbtech.co.jp/letter_avatar_proxy/v4/letter/b/4da419/32.png) [@bbtech](https://sitcp.bbtech.co.jp/u/bbtech)\
**Post date:** [2019 年 5 月 20 日午前 5:22 UTC](https://sitcp.bbtech.co.jp/t/topic/23/1 "2019-05-20T05:22:58Z")

</div>

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

```auto
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.](https://github.com/BeeBeansTechnologies)

* * *

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

### jjteoh

Thank a lot!!! I will try that.
