User Guide TCN Ethernet Simulator

Product overview

The user interacts with the system via the graphical user frontend. The user constructs a network topology by selecting hosts and switches and connecting them together very much like a physical Ethernet network is assembled. The user also specify the data frames and their parameters like source host, destination host(s), size and frequency.

The graphical user frontend consists of two views, the Topology View and the Tree View. The network files are stored in a XML file format, an open file format described in the TCNDL specification.

The Topology View illustrates the relationships between network elements in a drawing. Elements of different types are visualized by Nodes having different characteristics such as shape and colour. E.g a Switch is represented by a red standing square, and a CAN Bus is represented by a green horizontal bar. 

The Tree View reveals hierarchical dependencies between the network and traffic elements, as well as displays the details of the element attributes.

Layout options

As you are adding more and more network elements to your topology, you will find that the optimal way to visualize the topology is gradually changing, depending on the number of network elements and the way they are connected to each other. TCN Ethernet Design & Analysis Suite contains a number of layout formats. Using these, you can apply different layouts to emphasize relationship patterns of your topology. Some examples of the layout options are:

Symmetric Layout

Circular Layout

Orthogonal Layout

Hierarchical Layout

When selecting a new layout type from the Layout Menu , the drawing will be reformatted. Advanced algorithms will ensure that space is used efficiently, lengths and crossings of connections are minimized and that no network elements overlap.

Even when keeping the same layout type, TCN Ethernet Design & Analysis Suite can help you optimize the drawing as described above. If you select the Global Layout  tool, the position of all network elements can be changed. Selecting the Incremental Layout  tool will maintain the relative position of most network elements, while repositioning Ports within the network element as well as repositioning newly added and recently changed elements.

Starting the application

When TCN Ethernet Design & Analysis Suite starts it will automatically load the file you were working with the last time you closed it and present the network model found in it. 

Building a network topology

You build your network topology by creating new Devices and connecting Ports with Links - much like you would with a physical network.

Devices

To add a new Device to your system model, click the Add Host or Add Switch  tool. In both cases you will be presented with a new dialog window allowing you to supply the settings for the new Device.

 

The New Host dialog window is shown below.

In the left column, this dialog allows you to specify a name for the new Host and the number of ports of type Ethernet, CAN and LIN, respectively. Furthermore, it is possible to specify fixed execution times of software components involved in creating Data Frames and relaying these between different ports when the Host is used in a gateway setup.

In the right pane, detailed Ethernet port configuration settings are available. Please see a separate article for a detailed explanation of theses settings: https://tcntcn.atlassian.net/wiki/spaces/TD/pages/845479937/Ethernet+layer-2+priority+support

 

The New Switch dialog window is shown below.

In the left column, this dialog allows you to specify a name for the new Switch as well as the number of available Ethernet ports. At the bottom left, parameters part of the switch memory model are available. These allow you to specify the port memory buffer sizes, which will affect the probability of packet drop occurring during contention on a port. The configuration of these parameters are explained in a separate article: https://tcntcn.atlassian.net/wiki/spaces/TD/pages/912752641

In the right pane, detailed Ethernet port configuration settings are available. Please see a separate article for a detailed explanation of theses settings: https://tcntcn.atlassian.net/wiki/spaces/TD/pages/845479937/Ethernet+layer-2+priority+support

When you are done filling in details about your Device, click 'OK' and your new Device Node appears as a square in the Topology View. You can tell from the colour of the square, which Device type it is (red = Switch, blue = Host).

When you want to connect two Device Ports to each other, select the Add Link  tool and then sequentially click the two Device Ports that you want to connect.

If you want to connect a Device to a Bus, click on the Bus Port of the Device and then on the Bus. 

If you connect two Bus Ports, a Bus between the Ports will be created automatically.

Buses

As described above, Bus elements will be implicitly created when you add connections between Bus Ports.

If you want to explicitly create a Bus, select the Add Bus  tool and click somewhere in the Topology View. In the dialog window, enter the name of the Bus and select the Bus type (CAN / LIN). 

Sensors

A sensor in the application is a device that has the capability to create a Data Flow, stored in a capture file. Thus, the Sensor can be the source of a Data Frame or a Stream.

The sensor can inject packets into a virtual Ethernet network by reading Ethernet frames with high-precision time stamps from a capture file. In the delivery, it is provided such a capture file with a recording of an automotive Ethernet best effort camera. In the same way any device generating Ethernet packets can be recorded (measured) with our other tool (TCN Ethernet StreamAnalyzer) and played back in the TCN Ethernet Simulator. TCN Ethernet StreamAnalyzer is not yet released, so TCN has to do this recording.

