Specifications
Things to Try
6-12
9) Select Debug
→
Run to run the example again. Use the RTDX-enabled
Windows application loadctrl.exe to change the load at run time (as in
section 6.4, page 6-7).
10) Notice that you can now increase the load without causing PRD_swi to
miss its real-time deadline.
Note: Starving Idle Loop
It is still possible to starve the idle loop by increasing the processing load to
maximum.
11) Before continuing to the next chapter (after completing section 6.6, page
6-12), perform the following steps to prepare for the next chapter:
■
Click (Halt) or press Shift F5 to stop the program.
■
Close all GEL dialogs, DSP/BIOS plug-ins, and source windows.
6.6 Things to Try
To further explore DSP/BIOS, try the following:
❏
When you increase the load, the Execution Graph shows that
processing_SWI requires more than one PRD tick to run. Does this mean
that processing_SWI is missing its real-time deadline? Recall that
processing_SWI must run every 10 milliseconds, while PRD ticks occur
every millisecond.
❏
What would happen if the processing function were called directly from a
hardware ISR rather than being deferred to a software interrupt? That
would cause the program to miss its real-time deadline because
hardware ISRs run at higher priority than the highest priority SWI object.
Recall that when the load is high, PRD_swi needs to preempt
processing_SWI. If processing_SWI is a hardware interrupt, it cannot be
preempted by PRD_swi.
❏
View the CPU Load Graph. Use the RTA Control Panel to turn the
statistics accumulators on and off. Notice that the CPU Load Graph
appears unaffected. This demonstrates that the statistics accumulators
place a very small load on the processor.
How much do the statistics accumulators affect the statistics for
processing_SWI? Watch the statistics view as you turn the statistics
accumulators on and off. The difference is a precise measurement of the
number of instructions each accumulator requires. Remember to
right-click and clear the statistics view to see the effect.
❏
Add calls to STS_set and STS_delta in the loadchange function like the
ones you added in section 5.7, page 5-17. How does this change affect