AXM57104 TSN Ethernet Switch PCIe Card User Guide Revision History Reference Design User Guide Revision Date Description 1.00 2020/08/10 Initial release Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Linux open source. The system architecture as below figure: The software blocks with green color are provided by ASIX. The blocks with yellow color can be installed from open source. The hardware blocks with blue color are ASIX AXM57104 FPGA with TSN Ethernet Switch PCIe function.
Page 9
Network configuration tool Service Service for initial AXM57104 while boot AXM57104 Web Page Web base GUI for user ASIX Demo ASIX’s demonstration for Qbv / Qav Table 1 - 1 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Linux Ubuntu 16.04.5 (kernel version = 4.15.0) operation system with Distributed Switch Architecture (DSA) supporting. Figure 2 - 1 2-2 Platform Suggested hardware platform is Intel Corporation 200 series Platform Controller Hubs or later. 2-3 Board AXM57104 TSN Ethernet Switch PCIe Card: Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 11
AXM57104 TSN Ethernet Switch PCIe Card User Guide Reference Design User Guide Figure 2 - 2 PIN definition of J1 field, the function is sync_io: Figure 2 - 3 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 12
PIN definition of J2 field, the function is JTAG: Reference Design User Guide Figure 2 - 4 PIN definition of J3 field, the function is sync_io: Figure 2 - 5 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 13
The SW2 field is reserved function for use. The EEPROM component stores the MAC Address of upper layer management port (connect to port 4). Port definition and PPS: PPS Out = Pulse per second trigger out. Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 14
The definition of Ethernet port LED indicator as following: Figure 2 - 8 Note: The default PHY speed mode is 10/100/1000M auto-negotiation. The AXM57104 does not support PHY force speed mode (ex: force 100M or 1000M) temporarily. Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
# cd Driver # tar -jxvf AXM57104_Linux_Driver_vX.X.X_Source.tar.bz2 # cd AXM57104_Linux_Driver_vX.X.X_Source # make clean # make # make install Check out if driver loaded successfully by typing command: # lsmod Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 16
AXM57104 TSN Ethernet Switch PCIe Card User Guide Reference Design User Guide Figure 3 - 1 Check out network interface by typing command: # ifconfig –a Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 17
The “ethX” is original format of network interface name of Linux and the “ethX.Y” is format of DSA port where Y indicates port number. The DSA driver is provided by Linux kernel so that the network interface name of DSA ports follows original format. Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104 TSN Ethernet Switch PCIe Card User Guide 3-3 AXM57104 Service Reference Design User Guide Before building “AXM57104 Service”, “AXM5714 Config Reg”, “AXM57104 Qav Config” and “AXM57104 Qbv Config”, the system should contains below additional libraries: ◼ Pthread library (installed by default Ubuntu) ◼...
“AXM57104_Qbv_Config_vX.X.X.tar.bz2”, enter the package, clean old objects, build code and install the application. Note: Where X.X.X = version, like 1.0.0 for example. # tar -jxvf AXM57104_Qbv_Config_vX.X.X.tar.bz2 # cd AXM57104_Qbv_Config_vX.X.X # make clean # make all # make install Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
We try to make them to the same format (ex: enp3s0, enp3s0.0, enp3s0.1, enp3s0.2, enp3s0.3) so that we prepare an AXM57104 boot up service to rename the network interface name of DSA port. Before install this boot up service, you must install “AXM57104_Service” and “AXM57104_Config_Reg”.
Before install the Ptp4l, please confirm the configuration file “./configs/gPTP.conf”. Modify below high light with red square to correct DSA network interface name. For example: enp1s0.0 ~ enp1s0.3 change to enp4s0.0 ~ enp4s0.3 Figure 3 - 5 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
# sudo apt-get update # sudo apt-get install bridge-utils Now you can clean old objects, build code and install the application. # make clean # make all # make install Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Note: We do not install this program into the system. 3-11 Netconf Because the Netconf is a network management framework with many related software packages, so we describe it in chapter 8. Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Assume the device “SWITCH 1” is the best clock so that all other network devices in topology should do time synchronization and reference clock source from it. The “M” indicates the port role is master. The “S” indicates the port role is slave. Figure 4 - 1 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Reference Design User Guide If you already know how install Ptp4l by previous chapter. Here we try to setup two AXM57104 devices on two PCs. Let them do time synchronization through Ptp4l and observe PPS signal through Scope for confirm synchronization.
Page 26
TSN Ethernet Switch PCIe Card User Guide In PC1, we can see the below screen, the port 1 ~ port 4 of Ptp4l indicates port 0 ~ port 3 of AXM57104. The “selected best master clock 000ec6.fffe.003905” means that port0 of PC1 select outside entity with Reference Design User Guide mac address 00:0E:C6:00:39:05 as best master clock.
Page 27
The waveform with cyan-blue color (C3) is PC1 and the green color (C4) is PC2. We trigger the rising edge from C3 and the delta time of these 2 signals is “26 ns”. Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
# axm57104_config_reg # axm57104_config_reg -h It will show all operations: Figure 5 - 1 5-1 Functionality and Registers Map Type below command for list all functionalities: # axm57104_config_reg -l Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
We don’t need type functionality again. We just need type register map name. All read/write access needs to assign field ID by “-f SWITCH:”. # axm57104_config_reg –f SWITCH:core_version -r The red_high_light_1 indicates decimal value of this register. The red_high_light_2 indicates hex value of this register. Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Type below command is an example for write value into “mac_addr_lo”. Don’t forget add “0x” in front of hex value. # axm57104_config_reg –f SWITCH:mac_addr_lo –w 0x12345678 Figure 5 - 5 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Figure 6 - 1 6-1 Read Configuration Below command is an example for read Qbv configuration of port 0. # axm57104_qbv_config –c SWITCH –n 0 -r Figure 6 - 2 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Or you can refer to the Qbv JSON file of our demo in later chapter. Figure 6 - 3 6-3 Qbv JSON file Below figure is an example JSON file for Qbv setting. Figure 6 - 4 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 33
The high_light_9 “config_change” indicates to change the configuration. Below figure show the transmit behavior of each slot of this Qbv: O = Send X = Not send Figure 6 - 5 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
The reference JSON file you can refer to “configs/qav_file.json” in software package path. Or you can refer to the Qav JSON file of our demo in later chapter. Figure 7 - 3 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
The high_light_1 “cbs_enable” indicates to enable / disable the Qav for specified priority queue by command. The high_light_2 “idle_slope” indicates to set idle slope of this priority queue. The range of the value: 0 ~ 100. Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
To build sysrepo, there are many rely packages needs install first and check the packets version, such like: gcc-compiler, clang, cmake, cmocka, libyang, etc. Please following the below step to install the mention software packages. Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 38
The Cmake is the must import tool for Netconf framework, the Cmake require version >=2.8.12, please following below step to install: ~#: cd (Your BSP location)/Application/Netconf/RelyPackets/cmake ~#: ./Install.sh (you may need run it as root permission) Figure 8 - 4 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 39
POSIX regular expression API. please following below step to install: ~#: cd (Your BSP location)/Application/Netconf/RelyPackets/libpcre ~#: ./Install.sh (you may need run it as root permission) Figure 8 - 6 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 40
~#: mkdir build && cd build ~#: cmake -DUNIT_TESTING=ON -DCMAKE_INSTALL_PREFIX=/usr - DCMAKE_BUILD_TYPE=Debug .. ~#: make ~#: sudo make install ~#: sudo ldconfig Figure 8 - 8 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 41
~#: cd (Your BSP location)/Application/Netconf/RelyPackets/libyang-1.0-r2 ~#: mkdir build && cd build ~#: cmake .. ~#: make ~#: sudo make install Figure 8 - 9 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 42
~#: cd (Your BSP location)/Application/Netconf/RelyPackets/libnetconf2-0.12-r1 ~#: mkdir build && cd build ~#: cmake -DENABLE_TLS=ON -DENABLE_SSH=ON .. ~#: make ~#: sudo make install Figure 8 - 10 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 43
Protocol Buffer. Please following below step to install: ~#: cd (Your BSP location)/Application/Netconf/RelyPackets/protobuf-c ~#: ./autogen.sh ~#: ./configure ~#: make ~#: sudo make install Figure 8 - 12 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 44
~#: cd (Your BSP location)/Application/Netconf/RelyPackets/sysrepo-0.7.7 ~#: mkdir build && cd build ~#: cmake -DCMAKE_BUILD_TYPE=Release - DCMAKE_INSTALL_PREFIX:PATH=/usr .. -DGEN_LUA_BINDINGS=OFF ~#: make ~#: sudo make install Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
~#: mkdir build && cd build ~#: cmake .. ~#: make ~#: sudo make install ~#: ./model-install.sh (you may need run it as root permission) Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 46
~#: cd (Your BSP location)/Application/Netconf/RelyPackets/netopeer2-0.7-r1/cli ~#: mkdir build && cd build ~#: cmake .. ~#: make ~#: sudo make install Figure 8 - 17 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Final, we need import some configure files into sysrepo, please following below step ~#: cd (Your BSP location)/Application/Netconf/ ~#: ./Install_configure.sh (you may need run it as root permission) Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
We use Datastore_handler as a bridge to exchange data from sysrepo to AXM57104_service to configure the AXM57104 switch board, to achieve this, the example of below step show how to use Netconf-client get/set config file from sysrepo via Netconf-server, and when the config already modify, save it into sysrepo to...
Page 49
–source running –filter-xpath /ietf-interfaces:* --out > /home/axm57104/BSP/Application/Netconf/ietf-interfaces.xml The config file will save at “/home/axm57104/BSP/Application/Netconf” named “ietf-interfaces.xml”, so you can use any text editor to view it. Figure 8 - 22 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 50
If we want to edit config which save in remote server, for example ,edit ietf-interfaces config, you can following below step: Step 1: download config file get-config –source running –filter-xpath /ietf-interfaces:* --out > /home/axm57104/BSP/Application/Netconf/ietf-interfaces.xml Step 2: edit config file, for example change like below figure Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 51
--target running --config=/home/axm57104/BSP/Application/Netconf/ietf-interfaces.xml The new config parameter already saves into sysrepo via server and on server side, the datastore_handler get config parameter then pass it to AXM57104_service Figure 8 - 25 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 52
–source running –filter-xpath /ietf-interfaces:* --out Reference Design User Guide /home/axm57104/BSP/Application/Netconf/ietf-interfaces2.xml Now we can use text editor to view two XML files : ietf-interface.xml and ietf-interface2.xml Figure 8 - 26 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104 TSN Ethernet Switch PCIe Card User Guide 8-5 IETF-Interface File Description Reference Design User Guide Below table show relationship between related fields in the IETF-interface file and AXM57104 Qbv function. Fields in XML Range Description AXM57104 Register <name> PORT_0 ~ PORT_3...
9. RSTP Reference Design User Guide The most of AXM57104 RSTP software package is modified from open source mstpd. The daemon depends on the bridge Linux kernel code to gather basic info about bridge, such as bridge state, slave interfaces for the bridge and their state.
(switch port0 and port1) so that only shows “rstp0” and “rstp1”. Figure 9 - 3 Type below command for check out status of bridge 0: # mstpctl showbridge br0 Figure 9 - 4 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Figure 9 - 6 Type below command in PC1 and PC2, it can watch the command result of “mstpctl” every 1 second: # watch –n 1 mstpctl showportdetail br0 rstp0 rstp1 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 57
Figure 9 - 7 Below figure is PC2’ screen, the “rstp0” of SWITCH 2 enter “forwarding” state with “Designated” role and the “rstp1” is also disabled. Figure 9 - 8 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 58
(Upper layer application of OS send broadcast usually). We check out the PC1’ screen: The “rstp0” still “forwarding” state but “rstp1” becomes to “Alternate” role with “discarding” state. Figure 9 - 10 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 59
The opposite port in root switch is “discarding” state so that will not cause broadcast storm. Figure 9 - 11 We take off the port0 connection between SWITCH 1 and SWITCH 2 now: Figure 9 - 12 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 60
Reference Design User Guide Figure 9 - 13 Observe the PC2’ screen: The “rstp0” also be disabled and “rstp1” enter “forwarding” state with “Designated” role. Figure 9 - 14 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
TSN Ethernet Switch PCIe Card User Guide 10. FPGA Upgrade Reference Design User Guide The “axm57104_FPGA_upgrade” program is used for upgrade FPGA code of AXM57104 TSN Ethernet Switch PCIe Card. Current version supports update FPGA by local file only. The mechanism as following figure: Figure 10 - 1 User can execute the program in console and assign a local FPGA file with MCS format.
Page 62
Figure 10 - 6 Please power off your system, wait for 10 seconds and then power on your system. New FPGA code will be loaded while next booting. Figure 10 - 7 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
11. User Web Reference Design User Guide We provide web page as user interface for AXM57104 parameter configuration. This web page run through an open source web server named “lighttpd” and provides 3 basic configurations: IP configuration, Qbv configuration and Qav configuration.
Page 64
AXM57104 TSN Ethernet Switch PCIe Card User Guide Reference Design User Guide Type “admin” in User Name field and “asix” in Password field: Figure 11 - 2 You will see the main page as following: There are 2 buttons that “General Settings” and “Advanced Network”.
Page 65
The “Port” field let you select “PORT_0” ~ “PORT_3” for the Qbv configuration. The “Gate enabled” field let you enable / disable the Qbv configuration under this port. Figure 11 - 5 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 66
The right hand side of below figure shows you operative settings. If you have any changes, please don’t forget to click “Apply changes” at upper right corner. Figure 11 - 6 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 67
The “Idle slope” field is used for adjust shared bandwidth of this priority. The range of value is 0 ~ 100. If you have any changes, please don’t forget to click “Apply changes” at upper right corner. Figure 11 - 7 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
12. Setup TSN Demonstration Reference Design User Guide This chapter describes how to setup Time-aware Sensitivity Network demo environment for ASIX AXM57104 TSN Ethernet Switch PCIe Card and run it. The environment demonstrates 2 video streams and noise (broadcast) existed at the same network topology that network devices synchronized by 802.1AS at each segment.
The setup method of “AXM57104 Driver” ~ “AXM57104 Qav Config” of the Table 12-2 is already mentioned in chapter 3. User just needs to setup three AXM57104 Ethernet SWITCH PCIe Cards in three PCs. We don’t repeat them here and let’s talk about “Node.js” ~ “Pktgen” in PC1 / PC2 / PC3.
Page 70
After finish modification, type below command in PC1 / PC2 / PC3 for install related boot up service. # make install # reboot After PC1 / PC2 / PC3 boot up, go to “ASIX_Demo” under AXM57104 BSP working directory. Decompress the package “ASIX_demo_vX.X.X.tar.bz2” by type command in console: # tar –jxvf ASIX_demo_vX.X.X.tar.bz2 Enter the package folder: # cd ASIX_demo_vX.X.X...
That will let you connect to web server of PC2. Figure 12 - 4 You will see below screen, there are 3 buttons that named: “AXM57104 Negative Test”, “AXM57104 Time Aware Shaper Test” and “AXM57104 Credit Based Shaper Test”. Figure 12 - 5...
Page 72
Reference Design User Guide We enter the “AXM57104 Negative Test” page by click and will see below screen: In this page, we turn on the Qbv and prepare 2 slots. Generic packet and gPTP frame in slot 0, 2 videos and noise in slot 1.
Page 73
The noise effect Video 1, Video 2. Figure 12 - 8 Click “Go back” button and enter “AXM57104 Time Aware Shaper Test” page: In this page, we turn on the Qbv by default. There are two videos playing in this page.
Page 74
The noise just effect Video 2, and a few of gPTP. But don’t worry about gPTP, because it is not application of stream type. It belongs to long interval and few packets. So it has chance of 4 slots to send the packet. Figure 12 - 11 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 75
TSN Ethernet Switch PCIe Card User Guide Reference Design User Guide Click “Go back” button and enter “AXM57104 Credit Based Shaper Test” page: In this page, we turn on the Qav by default. There are two videos be playing. They should also be playing smoothly.
Page 76
Reference Design User Guide The Packet-Time diagram as following: Due to we inhibit the bandwidth of the Noise, the Noise effect the Video 2 slightly. Figure 12 - 14 Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Page 77
No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, for any purpose, without the express written permission of ASIX. ASIX may make changes to the product specifications and descriptions in this document at any time, without notice.
Page 78
TSN Ethernet Switch PCIe Card User Guide Reference Design User Guide 4F, No.8, Hsin Ann Rd., Hsinchu Science Park, Hsinchu, Taiwan, R.O.C. TEL: +886-3-5799500 FAX: +886-3-5799558 Email: support@asix.com.tw Web: http://www.asix.com.tw Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
Need help?
Do you have a question about the AXM57104 and is the answer not in the manual?
Questions and answers