![](http://datasheet.mmic.net.cn/370000/P312XDP512F0VFV_datasheet_16728159/P312XDP512F0VFV_203.png)
Chapter 6 XGATE (S12XGATEV2)
MC9S12XDP512 Data Sheet, Rev. 2.17
Freescale Semiconductor
203
The programmer’s model of the XGATE RISC core is shown in
Figure 6-19
. The processor offers a set of
seven general purpose registers (R1 - R7), which serve as accumulators and index registers. An additional
eighthregister(R0)istiedtothevalue“$0000”.RegisterR1hasanadditionalfunctionality.Itispreloaded
withtheinitialvariablepointerofthechannel’sservicerequestvector(see
Figure 6-20
).Theinitialcontent
of the remaining general purpose registers is undefined.
The 16 bit program counter allows the addressing of a 64 kbyte address space.
The condition code register contains four bits: the sign bit (S), the zero flag (Z), the overflow flag (V), and
the carry bit (C). The initial content of the condition code register is undefined.
6.4.3
Memory Map
TheXGATE’sRISCcoreisabletoaccessanaddressspaceof64Kbytes.Theallocationofmemoryblocks
within this address space is determined on chip level. Refer to the
S12X_MMC Section
for a detailed
information.
The XGATE vector block assigns a start address and a variable pointer to each XGATE channel. Its
position in the XGATE memory map can be adjusted through the XGVBR register (see
Section 6.3.1.3,
“XGATE Vector Base Address Register (XGVBR)”
).
Figure 6-20
shows the layout of the vector block.
Each vector consists of two 16 bit words. The first contains the start address of the service routine. This
value will be loaded into the program counter before a service routine is executed. The second word is a
pointer to the service routine’s variable space. This value will be loaded into register R1 before a service
routine is executed.
Figure 6-20. XGATE Vector Block
+$0000
unused
+$0024
+$0028
+$002C
+$0030
+$01E0
Code
Variables
Code
Variables
XGVBR
Channel $0A Initial Program Counter
Channel $0A Initial Variable Pointer
Channel $09 Initial Program Counter
Channel $09 Initial Variable Pointer
Channel $0B Initial Program Counter
Channel $0B Initial Variable Pointer
Channel $0C Initial Program Counter
Channel $0C Initial Variable Pointer
Channel $78 Initial Program Counter
Channel $78 Initial Variable Pointer