To add a Sensor, select the Add Sensor  tool. In the dialog window, enter the name of the Sensor and select a type and model of the sensor. 

The application comes with a set of sensors pre-installed. When you select one of the pre-installed Sensors, the details (port type, port speed and capture file name) are automatically filled in for you. If you want to define a sensor that is not among the pre-installed set, select type: Custom and enter the details.

Merge Switches

When you are working with an existing topology you will often find that you desire to exchange one or more network elements for a network element with different characteristics. 

To merge two or more Switches into one, first select all Switches that you desire to merge. Right-click and select the Merge Switches  tool. Enter the details for the new Switch in the dialog window that is opened. The system will suggest a number of Ports depending on the number of Ports of the Switches to be merged. If you desire, you can change that number. When you are satisfied with the details, select 'OK'.

The old switches will be deleted from the topology. All connections and timers associated with any of the old switches will be moved to the new switch. Furthermore, all paths that include any of the old switches will be updated to include the new switch instead.

Drawing Layout

The drawing of the topology can be stored and restored across user sessions. This means that you can save the layout of a drawing that you are satisfied with and restore it later if some updates of the drawing did not have the desired effect. This allows you to dynamically explore the best way to visualize your network topology.

To save a layout, select the Save Layout  tool. Enter a filename for the layout XML file and select 'OK'.

To restore a saved layout, select the Load Layout  tool. Select the layout XML file using the file browser and select 'OK'.

If any network elements have been deleted since the saving of the layout, these elements will not be restored, it is only the visualization of the elements existing in the topology that are affected by the drawing layout functionality.

Flows

Once the topology of your network has been defined, it is time to enter information about the data signals flowing through the network. A Data Frame will pass through the network passing from one Node to another until it reaches the target Node. The chain of nodes it has passed from source to target constitutes a Path. A Data Frame can have multiple (multicast/broadcast) Paths or just one (unicast).

Data Frames

Add a new Data Frame to the network model by selecting the Add Data Frame  tool. In a new dialog you can enter details of the Data Frame such as Source, Period, Offset, Priority and Size.

Regarding the priority of a Data Frame, please note that a Node that is to send a Data Frame across a switched Ethernet network will currently always encapsulate the Data Frame in a UDP frame. The UDP frame is then in turn encapsulated in an IPv4 frame and the priority that you have associated with the Data Frame is placed into the IP ToS bits of the IPv4 header field. Finally, the IPv4 frame is encapsulated in an Ethernet frame, that is passed to the egress interface of the Ethernet output port of the Node for transmission onto the Link connecting the Node to an Ethernet Switch.

It is also possible to add Paths for the Data Frame by building an ordered list of Nodes (a Node in the context being a Device, a Sensor or a Bus). The list to the right shows all possible next Nodes according to the defined topology. Select one of the Nodes and click the 'Add' button. This will add the selected Node to the list to the left. At the same time the list to the right is updated to include only the Nodes that are connected to the Node that was just added. Keep adding Nodes until the Path is complete. 

Streams

A Stream is a recorded sequence of Data Frames. The file containing the recording is called a capture file.

To add a Stream, select the Add Stream  tool, and enter the details of the Stream. 

The source you select is a Sensor, which is already associated with an Ethernet data frame capture file, collected from a physical network measurement using TCN Ethernet StreamAnalyzerTM. The capture file will be used to specify how the sensor injects packets into the network.

Show Path

If you want to find a specific Path in the Topology View, start by searching for the parent Flow (Data Frame or Stream) in the Tree View. Expand the Flow to see all the details, including the Paths. Right click on the desired Path and select the Show Path  tool. The Path will be visualized with a thick red line from the source to the destination in the Topology View.

When you are done studying the visualized path either select another flow in the Tree View and do another Show Path command, or right click anywhere in the Flows Tree View and choose the Hide Path  tool if you would like to turn off the red visualized path. 

Invalid Paths

If a Path is invalidated, e.g. by the (intentional or accidental) deletion of a Link or Node that is included in the Path, the Path name will be displayed in red in the Tree View. To make invalid Paths easier to find, also the name of the parent Flow is displayed in red. This way, it is possible to drill down to find all invalid Paths and the Node causing the invalidity.

Note! If there are one or more invalid paths in your topology, you will not be able to run any simulation, until the faulty Path has been corrected.

Timers

By applying Timers to certain Ethernet Ports it is possible to measure the forwarding delay or latency of individual Flows forwarded through a number of Ethernet Switches. Timers are applied pair-wise typically were a Flow of interest enters and exists an Ethernet backbone. Thus, the first Timer must be applied on the Switch ingress Port through which the Flow enters the Ethernet backbone. Likewise, the second Timer must be applied on the Switch egress Port where the Flow will exit the Ethernet backbone. The following image shows a simple network with Timers applied to selected Switch Ports:

