레이블이 W7500인 게시물을 표시합니다. 모든 게시물 표시
레이블이 W7500인 게시물을 표시합니다. 모든 게시물 표시

2015년 7월 1일 수요일

WIZwiki_W7500

Overview

WIZwiki-W7500은 WIZnet의 W7500을 기반으로한다. “Internet Offload Platform for IoT”을 표방하는 W7500 chip은 ARM Cortex-M0에 TCP/IP Offload Engine(TOE)를 SoC한 one-Chip Soulution이다. W7500은 TOE를 장착하고 있기 때문에 ARM Corte-M0로 Software TCP/IP의 지원없이도 Internet에 간단히 접속할 수 있습니다.

또한, WIZwiki_W7500은 Arduino Shield와 pin Compatible로 Arduino Shield를 사용하는데 용이하다. 그리고 CMSIS-DAP USB를 지원하여 ARM mbed Web-IDE에서 Programming과 Virtual-Serial Port를 지원하며, Keil/IAR의 IDE를 과는 Programming물론 Debugging이 가능하다.

Block Diagram

WIZwiki_W7500_block

WIZwiki_W7500은 그림과 같이 크게 W7500, CMSIS-DAP, Ethernet port(RJ45)+PHY 3부분으로 구성된다.

  • W7500

     ARM® Cortex™-M0 Core기반에 다수의 peripherals포함하고 있다.  다른 Vendor의 Microcontroller들과 차이점은 peripherals 중 MAC laye가 포함된 TCP/IP Offload Engine(TOE)를 탑재하고 있다는 것이다. 
    
  • CMSIS-DAP

      간단하게 Debugger Interface로 이해하면 된다. LPC11u35칩에 W7500의 program algorithm 내장한 CMSIS-DAP는 개발용 PC와 USB Cable를 통해 연결된다. 연결된 PC쪽에서는 WIZwiki_W7500 Board를 USB Drive인식 하도록 되어 있다. 물론 이를 위에 아래에 "How to write the firmware"참고하여 CMSIS-DAP용 Driver를 PC에 인스톨해야한다. USB Driver에 Bin을 Copy하는 식으로 Firmware의 업데이트가 가능하다. 또한 CMSIS-DAP은 Virtual COM를 지원하기 때문에 USB-to-Serial Port없이 CMSIS-DAP port로 WIZwiki_W7500의  UART Output/Input를 Control할 수 있다. 
     CMSIS-DAP의 Algorithm의 변경은 LPC11u35칩의 Firmware를 update하면 되며 아래의 "How to write the firmware to CMSIS-DAP"를 참고한다. 
    
  • RJ45+PHY

      이 부분은 Ethernet PHY Layer로 W7500은 PHY를 내장하지 않기 때문에 Internet에 연결하기 위해 External PHY가 반드시 필요하다. 
    

Features

  • WIZnet W7500
  • ARM® Cortex™-M0 Core upto 48MHz
  • 128KB Flash memory
  • 16KB to 48 KB SRAM
  • Hardwired TCP/IP Core (8 Sockets, MII: Medium-Independent Interface)
  • 12-bit, 8ch ADC
  • 53 I/Os
  • 1ch Watchdog, 4ch Timers and 8ch PWM
  • 3ch UART
  • 2ch SPI
  • 2ch I2C
  • Arduino form-factor
  • Compatible with a wide range of commercially available shields
  • CMSIS-DAP interface firmware
  • Built-in USB drag ‘n’ drop FLASH programmer
  • USB Virtual COM port for serial terminal
    • CMSIS-DAP interface for programming and debugging from offline tools

Pinout

pin map

Resources on ARMmbed

ARMmbed WIZnetInterface

WIZnetInterface

WIZnet Ethernet Interface using Hardware TCP/IP chip, W5500 and TCP/IP Offload Engine, W7500.
Users » embeddist » Code » WIZnetInterface

