SDSIO Interface

The SDSIO components offer flexible recorder and playback interfaces. You may choose between these interface components that are stored in the folder ./sds/source/sdsio. These interfaces can be accessed as CMSIS software components for integration into the target system:

  - component: SDS:IO:Socket                     # Socket Interface (Ethernet or WiFi)
  - component: SDS:IO:USB&MDK USB                # USB Interface
  - component: SDS:IO:Serial&CMSIS USART         # USART Interface
  - component: SDS:IO:File System&MDK FS         # Memory card
  - component: SDS:IO:File System&Semihosting    # Simulation or Debugger via Semihosting interface
  - component: SDS:IO:VSI                        # VSI Simulation interface of an AVH FVP
  - component: SDS:IO:Custom                     # Source code template for custom implementation

To simplify usage further, the following pre-configured SDS interface layers in csolution project format are available. These connect via various interfaces to the SDSIO Server, which provides read/write access to SDS data files.

Layer: sdsio_network

The layer/network/sdsio_network.clayer.yml is configured for recording and playback via Ethernet interface. It uses the MDK-Middleware Network component.

For SDS data file access the SDSIO-Server is started on the Host computer as shown below. This output an IP address as shown below:

>python sdsio-server.py socket
Press Ctrl+C to exit.
Socket server listening on 172.20.10.2:5050

This is the IP address that the target hardware needs to connect and it is require to configure this IP address in the file ./layer/network/RTE/SDS/sdsio_config_socket.h with the define SDSIO_SOCKET_SERVER_IP.

Note

  • The firewall of the Host computer must be configured so that it can be reached from the target device under its IP address.

Usage on Windows

The easier way to connect the Host computer to the target board via Ethernet is to use a local network switch. With a standard network installation, the target hardware and the Host computer should be connected to the same LAN, and the DHCP server should assign a dynamic IP address automatically.

A firewall may restrict Ethernet access. The instructions below are for the Windows Defender Firewall.

  • Open Windows Security - Firewall & network protection - Allow an app through firewall.
  • Click Change settings, then allow your Python runtime (python.exe) on the network profile you use (usually Private).

If this is a managed corporate PC, Group Policy or endpoint security may still block it, so your IT may need to whitelist the IP address and port.

Layer: sdsio_usb

The layer/usb/sdsio_usb.clayer.yml is configured for recording and playback via USB Device interface. It uses the MDK-Middleware USB Device component and connects via a USB interface to a Host computer.

For SDS data file access start the SDSIO-Server on the Host computer with:

>sdsio-server.py usb
Press Ctrl+C to exit.
Starting USB Server...
Waiting for SDSIO Client USB device...

Once the SDSIO-Server is running start the application. The SDSIO-Server outputs:

SDSIO Client USB device connected.
Ping received.

For recording, the SDSIO-Server outputs:

Record:   DataInput (.\DataInput.0.sds).
Record:   DataOutput (.\DataOutput.0.sds).
..
Closed:   DataInput (.\DataInput.0.sds).
Closed:   DataOutput (.\DataOutput.0.sds).

For playback, the SDSIO-Server outputs:

Playback: DataInput (.\DataInput.0.sds).
Record:   DataOutput (.\DataOutput.1.sds).
Closed:   DataInput (.\DataInput.0.sds).
Closed:   DataOutput (.\DataOutput.1.sds).

Layer: sdsio_fs

The layer/filesystem/sdsio_fs.clayer is configured for recording and playback to/from the Memory Card. It uses the MDK-Middleware File System component.

Layer: sdsio_fvp

The template/sdsio/fvp/sdsio_fvp.clayer targets AVH FVP simulation and is configured for recording and playback to/from the Host computer. It uses the SDSIO VSI interface implemented by the file vsi/python/arm_vsi3.py, which is loaded by the FVP simulation model. As the SDSIO server is implemented in arm_vsi3.py there is no separate SDSIO server needed.

Configuration File: sdsio.yml

The SDSIO VSI interface can be configured using the sdsio.yml file in the current working folder that is used to start the FVP simulator. This configuration settings define the SDS data file access during FVP simulation.

Node Description
dir: Directory that contains the SDS data files.
idx-start: First index of the SDS data file that are accessed; default: 0.
idx-end: Last index of the SDS data file that are accessed; default no upper limit.
idx-list: Index lists of SDS data files that are accessed; if given index-start: and index-end: are not used.

Example:

dir: ./algorithm/SDS Recordings
idx-start: 0
idx-end: 11
#idx-list: [1, 3]             # list of index to check (when applied, idx-start/end is ignored)

Protocol File: sdsio.log

During the FVP simulation a log file is generated that lists the SDS data file access.

Example:

Created by ...\Board\Corstone-300\vsi\python\arm_vsi3.py

Playback:  DataInput (.\algorithm\SDS Recordings\DataInput.0.sds).
Record:    DataOutput (.\algorithm\SDS Recordings\DataOutput.0.sds).
Closed:    DataInput.
Closed:    DataOutput.
Playback:  DataInput (.\algorithm\SDS Recordings\DataInput.1.sds).
Record:    DataOutput (.\algorithm\SDS Recordings\DataOutput.1.sds).
Closed:    DataInput.
Closed:    DataOutput.
   :
   :
Playback:  DataInput (.\algorithm\SDS Recordings\DataInput.11.sds).
Record:    DataOutput (.\algorithm\SDS Recordings\DataOutput.11.sds).
Closed:    DataInput.
Closed:    DataOutput.
Playback:  DataInput - ACCESS REJECTED. Index excluded in sdsio.yml