,

Timers are instructed to look for specific Flows. During a simulation, when a Timer sees its assigned Flow passing by, it registers the current point in time. At a later point in time, when the same instance of the Flow exits the Ethernet backbone, the Timer collects a second time stamp. The difference between the two collected time stamps constitute the forwarding delay (or latency) of this particular Flow. If a number of Flows are registered, a statistical distribution of forwarding delays is collected during a simulation. After the simulation terminates, the statistical distribution is visualized in a chart under the Simulation results tab. Depending on Port loads, the Data Frame priority, the Paths taken by other Data Frames etc, a certain Flow can experience more or less contention when it wants to exit through different Switch Ports. If an Ethernet egress interface is busy transmitting when a Flow wants to exit through the associated Switch Port, the Flow is queued up for a shorter or longer time period. Queuing delay increases the forwarding delay and causes jitter to the Flow in a periodic flow. The Latency Chart indicates the probability that a specific Flow experience a certain latency and jitter.

Add a new Timer to the network model by selecting the Add Timer  tool. Timers are applied pair-wise, visualized by two clocks at different locations in the topology window, with the Flow entering at one Port (Ingress) and leaving at another Port (Egress).

Specify which Flow and Switch Ports the Timer will apply for, and optionally specify the target MAC address. If no MAC address, it will be automatically assigned.

Note!  By right clicking on a Data Frame or Stream Path in the Tree View, you can then select the Add Timer tool. Opening the tool in this way gives you the advantage of having the Flow, Ingress and Egress Interfaces automatically pre selected and thereby you only have to name the timer. 

VLANs

A VLAN can be created either by defining the Devices that will constitute the VLAN or by defining the Flow(s) that is associated to the VLAN.

To define the VLAN, select either a number of Devices or one or more Flows. Select the Add VLAN  tool. In the dialog that is opened, the system will show the appropriate Ports included in the VLAN according to your selection. You can enter the name, ID (the system can suggest the lowest available ID) and priority of the VLAN. If you created the VLAN by selecting Devices, you also need to associate one or more Flows to the VLAN  .

To associate flows to theVLAN, select the Associate VLAN tool, and select one or more Flows from the list that is presented to you. The list will only display Flows whose Paths match the Devices that was selected when creating the VLAN.

If you would like to edit the VLAN definition once the VLAN has been created, select the VLAN to edit. Select the Edit VLAN tool. In the Edit VLAN dialog, the system will present two lists. One is the Ports included in the VLAN, the other is Devices that are adjacent to the Devices included in the VLAN. To extend the VLAN, select one of the adjacent Devices and select the Add button. To reduce the VLAN, select one of the Ports and select the Delete button.

Currently, only Tagged Ports VLANs can be created in the topology, support for untagged ports will follow in a later release of the software.

Bulk creation

In case you want to create many VLANs and each of them will be associated to just one Flow, select the VLAN in bulk tool. In the list of Flows presented, select which Flows to create a VLANs for.

Show VLAN

To visualize a particular VLAN in the same way as the "Show Path" tool, right click on a VLAN in the Tree View and select the Show VLAN  tool. All the paths included in that VLAN will be colored red. Select the Hide VLAN  tool to reset the topology to normal view.

Simulation

As a result of a simulation, the Switch Port memory and link utilization is presented to the user as well as the loss of individual data packets in the network. Packet drop occur due to high instantaneous link load and limited frame buffer memory in the switch output ports. In general, the higher the load and the more burstiness of the traffic, the higher the probability is that packet drop occur given a certain size of output port memory size.

Running a simulation

After a complete network model has been specified including Hosts, Switches, Links and Flows (and optionally Timers), you can start a simulation. This is done by selecting the Start Simulation tool .

You will be presented with a dialog from where you can launch the simulation:

To start the simulation without changing any options, select the Start simulation button. This will launch the simulator and run it for the specified simulation time. While running the simulator, it is still possible to continue working with the rest of the application.

The Running time tells you how much real time the simulation has taken.

The Elapsed time tells you how far the simulated time has progressed. 

Events handled is a measurement of how many topology events have been carried out. An event can be anything that is done in the system, e.g. sending an Ethernet frame from an egress port or an IP stack processing a frame.

The Dropped frames counter indicates how many frames were dropped during the simulation so far.

To abandon the simulation select the Stop simulation button. The results gathered until execution was halted will still be available for viewing.

Options

The Run multiple simulations in sequence option makes it possible to run multiple consecutive simulations and gather the total results in one database. When choosing this option, the Flow offsets are automatically randomized between 0 and the Flow period time. At the start of each simulation, new randomized values for the offsets are produced. Change the Number of runs sub option to the wanted number of simulations to run.

