TC1796
System Units (Vol. 1 of 2)
Peripheral Control Processor (PCP)
User’s Manual
11-31
V2.0, 2007-07
PCP, V2.0
•
The PC of the instruction that was executing when the error occurred is stored in
PCP_ES.EPC.
•
The number of the channel program that was executing when the error occurred is
stored in PCP_ES.EPN.
•
The error type is set in the appropriate field of register PCP_ES.
•
The context is saved back to the PRAM CSA. Depending on the chosen context size
(PCP_ES.CS) a Full, Small, or Minimum Context save is performed.
•
If the error condition was not due to an FPI Bus error or a DEBUG instruction, then
an interrupt request to the CPU is generated with the priority number stored in
register PCP_CS.ESR.
The repetitive posting of PCP error interrupts will not cause an overwhelming number of
interrupts to the CPU. In this situation, the PCP’s CPU service request queue (see
) will quickly fill, and force the PCP to stall until the CPU can resolve the
situation.
Note: An error condition (other than an FPI Bus error) will result in an interrupt being sent
to the CPU. The interrupt routine that responds to this interrupt must be capable
of dealing with the cause as recorded in PCP_ES, and it must be able to restore
the channel program to operation. The minimum required to restart the channel
program is to set the context value of CR7.CEN = 1.
11.4.3.3 Debug Exit
If the DEBUG instruction is programmed to stop the channel program execution
(SDB = 1 has been specified), the PCP performs an exit sequence that is very similar to
the error exit sequence, with the exception that no interrupt request to the CPU is
generated. This sequence is:
•
If RTA = 0, then the channel enable bit R7.CEN is cleared. This means the channel
program will be unable to restart until another FPI Bus master has re-configured the
channel program’s stored context to set CR7.CEN to 1 again. Otherwise, the R7.CEN
bit remains unchanged, and the PC is decremented (such that it points to the DEBUG
instruction)
•
If EDA = 1, a break-point event is generated
•
If DAC = 1, then the PCP_CS.EN bit is cleared. This means that the PCP will not
execute any further channel programs until the PCP_CS.EN bit is set by another FPI
Bus master
•
The address of the DEBUG instruction (i.e. the current PC) is stored in register
PCP_ES.PC
•
The current channel number is stored in register PCP_ES.PN
The execution of the current channel program is stopped at the point of the DEBUG
instruction. This instruction only disables the current channel; the PCP will continue to
operate, accepting service requests for other channels as they arise.