TC1796
System Units (Vol. 1 of 2)
Peripheral Control Processor (PCP)
User’s Manual
11-114
V2.0, 2007-07
PCP, V2.0
JC
ERROR,cc_NZ
;jump to error routine if not
;correct
ADD.I
R5,#0x1
;increment state number
EXIT EC=1,ST=0,INT=0,EP=1,cc_UC
;begin exit
STATE1:
COMP.I
R5,#0x1
;compare to interrupt number it
;should be
JC
ERROR,cc_NZ
;jump to error routine if not
;correct
ADD.I
R5,#0x1
;increment state number
EXIT EC=1,ST=0,INT=0,EP=1,cc_UC
;begin exit
STATE2:
COMP.I
R5,#0x2
;compare to interrupt number it
;should be
JC
ERROR,cc_NZ
;jump to error routine if not
;correct
LD.I
R5,#0x0
;reset state number
JC
START,cc_UC
;jump back to start of state
;machine
The last state could just as easily have ended with an EXIT that resets the PC to the
Channel Entry Table (EP = 0) rather than jumping back to START.
11.12.2
Channel Management for Small and Minimum Contexts
If Small or Minimum Contexts are being used, only some of the registers are saved and
restored. The integrity of the GPRs that are not included in the context must be handled
explicitly by channel programs, since these are not saved and restored with the context
of the interrupted channel program.
Channel programs may still use all registers reliably. Channel programs can be so
designed that they either ignore the values in unsaved registers, or use those registers
to store constants that no channel program changes. Hence they never need to be saved
and restored. Alternately, channel programs can use these unused GPRs as temporary
variables as long as the values of such registers cannot be corrupted by the interrupt of
the channel program by a higher-priority channel (see
11.12.3
Unused Registers as Globals or Constants
Registers R0 through R3 (for the Small Context Model), or R0 through R5 (for the
Minimum Context Model) can be used to store constants such as addresses that are
available to all channel programs. Hence, these registers hold global data, and no
channel program is allowed to change them.
Since the GPRs of the PCP are not directly accessible from the FPI Bus, there does need
to be an initial channel program that sets these values at or near boot time. There are