SPRACT8 September   2020 66AK2H06 , 66AK2H12 , 66AK2H14

 

  1.   Abstract
  2.   Trademarks
  3. 1Introduction
    1. 1.1 TI Processor SDK RTOS
    2. 1.2 TI NDK
    3. 1.3 66AK2H Device
    4. 1.4 FTP Offering in TI Processor SDK RTOS
  4. 2Hardware and Software
  5. 3Develop the FTP Server on K2H
    1. 3.1 Reference FTP Server Example
    2. 3.2 Create K2H FTP Server Example
    3. 3.3 Test K2H FTP Server Example
  6. 4Performance Tuning
    1. 4.1 Quick Code Check
      1. 4.1.1 FTP Transmitting Code Check
      2. 4.1.2 FTP Receiving Code Check
      3. 4.1.3 CCS Project Optimization
    2. 4.2 Increase the TCP Buffer Sizes
    3. 4.3 UIA CPU Load Instrumentation
    4. 4.4 What Can We Do on the PC Side?
      1. 4.4.1 TCP Window Scaling Check
      2. 4.4.2 Receive Interrupt Coalescing Check
    5. 4.5 What Else Can We Do on the K2H Side?
      1. 4.5.1 TCP/IP Checksum Offloading Check
      2. 4.5.2 NIMU Driver Efficiency Profiling
      3. 4.5.3 Receive Interrupt Coalescing
    6. 4.6 Final FTP Throughput Results
  7. 5Summary
  8. 6References

UIA CPU Load Instrumentation

Before moving deeper into network setting and NIMU driver tuning, it is good to understand if the throughput is limited by the CPU load, which is probably 100% busy? Such can be answered by using Unified Instrumentation Architecture (UIA) module for CPU load measurement. The major steps include:

GUID-20200819-CA0I-PPGQ-1ZTT-DJMHNDQWDS4C-low.png Figure 4-3 Adding UIA Module Into CCS Project
  1. Add the below configuration into the .cfg file. The SYSBIOS has a default CPU speed info which needs to be updated with the real CPU speed as well:
    BIOS.cpuFreq.lo = 1000000000;  /*1GHz CPU*/
    
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    LoggingSetup.loadLogging = true;
    LoggingSetup.loadLoggerSize = 32768;
    LoggingSetup.mainLoggerSize = 32768;
    LoggingSetup.sysbiosLoggerSize = 32768;
    LoggingSetup.sysbiosSemaphoreLogging = true;
    LoggingSetup.loadTaskLogging = true;
    LoggingSetup.loadSwiLogging = true;
    LoggingSetup.loadHwiLogging = true;
    LoggingSetup.enableTaskProfiler = true;
    LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_JTAGSTOPMODE;
  2. Enable the UIA measurement in CCS by selecting Tools → RTOS Analyzer → Load Analysis:
    GUID-20200819-CA0I-V7ZS-82J4-LQPKZDRPLSHM-low.png Figure 4-4 UIA Analysis Configuration
  3. Run the test.
  4. Halt CPU to collect the CPU load graph. Below is an example with Tx throughput 61MB/s followed by Rx throughput 59MB/s. The CPU load is 55% and 68%, respectively, so there is still CPU processing power left.
    GUID-20200819-CA0I-0M0Z-RJQ6-ZZTTPRJHL0FR-low.png Figure 4-5 A15 CPU Load Under FTP Transmitting and Receiving
  5. Note that the UIA module adds a little bit overhead as every context switch is being timestamped to get more accurate CPU load number. Remove the UIA code in the .cfg file once the measurement is performed.