Chapter 8 AutoCode Sim Cdelay Scheduler
AutoCode Reference 8-16 ni.com
At the template level, the default Sim with Cdelay ATR triggered task
behavior of re-queueing a task for execution on receipt of a new trigger
before the outputs have been posted can be turned off by replacing
the segment call Sim_style_ATR_Idle by a call to
NoRetrigger_style_ATR_Idle. To turn off the Sim with Cdelay
global timeline enable policy, replacing it with the default sync
immediate on enable policy, you must replace the calls to the segments
Sim_style_Enable_Idle and Sim_style_Enable_Blocked with
calls to the segments Fast_style_Enable_Idle and
Fast_style_Enable_Blocked, respectively.
Figure 8-9. Alternative (Old Enable Policy) STD for an Enabled Task
Shortcomings of the Sim Cdelay Scheduler
What the pipeline re-configuration did in the new scheduler was to
purchase low latency at the price of scheduler overhead. However, the
solution is not complete; given a chain of ANC tasks—that is, the output of
an ANT triggered block is the trigger of another ANT triggered block—the
new scheduler would not fire off all elements of the chain in a single cycle
as an ideal scheduler would. Instead, it would only catch the first element
of the chain; each additional element would suffer a cycle of scheduler
latency. To solve this problem, it would suffice to enclose the queue task
and the second post outputs stage of the new scheduler in a relaxation loop
IDLE RUNNING
BLOCKED
task
done
Timer is zero and
enable, reset timer
and post outputs
Timer has reached
zero, signal overflow
Enable,
reset timer
Timer is greater
than zero,
decrement it
Timer is zero and
!enable, post
outputs