ASIX AXM57104 User manual

1
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
Revision 1.00
August 10th, 2020
AXM57104
TSN Ethernet Switch PCIe Card
User Guide

2
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
Revision History
Revision
Date
Description
1.00
2020/08/10
Initial release

3
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
CONTENT
Revision History .................................................................................................................2
1. Introduction ....................................................................................................................8
2. Requirements................................................................................................................10
2-1 Operation System.................................................................................10
2-2 Platform................................................................................................10
2-3 Board ...................................................................................................10
3. Software Build and Installation ...................................................................................15
3-1 Board Supported Package ...................................................................15
3-2 AXM57104 Linux Driver .......................................................................15
3-3 AXM57104 Service...............................................................................18
3-4 AXM57104 Config Reg.........................................................................19
3-5 AXM57104 Qav Config.........................................................................19
3-6 AXM57104 Qbv Config.........................................................................19
3-7 AXM57104 Boot Up Service.................................................................20
3-8 AXM57104 Ptp4l ..................................................................................21
3-9 AXM57104 RSTP.................................................................................22
3-10 AXM57104 FPGA Upgrade................................................................23
3-11 Netconf...............................................................................................23
4. PTP4L ............................................................................................................................24
4-1 Example PTP Topology........................................................................24
4-2 Time Synchronization between AXM57104 devices.............................25
5. AXM57104 Config Reg..................................................................................................28
5-1 Functionality and Registers Map ..........................................................28
5-2 Read Value from Register....................................................................29
5-3 Write Value to Register ........................................................................30
6. AXM57104 Qbv Config .................................................................................................31
6-1 Read Configuration ..............................................................................31
6-2 Write Configuration...............................................................................32
6-3 Qbv JSON file ......................................................................................32
7. AXM57104 Qav Config..................................................................................................34
7-1 Read Configuration ..............................................................................34
7-2 Write Configuration...............................................................................34
7-3 Qav JSON file ......................................................................................35
8. NETCONF ......................................................................................................................36
8-1 Requirements.......................................................................................36

4
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
8-2 System Architecture.............................................................................36
8-3 Environment Setup...............................................................................37
8-3-1 Sysrepo............................................................................................................................................37
8-3-2 Netopeer2 toolset............................................................................................................................45
8-3-3 Datastore_Handler ..........................................................................................................................47
8-4 Execution .............................................................................................48
8-5 IETF-Interface File Description.............................................................53
9. RSTP..............................................................................................................................54
9-1 Status of Bridge or Port........................................................................55
9-2 Simple Test for RSTP...........................................................................56
10. FPGA Upgrade............................................................................................................61
10-1 Upgrade .............................................................................................61
11. User Web.....................................................................................................................63
11-1 Installation..........................................................................................63
11-2 Execution ...........................................................................................63
12. Setup TSN Demonstration .........................................................................................68
12-1 Environment Setup.............................................................................69
12-2 Demo Execution.................................................................................71

5
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
List of figure
Figure 2 - 1 ........................................................................................................................................................10
Figure 2 - 2 ........................................................................................................................................................11
Figure 2 - 3 ........................................................................................................................................................11
Figure 2 - 4 ........................................................................................................................................................12
Figure 2 - 5 ........................................................................................................................................................12
Figure 2 - 6 ........................................................................................................................................................13
Figure 2 - 7 ........................................................................................................................................................14
Figure 2 - 8 ........................................................................................................................................................14
Figure 3 - 1 ........................................................................................................................................................16
Figure 3 - 2 ........................................................................................................................................................17
Figure 3 - 3 ........................................................................................................................................................18
Figure 3 - 4 ........................................................................................................................................................20
Figure 3 - 5 ........................................................................................................................................................21
Figure 3 - 6 ........................................................................................................................................................22
Figure 4 - 1 ........................................................................................................................................................24
Figure 4 - 2 ........................................................................................................................................................25
Figure 4 - 3 ........................................................................................................................................................26
Figure 4 - 4 ........................................................................................................................................................26
Figure 4 - 5 ........................................................................................................................................................27
Figure 5 - 1 ........................................................................................................................................................28
Figure 5 - 2 ........................................................................................................................................................29
Figure 5 - 3 ........................................................................................................................................................29
Figure 5 - 4 ........................................................................................................................................................30
Figure 5 - 5 ........................................................................................................................................................30
Figure 6 - 1 ........................................................................................................................................................31
Figure 6 - 2 ........................................................................................................................................................31
Figure 6 - 3 ........................................................................................................................................................32
Figure 6 - 4 ........................................................................................................................................................32
Figure 6 - 5 ........................................................................................................................................................33
Figure 7 - 1 ........................................................................................................................................................34
Figure 7 - 2 ........................................................................................................................................................34
Figure 7 - 3 ........................................................................................................................................................34
Figure 7 - 4 ........................................................................................................................................................35
Figure 8 - 1 ........................................................................................................................................................36
Figure 8 - 2 ........................................................................................................................................................38
Figure 8 - 3 ........................................................................................................................................................38
Figure 8 - 4 ........................................................................................................................................................38
Figure 8 - 5 ........................................................................................................................................................39
Figure 8 - 6 ........................................................................................................................................................39
Figure 8 - 7 ........................................................................................................................................................40
Figure 8 - 8 ........................................................................................................................................................40
Figure 8 - 9 ........................................................................................................................................................41
Figure 8 - 10 ......................................................................................................................................................42
Figure 8 - 11 ......................................................................................................................................................43
Figure 8 - 12 ......................................................................................................................................................43
Figure 8 - 13 ......................................................................................................................................................44
Figure 8 - 14 ......................................................................................................................................................45
Figure 8 - 15 ......................................................................................................................................................45
Figure 8 - 16 ......................................................................................................................................................46

6
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
Figure 8 - 17 ......................................................................................................................................................46
Figure 8 - 18 ......................................................................................................................................................47
Figure 8 - 19 ......................................................................................................................................................48
Figure 8 - 20 ......................................................................................................................................................48
Figure 8 - 21 ......................................................................................................................................................49
Figure 8 - 22 ......................................................................................................................................................49
Figure 8 - 23 ......................................................................................................................................................50
Figure 8 - 24 ......................................................................................................................................................51
Figure 8 - 25 ......................................................................................................................................................51
Figure 8 - 26 ......................................................................................................................................................52
Figure 9 - 1 ........................................................................................................................................................54
Figure 9 - 2 ........................................................................................................................................................54
Figure 9 - 3 ........................................................................................................................................................55
Figure 9 - 4 ........................................................................................................................................................55
Figure 9 - 5 ........................................................................................................................................................56
Figure 9 - 6 ........................................................................................................................................................56
Figure 9 - 7 ........................................................................................................................................................57
Figure 9 - 8 ........................................................................................................................................................57
Figure 9 - 9 ........................................................................................................................................................58
Figure 9 - 10 ......................................................................................................................................................58
Figure 9 - 11 ......................................................................................................................................................59
Figure 9 - 12 ......................................................................................................................................................59
Figure 9 - 13 ......................................................................................................................................................60
Figure 9 - 14 ......................................................................................................................................................60
Figure 10 - 1 ......................................................................................................................................................61
Figure 10 - 2 ......................................................................................................................................................61
Figure 10 - 3 ......................................................................................................................................................62
Figure 10 - 4 ......................................................................................................................................................62
Figure 10 - 5 ......................................................................................................................................................62
Figure 10 - 6 ......................................................................................................................................................62
Figure 10 - 7 ......................................................................................................................................................62
Figure 12 - 1 ......................................................................................................................................................68
Figure 12 - 2 ......................................................................................................................................................70
Figure 12 - 3 ......................................................................................................................................................70
Figure 12 - 4 ......................................................................................................................................................71
Figure 12 - 5 ......................................................................................................................................................71
Figure 12 - 6 ......................................................................................................................................................72
Figure 12 - 7 ......................................................................................................................................................72
Figure 12 - 8 ......................................................................................................................................................73
Figure 12 - 9 ......................................................................................................................................................73
Figure 12 - 10 ....................................................................................................................................................74
Figure 12 - 11 ....................................................................................................................................................74
Figure 12 - 12 ....................................................................................................................................................75
Figure 12 - 13 ....................................................................................................................................................75
Figure 12 - 14 ....................................................................................................................................................76

7
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
List of Table
Table 1 - 1............................................................................................................................................................9
Table 8 - 1..........................................................................................................................................................53
Table 12 - 1........................................................................................................................................................68
Table 12 - 2........................................................................................................................................................68
Table 12 - 3........................................................................................................................................................69

8
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
1. Introduction
This document introduces software structure of ASIX AXM57104 TSN Network Switch PCIe Card, describes
how to build / setup each software components and provides a demonstration for ASIX AXM57104 PCIE
Switch and run it.
The AXM57104 is an x86 PC based PCIe network adapter with TSN feature. All related software developed
by 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.
Figure 1 - 1

