TTEthernetTutorial

Parent Previous Next



Introduction


TTEthernet is a scalable, open real-time Ethernet platform used for safety-related applications primarily in transportation industries and industrial automation. TTEthernet sets new standards for flexibility, modularity, and scalability in Ethernet-based systems. It is compatible with IEEE 802.3 Ethernet and integrates transparently with Ethernet network components.


TTEthernet has been designed for safe and highly available real-time applications, cyber-physical systems, and unified networking. This technology offers deterministic real-time communication and TCP/IP Ethernet traffic in parallel on the same network. TTEthernet simplifies the design of fault-tolerant and high availability solutions. Its innovative technology consolidates experiences and proven mechanisms from aerospace system design, automotive electronics, and industrial automation.

Three message types are provided:
  1. Time-Triggered - Messages are sent over the network at predefined times and take precedence over all other message types. The occurrence, temporal delay, and precision of time-triggered messages are predefined and guaranteed. The messages have as little delay on the network as possible and their temporal precision is as accurate as necessary. However, "synchronized local clocks are the fundamental prerequisite for time-triggered communication".
  2. Rate-Constrained - Messages are used for applications with less stringent determinism and real-time requirements. These messages guarantee that bandwidth is predefined for each application and delays and temporal deviations have defined limits.
  3. Best-Effort - Messages follow the usual Ethernet policy. There is no guarantee whether and when these messages can be transmitted, what delays occur, and if messages arrive at the recipient. Best-effort messages use the remaining bandwidth of the network and have lower priority than the other two types.


About VisualSim TTEthernet Library


VisualSim TTEthernet library is completely compliant with TTEthernet specifications from TTTech. TTEthernet library package includes TTEthernet node, Traffic Generators, TTEthernet Bridge, and Statistic generators. In addition to the standard library modules, VisualSim also has preconfigured TTEthernet Configuration tables which include routing table, Bandwidth allocator, stream table, VLAN table, and Traffic generator table.


VisualSim TTEthernet library can be used to design a completely new TTEthernet based system or integrate with a system in which multiple different protocols exist.


Below is a brief explanation on each TTEthernet library block.


1.TTE_Node: This block connects TTE_Node to the network. This block manages triple redundancy, multicast, MAC, and Phy layers.
2.TTE_Traffic_Gen:  This is a traffic generator and it can generate traffic messages with Time-Triggered, Rate Constrained, and Best Effort (Normal Ethernet traffic).
3.TTE_Bridge: This block connects to both Nodes and other Bridges. It handles the routing, multicast, compression synchronization, and broadcast of clock synchronization messages to all the links.
4.TTE_Setup: One instance of this is required in all TTEthernet models. This processes all the tables in the model.
5.TTE_Stats:  This is a convenient block that displays the latency plot for all streams from all the Nodes, writes the information and warning messages to a file in the model directory, and computes the latency jitters and writes it to a separate file in the Model Directory.
6.TTE_Config_Table: This is a block that contains the sample of all configuration tables required for TTEthernet.


Tutorial System


Multiple demonstration systems are provided with documentation to guide a user to learn the TTEthernet modeling environment and create executable models.


A demonstration system is provided with explanation on the use of this library. The block diagram is provided below:


Figure 1.0 Block Diagram of Simple TTEthernet Network


Node 1 and Node 2 are the synchronization masters, Node 5 acts as a Synchronization client, and Bridge acts as a compression master in figure 1.0. Each Source node’s (Node1 & Node2) or Synchronization masters can generate messages of Time-Triggered (TT), Rate-Constrained (RC) or Best-Effort (Ethernet). Node 1 and Node 2 transmit messages to a single client Node5 which is connected by a Bridge in between.

Open this model in VisualSim from the following location:

File->Open File  $VS/doc/Training_Material/Tutorial/WebHelp/Tutorial/Networking/TTE_Simple_Example.xml . A bunch of different test cases using TTE is provided in the same directory.


Each node consists of one traffic generator which can generate messages of TT, RC and Ethernet; and a node block. The bridge uses the TTE_Bridge block. As Node_5 is a client, we have connected TTE_Stats to it to generate network statistics and stream latency. The TTE_Config_Table and TTE_Setup blocks are added to this block diagram editor to define network attributes. Users have to define the following top level model parameters:


The Digital simulation is added with a stop time. When you run the simulation, there are four outputs. There are two plots - one displaying the latency for all the streams and the other is a Histogram of the latency. There are two text files that are written at the end of the simulation - one contains information and warning messages, and the other contains the latency statistics for each stream.


 

Figure 2.0 VisualSim Model


