Documentation Home Page ◇ HYPERSIM Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.
Event Detector
Description
The Event Detector functionality of the OPAL-RT Board interface, also known as Time-Stamped Digital Input (TSD Input), is used to return information describing rising-edge and falling-edge transitions (or events) occurring on the digital input channels of an OP5353 module installed in the simulator.
In the case of the OP4200 chassis, the OP5353 module is incorporated into the I/O cassette with ID OP4250-1.
Each transition is described by the ending state of the digital line (0 for a falling edge, and 1 for a rising edge), and the time, relative to the beginning of the calculation step, when the transition occurred.
The maximum number of events returned to the HYPERSIM model for a subgroup of 8 channels is set to 250. Note that there can be more than one transition per event (meaning transitions on different channels occurred at the same time).
The number of expected transitions per calculation step for each channel is set with the use of the Number of events parameter.
Usage
Once the bitstream configuration file has been parsed, the location of the digital input modules becomes visible to the user. The channels of the modules are grouped into bunches of 8. By clicking on each group of 8, the user has access to the configurable options of the group.
Bitstreams generated with an RT-XSG version 3.1.2 or later offer the possibility of using the selectable digital input-output feature (SDIO). The SDIO feature gives the user the option to switch between the type of functionality (either static, PWM or Event Detector) for a group of channels. The user will know if the bitstream offers the feature as soon as its configuration is loaded in the main section of the current board's configuration page.
Verifying that a bitstream is SDIO-capable is done in the channel group configuration section. If the bitstream has the feature then a drop-down list will be present for choosing the functionality. If it does not, the functionality will be displayed as a non-editable field (i.e. grayed out).
Channel group configuration
- Name
The name of the channel group denotes the physical channels of the digital input module the current configuration will be applied to. - Enable
Checking this box will enable the acquisition of data for the channels in the group once the simulation has started, provided that the type of functionality is set to Event Detector (see item below for more detail).
Clicking on Enable also makes the connection points for each of the 8 channels' Events and Timestamps connection points available in HYPERSIM. This means that if the user wishes to monitor these two characteristics of the digital signals, connections must be made between points in the model and the event detector input connectable points. - Digital type
In case the bitstream is SDIO-capable, this field will take the form of a drop-down list. This list provides the user the choices for the type of functionality to be applied for the current group of 8 digital input channels.
To receive event detection information, the option Event Detector must be chosen.
Otherwise, if the bitstream is not SDIO-capable, this field will be seen as non-editable. This means that the 8 channels in the current group can only operate with the functionality described in the grayed-out field. For receiving TSD inputs, please verify that the field displays Event Detector. - Time unit
If Ratio is selected, the information about the time when detected transitions occurred is a ratio of the transition time relative to the beginning of the calculation step. If Second is selected, the information received represents the delay from the beginning of the calculation step and the time of the occurrence of the transition, in seconds.
Signals Configuration
- Number of events
This parameter represents the number of expected transitions for each channel. It controls the amount of transition data transferred from the digital input modules to the HYPERSIM model at each calculation step. This parameter is used to set the widths of the Events and Timestamps input connection point vectors.
The maximum number of transitions allowed per channel is 250. The maximum number of detectable events per subgroup of 8 channels is also 250.
The reason why this field allows up to 250 transitions when the maximum allowed per subgroup of 8 channels is also 250 is the following:
Transitions expected by different channels could be occurring as part of the same event (i.e. at the same time), effectively reducing the number of events reported.
As an example, let's say that each one of the 8 channels of the subgroup is expecting 250 transitions. If these transitions will happen at the same time (each channel's first transition occurring at the same time, then the second transition occurring at the same time, etc.) then the overall number of events detected would be 250. In this case, every event would contain transition information for all 8 channels in the subgroup.
Input
The current functionality has one Event and one Timestamp vector for each channel, plus one global Status input.
The information about the transitions is returned in chronological order, i.e. the first value of each Events and Timestamps vector corresponds to the first transition that occurred on the digital input channel during the previous calculation step, the second value to the second transition etc.
In case only 1 event is configured in the Number of events parameter of a channel and no transitions are detected on that particular channel, then the channel enters 'static digital in' mode. This means that the data reported to the simulation is directly related to the physical value received by the simulator. In this scenario, the status code is set to -5 (a warning that the channel is in 'static digital in' mode) and the timestamp is set to 1 or Ts, depending on the display mode selected in the Time unit parameter of the subgroup's configuration.
If, however, more than 1 event is actually received on that particular channel, only the first transition will be reported and the status will be set to -4 (more data received than expected).
The inputs can take the following values:
- Events
Possible Values | Description |
---|---|
1 | Rising edge transition detected; if only 1 event expected (as per Number of events parameter), then this value represents the digital input value |
0 | Falling edge transition detected; if only 1 event expected (as per Number of events parameter), then this value represents the digital input value |
-1 | No transition occurred |
- Timestamps
Possible Values (Ratio) | Description |
---|---|
0 <= x < 1 | Ratio of the time of occurrence of the transition (Ttr) over the duration of the calculation step (Ts). Ttr is the time offset of the transition relative to the beginning of the calculation step where the transition occurred. Ttr = (0:Ts); and x = Ttr/Ts |
1 | No transition occurred |
Possible values (Second) | Description |
0 < = x < Ts | Time elapsed between beginning of calculation step and occurrence of transition. |
Ts | No transition occurred. |
- Status
Value | Description |
---|---|
0 | No error. |
-3 | Data reception error: less data was received from the digital input module than the value expected according to the Number of events parameter. Missing data were replaced by 0. |
-4 | Data reception error: more data was received from the digital input module than the value expected according to the Number of events parameter. Extra data were discarded. |
-5 | Warning: at least one channel in the subgroup is in "static digital in" mode. This is due to having configured only 1 expected event in the Number of events parameter. |
Characteristics and limitations
Processing time and amount of data transferred between the digital input module and the CPU increases with the number of events to decode.
For the connector pin assignments, the user should refer to the carrier documentation.
The current version of the event detector functionality of the OPAL-RT Board driver has the following limitations:
- Limitations will be added as they are found
OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter