User Reference:Timing: Difference between revisions
No edit summary |
No edit summary |
||
| Line 4: | Line 4: | ||
To fulfil the real-time constraint, roundtrip time may not exceed the physical duration of a sample block. | To fulfil the real-time constraint, roundtrip time may not exceed the physical duration of a sample block. | ||
For stable system operation, a weaker condition is sufficient; only the roundtrip's average value needs to stay below a sample block duration. | For stable system operation, a weaker condition is sufficient; only the roundtrip's average value needs to stay below a sample block duration. | ||
==Measuring Block Duration== | |||
Immediately after data block has been acquired from hardware, the [[User Reference:DataIOFilter|DataIOFilter]] writes a 16-bit millisecond-resolution time stamp into the ''SourceTime'' state. | |||
Block duration is measured as the difference between two consecutive time stamps. | |||
==Measuring Roundtrip Time== | ==Measuring Roundtrip Time== | ||
Roundtrip is measured | Roundtrip is measured by subtracting a data block's time stamp from the current time when it enters the data acquisition module coming from the application module. | ||
==Measuring Source-to-Stimulus Delay== | ==Measuring Source-to-Stimulus Delay== | ||
| Line 15: | Line 19: | ||
[[Image:RoundtripDisplay.png|frameless]] | [[Image:RoundtripDisplay.png|frameless]] | ||
When switched on via the ''VisualizeRoundtrip'' parameter, | When switched on via the ''VisualizeRoundtrip'' parameter, timing data are displayed in a visualization window. | ||
In this window, | In this window, theoretical sample block length is indicated with a tickmark on the y axis, with scaling such that a range of 0..2 physical sample block lengths is displayed. | ||
Timing values are displayed separately for actual block duration, roundtrip time, and source-to-stimulus delay. | |||
Using this graph, the experimentator can keep track of | |||
*regularity of data acquisition -- the block duration curve should be a straight line; | |||
*real-time operation -- roundtrip time should stay below theoretical sample block length; | |||
*module communication (networking) overhead -- this is represented by the difference between ''roundtrip'' and ''stimulus'' curves. | |||
==See also== | ==See also== | ||
[[Technical Reference:Core Modules]], [[User Reference:DataIOFilter]] | [[Technical Reference:Core Modules]], [[User Reference:DataIOFilter]] | ||
Revision as of 15:24, 8 November 2007
Roundtrip time is the time needed for a sample block to traverse the core modules. Starting with the acquisition of a sample block, a block's roundtrip includes the time spent on signal processing and stimulus display. The roundtrip finishes when the block enters the data acquisition module again.
To fulfil the real-time constraint, roundtrip time may not exceed the physical duration of a sample block. For stable system operation, a weaker condition is sufficient; only the roundtrip's average value needs to stay below a sample block duration.
Measuring Block Duration
Immediately after data block has been acquired from hardware, the DataIOFilter writes a 16-bit millisecond-resolution time stamp into the SourceTime state. Block duration is measured as the difference between two consecutive time stamps.
Measuring Roundtrip Time
Roundtrip is measured by subtracting a data block's time stamp from the current time when it enters the data acquisition module coming from the application module.
Measuring Source-to-Stimulus Delay
In the StimulusTime state, the application module stores a time stamp when the module's Process() function has finished. The DataIOFilter subtracts the source time stamp from the stimulus time stamp to compute the source-to-stimulus delay. Unlike roundtrip time, measurement of the source-to-stimulus delay requires that data acquisition and application modules share a common time base; when distributed over multiple machines in a network, source-to-stimulus delay cannot be measured.
Roundtrip Display
When switched on via the VisualizeRoundtrip parameter, timing data are displayed in a visualization window. In this window, theoretical sample block length is indicated with a tickmark on the y axis, with scaling such that a range of 0..2 physical sample block lengths is displayed.
Timing values are displayed separately for actual block duration, roundtrip time, and source-to-stimulus delay. Using this graph, the experimentator can keep track of
- regularity of data acquisition -- the block duration curve should be a straight line;
- real-time operation -- roundtrip time should stay below theoretical sample block length;
- module communication (networking) overhead -- this is represented by the difference between roundtrip and stimulus curves.
See also
Technical Reference:Core Modules, User Reference:DataIOFilter