Basic Rules


  1. All the Source and Destination node names must start with Node_ followed by a number.
  2. All Bridges must start with Bridge_ followed by a number.
  3. Each Traffic Generator has a separate Traffic Table.
  4. Bandwidth credit and Class type for all streams from all nodes are listed in a single Stream Table.
  5. TTE_Setup block must be present in all models using TTEthernet libraries.
  6. The TTE_Config_Table is only an example of the required Tables. The user must modify all the Tables to setup the required configuration. Additional Traffic Tables must be added to cover all the Nodes and need to make sure TT_Config_Table is configured correctly.
  7. Construction Steps

To construct an TTEthernet model, there are five steps.

  1. TTE_Config_Table configuration
  2. Pre-Process block called TTE_Setup
  3. Instantiate Nodes and Bridges
  4. Add the traffic for each Nodes and define mode of message transmission.
  5. Attach Statistics block to each of the nodes that receive the data.


Step 1:


1. Drag Interfaces and Buses > TimeTriggeredEthernet > TTE_Config_Table into block diagram editor.
This provides the list of sample Tables that are required for the TTEthernet model.



                               

Figure 3: TTE_Config_Tables

1.1 Routing_Table (RT): Configure based on your network requirements. This is required to handle the routing between nodes, compute latency on the links and maintain statistics. For this tutorial configure RT as below.


 

Figure 4: Routing Table Configuration

1.2 Buffer_ClkSync: No change required. Buffer_ClkSync is a Memory_Init block. This contains a set of required parameters for TTE. The following is the list of variables.

Percent_BW global 0.75 ; ---Maximum allocation to Class A or B of the total bandwidth for that Type.
Default_ProcTime global 1.0E-06; Default Processing time for node processing.
Max_Buffer_Pkts      global   256 ; Maximum buffer packet size.
Max_Pkt_Bytes global 1500 ; ---Maximum packet size Max_Buffer_Pkts global 256 Maximum number of buffers at each Node. Each buffer can hold one Data Structure or packet.
Grand_Master global "Node_1" ; ---Node Name of the Master for the Clock Sync. Grand_Master_Rate global 200.0E-03 ; ---Rate of Clock Synchronization messages from the Grand Master Node.

1.3 Multicast_List: Please make sure that you have required source and destination names in the table.

1.4 Traffic Table: One table is required for each Node. Enter the list of TT, RC, and Ethernet streams. One sample table is provided. Copy this instance to generate the required number of traffic tables. Make sure to give each Table a unique Name for the Linking_Table_Name. The list of all the Traffic_Tables must be provided to the TTE_Setup block.
ID  Identifier     Task_Source   Task_Destination   Mbps         Task_Size        Start_Time  Stop_Time  Protocol VLAN Type ;       
 1  "TT1"            Node_1            Node_5                   TT_Mbps   TT_Bytes         3.0e-12         0.5                  UDP        1         7  ;
 2  "RC1"            Node_1           Node_5                    0.5             64                     1.5E-03          0.5                 UDP         2         6  ;
 3  "RC2"            Node_1           Node_5                    0.5             128                   2.0E-03          0.5                 UDP         3         6  ;
 4  "Ethernet"   Node_1           Node_5                    0.3              64                    2.5E-03          0.5                 UDP          4         5  ;  


ID: Increasing sequence number
Identifier: This determines the message stream type
Task_Source: Name of this Source Node.
Task_Destination: Name of the final destination or listener.
Mbps: Generation rate of this traffic stream
Task_Size: Packet data size. Does not include headers or tailers
Start_Time: Time in seconds after the start of the simulation
Stop_Time: Time in seconds after the start of the simulation
Protocol: UDP or TCP
VLAN: This is VLAN ID and it enables users to select BAG
Type: Type of Class. Can be 0 to 7.


1.5 Stream: This table contains the Class and the requested bandwidth for all TTEthernet stream from all the nodes.

ID       Mac_ID                              Identifier             SR_Class  Mbps  ;   
 1        "a0:36:9f:0c:77:38"        "TTE1"                    A              0.2  ;
 2        "a0:36:9f:0c:77:38"        "RC1"                      A             0.2  ;
 3        "a0:36:9f:0c:77:38"        "RC2"                     B               0.5  ;
 4        "a0:36:9f:0c:77:38"        "Ethernet"             A              0.3  ;
 5        "a0:36:9f:0c:77:39"         "TTE2"                   A             0.2  ;
 6       "a0:36:9f:0c:77:39"          "RC3"                    A              0.2  ;
 7        "a0:36:9f:0c:77:39"         "RC4"                     B            0.5  ;
 8        "a0:36:9f:0c:77:39"         "Ethernet"            A            0.3  ;
 9       "a0:36:9f:0c:77:3A"          "TTE3"                   A           0.2  ;
 10     "a0:36:9f:0c:77:3A"           "RC5"                  A             0.2  ;
 11     "a0:36:9f:0c:77:3A"          "RC6"                  B              0.5  ;
 12     "a0:36:9f:0c:77:3A"          "Ethernet"          A            0.3  ;