9
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
All software components provided by ASIX as below table:
ITEM
DESCRIPTION
AXM57104 PCIe Network Driver
PCIe based network adapter driver
AXM57104 Service
Middleware of AXM57104
AXM57104 Config Reg
AXM57104 register configuration tool
AXM57104 Qbv Config
802.1 Qbv configuration tool
AXM57104 Qav Config
802.1 Qav configuration tool
AXM57104 PTP4L
802.1AS for bridge architecture
AXM57104 RSTP
Rapid spanning tree tool
AXM57104 FPGA Upgrade
FPGA code upgrading tool
Netconf
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

10
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
2. Requirements
Before starting to setup the environment, we should prepare some software, platform and board. Of course,
they are all running based on general desktop PC with Linux OS.
2-1 Operation System
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:

11
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
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

12
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
PIN definition of J2 field, the function is JTAG:
Figure 2 - 4
PIN definition of J3 field, the function is sync_io:
Figure 2 - 5

13
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
PIN definition of J4 field, the function is sync_io:
Figure 2 - 6
The LED field is reserved function for use.
The SW1 field is reserved function for use.
The SW2field 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.

14
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
Figure 2 - 7
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.

15
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
3. Software Build and Installation
3-1 Board Supported Package
We suggest to switch to root authority first before below steps.
# sudo su
Please copy the BSP “AXM57104_BSP_vXXX.tar.bz2”to a working directory in your system.
Note: Where BSP = Board Supported Package, XXX = version, like 100 for example.
Decompress and enter the BSP:
# tar –jxvf AXM57104_BSP_vXXX.tar.bz2
# cd AXM57104_BSP_vXXX
3-2 AXM57104 Linux Driver
Enter the driver folder, decompress the “AXM57104_Linux_Driver_vX.X.X_Source.tar.bz2”, enter the
package, clean old objects, build code and install driver.
Note: Where X.X.X = version, like 1.0.0 for example.
# 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

16
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
Figure 3 - 1
Check out network interface by typing command:
# ifconfig –a

17
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
Figure 3 - 2
The “enpXs0”is newer format of network interface name of Ubuntu, where Xindicates order of network
adapters. The “ethX”is original format of network interface name of Linux and the “ethX.Y”is format of DSA
port where Yindicates port number. The DSA driver is provided by Linux kernel so that the network interface
name of DSA ports follows original format.

18
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
3-3 AXM57104 Service
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)
◼SystemD library development files (Ubuntu package: libsystemd-dev)
◼SnmpD library development files (Ubuntu package: libsnmp-dev)
◼ZMQ library development files (Ubuntu package: libzmqpp-dev)
Make sure your system already connect to Internet, type below command in console:
# sudo apt-get update
# sudo apt-get install libsystemd-dev
# sudo apt-get install libsnmp-dev
# sudo apt-get install libzmqpp-dev
In the “./Application/AXM57104_Service”folder, decompress the “AXM57104_Service_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.
# cd Application
# tar -jxvf AXM57104_Service_vX.X.X.tar.bz2
# cd AXM57104_Service_vX.X.X
# make clean
# make all
# make install
Restart the system, type the command in console. Confirm the “axm57104_service”is running.
# systemctl status axm57104_service
Figure 3 - 3

19
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
3-4 AXM57104 Config Reg
In the “./Application/AXM57104_Config_Reg”folder, decompress the
“AXM57104_Config_Reg_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_Config_Reg_vX.X.X.tar.bz2
# cd AXM57104_Config_Reg_vX.X.X
# make clean
# make all
# make install
3-5 AXM57104 Qav Config
In the “./Application/AXM57104_Qav_Config”folder, decompress the
“AXM57104_Qav_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_Qav_Config_vX.X.X.tar.bz2
# cd AXM57104_Qav_Config_vX.X.X
# make clean
# make all
# make install
3-6 AXM57104 Qbv Config
In the “./Application/AXM57104_Qbv_Config”folder, decompress the
“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

20
Copyright (C) 2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AXM57104
TSN Ethernet Switch PCIe Card User Guide
Reference Design User Guide
3-7 AXM57104 Boot Up Service
Due to format of network interface name is different between main network interface and DSA port at above-
mentioned. 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”.
In the “./Application/BootUp”folder, type below command:
# make install
Restart the system. The service will execute a bash “AXM57104_Init.sh”in “/usr/local/bin”once while
system boot.
After system reboot, you can type command to check out all network interfaces again.
# ifconfig
The service already changed interface names of DSA port.
Figure 3 - 4
Table of contents