WIZnetInterface ?

  • EthernetInterface in ARM mbed
    mbed.org는 Handbook>>Ethernet에 ARM mbed platform들이 Internet에 Connecting하기 위한 Network Library인 EthernetInterface를 제공하고 있다. EthernetInterface는 TCP/IP Software stack으로 lwIP을 채택하고 있다.
  • WIZnet TCP/IP Offload Engine
    아래의 그림과 같이 TOE는 TCP이하의 Network Layer가 Hardware적으로 설계되어 있어 Operating System과 Microcontroller의 Networking을 위한 리소스와 메모리를 최소화 해준다. 따라서, 리소스가 제한되는 Low-end IoT Device에서 TOE의 기능이 탑재한 MCU혹은 TOE를 채택한 System은 보다 Networking 이외의 기능들에 최적화 시킬 수 있다.
    TCP/IP Offload Engine
  • 과연, ARM mbed에서 이러한 TOE를 적용한 Platform혹은 Components 있나?
    있습니다. 있고요.
    Platform으로는 W7500이 적용된 WIZwiki_W7500이 있습니다.
    Component로는 W5500이 적용된 W5500 Ethernet Shield가 있습니다. 둘다 made in 대한민국!
  • 그럼, 이렇게 TOE가 적용된 Platform과 Component들도 EthernetInterface를 사용하나?
    아니요. TOE가 적용된 Platform과 Component는 WIZnetInterface를 사용해야 합니다.
    WIZnetInterface
    WIZnetInterface는 위의 그림처러 TOE Driver를 mbed Ethernet Interface기반으로 포팅하였습니다. 따라서, ARM mbed에서 EthernetInterface를 적용한 program을 WIZnetInterface로 replace하는 것이 가능합니다.