ID: Increasing sequence number
MAC_ID: Physical address of the Node
Identifier: Unique ID for each TTE stream. This must match the Identifier in the Traffic Table.
SR_Class: Stream Reservation class of this TTE stream- A or B.
Mbps: Requested bandwidth


1.5    Type_to_BW: For each Bridge and Node in the model, the amount of bandwidth allocated to each Type is specified in this Table. Top Level parameter Bandwidth_Mbps determines Ethernet Speed and is common for all nodes.


Sample Format is as below


ID Type    Mbps   ;

 0    0        0.0     ;
 1    1         0.0    ;  
 2    2       0.0      ; 
 3    3       1.0      ;
 4    4       1.0      ;
 5    5       33.0    ;
 6    6       25.0    ;
 7    7       40.0           ;

ID: Increasing sequence number starting from 1.

Type: Type of Class. The values are 0 to 7

Mbps: Bandwidth allocation. The sum of all the rows of this column must not exceed the total bandwidth of the links.

Full Format is

ID Type  Node_1  Node_2  Node_3  Bridge_4  Bridge_5  Node_5   ;
 0    0   0.0     0.0     0.0     0.0       0.0       0.0     ; /* Background                  */
 1    1   0.0     0.0     0.0     0.0       0.0       0.0     ; /* Best Effort                 */
 2    2   0.0     0.0     0.0     0.0       0.0       0.0     ; /* Excellent Effort            */
 3    3   1.0     1.0     1.0     1.0       1.0       1.0     ; /* Video  50ms latency         */
 4    4   1.0     1.0     1.0     1.0       1.0       1.0     ; /* Critical Apps               */
 5    5  25.0    25.0    25.0    33.0      33.0      33.0     ; /* Video   2ms latency         */
 6    6  25.0    25.0    25.0    25.0      25.0      25.0     ; /* Internet Control            */
 7    7  40.0    40.0    40.0    40.0      40.0      40.0     ; /* Network Control, highest    */

ID: Increasing sequence number starting from 1.
Type: Type of Class. The values are 0 to 7
Node_1, Bridge_1...: Bandwidth allocation. The sum of all the rows of each column must not exceed the total bandwidth of the link.

Please make sure that you have included all the available nodes in the model

1.6 Class_to_Type- For each Bridge and Node in the model, the mapping of Type to Class and B.
Sample table is as shown below

ID    Class      Type      ;

0      A             4              ;

1      B             3              ;

ID: Increasing sequence number starting from 1

Class: A or B

Type: Type of Class. The values are 0 to 7. Common to all Nodes and Bridges in the model.

Full format is

ID     Class  Node_1  Node_2  Node_3  Bridge_4  Bridge_5  Node_5 ;
 0       A         4                 4             4               4              4               4    ; /* Background                  */
 1       B         3                 3             3                3              3               3    ; /* Best Effort                 */

ID: Increasing sequence number starting from 1
Class: A or B
Type: Type of Class. The values are 0 to 7. Common to all Nodes and Bridges in the model.

1.7 TT_Config_Table: TT_Config table provides the timing precision for Time-Triggered messages. StartTime is computed based on the task size and the Network Speed. User should enter details for the complete flow, for example if Source node is Node_1 and the destination is Node_5 then all the Nodes and bridges involved in communication flow should be defined in the table.

Sample TT_Config_Table is shown below
Node             TTName   StartTime   BasePeriod      ProcTime ;
"Node_1"       "TT1"      1.25E-03     BasePERIOD    ProcTIME ;
"Node_2"       "TT1"      2.0E-03       BasePERIOD     ProcTIME ;  
"Node_3"       "TT3"      3.0E-03       BasePERIOD     ProcTIME ;   
"Bridge_4"     "TT1"      2.5E-03       BasePERIOD     ProcTIME ;
"Bridge_4"     "TT2"      3.0E-03      BasePERIOD     ProcTIME ;
"Bridge_4"      "TT3"      3.5E-03      BasePERIOD     ProcTIME ;
"Bridge_5"      "TT1"      3.0E-03     BasePERIOD     ProcTIME ;
"Bridge_5"      "TT2"      3.5E-03     BasePERIOD     ProcTIME ;
"Bridge_5"      "TT3"      4.0E-03     BasePERIOD     ProcTIME ;
 "Node_5"          "TT1"      3.5E-03    BasePERIOD      ProcTIME ;


1.8 VLAN: No change is required. In this table based on the VLAN ID BAG is allocated. For the Rate Constrained traffic stream, this table decides the allocated bandwidth for a given VLAN. User can have as many VLANs and associated with BAG and LMax time. Sample VLAN table is shown below;
ID VLAN  BAG          LMax  ;       
 1   1         1.0e-6        256   ;
 2   2         1.5e-6     512   ;
 3   3         2.0e-6       1024  ;
 4   4         2.0e-6       1024  ;
 5   5        2.0e-6        1024  ;

Step2

In this step we will add the blocks required for pre-processing the tables. This block must be added to all TTE models or models that use the TTE blocks. This block does require the existence of the Traffic tables, Routing Table, Link Setup table, Type_to_BW table, Class_to_Type, TT_Config_Table table, and Multicast Memory_Init block.

a. Instantiate the Interfaces and Buses > TimeTriggeredEthernet > TTE_Setup block.
b. Link the Routing_Table_Name parameter to the top-level. This ensures that all blocks use the same name.
c. In the parameter ‘Traffic_Tables’, list all the traffic tables names as strings in array.
Step3
Each transmitting node or synchronizing master node requires two blocks – TTE_Traffic_Gen and Node block. The assembly of the two blocks is as below.


 

Figure 5: Assembly of Source Node


At the receiver side or client side only Node block is sufficient. To collect network activities and statistics, one can connect TTE_Stats to the client node block. The assembly of the two blocks is as shown below.


 

Figure 6: Assembly of Client Node/ Destination only node


Step4


The Bridge connects the Nodes to the network and also connects to other Bridges. The bridge block handles the Routing and broadcast of clock synchronization. A model can have a single bridge with all the Nodes connected to it.


 

Figure 7 Single Bridge Network


If a model has multiple bridges, instantiate as many TTE_Bridge blocks and update the Link_Setup. The topology of the network is determined by the Link_Setup table. The Block Diagram shows the number of Bridge and Node instances.


 

Figure8 Multiple Bridge Network


The following is the sequence:
a. Add as many Interfaces and Buses > TimeTriggeredEthernet > TTE_Bridge blocks as you have defined in the Link Configuration table.
b. Assign a unique name to each Bridge block. The rule here is that the name must be Bridge_ followed by a number. No two Bridges can have the same name.
c. For the parameter, add the Routing_Table_Name. For now it is just “RT”.

Step5

The TTE_Stats block can be connected directly to the Node out for a Destination-only or the data_out port of the TT_Traffic_Gen block for a Source+Destination block.
The TTE_Stats generates three different pieces of information. They are:

1. The latency statistics and through for all the streams arriving at Node to which this TTE_Stats is connected.


Time-Triggered

Rate Constraint

N1_to_N5_TT1_1

Latency

                Minimum: 2.5061367090 ms

                Mean:  2.5061367090 ms

                Std Dev: 29.1 ps

                Maximum: 2.5061367090 ms

Throughput

                                Mbps:   0.0328661952051

N2_to_N5_RC2_3

Latency

                Minimum: 24.5134240 us

                Mean: 494.2624945 us

                Std Dev: 571.1953459 us

                Maximum: 2.0779767120 ms

Throughput

                              Mbps:     0.5011401721222

Ethernet

N1_to_N5_Ether_4

Latency

                                     Minimum:      14.2734240 us

                               Mean:    519.6828018 us

                                      Std Dev:         617.3499543 us

                                       Maximum:   2.8099000580 ms

                                                            Throughput

                                              Mbps:     0.3010222764019



Here
N1_to_N5- Node_1 to Node_5
TT_1- Time Triggered stream with ID 1 in the Traffic Table
RC2_3- Rate Constrained  stream with ID 3 in the Traffic Table
Ether_4- Ethernet stream with ID 4 in the Traffic Table
Minimum- Lowest latency recorded during the simulation
Maximum- Highest latency recorded during the simulation
Mean- Average of all the latencies recorded
Std Dev- Standard Deviation of the latencies


2.    Graphical plot showing the Latency for all the streams arriving at the Node to which this TTE_Stats block is connected.

 

Figure 9: Stream Latency Plot



3.    Histogram of the Latency for all the streams arriving at the Node to which this TTE_Stats block is connected.


 

Figure 10 Histogram Latency plot


The following is the connection sequence:

