Accessing the I/O Interface Configuration
The TCP-UDP communication protocol can be configured in the I/O Interface Configuration tool, accessed from the HYPERSIM ribbon.
For more information on the general use of the I/O Interface Configuration, See also I/O Interface Configuration.
General Configuration
The TCP-UDP I/O interface is configured within a few pages.
The first parameters to be configured are found below:
Use an RT core for asynchronous computation | If set to "true", the driver will reserve a real-time CPU core for its communication system and will be able to handle a bigger amount of data. If set to "false", the communication system will default to core 0. |
Verbose | If enabled, additional information will be displayed during the load of the model. |
Data frame adjustments | This drop-down offers options for automatic adjustments to the data frame as it is being built. The options are: The correction is done by displacing all signals affected by the changes mentioned above by the correct amount of bits. |
Enable virtual mode | In virtual mode, the model can be executed even if this I/O interface is not compatible with the hardware configuration of the system. The connections between the model and the I/O interface will be done during the initialization, but the I/O interface will not do anything. The virtual mode can be used to troubleshoot problems on a system without having the required hardware, or to prepare a model with different |
Stream Configuration
General Stream Configuration
By default, the driver is configured with two streams with a TCP client and a TCP server, both using the internal loopback network on port 23000.
Each TCP-UDP stream device has multiple parameters:
- Protocol: Two choices are available:
- TCP: Stream exchanges data over TCP.
- UDP: Stream exchanges data over UDP.
- TCP specific parameters:
- TCP mode: Two choices are available:
- Server: Stream endpoint acts as a TCP server.
- Client: Stream endpoint acts as a TCP client.
- TCP port: Select the TCP port on which the stream will communicate. The default port is 23000.
- TCP mode: Two choices are available:
- UDP specific parameters:
- UDP local port: Select the local UDP port on which the endpoint will receive data. The default port is 23001.
- UDP remote port: Select the remote UDP port on which the endpoint will send data. The default port is 23002.
- NIC name: The desired network interface name. The proper interface name should be selected based on the information given by the Linux command "ifconfig". If the driver is running on Windows this field is ignored.
- Local IP address: IP address of the local TCP/UDP endpoint
- On Linux platforms, the IP aliasing functionality can be used to give each stream a different IP address even though the same network interface will be used. Each stream will have its own IP alias (i.e. eth0:0, eth0:1 ...) and they should appear in the list displayed by the linux command "ifconfig".
- It is possible to use the keyword ‘auto’ and the IP address of the first network interface of the simulator will be automatically used to handle the communication of this stream.
- NIC speed: The desired network interface speed. If the driver is running on Windows this field is ignored.
- Several choices available:
- Default: Don't change the network interface speed.
- ForceAuto: Set the network interface in auto-negotiation mode.
- Force10: Set the network interface speed to 10mbps, auto-negotiation off.
- Force100: Set the network interface speed to 100mbps, auto-negotiation off.
- Force1000: Set the network interface speed to 1gbps, auto-negotiation off.
- Force10000: Set the network interface speed to 10gbps, auto-negotiation off.
- Several choices available:
- Remote IP address: IP address of the remote TCP/UDP endpoint (only available in TCP server).
- Decimation factor: Number of timesteps between transmission triggers. A value of one triggers transmission at each timestep.
- Enable transmission control: Adds a data point that controls whether or not the I/O interface will send data. If disabled, the transmission is always enabled.
- Enable reception control: Adds a data point that controls whether or not the I/O interface will receive data. If disabled, reception is always enabled.
- Swap byte order: Swaps the native byte order when transmitting data.
Frame Format
A TCP-UDP stream frame builder example is shown below:
For each data point, the following parameters are configurable:
- Name: A specific name for the data point. This name must be unique within the frame.
- Type: The data type to use to transmit/receive the data. Custom types allow for bit fields.
- Vector size: Number of values to transmit/receive.
- Byte offset: Starting offset of data within frame in bytes.
- Bit offset: Starting offset of data within byte in bits. May only be configured with custom data types.
- Size (bits): Number of bits to use to transmit/receive each value. May only be configured with custom data types.
- Initial value: Initial value for each element.
- Min: Minimum possible value for data type.
- Max: Maximum possible value for data type.