What is new?

  • W7500과 W5500을 어떻게 선택하나
    eth_arch.h을 추가하여 Web-IDE에서 platform을 선택하면 Target Platform에 따라 자동적으로 W7500혹은 W5500을 적용할 수 있다. W5500과 W7500이 통합된 Library이지만 둘 중 하나를 선택하기 위해 여분의 Configuration이 필요없다.
    #if defined(TARGET_WIZwiki_W7500)
    #include "W7500x_toe.h"
    #define __DEF_USED_IC101AG__  //For using IC+101AG@WIZwiki-W7500
    #else
    #include "W5500.h"            // W5500 Ethernet Shield 
    //#define USE_WIZ550IO_MAC    // WIZ550io; using the MAC address
    #endif
    
  • PHY링크를 어떻게 설정하고 확인하나
    Ethernet PHY는 아래의 그림과 같이 RJ45의 Link LED와 Active LED를 이용하여 육안으로 확인이 가능하다. Embedded system에서는 MCU의 GPIO에 Link와 Active Signal을 연결하거나 MDIO Interface를 확인 할 수 있다.
    PHY link
    (http://www.avtech.com/Support/modules/KB/Image/Image/166_RA_LEDs/Ethernet_LEDs_NormalOperation_BothTypes.gif)
    EthernetInterface에서 이러한 기능을 위해 link()와 set_link()를 제공하고 WIZnetInterface에서도 이 API를 제공하고 있다.
    • link()
      PHY링크를 확인할 수 있는 함수 return값이 True이면 Link이고, Fail이면 Link-Fail이다
        * Check if an ethernet link is pressent or not.
        *
        * @returns true if successful
        */
        bool link(int wait_time_ms= 3*1000);
      
    • set_link()
      PHY의 Duplex/SPEED를 설정할 수 있는 함수이다.
       /*
        * Sets the speed and duplex parameters of an ethernet link.
        *
        * @returns true if successful
        */
        void set_link(PHYMode phymode);
      
  • Networking에 필수적으로 필요한 DHCP와 DNS lib를 포함
    dhcpdns

How to import

  • import and update
    • WIZnetInterface Library의 import를 위해 import하고자 하는 program에서 오른쪽 클릭 후 ‘From Import Wizard’를 클릭 한다.
      import_WIZnetInterface
    • import wizard의 검색 창에서 ‘WIZnetInterfae”를 적고 ‘Search’ button을 클릭한다. 검색 결과 창에서 ‘WIZnetInterface’을 선택한 후 거침없이 ‘Import’ button을 클릭!
      search_WIZnetInterface
    • Import Library창이 뜨면 당황하지 않고 각항목을 알맞게 ‘Import name’ 과 ‘Target path’설정 한다. 또한 최신의 Library를 import하기 위해 ‘update’ check box를 반드시 체크한다. 그리고 ‘Import’ Button을 클릭하여 WIZnetInteface의 Import를 완료한다.
      importandupdate_WIZnetInteface

Where is Clone repository

파일 버젼관린 시스템 Git과 같은 Mecurial를 ARM mbed에서 적용하고 있다.
아래의 명령어를 이용하여 WIZnetInterface를 Clone할 수 있으며 hg명령어를 이용하여 버젼관리를 할 수 있다.
hg clone https://embeddist@developer.mbed.org/users/embeddist/code/WIZnetInterface/
또한, WIZnetInterface는 ARM mbed의 Team WIZnet에서 관리하고 있으므로 https://developer.mbed.org/teams/WIZnet/를 방문하여 다운 및 다수의 예제를 활용할 수 있다.

How to use

  • make main.cpp
    • WIZwiki_W7500
      #define _DHCP_
      EthernetInterface eth;  /*1. Creat eth object from EthernetInteface class*/
      
      main()
      {
        /*2. MAC address as arr in HEX-Type*/
        uint8_t mac_addr[6] = {0x00, 0x08, 0xDC, 0x01, 0x02, 0x03};  
      
        /*3. Select DHCP or Fixed IP address*/
      #ifdef _DHCP_
        /*3.1 Set  MAC address, Initialize the interface with DHCP*/
        eth.init(mac_addr); 
      #else   
        /*3.2 Set  MAC address and Set MAC, IP, Gatway address and Subnet Mask as String-Type*/
        eth.init(mac_addr, "192.168.77.34", "255.255.255.0", "192.168.77.1"); 
      #endif
      
        /*4. Check Ethernet Link-Done */
        printf("Check Ethernet Link\r\n");
        if(eth.link() == true) { printf("- Ethernet PHY Link-Done \r\n"); }
        else {printf("- Ethernet PHY Link- Fail\r\n");}
      
        /*5. Set IP addresses ,start DHCP if needed  */
        if( eth.connect() == ture )
        {
            printf("Connected, IP: %s\n\r", eth.getIPAddress());
            printf("MASK: %s\n\r", eth.getNetworkMask());
            printf("GW: %s\n\r",eth.getGateway());
        }
        else
        {
            printf("eth.connect fail\n\r");
        }
        ...
      
        /* Your application 
           Visit for examples - https://developer.mbed.org/teams/WIZnet/
        */
      
      }
      
    • W5500 Ethernet Shield
      #define _DHCP_
      /* 0. Set SPI Interface with SPI API*/
      SPI spi(D11, D12, D13);                  // mosi, miso, sclk
      /*1. Creat eth object from EthernetInteface class*/
      EthernetInterface eth(&spi, D10, D9);    // spi, cs, reset
      
      main()
      {
        /*2. MAC address as arr in HEX-Type*/
        uint8_t mac_addr[6] = {0x00, 0x08, 0xDC, 0x01, 0x02, 0x03};  
      
         /*3. Select DHCP or Fixed IP address*/
      #ifdef _DHCP_
        /*3.1 Set  MAC address, Initialize the interface with DHCP*/
        eth.init(mac_addr); 
      #else
        /*3.2 Set  MAC address and Set MAC, IP, Gatway address and Subnet Mask as String-Type */
        eth.init(mac_addr, "192.168.77.34", "255.255.255.0", "192.168.77.1"); 
      #endif
      
        /*3. Check Ethernet Link-Done */
        printf("Check Ethernet Link\r\n");
        if(eth.link() == true) { printf("- Ethernet PHY Link-Done \r\n"); }
        else {printf("- Ethernet PHY Link- Fail\r\n");}
      
        /*4. Set IP addresses ,start DHCP if needed  */
        if( eth.connect() == ture )
        {
            printf("Connected, IP: %s\n\r", eth.getIPAddress());
            printf("MASK: %s\n\r", eth.getNetworkMask());
            printf("GW: %s\n\r",eth.getGateway());
        }
        else
        {
            printf("eth.connect fail\n\r");
        }
        ...
      
        /* Your application 
           Visit for examples - https://developer.mbed.org/teams/WIZnet/
        */
      
      }
      

WIZnetInterface APIs for mbed Ethenret Interface

Ethernet 기반의 Networking을 위해 *Ethenret Interface Library를 ARM mbed에서 제공하고 있으며, 이 Library는 크게 4가지 TCP/IP Protocol layer, Ethernet, EthernetInterface and Socket로 구성되있다.
Internet에 연결하기 위해 EthernetInterface의 각각의 Layer는 APIs들로 구성되어 있다. 각각의 API는 아래의 경로에서 확인할 수 있다.

WIZnetInterface Implementation base on mbed Ethernet Interface

  • EthernetInterface- EthernetInterface Class
    Type Func. Descriptions WIZnetInterface
    static int init () Initialize the interface with DHCP. O
    static int init (const char ip, const char mask, const char *gateway) Initialize the interface with a static IP address. O
    static int connect (unsigned int timeout_ms=15000) Connect Bring the interface up, start DHCP if needed. O
    static int disconnect () Disconnect Bring the interface down. no use
    static char* getMACAddress () Get the MAC address of your Ethernet interface. O
    static char* getIPAddress () Get the IP address of your Ethernet interface. O
    static char* getGateway () Get the Gateway address of your Ethernet interface. O
    static char* getNetworkMask () Get the Network mask of your Ethernet interface. O
    void EthernetInterface (PinName mosi, PinName miso, PinName sclk, PinName cs, PinName reset) Initialize SPI SPI pins to user for SPI interface and Reset pin for W5500 0 (for W5500)
    void EthernetInterface (SPI* spi, PinName cs, PinName reset) Initialize SPI SPI pins to user for SPI interface and Reset pin for W5500 O (for W5500)
  • Socket - TCPSocketServer Class
    Type Func. Descriptions WIZnetInterface
    TCPSocketServer () Instantiate a TCP Server. O
    int bind (int port) Bind a socket to a specific port. O
    int listen (int backlog=1) Start listening for incoming connections. O
    int accept ( TCPSocketConnection &connection) Accept a new connection. O
    void set_blocking (bool blocking, unsigned int timeout=1500) Set blocking or non-blocking mode of the socket and a timeout on blocking socket operations. O
    int set_option (int level, int optname, const void *optval, socklen_t optlen) Set socket options. no use
    int get_option (int level, int optname, void optval, socklen_t optlen) Get socket options. no use
    int close (bool shutdown=true) Get socket options. O
  • Socket - TCPSocketConnection Class
    Type Func. Descriptions WIZnetInterface
    TCPSocketConnection () TCP socket connection. O
    int connect (const char *host, const int port) Connects this TCP socket to the server. O
    bool is_connected (void) Check if the socket is connected. O
    int send (char *data, int length) Send data to the remote host. O
    int send_all (char *data, int length) Send all the data to the remote host. O
    int receive (char *data, int length) Receive data from the remote host. O
    int receive_all (char *data, int length) Receive all the data from the remote host. O
    void set_blocking (bool blocking, unsigned int timeout=1500) Set blocking or non-blocking mode of the socket and a timeout on blocking socket operations. O
    int set_option (int level, int optname, const void *optval, socklen_t optlen) Set socket options. no use
    int get_option (int level, int optname, void optval, socklen_t optlen) Get socket options. no use
    int close (bool shutdown=true) Close the socket. O
    void reset_address (void) Reset the address of this endpoint. O
    int set_address (const char *host, const int port) Set the address of this endpoint. O
    char* get_address (void) Get the IP address of this endpoint. O
    int get_port (void) Get the port of this endpoint. O
  • etnerhet_api - ethernet_api Class
    Type Func. Descriptions WIZnetInterface
    Ethernet () Initialise the ethernet interface. no use
    virtual ~Ethernet () Powers the hardware down. no use
    int write (const char *data, int size) Writes into an outgoing ethernet packet. no use
    int send () Send an outgoing ethernet packet. no use
    int receive () Recevies an arrived ethernet packet. no use
    int read (const char *data, int size) Read from an recevied ethernet packet. no use
    void address (char *mac) Gives the ethernet address of the mbed. no use
    int link() Returns if an ethernet link is pressent or not. O
    void set_link(Mode mode) Sets the speed and duplex parameters of an ethernet link. O

2015년 5월 31일 일요일

Network performance of SoC with TCP/IP Offload engine, W7500, for Internet of Things

test.html

Network performance of SoC with TCP/IP Offload engine, W7500, for Internet of Things

We have measured TCP throughput of W7500 depending on RX buffer size, Main bus clock and DMA and
used HW, SW and Toos as belows,

What is SoC with TCP/IP TOE, W7500

Iperf for W7500
The 7500 chip is the one-chip solution which integrates an ARM Cortex-M0, 128KB Flash and hardwired TCP/IP TOE which is a market-proven hardwired TCP/IP stack with an integrated Ethernet. Using TOE allows users to implement the Ethernet application by adding the simple socket program. It’s faster and easier than using any other Embedded Ethernet solutions, especially internet of things. In addition, TOE can provide high and stable network performance on target system.
Iperf for W7500
Traditional system could be used operation system for TCP/IP stack. It means more memory and calcurate resources in IoT system which is limited resources extremely. TOE allows to offload the processing of TCP/IP protocols from the host microcontroller,
In TCP/IP protocol stack of W7500, there are multiple protocols as like,
  • Supports Hardwired TCP/IP Protocols : TCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE
  • Supports 8 independent sockets simultaneously
  • Supports Power down mode
  • Supports Wake on LAN over UDP

Hardware

  • W7500, SoC with TOE, for IOT
    wizwiki_W7500
    • ARM Cortex-M0
      • 48MHz maximum frequency
    • Hardwired TCP/IP Core
      • 8 Sockets
      • SRAM for socket: 32 KB
    • Memories
      • Flash: 128 KB
        • Large flexible-size SRAM buffer for various User Application
        • ROM for boot code: 6 KB
    • ADC : 12bit, 8ch, 1Msps
    • 6-channel DMA
    • GPIOs
    • Timer/PWM : 1 Watchdog , 4 Timers, 8 PWMs
    • Communication Interfaces: 3 UARTs, 2 SPIs, 2 I2Cs
    • Crypto : 1 RNG (Random Number Generator)
    • Package : 64 TQFP (7x7 mm)
  • WIZwiki_W7500
    wizwiki_W7500
    • WIZnet W7500
    • 32-bit ARM Cortex-M0
    • 128KB Flash / 48 SRAM
    • Hardware TCP/IP coe (WIZnet TCP/IP Engine)
    • CMSIS-DAP
    • SWD Con.
    • WIZwiki-W7500 feature
    • Arduino Pin compatible
    • ISP / SD Slot / REG LED
    • Ethernet PHY

Software: TCP recv only

  • How to config. Clock
    • W7500RM - 10.4.3 PLL frequency calculating register (PLL_FCR)
      • Address:0x4100_1014
      • Reset value : 0x0005_0200=> 20MHz
        bits 31-22 21-16 15-14 13-8 7-2 1-0
        Desc. RSVD M RSVD N RSVD OD
        These bits are written by S/W to set frequency of PLL output.
        PLL output frequency FOUT is calculated by the following equations:
        FOUT = FIN x M / N x 1 / OD
        Where:
        M = M[5] x 32 + M[4] x 16 + M[3] x 8 + M[2] x 4 + M[1] x 2 + M[0] x 1 (2 ~ 63)
        N = N[5] x 32 + N[4] x 16 + N[3] x 8 + N[2] x 4 + N[1] x 2 + N[0] x 1 (1 ~ 63)
        OD = 2 (2 x OD[1]) x 2 (1 x OD[0])
    • Psedo-code for PLL_FCR
      // main.c 
      /* External Clock */
      CRG_PLL_InputFrequencySelect(CRG_OCLK);
      //*(volatile uint32_t *)(0x41001014) = 0x000C0200; // 48MHz
      //*(volatile uint32_t *)(0x41001014) = 0x000B0200; // 44MHz
      //*(volatile uint32_t *)(0x41001014) = 0x000A0200; // 40MHz
      //*(volatile uint32_t *)(0x41001014) = 0x00090200; // 36MHz
      //*(volatile uint32_t *)(0x41001014) = 0x00080200; // 32MHz
      //*(volatile uint32_t *)(0x41001014) = 0x00070200; // 28MHz
      //*(volatile uint32_t *)(0x41001014) = 0x00060200; // 24MHzS
      //*(volatile uint32_t *)(0x41001014) = 0x00050200; // 20MHz, Default
      //*(volatile uint32_t *)(0x41001014) = 0x00040200; // 16MHz
      //*(volatile uint32_t *)(0x41001014) = 0x00030200; // 12MHz
      *(volatile uint32_t *)(0x41001014) = 0x00020200; //  8MHz
      
  • How to config. RX memory buffer
    • Iperf test Firmware
      • Source Code : https://github.com/embeddist/W7500/tree/W7500_DMA
      • W7500/W7500x_Library_Examples/Projects/Peripheral_Examples/WZTOE/IperfTest_DMA/main.c
      • TCP only Recv function in iperf.c
        int32_t recvonly_tcps(uint8_t sn, uint8_t* buf, uint16_t port)
        {
             int32_t ret;
             uint16_t size = 0;
             int32_t i;
             switch(getSn_SR(sn))
             {
                case SOCK_ESTABLISHED :
                   if(getSn_IR(sn) & Sn_IR_CON)
                   {
                      setSn_IR(sn,Sn_IR_CON);
                   }
                   // Don't need to check SOCKERR_BUSY because it doesn't not occur.
                   if((size = getSn_RX_RSR(sn)) > 0) 
                   {
                      if(size > DATA_BUF_SIZE) size = DATA_BUF_SIZE;
                      printf("---------------size :%d\r\n", size);
                     ret = recv(sn, buf, size);                 
                   }
                   break;
                case SOCK_CLOSE_WAIT :
                   if( (ret = listen(sn)) != SOCK_OK) return ret;
                   break;
                case SOCK_CLOSED:
                   if((ret = socket(sn, Sn_MR_TCP, port, Sn_MR_ND)) != sn) return ret;
                   break;
                default:
                   break;
             }
             return 1;
        }
        
    • Sn_RXBUF_SIZE (Socket n RX Buffer Size Register)
        Sn_RXBUF_SIZE configures the RX Buffer size of Socket n. Socket n RX Buffer size can be configured with 1,2,4,8, and 16 Kbytes. If a different size is configured, the data cannot be normally received from a peer.
      
      Value (dec) 0 1 2 4 8 16
      Buffer size 0KB 1KB 2KB 4KB 8KB 16KB
    • Use wizchip_init() for Setting Sn_RXBUF_SIZE
        // main.c 
        /* set Sn_RXBUF_SIZE and Sn_RXBUF_SIZE as 8KB */
        uint8_t tx_size[8] = { 8, 0, 0, 0, 0, 0, 0, 0 };
        uint8_t rx_size[8] = { 8, 0, 0, 0, 0, 0, 0, 0 };
      
        ...
      
        /* Set Network Configuration */
        wizchip_init(tx_size, rx_size);
      
    • Use API for Setting Sn_RXBUF_SIZE
        uint8 socket_num = 0;
        uint8 rx_buffer_size = 4; // set 4KB
        setSn_RXBUF_SIZE(socket_num, rx_buffer_size);
      
  • How to use Direct Memory Access (DMA)
    Direct memory access (DMA) is used in order to provide high-speed data transfer between peripherals and memory as well as memory to memory. The DMA controller has up to 6 channels in total, each dedicated to managing memory access requests from one or more peripherals. For more details, refer to “PrimeCell® μDMA Controller (PL230)” from the Technical Reference Manual.
    • WZ_TOE-to-memory transfer (software request only)
    • Initialization by using API
        //main.c
        /* Init. uDMA */
        dma_data_struct_init();
        dma_init();
      
    • DMA memory copy in W7500x_dma.c
        /* DMA memory copy */
        uint32_t chnl_num  = 5 ;          //DMA Channel number
        unsigned int src = 0xXXXX_XXXX;   // Source Address
        unsigned int dest = 0xDDDD_DDDD ; // Destination Address
        unsigned int size = 0;            // byte operation
        unsigned int num = 1024;          // data length
        void dma_memory_copy (chnl_num, src, dest, size, num)
      
    • Read/Write DMA functions for WZ_TOE
        //W7500x_wztoe.c
        #define _DEF_ACCESS_DMA_BUF_
        #ifdef _DEF_ACCESS_DMA_BUF_
        #include "W7500x_dma.h"
        #define MAX_TRANSNUM  1024
        void WIZCHIP_READ_DMA (uint32_t BaseAddr, uint16_t ptr, uint8_t* pBuf, uint16_t len)
        {
            /* call void dma_memory_copy () */
        }
        void WIZCHIP_WRITE_DMA(uint32_t BaseAddr, uint16_t ptr, uint8_t* pBuf, uint16_t len)
        {
            /* call void dma_memory_copy () */
        }
        ...
      

How to use Bandwidth Measurement Tool: Iperf

Iperf is a tool to measure maximum TCP bandwidth, allowing the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, datagram loss.
  • https://iperf.fr/
    # ex.) host IP(192.168.77.9):port[5000], display format is Mbit/sec, interval 1 sec.
    >iperf.exe -c 192.168.77.9 -p 5000 -f m -i 1
    
    • -c : —client host, -c will connect to the host specified.
    • -p : —port #, the server port for the server to listen.
    • -f : —format [], ‘m’ = Mbit/sec
    • -i : —interval #, Sets the interval time in seconds between periodic bandwidth through performance
  • Serial terminal for wizwiki_W7500 monitoring
    PHY is linked. 
    MAC ADDRESS : 00:08:DC:01:02:03
    IP ADDRESS : 192.168.077.009
    GW ADDRESS : 192.168.077.001
    SN MASK: 255.255.255.000
    TEST- START 
    0:Listen, TCP server loopback, port [5000]
    0:Connected - 192.168.77.223 : 1110 // <-- dispaly after TCP_Established from Iperf
    
  • Excute Iperp on Command Prompt
    Iperf for W7500

Network performances

Analysis of this improvement shows
  • that the total improvement is due to increasing RX buffer.
  • that the total improvement is due to increasing AHB bus Clock.
  • that 200% of the total improvement is due to using DMA.

Network performance according to RX Buffer size

  • Fig. TOE performance according to RX buffer size ( w/o DMA@48MHz)
    TOE performance according to RX buffer size
  • Fig. TOE performance according to to RX buffer size (w/ DMA@20MHz)
    TOE performance according to to RX buffer siz

Network performancd according to AHB bus clock

  • Fig. TOE performance according to AHB bus clock (w/o DMA, RX Buffer:8KB)
    TOE performance according to AHB bus clock
  • Fig. TOE performance according to AHB bus clock (w/o DMA, RX Buffer:8KB)
    TOE performance according to AHB bus clock