It is also possible to have random offsets when only running a single simulation. Use the Randomize Data Frame offsets option to accomplish this.

Simulation time sets the maximum simulation time. The simulation will not run longer than the specified time.

When running a single simulation all tasks are stored for viewing in the results section. If disk space is sparse, use the Discard tasks from result file to save disk space. This option is only available for single simulations.

When simulation ends

When a simulation is done or when stopping the simulation manually, the simulator will start its shutdown sequence. The sequence involves emptying internal queues to get the correct statistical measurements and also some housekeeping (e.g. freeing allocated memory).

Viewing simulation results

After a completed (or abandoned) simulation, it is possible to view the results in the Simulation results tab, where the results from all simulations carried out since the application was started are collected. 

To view the results, select the View button. This will make a result window with the results from this simulation appear.

To add a comment to the results, click the comment field and add a text. 

To remove a row, select the termination button .

Selecting the right mouse button on a row brings up the context menu for simulation results:

  • View brings up the results window

  • Save... make is possible to save the results to disk

  • Delete removes the row from the Simulation results tab

To import results data that has been saved, go to the File Open menu option found in the File menu when the Simulation Results tab is active.

Simulation results window

The results are presented in a number of charts.

Right clicking the chart area brings up the context menu:

  • Copy - copies the chart as an image into your clipboard

  • Save as - save the chart in different formats (PNG is the only format available at this time)

  • Print... - send the chart to the printer

  • Zoom In /Zoom out - zoom in or out by adjusting the axis ranges

  • Auto Range - lets the axis range automatically adjusts to the current data

  • Toggle filter - displays the filter panel where you can filter what is displayed in the chart

  • Reset range - resets the range to the original settings (available where appropriate)

 You can use the drag region feature in the charts to zoom into the chart. Hold down the left mouse button and drag to the right/down to mark a region. This region will be zoomed into. Hold the left mouse button and drag to the left to return to the original view.

Overview

The first tab is the Overview tab. Here you can view information about the simulation such as when it was started and for how long the simulation ran. In the Runtime warnings/information list, all messages from the simulator can be viewed. A warning is issued if the simulator consider something happening as not being what the user wants, e.g. a Timer that has been set in the wrong place. Information is used by the simulator to communicate something that is considered as normal but the user might still want to know it, e.g. 2 connected devices have used auto-negotiation to choose common parameters in order to communicate.

Utilization chart

In the utilization chart you can view the capacity used by the different buses and Ethernet interfaces in the system. Since the capacity used by the ingress interface at the other end of the link is identical to the corresponding egress interface, it is not shown in the chart.

Port memory utilization

This chart displays the Port memory usage in the Switches found in the topology.

       

The Port memory stores the Ethernet frames that arrive at that Port before being forwarded to another Port in the Switch. Too high utilization may cause packet drops, which is presented in a pop-up window when the mouse pointer is positioned over the chart bar.

Latency chart

The latency chart shows all the data collected by the Timers. 

In the top scrollable list all the latency charts are thumbnailed. Hover above a thumbnail to view it as a slightly larger image. Click on it to display it in the chart panel below the list.

The chart displays latency times collected for a timer as a frequency plot. The data have been sorted into bins (the green bars). A cumulative distribution function (the red curve) makes it easy to see the probablity of latency outcome (using the cross hair).

Gantt Task Chart

The Gantt chart displays tasks that the different processing units have executed during simulation and between which points in time each task has been executed. 

         

When first opening the task chart, the first 100 milliseconds will be displayed. In the case there are a large number of tasks, the chart will contain so much information that it might seem hard to overview. In this case, use the Filter panel to the right of the chart to filter out the data you want to see (the filter panel can be toggled on and off by right clicking in the chart).

Use the Click-drag feature to zoom in the data. You can also zoom in and out by using the buttons at the lower left corner.

Use the Indicator button to toggle two slide indicators on and off. You can adjust the position of each indicator and thereby get a time difference measurement which is presented to the top left of the chart when the Indicator button is toggled on

File Management

Loading a TCNDL file 

You can load any file conforming to the TCNDL specification into the application. It might be created previously using TCN Ethernet Design & Analysis Suite, created manually or imported from some other file format through the import plug-in. 

To load a file, select the Load  tool and select the desired file from the file browser. Initially only files with the official suffix .tcn is displayed, but it is possible to select files with other suffixes as well. Of course, the file must conform to the TCNDL specification to be loaded.

Saving the network

To save your network, select the Save  or Save As  tool and specify a file name and location in the file browser.





1