TC1796
System Units (Vol. 1 of 2)
Peripheral Control Processor (PCP)
User’s Manual
11-45
V2.0, 2007-07
PCP, V2.0
11.7.6
Addressing Modes
The PCP needs to address locations in memory in different ways, as determined by the
type of memory being accessed and the type of action being performed on that location.
11.7.6.1 FPI Bus Addressing
All FPI Bus accesses from the PCP are indirect to some extent. The main indirect
addressing on the FPI Bus uses a 32-bit absolute address located in the GPR indicated
in the instruction. This address must be properly aligned for the type of data access –
byte, half-word or word. If it is not aligned, the results are undefined.
•
Effective Target Address [31:0] = <R[a]>
where a is the number of the register, for instance, R2. Instructions using this address
mode are indicated through the “.F” suffix.
For indirect-plus-immediate addressing on the FPI Bus, the 32-bit absolute address
located in the GPR indicated in the instruction is added to the immediate 5-bit offset
value encoded in the instruction. This address must be properly aligned for the type of
data access (byte, half-word or word). If it is not aligned, the results are undefined.
•
Effective Target Address [31:0] = <R[a]> + #offset5
where a is the number of the register and #offset5 is a 5-bit immediate offset value.
Instructions using this addressing mode are indicated through the “.IF” suffix (only
available for load and store, LD.IF and ST.IF).
This addressing mode is particularly useful for managing peripherals, where the
peripheral base address is held in R[a], and the offset can index directly into a specific
control register.
The BCOPY and COPY instructions use the indirect absolute addressing with predefined
PCP registers. Register R4 is used as the source address pointer, while R5 represents
the destination address pointer.
•
Effective Source Address [31:0] = <R4>
•
Effective Destination Address [31:0] = <R5>
Note: All FPI Bus accesses by the PCP are performed in Supervisor mode.
Note: The PCP is not allowed to access its own registers via instructions executed in the
PCP.