AN 957: Time-Sensitive Networking for Drive-on-Chip Design Example

ID 683707
Date 10/30/2021
Public
Document Table of Contents

7. TSN Configuration Example

The TSN configuration relates to the application that the Cyclone V SoC Development board runs. For more details about PTP, Qbv, TSN, VLAN.; refer to the TTTech TSN IP Reference Design for DE-IP-SCV user manual

The OPC UA Publisher is using the multicast MAC address 01-00-5E-00-00-02 with the VLAN tag 3 and PCP (Priority Code Point) 7. Therefore, configure the VLAN as:

>> ssh root@192.168.1.20 (default IP address Development board)
>> ip link add link sw0ep name myvlan type vlan id 3 (add VLAN id 3) 
>> ip link set dev myvlan up (set the VLAN up) 
>> bridge vlan add vid 3 dev sw0p1 (add VLAN to internal port) 
>> bridge vlan add vid 3 dev sw0p2 (add VLAN to external port 1) 
>> bridge vlan add vid 3 dev sw0p3 (optional if second port is used) 

If the Publisher (outgoing traffic) requires TSN configuration, add a Qbv schedule. For example:

>> tsntool st wrcl sw0p2 /home/root/scripts/qbv.conf(write the schedule, port 1) 
>> tsntool st wrcl sw0p3 /home/root/scripts/qbv.conf(write the schedule, port 2) 
>> tsntool st rdacl sw0p2 /dev/stdout(to read) 
>> tsntool st configure 0.0 1/1000 10000 sw0p2 (configure the schedule 1ms interval) 
>> tsntool st configure 0.0 1/1000 10000 sw0p3 

The parameters can vary according to your specification. Also, qbv.conf is a file specifying the schedule. For example, a 1 ms schedule:

 
sgs 400000 0x80 (high priority traffic) 
sgs 100000 0x7E (other traffic)
sgs 400000 0x80 
sgs 100000 0x7f 
 

To check the status of the precision time protocol (PTP) clock synchronization across devices that are TSN capable use DEPTP_TOOL provided by TTTech :

 >> deptp_tool –get-current-dataset

Did you find the information on this page useful?

Characters remaining:

Feedback Message