Execution of the Model
The MxTransIt Model executes when you click the Run button in MxVDev. It is responsible for streaming Stimulus Signal test data to the SUT(s) (via Connector Transforms) and for capturing Response Signal test data and streaming it back to MxVDev. It is a 'discrete model' in that time advances in discrete steps. The step size may be non-uniform and is determined by Scheduler Transforms in the model. A Transform is a Scheduler if it implements the TryGetScheduler method to return a valid scheduler. The combination of all schedulers in the model determines when ticks occur. For example, if one transform schedules ticks every 3ms and another transform schedules ticks every 4ms, the following sequence of ticks is executed:
3, 4, 6, 8, 9, 12, 15, 16, 18, 20, 21, 24, ...
When testing with real-time HIL test equipment, we may establish an asynchronous connection to the equipment. In this case, the Stimulus and Response clocks of the model are out-of-phase by a fixed amount of time. The Stimulus clock may be ahead of the Response clock allowing us to negate the variability in the PC clock, and take advantage of the performance of real-time HIL systems. When we test with Simulink models or 'C' code (using the Virtual Micro-Controller), the connection is synchronous: the clocks always read the same.
The Signal Transform function is implemented in the Tick() method of the transform class. How a Transform is ticked is slightly different depending on the value returned by the IsConnector and IsDelay properties.
•Neither Connector nor Delay - The Tick function is called ONCE per model clock tick. In that Tick invocation the Signal Processing is performed.
•Connector - The Tick function is invoked TWICE per model tick Connectors are invoked last during the stimulus pass, and first during the response pass to receive stimulus transitions and generate response transitions respectively.
•Delay - The Tick function is invoked TWICE per model tick, but is invoked first in the stimulus pass and ticked last in the response pass (the opposite of a Connector).
•Connector and Delay - This is not a valid configuration; results are undefined.
Note: If the IsSut property of a Transform is set to True, then the Transform is a Connector Transform.
The order in which transforms are evaluated (or ticked) in an MxTransIt Harness is roughly left to right. Stated more precisely, the requirement is:
•Transforms that produce signal transitions that are consumed by other transforms have to be ticked first (but see also the description for the Z-1 Transform).
Depending on the Harness structure, this rule still leaves a lot of flexibility in the order in which transforms are executed, and in most cases the actual order is not important to the tester. But consider the case where two or more Connector Transforms connect to an external entity. In this case, there may be an external dependency or data flow which is not represented in the interconnections of a Harness. For example, there may be a Connector Transform that causes an input to an ECU to be set, and another that writes an SPI message to the same device. If the TestCase specifies that a Transition be sent to each device at the same time (in the same tick) then it is preferable that both external devices are updated as close to the same time as possible. To support this idea, MxTransit supports the concept of a Connector Transform. When a Harness includes one or more Connector Transforms, the tick order is as follows:
1.Signal Processing Transforms upstream of the Connector Transforms are all ticked.
2.The Connector Transforms are ticked once. During this tick the Connector Transforms should update their outputs to the SUT.
3.The Connector Transforms are ticked a second time. During this tick the Connector Transforms should read their inputs from the SUT.
4.Finally all the Signal Processing Transforms downstream of the Connector Transforms are ticked.