![Xilinx Virtex-II Pro PPC405 Скачать руководство пользователя страница 56](http://html1.mh-extra.com/html/xilinx/virtex-ii-pro-ppc405/virtex-ii-pro-ppc405_user-manual_3410279056.webp)
364
March 2002 Release
1-800-255-7778
Virtex-II Pro™ Platform FPGA Documentation
Chapter 3:
User Programming Model
R
The LR is an SPR with an address of 8 (0x008) and can be read and written using the
mfspr
and
mtspr
instructions. It is possible for the processor to prefetch instructions along the
target path specified by the LR provided the LR is loaded sufficiently ahead of the branch
to link-register instruction, giving branch-prediction hardware time to calculate the branch
address.
The two least-significant bits (LR[30:31]) can be written with any value. However, those
bits are ignored and assumed to have a value of 0 when the LR is used as a branch-target
address.
Some PowerPC processors implement a software-invisible
link-register stack
for
performance reasons. Although the PPC405 processor does not implement such a stack,
certain programming conventions should be followed so that software running on
multiple PowerPC processors can benefit from this stack. See
Count Register (CTR)
The count register (CTR) is a 32-bit register that can be used by branch instructions in the
following two ways:
•
The CTR can hold a loop count that is decremented by a conditional-branch
instruction with an appropriately coded BO opcode field. The value in the CTR wraps
to 0xFFFF_FFFF if the value in the register is 0 prior to the decrement. See
for information on encoding the BO opcode
field.
•
The CTR can hold the branch-target address used by
branch-conditional to count-register
(
bcctr
x
) instructions.
The CTR is an SPR with an address of 9 (0x009) and can be read and written using the
mfspr
and
mtspr
instructions. It is possible for the processor to prefetch instructions along
the target path specified by the CTR provided the CTR is loaded sufficiently ahead of the
branch to count-register instruction, giving branch-prediction hardware time to calculate
the branch address.
The two least-significant bits (CTR[30:31]) can be written with any value. However, those
bits are ignored and assumed to have a value of 0 when the CTR is used as a branch-target
address.
User-SPR General-Purpose Register
The user-SPR general-purpose register (USPRG0) is a 32-bit register that can be used by
application software for any purpose. The value stored in this register does not have an
effect on the operation of the PPC405 processor.
The format of USPRG0 is shown in
0
31
Branch Address
Figure 3-6:
Link Register (LR)
0
31
Count
Figure 3-7:
Count Register (CTR)
Содержание Virtex-II Pro PPC405
Страница 1: ...R Volume 2 a PPC405 User Manual Virtex II Pro Platform FPGA Developer s Kit March 2002 Release...
Страница 14: ...322 www xilinx com March 2002 Release 1 800 255 7778 Virtex II Pro Platform FPGA Documentation Preface R...
Страница 252: ...560 www xilinx com March 2002 Release 1 800 255 7778 Virtex II Pro Platform FPGA Documentation R...
Страница 260: ...568 www xilinx com March 2002 Release 1 800 255 7778 Virtex II Pro Platform FPGA Documentation R...
Страница 562: ...870 www xilinx com March 2002 Release 1 800 255 7778 Virtex II Pro Platform FPGA Documentation R...