The Spectracom I/O interface uses the legacy file system for configuration. It needs two configuration files to be able to work properly in HYPERSIM : the SPECTRACOM.IO and SPECTRACOM_CFG.OPAL files.
SPECTRACOM.IO
This file lists a series of important details needed by the HYPERSIM simulation. The name of the .io file must be specified in the hyServMain.cfg file (found at /export/local/ssr/hyconfig) with the line:
IOFILE spectracom.io
The file has three main sections, named as follows: [HARDWARE_DIL], [MAPPING] and [SENSORS_DIL]. Below is an explanation of how these sections must be completed in order to use the Spectracom driver in your simulation.
First of all, the [HARDWARE_DIL] section lists the drivers that will be used in the simulation. For the Spectracom driver to be included, the section should look as follows:
[HARDWARE_DIL] !Tag Type Identification IOMode Config !--- ---- -------------- ------ ------ opal_1 Spectracom none 1 export/local/ssr/hyconfig/spectracom_cfg.opal
You can choose the tag name as you wish; this tag is used to identify the driver further down in the next sections of the .io file. The config column must contain the full path to the configuration file of the driver.
The [MAPPING] section binds the tags defined in the section described above to cores of the simulator. Example:
[MAPPING] !Tag Node !--- ---- opal_1 1
Finally, the [SENSORS_DIL] section is used to bind sensors in the simulation to drivers identified with their tags.
You can make connections on different data points in this section. These data points are coming from the card and going to the driver and represent the timestamp (years, months, days, hours, minutes, seconds and nanoseconds) and the epoch time. The timestamp status can also be displayed.
Here is a part of the file:
!Type Sensors Tag ConnectionPoint Modifier !---- ---- ----- -------- ------------------------------------------------ --------- AD 9000 9000 opal1 "Timestamp/error_status" none AD 9001 9001 opal1 "Timestamp/is_sync" none AD 9002 9002 opal1 "Timestamp/time_ref_utc" none AD 9003 9003 opal1 "Timestamp/time_ref_years" none AD 9004 9004 opal1 "Timestamp/time_ref_day" none AD 9005 9005 opal1 "Timestamp/time_ref_hours" none AD 9006 9006 opal1 "Timestamp/time_ref_minutes" none AD 9007 9007 opal1 "Timestamp/time_ref_seconds" none AD 9008 9008 opal1 "Timestamp/time_ref_ns" none
The file also contains a relative path to the spectracom_cfg.opal file. This file is very important, as it is used to configure the driver, and is detailed below.
SPECTRACOM_CFG.OPAL
This file is used to configure the driver. Below is an example of this configuration file when the Spectracom card is used without the PTP feature. For an example of how this configuration file should look like when the PTP feature is enabled, please see point 5.1.1 in the Annex.
OPAL-1.0 Object Spectracom::SpectracomConfig { deviceParameters { device_name=tsyncpci device_id=0 holdover_timeout=5 } ieee1588_enabled=0 }
Device Parameters
- The “device_name” and “device_id” refer to the Spectracom device that can be used on the Redhat target. These fields identify which TSync PCIe board to control in the case where multiple boards are present in the system.
- This device appears when typing “ll /dev/” if the Spectracom card is plugged in one of the PCIe slots of the target.
- The device name is also the name corresponding to the kernel module that is loaded on the target.
- The holdover timeout argument is the number of seconds that can be tolerated without having a valid input signal to be used as reference before setting the synchronization flag to 0. During the holdover state, the time is maintained by an internal oscillator.
IEEE-1588 (PTP - Precision Time Protocol)
- When the “ieee1588_enabled” is set to ‘1’, the IEEE-1588 (PTP) protocol is used to distribute the clock from a master to one or multiple slaves over Ethernet. Here is a slave example configuration:
|
- The network parameters (static IP address, subnet mask- and default gateway) have to be set according to how the network in which the driver will be used is configured.
- The “tai_leap_second” field refers to the international atomic time scale implemented by the atomic clocks. As of June 2015, TAI is ahead of UTC time by 36 seconds.
- If the user wants to configure the IEEE-1588 module as a master, communication_mode field has to be set to ‘MASTER’.
FPGA Hardware Synchronization
- The Spectracom driver can be used to synchronize the target’s FPGA and the Spectracom board clocks together. OpalBoards driver is required and has to be configured in “Master with External Clock” mode.
- A physical connection between an External Clock Adapter (OP5964) and the Spectracom card (GP Outputs P9 DB9 cable) is required. The FPGA is connected to the External Clock Adapter. This FPGA will now be known as the master with external synchronization.
- If the system is composed of multiple FPGAs, another synchronization card (OP5962) is required for each FPGA. The first OP5962’s input will be connected to the External Clock Adapter’s (OP5964) output via an audio cable. The following OP5962 cards will be daisy-chained. Each OP5962 will be connected to the FPGA that needs to be synchronized. The FPGAs in this chain will be configured as slaves.
OpalBoards configuration file
- This configuration file (.opal extension) lists the fields to be specified for the “OpalBoards” driver when the user wants the FPGA synchronized with an external clock (i.e. Spectracom’s clock).
- “clockMode” field has to be set to “Hardware”.
- “synchronizationMode” field has to be set to “MASTER_WITH_EXT_CLK”. “extHWClockType” field has to be set to “NA”. The potentially other FPGAs’ “synchronizationMode” will have to be set to “SLAVE” and their “extHWClockType” will have to be “AUDIO”.
- One of the fields specifies the path to a bitstream configuration file (.opal extension) that describes each driver data with its initial value, its minimum and maximum values, its name, its size etc.
- In the Annex section of the present document, three examples of the OpalBoards configuration file can be found, depending on the synchronization mode.
Complete Configuration File Examples
SPECTRACOM_CFG.OPAL
OPAL-1.0 Object Spectracom::SpectracomConfig { deviceParameters { device_name=tsyncpci device_id=0 holdover_timeout=5 } ieee1588_enabled=1 ieee1588Cfg { dhcp_enabled=1 communication_mode =MASTER static_ip_address=XXX.XXX.XXX.XXX subnet_mask=XXX.XXX.XXX.XXX default_gateway=XXX.XXX.XXX.XXX tai_leap_second=36 port_settings { announce_reception_timeout=3 announce_interval=1 sync_interval=0 delay_request_interval=4 peer_delay_interval=0 delay_mechanism=END_TO_END } } }
OPALBOARDS CONFIGURATION FILES (FPGA HARDWARE SYNCHRONIZATION)
Master with external clock
OPAL-1.0 Object OpalBoardsExchangerConfiguration { boardType=VC707 boardId=2 clockMode=Hardware modulePath=/usr/opalrt/modules/ sendMode=AT_STEP_END synchronizationMode=MASTER_WITH_EXT_CLK extHWClockType=NA verboseLevel=ALWAYS timestepFactor=1 bitstreamFile=path_to_Bitstream.opal }
Master
OPAL-1.0 Object OpalBoardsExchangerConfiguration { boardType=VC707 boardId=2 clockMode=Hardware modulePath=/usr/opalrt/modules/ sendMode=AT_STEP_END synchronizationMode=MASTER extHWClockType=NA verboseLevel=ALWAYS timestepFactor=1 bitstreamFile=path_to_Bitstream.opal }
Slave
OPAL-1.0 Object OpalBoardsExchangerConfiguration { boardType=VC707 boardId=2 clockMode=Hardware modulePath=/usr/opalrt/modules/ sendMode=AT_STEP_END synchronizationMode=SLAVE extHWClockType=AUDIO verboseLevel=ALWAYS timestepFactor=1 bitstreamFile=path_to_Bitstream.opal }