TC1796
System Units (Vol. 1 of 2)
Peripheral Control Processor (PCP)
User’s Manual
11-120
V2.0, 2007-07
PCP, V2.0
necessary, critical instruction sequences should be protected by use of the R7.IEN
bit (see
).
11.13.3
Use of Channel Interruption
•
When a channel program consists of only a few instructions, it is best to configure the
channel to be non-interruptible. This increases overall efficiency by removing the
context save/restore overhead that would be incurred if the channel were to be
interruptible.
11.13.3.1 Dynamic Interrupt Masking
A channel program can dynamically control whether it can be interrupted by use of the
R7.IEN bit. When masking interrupts (by clearing R7.IEN), it must be noted that there is
a delay of one instruction before the mask becomes effective. As a result the instruction
that clears R7.IEN must be placed at least one instruction before the instruction
sequence that is to be un-interruptable. As an example, consider the following
sequence:-
CLR R7,IEN
;Clear the R7.IEN bit
;<< Interrupt can occur here
NOP
;<< Interrupt can occur here
;First instruction of non-interruptible code
;sequence
11.13.3.2 Control of Channel Priority (CPPN)
The PCP has three extended Service Request Nodes (PCP_SRC9, PCP_SRC10 and
PCP_SCR11) that allow storage of suspended channel interrupt requests. This allows
interrupt nesting to a depth of four. This limit on the nesting depth carries the danger that
a high-priority service request will not be serviced because the PCP’s interrupt nesting
depth has been exceeded.
It is recommended that a four-level “grouping” scheme should be adopted to avoid this
problem. All PCP interrupt sources should be listed in order of their SRPNs. This list
should then be subdivided into four contiguous groups, Group 0 being the lowest priority
and Group 3 the highest. The CSA for each channel program should be configured such
that CR6.CPPN contains the SRPN value of the highest channel program within the
group to which the channel belongs. As each channel starts, the Operating Priority
(CPPN) of the channel is loaded from the context. Using the scheme recommended
above, any channel program will run with the priority of the highest SRPN within the
group. As a result, the channel can only be interrupted by a service request from a
higher-priority group (e.g. a Group 0 channel program can be interrupted by a new