Instructions of how to run the TSN+AVB simulation/analysis tool
Download this readme file as a PDF
To download the archive containing the tool and scripts necessary to perform the two experiments presented in the paper simply click on the link Implementation. You may then extract all the files from the archive. In order to perform the first experiment simply run the script titled “DefaultExperiment.m” and for the second experiment run the script titled “ExtendedExperiment.m”. These two scripts contain all the necessary codes to simulate, analyze and process the results described in section 5.1 and 5.2 of the paper respectively.
Necessary equipment and environments
In our work, we used a windows machine with an Intel i7 processor, 32Gb RAM and Matlab 2015b to perform the experiments. In this setting it took about 20 minutes to perform the first experiment and about 10 hours to perform the second one. We note that you may use an older version of Matlab, but we do recommend that you use a version that is as recent as possible.
DefaultExperiment: The default experiment simulates and analyses the default stream-set passing through Switch S1 of the network depicted in Figure 7 of the paper in three TAS settings: 1. no CDT present in the switch (i.e. AVB seting), 2. a single protected window (CDT-slot + GB), 3. two protected windows. The three TAS settings are run in a for loop and the results for each setting are outputted, containing a) a list of the largest transmission delays observed during simulation for each stream (these make up columns 3, 5 and 7 respectively of Table 4 in the paper), b) a list of the theoretical worst case transmission delays computed using our proposed analysis considering the current TAS configuration (these make up columns 2, 4 and 6 of Table 4 in the paper) and c) a list of the theoretical worst case transmission delays computed using the AVB analysis of [3, 4], i.e. as if there would be no TAS, meaning that the switch is effectively and AVB switch and not a TSN switch (these make up column 2 of Table 4 in the paper). We note that the list c) of worst case AVB delays is the same for all three TAS settings.
ExtendedExperiment: The extended experiment simulates and analyses an extended stream-set passing through Switch S1 of the network depicted in Figure 7 of the paper in a single TAS settings: two protected windows each with the a guard band of size GB=12 and a CDT-slot of size 2. The traffic on the switch is simulated and a list of the largest transmission delays observed during simulation for each stream (column 4 of Table 5 in the paper) is outputted as well as a list of the theoretical worst case transmission delays computed using our proposed analysis (column 3 of Table 5 in the paper).
Changing initial parameters
The provided scripts are set to perform the experiments presented in the paper, in order to reproduce their results. Further experiments can be created by changing the input parameters in the “DefaultExperiment” and “ExtendedExperiment” scripts. These parameters are:
- “timeToSimulate” – set the amount of time that the simulation is ran. Note that this value represents the number of time units that the switch experiences and not the actual amount of time that the experiment will take to execute.
- The AVB stream-set can be changed by modifying the contents of the cell-array named “ts” which is a colection of streams. Each stream is depicted as a cell-array of 4 elements:
1) the transmission time of a mesage of the stream, given as an aray of two elements, the first element being the transmission time while the second element being the constant 1.
2) the period of the stream, given as an aray of two elements, the first element being the transmission time while the second element being the constant 1.
3) the class to which the stream belongs, with 1=AVB_A, 2=AVB_B, 3=BE
4) the index of the streama. This is an integer from 1 to n (the number of streams in the set), with the first values being assigned to the AVB_A class, tehn to AVB_B class and finally to class BE.
- The configuration of the Time Aware Shaper can be changed such that: define TAS as one or more vectors of 4 values: first value is the period of the TAS (these should be equal among all vectors); second value is the size of the guard band (these should be equal among all vectors); third is the size of the CDT slot and forth is the offset with respect to the start of the TAS schedule (these values should be different from one another)
- The slopes used by the Credit Based Shaper can be changed as follows:
slopeA=[80;20]; % class AVB_A has an idleSlope of 80% and an sendSlope of 20%
slopeB=[20;80]; % class AVB_B has an idleSlope of 20% and an sendSlope of 80%
slopeC=[0;0]; % class BE is not shaped by the CBS hence both is idleSlope and SendSlope are set to 0
slopes=[slopeA slopeB slopeC]; % put the 3 slopes together to be used in the simulator
- The offset of the CDT-slots with respecto to the TAS cycle can be chaged with teh variable “offsetTAS”. The TAS has a cycle of 500 time units and at the begining of its cycle the AVB+BE streams are instantiated. The CDT-slots (together with the Guard Band – GB – that preceeds them) can also be instantiated at the begining of the TAS cycle (if offsetTAS=0) thus imediately blocking the transmission of the AVB streams, or it can be delayed by an amount of time equal to the value of “offsetTAS”, allowing in this way that some AVB messages be transmitted until the first Protected Window (GB + DCT-slot) is instantiated.
Note: for running the experiments described in the paper it is not needed to change any parameters in the script. We only describe these options in order to facilitate the understanding of the implementation for the interested researcher that may wish to use the tool to run other experiments than those described in the paper.