a. Connect an Interfaces and Buses > TimeTriggeredEthernet > TTE_Stats block to the output of each of the Nodes. This captures all the statistics including the activity traces, latency, and histogram plots. You can see a unique latency graph at each Listener of Destination Node. We only need this block for Nodes that receive data.
b. Enter the name of the Node that this block is connected.


Step6


Now the model is constructed. The next step is to run the simulation. Each simulation run can have different setup values - such as Network Topology (Link_Setup file), traffic streams from each node (Traffic table), number of TT/RC/Ethernet streams (stream table), and allocation of bandwidth to each Type at each Bridge (Type_to_BW).


For each run, the statistics are provided in a combination of files and graphical plots. View Step 6 to see the list of plots and reports.



Advanced Tutorial


1.TTEthernet model with 8 Source Nodes
Let us make use of TTEthernet_Simple_Example.xml model to extend the system with additional 6 Nodes or total of 8 Nodes.


Step1:
Extending System with additional Nodes and configure TTE_Config_Table.

  1. Instantiate additional TT_Nodes and provide unique name. Connect TT_Traffic_Gen blocks for each TT_Node and provide unique names.
  2. Open TT_Config_Table block and create additional Traffic_Tables for all Source Nodes.
  3. Update Routing Table (RT) with additional node details.
  4. Update additional node details to Type_to_BW and Class_to_Type blocks.
  5. Update TT_Config table with updated Traffic_Table details (TT1, TT2, TT3…) and timing precision based on the network speed and task size.
  6. VLAN Table – No modification is required.
  7.  Stream Table – No modifications required.

Step2:
TTE_Setup
1.Update Traffic_Tables parameter with all additional Traffic_Table names.

Step3:
Run Simulation.


2.  TTEthernet Model with 8 nodes and 3 Destination Nodes
In this tutorial we shall extend the model developed in advanced tutorial part 1.
Step1:
Open the model developed in Part-1 and instantiate additional destination nodes and TTE_Stats blocks. Provide unique names for TTE destination nodes.
Step2:
Open TTE_Config_Table block and update Routing Table(RT), Type_to_BW, Class_to_Type, TT_Config, and Traffic Table. With Regards to Traffic table, the user can decide which Destination node should be selected.
Step3:
Run the Simulation.

Note: Final version of the model is available in VS_AR\doc\Training_Material\Tutorial\WebHelp\Tutorial\Networking\TTE_8_Nodes_3dest_Nodes.xml.

3. TTEthernet Model with 8 Nodes, 2 Bridges and 3 Destination Nodes
In this tutorial, we shall extend the model developed in advanced tutorial Part2.


Step1:


Open the model developed in Part-1 and instantiate additional 1 TTE_Bridge block. Provide a unique name.


Step2:

Open TTE_Config_Table block and update Routing Table(RT), Type_to_BW, Class_to_Type, TT_Config, and Traffic Table. In the RT table one can select the flow. A sample RT table is shown below.


ID Source_Node    Destination_Node  Distance  Speed_Mbps  Duplex   ;       
 1 Node_1         Bridge_4          Link_Dist      100.0    true   ;
 2 Node_2         Bridge_5          Link_Dist      100.0    true   ;
 3 Node_3         Bridge_4          Link_Dist      100.0    true   ;  
 4 Node_4         Bridge_5          Link_Dist      100.0    true   ;  
 5 Node_5         Bridge_4          Link_Dist      100.0    true   ;  
 6 Node_6         Bridge_5          Link_Dist      100.0    true   ;  
 7 Node_7         Bridge_4          Link_Dist      100.0    true   ;  
 8 Node_8         Bridge_4          Link_Dist      100.0    true   ;      
 9 Bridge_4       Node_10           Link_Dist      100.0    true   ;
 10 Bridge_5      Node_10        Link_Dist      100.0    true   ;
 11 Bridge_5      Node_11        Link_Dist      100.0    true   ;
 12 Bridge_4      Node_12           Link_Dist      100.0    true   ;


Step3:


Run the Simulation.

'
Note: Final version of the model is available in VS_AR\doc\Training_Material\Tutorial\WebHelp\Tutorial\Networking\TTE_8_Nodes_3dest_Nodes_2Bridge.xml


List of VisualSim Models Used

VS_AR/demo/networking/TTEthernet/TTE_Simple_Example.xml

VS_AR\doc\Training_Material\Tutorial\WebHelp\Tutorial\Networking\TTE_8_Nodes_3dest_Nodes.xml

VS_AR\doc\Training_Material\Tutorial\WebHelp\Tutorial\Networking\TTE_8_Nodes_3dest_Nodes_2Bridge.xml