ARM Cortex-A8 Technical Reference Manual r1p1
ARM Cortex-A8 Technical Reference Manual r1p1
Revision: r1p1
Change History
Proprietary Notice
Words and logos marked with ® or ™ are registered trademarks or trademarks owned by ARM Limited, except
as otherwise stated below in this proprietary notice. Other brands and names mentioned herein may be the
trademarks of their respective owners.
Neither the whole nor any part of the information contained in, or the product described in, this document
may be adapted or reproduced in any material form except with the prior written permission of the copyright
holder.
The product described in this document is subject to continuous developments and improvements. All
particulars of the product and its use contained in this document are given by ARM in good faith. However,
all warranties implied or expressed, including but not limited to implied warranties of merchantability, or
fitness for purpose, are excluded.
This document is intended only to assist the reader in the use of the product. ARM Limited shall not be liable
for any loss or damage arising from the use of any information in this document, or any error or omission in
such information, or any incorrect use of the product.
Some material in this document is based on ANSI/IEEE Std 754-1985, IEEE Standard for Binary
Floating-Point Arithmetic and on IEEE Std. 1500-2005, IEEE Standard Testability Method for Embedded
Core-based Integrated Circuits. The IEEE disclaims any responsibility or liability resulting from the
placement and use in the described manner.
Where the term ARM is used it means “ARM of any or its subsidiaries as appropriate”.
Confidentiality Status
This document is Non-Confidential. The right to use, copy and disclose this document may be subject to
license restrictions in accordance with the terms of the agreement entered into by ARM and the party that
ARM delivered this document to.
Product Status
ii Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Web Address
http://www.arm.com
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. iii
iv Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Contents
Cortex-A8 Technical Reference Manual
Preface
About this manual .................................................................................... xxviii
Feedback ................................................................................................. xxxiv
Chapter 1 Introduction
1.1 About the processor .................................................................................... 1-2
1.2 ARMv7-A architecture ................................................................................. 1-3
1.3 Components of the processor ..................................................................... 1-4
1.4 External interfaces of the processor ............................................................ 1-8
1.5 Debug ......................................................................................................... 1-9
1.6 Power management .................................................................................. 1-10
1.7 Configurable options ................................................................................. 1-11
1.8 Product revisions ...................................................................................... 1-13
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. v
Contents
vi Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Contents
Chapter 12 Debug
12.1 Debug systems ......................................................................................... 12-2
12.2 About the debug unit ................................................................................. 12-4
12.3 Debug register interface ............................................................................ 12-7
12.4 Debug register descriptions .................................................................... 12-18
12.5 Management registers ............................................................................ 12-56
12.6 Debug events .......................................................................................... 12-72
12.7 Debug exception ..................................................................................... 12-76
12.8 Debug state ............................................................................................. 12-80
12.9 Cache debug ........................................................................................... 12-90
12.10 External debug interface ......................................................................... 12-92
12.11 Using the debug functionality .................................................................. 12-98
12.12 Debugging systems with energy management capabilities .................. 12-120
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. vii
Contents
Chapter 17 AC Characteristics
17.1 About setup and hold times ...................................................................... 17-2
17.2 AXI interface ............................................................................................. 17-4
17.3 ETM ATB and CTI interfaces .................................................................... 17-6
17.4 Debug APB interface ................................................................................ 17-7
17.5 L1 and L2 MBIST interfaces ..................................................................... 17-9
17.6 L2 preload interface ................................................................................ 17-10
17.7 DFT interface .......................................................................................... 17-11
17.8 Miscellaneous signals ............................................................................. 17-12
viii Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Contents
Glossary
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. ix
Contents
x Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
List of Tables
Cortex-A8 Technical Reference Manual
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. xi
List of Tables
xii Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
List of Tables
Table 3-52 Coprocessor Access Control Register bit functions ................................................ 3-65
Table 3-53 Results of access to the Coprocessor Access Control Register ............................. 3-66
Table 3-54 Secure Configuration Register bit functions ............................................................ 3-67
Table 3-55 Operation of the FW and FIQ bits ........................................................................... 3-68
Table 3-56 Operation of the AW and EA bits ............................................................................ 3-69
Table 3-57 Secure Debug Enable Register bit functions .......................................................... 3-70
Table 3-58 Results of access to the Coprocessor Access Control Register ............................. 3-70
Table 3-59 Nonsecure Access Control Register bit functions ................................................... 3-71
Table 3-60 Results of access to the Auxiliary Control Register ................................................. 3-72
Table 3-61 Translation Table Base Register 0 bit functions ...................................................... 3-73
Table 3-62 Results of access to the Translation Table Base Register 0 ................................... 3-74
Table 3-63 Translation Table Base Register 1 bit functions ...................................................... 3-75
Table 3-64 Results of access to the Translation Table Base Register 1 ................................... 3-75
Table 3-65 Translation Table Base Control Register bit functions ............................................ 3-77
Table 3-66 Results of access to the Translation Table Base Control Register ......................... 3-78
Table 3-67 Domain Access Control Register bit functions ........................................................ 3-79
Table 3-68 Results of access to the Domain Access Control Register ..................................... 3-79
Table 3-69 Data Fault Status Register bit functions .................................................................. 3-80
Table 3-70 Instruction Fault Status Register bit functions ......................................................... 3-82
Table 3-71 Results of access to the Auxiliary Fault Status Registers ....................................... 3-84
Table 3-72 Results of access to the Data Fault Address Register ............................................ 3-85
Table 3-73 Results of access to the Instruction Fault Address Register ................................... 3-85
Table 3-74 Register c7 cache and prefetch buffer maintenance operations ............................. 3-87
Table 3-75 Functional bits of c7 for set and way ....................................................................... 3-88
Table 3-76 Values of A, L, and S for L1 cache sizes ................................................................ 3-88
Table 3-77 Values of A, L, and S for L2 cache sizes ................................................................ 3-89
Table 3-78 Functional bits of c7 for MVA .................................................................................. 3-89
Table 3-79 PA Register for successful translation bit functions ................................................ 3-91
Table 3-80 PA Register for unsuccessful translation bit functions ............................................ 3-92
Table 3-81 Results of access to the data synchronization barrier operation ............................. 3-94
Table 3-82 Results of access to the data memory barrier operation ......................................... 3-95
Table 3-83 Performance Monitor Control Register bit functions ................................................ 3-97
Table 3-84 Results of access to the Performance Monitor Control Register ............................. 3-98
Table 3-85 Count Enable Set Register bit functions ................................................................. 3-99
Table 3-86 Results of access to the Count Enable Set Register ............................................ 3-100
Table 3-87 Count Enable Clear Register bit functions ............................................................ 3-101
Table 3-88 Results of access to the Count Enable Clear Register ......................................... 3-101
Table 3-89 Overflow Flag Status Register bit functions .......................................................... 3-102
Table 3-90 Results of access to the Overflow Flag Status Register ....................................... 3-103
Table 3-91 Software Increment Register bit functions ............................................................ 3-104
Table 3-92 Results of access to the Software Increment Register ......................................... 3-104
Table 3-93 Performance Counter Selection Register bit functions ......................................... 3-105
Table 3-94 Results of access to the Performance Counter Selection Register ....................... 3-105
Table 3-95 Results of access to the Cycle Count Register ..................................................... 3-106
Table 3-96 Event Selection Register bit functions ................................................................... 3-107
Table 3-97 Results of access to the Event Selection Register ................................................ 3-107
Table 3-98 Values for predefined events ................................................................................ 3-108
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. xiii
List of Tables
Table 3-99 Results of access to the Performance Monitor Count Registers .......................... 3-112
Table 3-100 Signal settings for the Performance Monitor Count Registers .............................. 3-112
Table 3-101 User Enable Register bit functions ....................................................................... 3-113
Table 3-102 Results of access to the User Enable Register .................................................... 3-114
Table 3-103 Interrupt Enable Set Register bit functions ........................................................... 3-115
Table 3-104 Results of access to the Interrupt Enable Set Register ........................................ 3-115
Table 3-105 Interrupt Enable Clear Register bit functions ........................................................ 3-116
Table 3-106 Results of access to the Interrupt Enable Clear Register ..................................... 3-116
Table 3-107 L2 Cache Lockdown Register bit functions ........................................................... 3-118
Table 3-108 Results of access to the L2 Cache Lockdown Register ........................................ 3-119
Table 3-109 L2 Cache Auxiliary Control Register bit functions ................................................. 3-121
Table 3-110 Results of access to the L2 Cache Auxiliary Control Register .............................. 3-124
Table 3-111 TLB Lockdown Register bit functions ................................................................... 3-125
Table 3-112 Results of access to the TLB Lockdown Register ................................................ 3-126
Table 3-113 Application of remapped registers on memory access ......................................... 3-128
Table 3-114 Primary Region Remap Register bit functions ...................................................... 3-129
Table 3-115 Encoding for the remapping of the primary memory type ..................................... 3-130
Table 3-116 Normal Memory Remap Register bit functions ..................................................... 3-130
Table 3-117 Remap encoding for inner or outer cacheable attributes ...................................... 3-132
Table 3-118 Results of access to the memory region remap registers ..................................... 3-132
Table 3-119 PLE Identification and Status Register bit functions ............................................. 3-134
Table 3-120 Opcode_2 values for PLE Identification and Status Register functions ................ 3-134
Table 3-121 Results of access to the PLE Identification and Status Registers ........................ 3-135
Table 3-122 PLE User Accessibility Register bit functions ....................................................... 3-136
Table 3-123 Results of access to the PLE User Accessibility Register .................................... 3-136
Table 3-124 PLE Channel Number Register bit functions ........................................................ 3-137
Table 3-125 Results of access to the PLE User Accessibility Register .................................... 3-138
Table 3-126 Results of access to the PLE Enable Registers ................................................... 3-139
Table 3-127 PLE Control Register bit functions ........................................................................ 3-140
Table 3-128 Writing to UM bit [26] ............................................................................................ 3-141
Table 3-129 Results of access to the PLE Control Registers ................................................... 3-142
Table 3-130 Results of access to the PLE Internal Start Address Register .............................. 3-143
Table 3-131 Maximum transfer size for various L2 cache sizes ............................................... 3-144
Table 3-132 Results of access to the PLE Internal End Address Register ............................... 3-145
Table 3-133 PLE Channel Status Register bit functions ........................................................... 3-146
Table 3-134 Results of access to the PLE Channel Status Register ........................................ 3-147
Table 3-135 PLE Context ID Register bit functions .................................................................. 3-148
Table 3-136 Results of access to the PLE Context ID Register ............................................... 3-148
Table 3-137 Secure or Nonsecure Vector Base Address Register bit functions ...................... 3-149
Table 3-138 Results of access to the Secure or Nonsecure Vector Base Address Register ... 3-150
Table 3-139 Monitor Vector Base Address Register bit functions ............................................ 3-151
Table 3-140 Results of access to the Monitor Vector Base Address Register ......................... 3-151
Table 3-141 Interrupt Status Register bit functions ................................................................... 3-152
Table 3-142 Results of access to the Interrupt Status Register ................................................ 3-153
Table 3-143 FCSE PID Register bit functions ........................................................................... 3-154
Table 3-144 Results of access to the FCSE PID Register ........................................................ 3-154
Table 3-145 Context ID Register bit functions .......................................................................... 3-156
xiv Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
List of Tables
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. xv
List of Tables
xvi Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
List of Tables
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. xvii
List of Tables
xviii Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
List of Tables
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. xix
List of Tables
xx Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
List of Figures
Cortex-A8 Technical Reference Manual
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. xxi
List of Figures
xxii Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
List of Figures
Figure 3-57 PLE Internal Start Address Register bit format ..................................................... 3-143
Figure 3-58 PLE Internal End Address Register format ........................................................... 3-144
Figure 3-59 PLE Channel Status Register format .................................................................... 3-146
Figure 3-60 PLE Context ID Register format ............................................................................ 3-148
Figure 3-61 Secure or Nonsecure Vector Base Address Register format ................................ 3-149
Figure 3-62 Monitor Vector Base Address Register format ...................................................... 3-150
Figure 3-63 Interrupt Status Register format ............................................................................ 3-152
Figure 3-64 FCSE PID Register format .................................................................................... 3-153
Figure 3-65 Address mapping with the FCSE PID Register ..................................................... 3-155
Figure 3-66 Context ID Register format .................................................................................... 3-156
Figure 3-67 Formats of the instruction and Data side data 0 Registers ................................... 3-160
Figure 3-68 Formats of the instruction and Data side data 1 Registers ................................... 3-160
Figure 3-69 L1 TLB CAM read operation format ...................................................................... 3-165
Figure 3-70 L1 TLB CAM write operation format ...................................................................... 3-165
Figure 3-71 L1 HVAB array read operation format ................................................................... 3-167
Figure 3-72 L1 HVAB array write operation format .................................................................. 3-168
Figure 3-73 L1 TAG array read operation format ..................................................................... 3-169
Figure 3-74 L1 TAG array write operation format ..................................................................... 3-169
Figure 3-75 L1 DATA array read operation format ................................................................... 3-170
Figure 3-76 L1 DATA array write operation format ................................................................... 3-171
Figure 3-77 BTB array read operation format ........................................................................... 3-172
Figure 3-78 BTB array write operation format .......................................................................... 3-173
Figure 3-79 GHB array read operation format .......................................................................... 3-174
Figure 3-80 GHB array write operation format ......................................................................... 3-174
Figure 3-81 Formats of the L2 data 0 Register ......................................................................... 3-175
Figure 3-82 Formats of the L2 data 1 Register ......................................................................... 3-175
Figure 3-83 Formats of the L2 data 2 Register ......................................................................... 3-176
Figure 3-84 L2 parity/ECC array read operation format ........................................................... 3-178
Figure 3-85 L2 parity/ECC array write operation format ........................................................... 3-179
Figure 3-86 L2 tag array read operation format ........................................................................ 3-180
Figure 3-87 L2 tag array write operation format ....................................................................... 3-180
Figure 3-88 L2 data RAM array read operation format ............................................................. 3-181
Figure 3-89 L2 data RAM array write operation format ............................................................ 3-181
Figure 6-1 16MB supersection descriptor format ....................................................................... 6-4
Figure 8-1 L2 cache bank structure ............................................................................................ 8-4
Figure 10-1 CLK duty cycle ........................................................................................................ 10-2
Figure 10-2 CLK-to-ACLK ratio of 4:1 ........................................................................................ 10-3
Figure 10-3 Changing the CLK-to-ACLK ratio from 4:1 to 1:1 .................................................... 10-3
Figure 10-4 Changing the PCLK-to-internal-PCLK ratio from 4:1 to 1:1 .................................... 10-4
Figure 10-5 Changing the ATCLK-to-internal-ATCLK ratio from 4:1 to 1:1 ................................ 10-4
Figure 10-6 Power-on reset timing ............................................................................................. 10-6
Figure 10-7 Soft reset timing ...................................................................................................... 10-7
Figure 10-8 PRESETn and ATRESETn assertion ...................................................................... 10-8
Figure 10-9 STANDBYWFI deassertion ................................................................................... 10-11
Figure 10-10 Power domains ..................................................................................................... 10-13
Figure 11-1 L1 MBIST Instruction Register bit assignments ...................................................... 11-3
Figure 11-2 L2 MBIST Instruction Register bit assignments ...................................................... 11-7
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. xxiii
List of Figures
Figure 11-3 L1 and L2 MBIST GO-NOGO Instruction Registers bit assignments ................... 11-12
Figure 11-4 L1 MBIST GO-NOGO Instruction Register example with two patterns ................ 11-13
Figure 11-5 L1 MBIST Datalog Register bit assignments ........................................................ 11-14
Figure 11-6 L2 MBIST Datalog Register bit assignments ........................................................ 11-15
Figure 11-7 Timing of MBIST instruction load .......................................................................... 11-19
Figure 11-8 Timing of MBIST custom GO-NOGO instruction load .......................................... 11-20
Figure 11-9 Timing of MBIST at-speed execution .................................................................... 11-21
Figure 11-10 Timing of MBIST end-of-test datalog retrieval ...................................................... 11-22
Figure 11-11 Timing of MBIST start of bitmap datalog retrieval ................................................. 11-22
Figure 11-12 Timing of MBIST end of bitmap datalog retrieval .................................................. 11-23
Figure 11-13 Physical array after pass 1 of CKBD .................................................................... 11-26
Figure 11-14 Physical array after pass 1 of COLBAR ................................................................ 11-27
Figure 11-15 Physical array after pass 1 of ROWBAR .............................................................. 11-28
Figure 11-16 Row 1 column 2 state during pass 2 of RWXMARCH .......................................... 11-29
Figure 11-17 Row 1 column 2 state during pass 2 of RWYMARCH .......................................... 11-29
Figure 11-18 Row 1 column 2 state during pass 2 of RWRXMARCH ....................................... 11-30
Figure 11-19 Row 1 column 2 state during pass 2 of RWRYMARCH ....................................... 11-30
Figure 11-20 Row 1 column 2 state during pass 2 of XMARCHC ............................................. 11-31
Figure 11-21 Row 1 column 2 state during pass 2 of YMARCHC ............................................. 11-32
Figure 11-22 XADDRBAR array accessing and data ................................................................. 11-32
Figure 11-23 YADDRBAR array accessing and data ................................................................. 11-33
Figure 11-24 WRITEBANG ........................................................................................................ 11-34
Figure 11-25 READBANG .......................................................................................................... 11-34
Figure 11-26 Input wrapper boundary register cell control logic ................................................ 11-37
Figure 11-27 Output wrapper boundary register cell control logic ............................................. 11-37
Figure 11-28 IEEE 1500-compliant input wrapper boundary register cell .................................. 11-38
Figure 11-29 Reset handling ...................................................................................................... 11-39
Figure 11-30 SAFESHIFTRAM signal ........................................................................................ 11-39
Figure 12-1 Typical debug system ............................................................................................. 12-2
Figure 12-2 Debug ID Register format ..................................................................................... 12-19
Figure 12-3 Debug ROM Address Register format .................................................................. 12-22
Figure 12-4 Debug Self Address Offset Register format .......................................................... 12-23
Figure 12-5 Debug Status and Control Register format ........................................................... 12-24
Figure 12-6 DTR format ........................................................................................................... 12-32
Figure 12-7 Vector Catch Register format ............................................................................... 12-33
Figure 12-8 Event Catch Register format ................................................................................. 12-36
Figure 12-9 Debug State Cache Control Register format ........................................................ 12-37
Figure 12-10 ITR format ............................................................................................................. 12-37
Figure 12-11 Debug Run Control Register format ..................................................................... 12-38
Figure 12-12 Breakpoint Control Registers format ..................................................................... 12-40
Figure 12-13 Watchpoint Control Registers format .................................................................... 12-45
Figure 12-14 OS Lock Access Register format .......................................................................... 12-48
Figure 12-15 OS Lock Status Register format ........................................................................... 12-49
Figure 12-16 OS Save and Restore Register format ................................................................. 12-50
Figure 12-17 PRCR format ........................................................................................................ 12-52
Figure 12-18 PRSR format ......................................................................................................... 12-54
Figure 12-19 Integration Internal Output Control Register format .............................................. 12-59
xxiv Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
List of Figures
Figure 12-20 Integration External Output Control Register format ............................................. 12-60
Figure 12-21 Integration Input Status Register format ............................................................... 12-62
Figure 12-22 Integration Mode Control Register format ............................................................. 12-63
Figure 12-23 Claim Tag Set Register format .............................................................................. 12-64
Figure 12-24 Claim Tag Clear Register format ........................................................................... 12-64
Figure 12-25 Lock Access Register format ................................................................................ 12-65
Figure 12-26 Lock Status Register format .................................................................................. 12-66
Figure 12-27 Authentication Status Register format ................................................................... 12-67
Figure 12-28 Device Type Register format ................................................................................. 12-68
Figure 12-29 Timing of core power-down and power-up sequences ......................................... 12-93
Figure 12-30 Timing of ETM power-down and power-up sequences ......................................... 12-94
Figure 13-1 NEON and VFPLite register bank ........................................................................... 13-4
Figure 13-2 Register banks ........................................................................................................ 13-6
Figure 13-3 Floating-Point System ID Register format ............................................................. 13-13
Figure 13-4 Floating-Point Status and Control Register format ................................................ 13-15
Figure 13-5 Floating-Point Exception Register format .............................................................. 13-18
Figure 13-6 MVFR0 Register format ........................................................................................ 13-18
Figure 13-7 MVFR1 Register format ........................................................................................ 13-19
Figure 14-1 Example CoreSight debug environment ................................................................. 14-4
Figure 14-2 ID Register format ................................................................................................. 14-11
Figure 14-3 Configuration Code Register format ...................................................................... 14-13
Figure 14-4 Configuration Code Extension Register format ..................................................... 14-14
Figure 14-5 Mapping between the Component ID Registers and the component ID value ...... 14-17
Figure 14-6 ITMISCOUT Register format ................................................................................. 14-19
Figure 14-7 ITMISCIN Register format ..................................................................................... 14-19
Figure 14-8 ITTRIGGER Register format ................................................................................. 14-20
Figure 14-9 ITATBDATA0 Register format ............................................................................... 14-21
Figure 14-10 ITATBCTR2 Register format ................................................................................. 14-21
Figure 14-11 ITATBCTR1 Register format ................................................................................. 14-22
Figure 14-12 ITATBCTR0 Register format ................................................................................. 14-23
Figure 15-1 Debug system components ..................................................................................... 15-2
Figure 15-2 Cross Trigger Interface channels ............................................................................ 15-4
Figure 15-3 Asynchronous to synchronous converter ................................................................ 15-8
Figure 15-4 CTI Control Register format .................................................................................. 15-13
Figure 15-5 CTI Interrupt Acknowledge Register format .......................................................... 15-13
Figure 15-6 CTI Application Trigger Set Register format ......................................................... 15-14
Figure 15-7 CTI Application Trigger Clear Register format ...................................................... 15-15
Figure 15-8 CTI Application Pulse Register format .................................................................. 15-16
Figure 15-9 CTI Trigger to Channel Enable Registers format .................................................. 15-16
Figure 15-10 CTI Channel to Trigger Enable Registers format .................................................. 15-17
Figure 15-11 CTI Trigger In Status Register format ................................................................... 15-18
Figure 15-12 CTI Trigger Out Status Register format ................................................................ 15-19
Figure 15-13 CTI Channel In Status Register format ................................................................. 15-19
Figure 15-14 CTI Channel Gate Register format ........................................................................ 15-20
Figure 15-15 ASIC Control Register format ................................................................................ 15-21
Figure 15-16 CTI Channel Out Status Register format .............................................................. 15-22
Figure 15-17 ITTRIGINACK Register format .............................................................................. 15-24
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. xxv
List of Figures
xxvi Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Preface
This preface introduces the Cortex™-A8 Revision r1p1 Technical Reference Manual
(TRM). It contains the following sections:
• About this manual on page xxviii
• Feedback on page xxxiv.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. xxvii
Preface
The rnpn identifier indicates the revision status of the product described in this manual,
where:
rn Identifies the major revision of the product.
pn Identifies the minor revision or modification status of the product.
Intended audience
This document is written for hardware and software engineers who want to design or
develop products based on the Cortex-A8 processor.
Chapter 1 Introduction
Read this chapter for an introduction to the processor and descriptions of
the major functional blocks.
xxviii Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Preface
Chapter 12 Debug
Read this chapter for a description of the debug support.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. xxix
Preface
Chapter 17 AC Characteristics
Read this chapter for a description of the timing parameters applicable to
the processor.
Conventions
Typographical
monospace Denotes text that you can enter at the keyboard, such as
commands, file and program names, and source code.
monospace bold Denotes language keywords when used outside example code.
xxx Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Preface
< and > Angle brackets enclose replaceable terms for assembler syntax
where they appear in code or code fragments. They appear in
normal font in running text. For example:
• MRC p15, 0 <Rd>, <CRn>, <CRm>, <Opcode_2>
• The Opcode_2 value selects which register is accessed.
Timing diagrams
The figure named Key to timing diagram conventions explains the components used in
timing diagrams. Variations, when they occur, have clear labels. You must not assume
any timing information that is not explicit in the diagrams.
Shaded bus and signal areas are undefined, so the bus or signal can assume any value
within the shaded area at that time. The actual level is unimportant and does not affect
normal operation.
&ORFN
+,*+WR/2:
7UDQVLHQW
+,*+/2:WR+,*+
%XVVWDEOH
%XVWRKLJKLPSHGDQFH
%XVFKDQJH
+LJKLPSHGDQFHWRVWDEOHEXV
Signals
Signal level The level of an asserted signal depends on whether the signal is
active-HIGH or active-LOW. Asserted means HIGH for
active-HIGH signals and LOW for active-LOW signals.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. xxxi
Preface
Numbering
<size in bits>'<base><number>
This is a Verilog method of abbreviating constant numbers. For example:
• 'h7B4 is an unsized hexadecimal value.
• 'o7654 is an unsized octal value.
• 8'd9 is an eight-bit wide decimal value of 9.
• 8'h3F is an eight-bit wide hexadecimal value of 0x3F. This is
equivalent to b00111111.
• 8'b1111 is an eight-bit wide binary value of b00001111.
Further reading
ARM publications
This manual contains information that is specific to the processor. See the following
documents for other relevant information:
xxxii Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Preface
• CoreSight Design Kit Implementation and Integration Manual (ARM DII 0092)
Other publications
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. xxxiii
Preface
Feedback
ARM welcomes feedback on the processor and its documentation.
If you have any comments or suggestions about this product, contact your supplier
giving:
• the product name
• a concise explanation of your comments.
If you have any comments on this manual, send email to [email protected] giving:
• the document title
• the document number
• the page number(s) to which your comments apply
• a concise explanation of your comments.
xxxiv Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 1
Introduction
This chapter introduces the processor and its features. It contains the following sections:
• About the processor on page 1-2
• ARMv7-A architecture on page 1-3
• Components of the processor on page 1-4
• External interfaces of the processor on page 1-8
• Debug on page 1-9
• Power management on page 1-10
• Configurable options on page 1-11
• Product revisions on page 1-13.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 1-1
Introduction
• dynamic branch prediction with branch target address cache, global history
buffer, and 8-entry return stack
• Memory Management Unit (MMU) and separate instruction and data Translation
Look-aside Buffers (TLBs) of 32 entries each
• Level 2 cache with parity and Error Correction Code (ECC) configuration option
• Level 2 cache configuration option that supports one, two, or four tag banks
• ARMv7 debug with watchpoint and breakpoint registers and a 32-bit Advanced
Peripheral Bus (APB) interface to the CoreSight debug system.
1-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Introduction
• ARM Thumb®-2 architecture for overall code density comparable with Thumb
and performance comparable with ARM instructions. See the ARM Architecture
Reference Manual, Thumb-2 supplement for details of both the ARM and Thumb
instruction sets.
• TrustZone® technology for enhanced security. See the ARM Reference Manual,
Security Extensions supplement for details on how TrustZone works in the
architecture.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 1-3
Introduction
(70
)ODJV $/8
/
/FDFKH 3UHIHWFK 'HSHQGHQF\
/ DQG 'HFRGH FDFKH /
LQWHUIDFH FKHFNDQG $/8 &RQWURO LQWHUIDFH
5$0 EUDQFK VHTXHQFHU 5$0
LVVXH 5HJ%DQN
SUHGLFWLRQ
0$&
7/% 7/%
/
FDFKH ,QVWUXFWLRQGDWD1(21DQGSUHORDGHQJLQHEXIIHUV
$UELWUDWLRQ /FDFKHSLSHOLQHFRQWURO
)LOODQGHYLFWLRQTXHXH
3DULW\DQG
/FDFKHGDWD5$0 /FDFKHWDJ5$0
:ULWH (&&5$0
%,8
EXIIHU
1(21
&RUWH[$
$;,LQWHUIDFH
1-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Introduction
The instruction fetch unit predicts the instruction stream, fetches instructions from the
L1 instruction cache, and places the fetched instructions into a buffer for consumption
by the decode pipeline. The instruction fetch unit also includes the L1 instruction cache.
The instruction decode unit decodes and sequences all ARM and Thumb-2 instructions
including the debug control coprocessor, CP14, and the system control coprocessor,
CP15 instructions. See Chapter 12 Debug for information on the CP14 coprocessor and
Chapter 3 System Control Coprocessor for information on the CP15 coprocessor.
See Chapter 16 Instruction Cycle Timing for more information on how the processor
sequences instructions.
The instruction execute unit consists of two symmetric Arithmetic Logical Unit (ALU)
pipelines, an address generator for load and store instructions, and the multiply pipeline.
The execute pipelines also perform register write back.
• executes all integer ALU and multiply operations including flag generation
• generates the virtual addresses for loads and stores and the base write-back value,
when required
• supplies formatted data for stores and also forwards data and flags
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 1-5
Introduction
1.3.4 Load/store
The load/store unit encompasses the entire L1 data side memory system and the integer
load/store pipeline. This includes:
• the L1 data cache
• the data side TLB
• the integer store buffer
• the NEON store buffer
• the integer load data alignment and formatting
• the integer store data alignment and formatting.
The pipeline accepts one load or store per cycle that can be present in either pipeline 0
or pipeline 1. This gives the processor flexibility when scheduling load and store
instructions. See Chapter 7 Level 1 Memory System for more information.
1.3.5 L2 cache
The L2 cache unit includes the L2 cache and the Buffer Interface Unit (BIU). It services
L1 cache misses from both the instruction fetch unit and the load/store unit. See
Chapter 8 Level 2 Memory System and Chapter 9 External Memory Interface for more
information.
1.3.6 NEON
The NEON unit includes the full 10-stage NEON pipeline that decodes and executes the
NEON media instruction set. The NEON unit includes:
• the NEON instruction queue
• the NEON load data queue
• two pipelines of NEON decode logic
• three execution pipelines for NEON integer instructions
• two execution pipelines for NEON floating-point instructions
• one execution pipeline for NEON and VFP load/store instructions
• the VFP engine for full execution of the VFPv3 data-processing instruction set.
See Chapter 13 NEON & VFPLite Programmer’s Model for programming information
on the NEON and VFPLite coprocessor.
1.3.7 ETM
The ETM unit is a non-intrusive trace macrocell that filters and compresses an
instruction and data trace for use in system debugging and system profiling.
1-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Introduction
The ETM unit has an external interface outside of the processor called the Advanced
Trace Bus (ATB) interface. See Chapter 14 Embedded Trace Macrocell for more
information.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 1-7
Introduction
See the AMBA AXI Protocol Specification and the CoreSight Architecture Specification
for more information on these interfaces.
The AXI bus interface is the main interface to the system bus. It performs L2 cache fills
and noncacheable accesses for both instructions and data. The AXI interface supports
64-bit or 128-bit wide input and output data buses. It also supports multiple outstanding
requests on the AXI bus. The AXI signals are synchronous to the CLK input. A wide
range of bus clock to core clock ratios is possible through the use of the AXI clock
enable signal ACLKEN.
The APB is an AMBA bus used for debugging. The CoreSight interface is the ARM
architecture for multi-processor trace and debug. It defines what debug and trace
components are required and how they are connected.
The ATB is a trace output bus used for debugging. The CoreSight components are
programmed with the Debug Access Port (DAP) using the APB programming bus.
Trace is output over the ATB trace bus. See the CoreSight Architecture Specification for
more information on AMBA 3 ATB.
The Design For Test (DFT) interface provides support for manufacturing testing of the
core using Memory Built-In Self Test (MBIST) and Automatic Test Pattern Generation
(ATPG). See Chapter 11 Design for Test for more information.
1-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Introduction
1.5 Debug
The processor implements the ARMv7 Debug architecture that includes support for
TrustZone and CoreSight. The memory-mapped external debug interface replaces the
coprocessor interface defined in the previous version of the Debug architecture.
To get full access to the processor debug capability, you can access the debug register
map through the Advanced Peripheral Bus (APB) slave port. See Chapter 12 Debug for
more information.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 1-9
Introduction
1-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Introduction
0KB -
64KB 1 or 2
128KB 1 or 2
256KB 2
512KB 2 or 4
1MB 2 or 4
2MB 4
L2 Parity/ECC Yes or No
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 1-11
Introduction
ETM Yes or No
Neon Yes or No
Note
When you configure the processor without the NEON options, all attempted NEON and
VFP instructions result in an Undefined exception.
1-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Introduction
• The L2EN bit of the Auxiliary Control Register is banked between Nonsecure and
Secure states
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 1-13
Introduction
1-14 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 2
Programmer’s Model
This chapter describes the processor registers and provides information for
programming the microprocessor.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-1
Programmer’s Model
2-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
• Thumb-2 instruction set, see the ARM Architecture Reference Manual, Thumb-2
supplement
• NEON instruction set, see the ARM Architecture Reference Manual, Advanced
SIMD Extension and VFPv3 supplement.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-3
Programmer’s Model
The most important difference between the Thumb instruction set and the ARM
instruction set is that most 32-bit Thumb instructions are unconditional, whereas most
ARM instructions can be conditional. Thumb-2 introduces a conditional execution
instruction, IT, that is a logical if-then-else function that you can apply to following
instructions to make them conditional.
Thumb-2 instructions are accessible as were Thumb instructions when the processor is
in Thumb state, that is, the T bit in the CPSR is 1 and the J bit in the CPSR is 0.
In addition to the 32-bit Thumb instructions, there are several 16-bit Thumb instructions
and a few 32-bit ARM instructions, introduced as part of the Thumb-2 architecture.
• addition of a 16-bit Compare with Zero and Branch (CZB) instruction to improve
code density by replacing two-instruction sequence with a single instruction.
The 32-bit ARM Thumb-2 instructions are added in the space occupied by the Thumb
BL and BLX instructions. Figure 2-1 shows the 32-bit ARM Thumb-2 instruction
format.
KZ KZ
2-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
The first halfword (hw1) determines the instruction length and functionality. If the
processor decodes the instruction as 32-bit long, then the processor fetches the second
halfword (hw2) of the instruction from the instruction address plus two.
The availability of both 16-bit Thumb and 32-bit instructions in the Thumb-2
instruction sets, gives you the flexibility to emphasize performance or code size on a
subroutine level, according to the requirements of their applications. For example, you
can code critical loops for applications such as fast interrupts and DSP algorithms using
the 32-bit media instructions in Thumb-2 and use the smaller 16-bit classic Thumb
instructions for the rest of the application. This is for code density and does not require
any mode change.
See the ARM Architecture Reference Manual, Thumb-2 supplement for details on the
Thumb-2 instruction set architecture. For details of the ARM and Thumb instruction
sets, see the ARM Architecture Reference Manual.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-5
Programmer’s Model
For details of both the ARM and Thumb instruction sets, see the ARM Architecture
Reference Manual. For details of the Thumb-2EE instruction set, see the ARM
Architecture Reference Manual, Thumb-2 Execution Environment supplement.
2.3.1 Instructions
In ThumbEE state, the processor uses almost the same instruction set as Thumb-2
although some instructions behave differently, and a few are removed, or added.
Thumb-2EE instructions are accessible when the processor is in ThumbEE state, that is,
when the T bit in the CPSR is 1 and the J bit in the CPSR is 1.
2.3.2 Configuration
2-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
Figure 2-2 shows the bit arrangement of the Thumb-2EE Configuration Register.
5HVHUYHG
;('
Table 2-1 shows how the bit values correspond with the Thumb-2EE Configuration
Register.
[0] XED eXecution Environment Disable bit. Controls unprivileged access to the Thumb-2EE HandlerBase
Register:
0 = Unprivileged access permitted. See Access to Thumb-2EE registers on page 2-9 for details.
1 = Unprivileged access disabled.
The reset value of this bit is 0.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-7
Programmer’s Model
The purpose of the Thumb-2EE HandlerBase Register is to hold the base address for
Thumb-2EE handlers.
• in CP14 register c0
• a 32-bit read/write register, with unprivileged access that depends on the value of
the Thumb-2EE Configuration Register. See Access to Thumb-2EE registers on
page 2-9.
Figure 2-3 shows the bit arrangement of the Thumb-2EE HandlerBase Register.
+DQGOHU%DVH
5HVHUYHG
Table 2-2 shows how the bit values correspond with the Thumb-2EE HandlerBase
Register.
[31:2] HandlerBase The address of the Thumb-2EE Handler_00 implementation. This is the address of the first of
the Thumb-2EE handlers. The reset value of this field is Unpredictable.
2-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
Table 2-3 shows the access permissions for the Thumb-2EE registers, and how
unprivileged access to the Thumb-2EE HandlerBase Register depends on the value of
the Thumb-2EE Configuration Register.
Thumb-2EE Configuration Read access permitted, Read access permitted, Read and write
write access Undefined write access Undefined access permitted
Thumb-2EE HandlerBase Read and write Read and write Read and write
access permitted access Undefined access permitted
a. Value of XED bit in the Thumb-2EE Configuration Register, see Thumb-2EE Configuration Register on
page 2-7.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-9
Programmer’s Model
See the ARM Architecture Reference Manual for full details of the Jazelle Extension.
The Jazelle Identity Register allows software to determine the implementation of the
Jazelle Extension provided by the processor.
Figure 2-4 shows the bit arrangement of the Jazelle Identity Register.
5HVHUYHG
Table 2-4 shows how the bit values correspond with the Jazelle Identity Register.
2-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
The Jazelle Main Configuration Register controls features of the Jazelle Extension.
Figure 2-5 shows the bit arrangement of the Jazelle Main Configuration Register.
5HVHUYHG
Table 2-5 shows how the bit values correspond with the Jazelle Main Configuration
Register.
[31:0] - RAZ
The Jazelle OS Control Register allows operating systems to control access to Jazelle
Extension hardware.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-11
Programmer’s Model
Figure 2-6 shows the bit arrangement of the Jazelle OS Control Register.
5HVHUYHG
Table 2-6 shows how the bit values correspond with the Jazelle OS Control Register.
[31:0] - RAZ
2-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
• It defines a class of core operation that you can switch between Secure and
Nonsecure state. Most code runs in Nonsecure state. Only trusted code runs in
Secure state.
• It defines some memory as secure memory. When the core is in Secure state, it
can access secure memory.
Exceptions are generally handled in a similar way to other ARM architectures. Support
is available for some exceptions handled only by code running in Secure state.
See the ARM Architecture Reference Manual, Security Extensions supplement for more
details on how TrustZone works in the architecture.
The basis of the TrustZone model is that the computing environment splits into two
isolated states, the Secure state and the Nonsecure state, with no leakage of secure data
to the Nonsecure state. Software Secure Monitor code, running in the Monitor mode,
links the two states and acts as a gatekeeper to manage program flow. The system can
have both secure and nonsecure peripherals that is suitable to secure and nonsecure
device drivers control. Figure 2-7 on page 2-14 shows the relationship between the
Secure and Nonsecure states. The Operating System (OS) splits into the secure OS, that
includes the secure kernel, and the nonsecure OS, that includes the nonsecure kernel.
For details on modes of operation, see Operating modes on page 2-22.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-13
Programmer’s Model
1RQVHFXUH 6HFXUH
)L[HGHQWU\ )L[HGHQWU\
SRLQWV SRLQWV
3ULYLOHJHGPRGHV
0RQLWRU
1RQVHFXUH 6HFXUH
NHUQHO NHUQHO
6HFXUH 6HFXUH
GHYLFHGULYHU GHYLFH
8VHUPRGH
1RQVHFXUH 6HFXUH
DSSOLFDWLRQ WDVNV
In normal nonsecure operation, the OS runs tasks in the usual way. When a User process
requires secure execution it makes a request to the secure kernel, that operates in
privileged mode. This then calls the Secure Monitor to transfer execution to the Secure
state.
This approach to secure systems means that the platform OS that works in the
Nonsecure state, has only a few fixed entry points into the Secure state through the
Secure Monitor. The trusted code base for the Secure state, that includes the secure
kernel and secure device drivers, is small and therefore much easier to maintain and
verify.
See Software consideration for TrustZone on page 2-44 and Hardware consideration
for TrustZone on page 2-45 for more details.
For more information on how TrustZone works in the architecture, see the ARM
Architecture Reference Manual, Security Extensions supplement.
2-14 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
NEON technology includes both Advanced Single Instruction Multiple Data (SIMD)
instructions and the VFPv3 instructions.
The NEON coprocessor provides a register bank that is distinct from the ARM integer
core register bank. Both the Advanced SIMD instructions and the VFP instruction use
this register bank.
The Advanced SIMD instructions perform packed SIMD operations. These operations
process registers containing vectors of elements of the same type packed together,
enabling the same operation to be performed on multiple items in parallel. Instructions
operate on vectors held in 64-bit or 128-bit registers.
See the ARM Architecture Reference Manual, Advanced SIMD Extension and VFPv3
supplement for details of the NEON technology.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-15
Programmer’s Model
• the introduction of VFP architecture v3U, that does not trap floating-point
exceptions.
VFPv3 is backward compatible with VFPv2 except for the capability of trapping
floating-point exceptions.
See the ARM Architecture Reference Manual, Advanced SIMD Extension and VFPv3
supplement for details of VFPv3.
2-16 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
ARM state 32-bit, word-aligned ARM instructions are executed in this state.
T bit is 0 and J bit is 0.
Note
• The processor does not support Jazelle state, that is, when the T bit is 0 and J bit
is 1.
• Transition between ARM and Thumb states does not affect the processor mode or
the register contents. See ARM Architecture Reference Manual, Thumb-2
Execution Environment supplement for details on entering and exiting ThumbEE
state.
Exceptions cause the processor to enter ARM or Thumb state according to the value
held in the TE bit within the system control coprocessor. Normally, on exiting an
exception handler, the processor restores the original contents of the T and J bits.
The processor enables you to mix ARM Thumb-2 code. See Chapter 4 Interworking
ARM and Thumb in the RealView Compilation Tools Developer Guide for details.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-17
Programmer’s Model
Note
• when any of these types are described as unsigned, the N-bit data value represents
a non-negative integer in the range 0 to +2N-1, using normal binary format
• when any of these types are described as signed, the N-bit data value represents
an integer in the range -2N-1 to +2N-1-1, using two’s complement format.
The processor provides mixed-endian and unaligned access support. See Chapter 4
Unaligned Data and Mixed-endian Data Support for details.
Note
You cannot use LDRD, LDM, LDC, STRD, STM, or STC instructions to access 32-bit
quantities if they are unaligned.
2-18 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
Additionally, the processor supports mixed-endian and unaligned data accesses. See
Chapter 4 Unaligned Data and Mixed-endian Data Support for details.
Note
Instructions are always treated as little-endian.
In byte-invariant big-endian format, the processor stores the most significant byte of a
word at the lowest-numbered byte, and the least significant byte at the
highest-numbered byte. Therefore, byte 0 of the memory system connects to data lines
31-24 as Figure 2-8 shows.
%LW :RUGDGGUHVV
+LJKHUDGGUHVV
/RZHUDGGUHVV
0RVWVLJQLILFDQWE\WHLVDWORZHVWDGGUHVV
:RUGLVDGGUHVVHGE\E\WHDGGUHVVRIPRVWVLJQLILFDQWE\WH
In little-endian format, the lowest-numbered byte in a word is the least significant byte
of the word and the highest-numbered byte is the most significant. Therefore, byte 0 of
the memory system connects to data lines 7-0. This is shown in Figure 2-9 on page 2-20.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-19
Programmer’s Model
%LW :RUGDGGUHVV
+LJKHUDGGUHVV
/RZHUDGGUHVV
/HDVWVLJQLILFDQWE\WHLVDWORZHVWDGGUHVV
:RUGLVDGGUHVVHGE\E\WHDGGUHVVRIOHDVWVLJQLILFDQWE\WH
2-20 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
When the core is in the Secure or Nonsecure state, the VA is Secure or Nonsecure
respectively. To get the VA to PA translation, the core uses secure translation tables
while it is in Secure state. Otherwise it uses the nonsecure translation tables.
Virtual Address Virtual index physical taga Translates Virtual Address to Physical Address Physical Addressb
This is an example of the address manipulation that occurs when the processor requests
an instruction.
2. The lower bits of the VA indexes the instruction cache. The VA is translated using
the Secure or Nonsecure Process ID, CP15 c13, to the MVA, and then to PA in the
Translation Lookaside Buffer (TLB). The TLB performs the translation in parallel
with the cache lookup. The translation uses secure descriptors if the core is in the
Secure state. Otherwise it uses the nonsecure ones.
3. If the TLB performs a successful protection check on the MVA, and the PA tag is
in the instruction cache, the instruction data is returned to the processor. For
information on unsuccessful protection checks, see Aborts on page 2-37.
4. The PA is passed to the L2 cache. If the L2 cache contains the physical address of
the requested instruction, the L2 cache supplies the instruction data.
5. The PA is passed to the AXI bus interface to perform an external access, in the
event of a cache miss. The external access is always Nonsecure when the core is
in the Nonsecure state. In the Secure state, the external access is Secure or
Nonsecure according to the NS attribute value in the selected descriptor.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-21
Programmer’s Model
Modes other than User mode are collectively known as privileged modes. Privileged
modes are used to service interrupts or exceptions, or to access protected resources.
Table 2-8 shows the mode structure for the processor.
NS bit = 1 NS bit = 0
2-22 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
2.13 Registers
The processor has a total of 40 registers:
• 33 general-purpose 32-bit registers
• seven 32-bit status registers.
These registers are not all accessible at the same time. The processor state and mode of
operation determine which registers are available to the programmer.
In ARM state, 16 data registers and one or two status registers are accessible at any time.
In privileged modes, mode-specific banked registers become available. Figure 2-10 on
page 2-25 shows which registers are available in each mode.
Thumb and ThumbEE state give access to the same set of registers as ARM state.
However, the 16-bit instructions provide only limited access to some of the registers. No
such limitations exist for 32-bit Thumb-2 and Thumb-2EE instructions.
Registers r0 through r13 are general-purpose registers used to hold either data or
address values.
Link Register Register r14 is used as the subroutine Link Register (LR).
Register r14 receives the return address when the processor
executes a Branch with Link (BL or BLX) instruction.
You can treat r14 as a general-purpose register at all other times.
Similarly, the corresponding banked registers r14_mon, r14_svc,
r14_irq, r14_fiq, r14_abt, and r14_und hold the return values
when the processor receives interrupts and exceptions, or when it
executes the BL or BLX instructions within interrupt or exception
routines.
One of the status registers, the Current Program Status Register (CPSR), contains
condition code flags, status bits, and current mode bits.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-23
Programmer’s Model
In privileged modes, another register, one of the Saved Program Status Registers
(SPSR), is accessible. This contains the condition code flags, status bits, and current
mode bits saved as a result of the exception that caused entry to the current mode.
Typically, this is used when returning after handling an exception.
Banked registers have a mode identifier that indicates which mode they relate to.
Table 2-9 shows these mode identifiers.
User usra
Interrupt irq
Supervisor svc
Abort abt
System usra
Undefined und
Monitor mon
a. The usr identifier is usually
omitted from register
names. It is only used in
descriptions where the User
or System mode register is
specifically accessed from
another operating mode.
FIQ mode has seven banked registers mapped to r8–r14, that is, r8_fiq through r14_fiq.
As a result many FIQ handlers do not have to save any registers.
The Monitor, Supervisor, Abort, IRQ, and Undefined modes have alternative
mode-specific registers mapped to r13 and r14, that permits a private stack pointer and
link register for each mode.
2-24 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
$50VWDWHJHQHUDOUHJLVWHUVDQGSURJUDPFRXQWHU
6\VWHPDQG
),4 6XSHUYLVRU $ERUW ,54 8QGHILQHG 0RQLWRU
8VHU
U U U U U U U
U U U U U U U
U U U U U U U
U U U U U U U
U U U U U U U
U U U U U U U
U U U U U U U
U U U U U U U
U UBILT U U U U U
U UBILT U U U U U
U UBILT U U U U U
U UBILT U U U U U
U UBILT U U U U U
U UBILT UBVYF UBDEW UBLUT UBXQG UBPRQ
U UBILT UBVYF UBDEW UBLUT UBXQG UBPRQ
U U 3& U 3& U 3& U 3& U 3& U 3&
$50VWDWHSURJUDPVWDWXVUHJLVWHUV
EDQNHGUHJLVWHU
Figure 2-11 on page 2-26 shows an alternative view of the ARM registers.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-25
Programmer’s Model
JHQHUDO
SXUSRVH
UHJLVWHUV
VWDWXVUHJLVWHU
U
U
U
U
U
JHQHUDOSXUSRVHUHJLVWHUV
U
PRGHVSHFLILFUHJLVWHUV EDQNHGUHJLVWHUV
U EDQNHGJHQHUDOSXUSRVHUHJLVWHUVEDQNHGVWDWXVUHJLVWHUV
U
U UBILT
U UBILT
U UBILT
U UBILT
U UBILT
U UBILT UBVYF UBDEW UBLUT UBXQG UBPRQ
U UBILT UBVYF UBDEW UBLUT UBXQG UBPRQ
U 3&
VWDWXVUHJLVWHUV
2-26 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
Figure 2-12 shows the bit arrangements of the program status registers.
*UHDWHUWKDQ 0RGHELWV
RUHTXDOWR 7KXPEVWDWHELW
-DYDVWDWHELW ),4GLVDEOH
,7>@ ,54GLVDEOH
6WLFN\RYHUIORZ ,PSUHFLVHDERUW
2YHUIORZ GLVDEOHELW
&DUU\%RUURZ([WHQG 'DWDHQGLDQQHVVELW
=HUR
1HJDWLYH/HVVWKDQ
Note
The bits identified in Figure 2-12 as Do Not Modify (DNM) must not be modified by
software. These bits are:
The N, Z, C, and V bits are the condition code flags. You can set them by arithmetic and
logical operations, and also by MSR and LDM instructions. The processor tests these
flags to determine whether to execute an instruction.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-27
Programmer’s Model
In ARM state, you can execute most instructions conditionally on the state of the N, Z,
C, and V bits. In Thumb state, you can execute fewer instructions conditionally.
However, you can make most instructions conditional with the IT instruction.
See the ARM Architecture Reference Manual for more information about conditional
executions.
You can set the Sticky Overflow, Q flag, by certain multiply and fractional arithmetic
instructions:
• QADD
• QDADD
• QSUB
• QDSUB
• SMLAD
• SMLAxy
• SMLAWy
• SMLSD
• SMUAD
• SSAT
• SSAT16
• USAT
• USAT16.
The Q flag is sticky in that, when set by an instruction, it remains set until explicitly
cleared by an MSR instruction writing to the CPSR. Instructions cannot execute
conditionally on the status of the Q flag.
To determine the status of the Q flag, you must read the PSR into a register and extract
the Q flag from this. See the individual instruction definitions in the ARM Architecture
Reference Manual for details of how you can set and clear the Q flag.
IT[7:5] encodes the base condition code for the current IT block, if any. It contains b000
when no IT block is active.
IT[4:0] encodes the number of instructions that are to be conditionally executed, and
whether the condition for each is the base condition code or the inverse of the base
condition code. It contains b00000 when no IT block is active.
2-28 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
When the processor executes an IT instruction, it sets these bits according to the
condition in the instruction, and the Then and Else (T and E) parameters in the
instruction. During execution of an IT block, IT[4:0] is shifted:
• to move the next bit into position to form the least significant bit of the condition
code.
See the ARM Architecture Reference Manual, Thumb-2 supplement for more
information on the operation of the IT execution state bits.
The J bit in the CPSR indicates when the processor is in ThumbEE state.
When T=1:
Note
• You cannot set the J bit to 1 when the T bit is 0. The J bit is written as 0 when the
T bit is written as 0.
• The placement of the J bit avoids the status or extension bytes in code running on
ARMv5TE or earlier processors. This ensures that OS code written using the
deprecated CPSR, SPSR, CPSR_all, or SPSR_all syntax for the destination of an
MSR instruction continues to work.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-29
Programmer’s Model
Some of the SIMD instructions set GE[3:0] as greater than or equal bits for individual
halfwords or bytes of the result, as Table 2-10 shows.
Signed
Unsigned
UADD16 [31:16] + [31:16] ≥ 216 [31:16] + [31:16] ≥ 216 [15:0] + [15:0] ≥ 216 [15:0] + [15:0] ≥ 216
UADDSUBX [31:16] + [15:0] ≥ 216 [31:16] + [15:0] ≥ 216 [15:0] - [31:16] ≥ 0 [15:0] - [31:16] ≥ 0
USUBADDX [31:16] - [15:0] ≥ 0 [31:16] - [15:0] ≥ 0 [15:0] + [31:16] ≥ 216 [15:0] + [31:16] ≥216
Note
GE bit is 1 if A op B ≥ C, otherwise 0.
The SEL instruction uses GE[3:0] to select which source register supplies each byte of
its result.
Note
• For unsigned operations, the usual ARM rules determine the GE bits for carries
out of unsigned additions and subtractions, and so are carry-out bits.
2-30 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
• For signed operations, the rules for setting the GE bits are chosen so that they have
the same sort of greater than or equal functionality as for unsigned operations.
ARM and Thumb instructions are provided to set and clear the E bit. The E bit controls
load/store endianness. The E bit can be initialized at reset using the CFGEND0 input.
See Chapter 4 Unaligned Data and Mixed-endian Data Support for details of the E bit.
See Miscellaneous signals on page A-10 for details on the CFGEND0 signal.
The A bit is set automatically. It is used to disable imprecise data aborts. It might not be
writable in the Nonsecure state if the AW bit in the SCR register is reset.
The bottom eight bits of a PSR are known collectively as the control bits. They are the:
• Interrupt disable bits
• T bit on page 2-32
• Mode bits on page 2-32.
The control bits change when an exception occurs. When the processor is operating in
a privileged mode, software can manipulate these bits.
• When the F bit is set, FIQ interrupts are disabled. FIQ can be nonmaskable in the
Nonsecure state if the FW bit in SCR register is reset.
Note
You can change the SPSR F bit in the Nonsecure state but this does not update the CPSR
if the SCR bit [4] FW does not permit it.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-31
Programmer’s Model
T bit
• when the T bit is set, the processor is executing in Thumb state or ThumbEE state
depending on the J bit
Note
Never use an MSR instruction to force a change to the state of the T bit in the CPSR. If
an MSR instruction does try to modify this bit the result is architecturally
Unpredictable. In the processor, this bit is not affected.
Mode bits
M[4:0] are the mode bits. These bits determine the processor operating mode as
Table 2-11 shows.
Thumb ARM
b10000 User r0–r7, r8-r12a, SP, LR, PC, CPSR r0–r14, PC, CPSR
b10001 FIQ r0–r7, r8_fiq-r12_fiqa, SP_fiq, r0–r7, r8_fiq–r14_fiq, PC, CPSR, SPSR_fiq
LR_fiq PC, CPSR, SPSR_fiq
b10010 IRQ r0–r7, r8-r12a, SP_irq, LR_irq, PC, r0–r12, r13_irq, r14_irq, PC, CPSR, SPSR_irq
CPSR, SPSR_irq
b10011 Supervisor r0–r7, r8-r12a, SP_svc, LR_svc, PC, r0–r12, r13_svc, r14_svc, PC, CPSR, SPSR_svc
CPSR, SPSR_svc
b10111 Abort r0–r7, r8-r12a, SP_abt, LR_abt, r0–r12, r13_abt, r14_abt, PC, CPSR, SPSR_abt
PC, CPSR, SPSR_abt
b11011 Undefined r0–r7, r8-r12a, SP_und, r0–r12, r13_und, r14_und, PC, CPSR, SPSR_und
LR_und, PC, CPSR, SPSR_und
b11111 System r0–r7, r8-r12a, SP, LR, PC, CPSR r0–r14, PC, CPSR
b10110 Secure r0-r7, r8-r12a, SP_mon, LR_mon, r0-r12, PC, CPSR, SPSR_mon, r13_mon, r14_mon
Monitor PC, CPSR, SPSR_mon
2-32 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
In previous architecture versions, MSR instructions can modify the flags byte, bits
[31:24], of the CPSR in any mode, but the other three bytes are only modifiable in
privileged modes.
After the introduction of ARMv6 however, each CPSR bit falls into one of the following
categories:
• Bits that are freely modifiable from any mode, either directly by MSR instructions
or by other instructions whose side-effects include writing the specific bit or
writing the entire CPSR.
Bits in Figure 2-12 on page 2-27 that are in this category are:
— N
— Z
— C
— V
— Q
— GE[3:0]
— E.
• Bits that must never be modified by an MSR instruction, and so must only be
written as a side-effect of another instruction. If an MSR instruction does try to
modify these bits the results are architecturally Unpredictable. In the processor
these bits are not affected.
Bits in Figure 2-12 on page 2-27 that are in this category are J and T.
• Bits that can only be modified from privileged modes, and that are completely
protected from modification by instructions while the processor is in User mode.
The only way that these bits can be modified while the processor is in User mode
is by entering a processor exception, as described in Exceptions on page 2-35.
Bits in Figure 2-12 on page 2-27 that are in this category are:
— A
— I
— F
— M[4:0].
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-33
Programmer’s Model
Only secure privileged modes can write directly to the CPSR mode bits to enter
Monitor mode. If the core is in secure User mode, nonsecure User mode, or
nonsecure privileged modes it ignores changes to the CPSR to enter the Secure
Monitor. The core does not copy mode bits in the SPSR that are changed in the
Nonsecure state, across to the CPSR.
The remaining bits in the PSRs are unused and reserved. When changing a PSR flag or
control bits, make sure that you do not alter these reserved bits. You must ensure that
your program does not rely on reserved bits containing specific values because future
processors might use some or all of the reserved bits.
2-34 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
2.15 Exceptions
Exceptions occur whenever the processor temporarily halts the normal flow of a
program, for example, to service an interrupt from a peripheral. Before attempting to
handle an exception, the processor preserves the current processor state so the original
program can resume when the handler routine finishes.
If two or more exceptions occur simultaneously, the processor deals with exceptions in
the fixed order given in Exception priorities on page 2-42.
Table 2-12 summarizes the PC value preserved in the relevant r14 on exception entry
and the recommended instruction for exiting the exception handler.
Exception
Return instruction Previous state Notes
or entry
SWI MOVS PC, R14_svc PC + 4 PC+2 Where the PC is the address of the SWI,
SMI, or Undefined instruction
SMI MOVS PC, R14_mon PC + 4 -
PABT SUBS PC, R14_abt, #4 PC + 4 PC+4 Where the PC is the address of instruction
that had the prefetch abort
FIQ SUBS PC, R14_fiq, #4 PC + 4 PC+4 Where the PC is the address of the
instruction that was not executed because
IRQ SUBS PC, R14_irq, #4 PC + 4 PC+4 the FIQ or IRQ took priority
DABT SUBS PC, R14_abt, #8 PC + 8 PC+8 Where the PC is the address of the load or
store instruction that generated the data
abort
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-35
Programmer’s Model
When an exception has completed, the exception handler must move the LR, minus an
offset to the PC. The offset varies according to the type of exception, as Table 2-12 on
page 2-35 shows.
Typically the return instruction is an arithmetic or logical operation with the S bit set
and rd = r15, so the core copies the SPSR back to the CPSR.
Note
The action of restoring the CPSR from the SPSR, automatically resets the T bit and J
bit to the values held immediately prior to the exception. The A, I, and F bits are also
automatically restored to the value they held immediately prior to the exception.
2.15.3 Reset
When the reset signals, as described in Chapter 10 Clock, Reset, and Power Control, are
driven appropriately a reset occurs, and the processor abandons the executing
instruction.
1. Forces the NS bit in SCR to 0 for secure and CPSR M[4:0] to 5'b10011 for secure
Supervisor mode.
3. Clears the CPSR J bit. The CPSR T bit is set based on the state of the CFGTE
input. Other bits in the CPSR are indeterminate.
4. Forces the PC to fetch the next instruction from the reset vector address.
5. Resumes execution in ARM or Thumb state based on the state of the CFGTE
input.
After reset, all register values except the PC and CPSR are indeterminate.
The Fast Interrupt Request (FIQ) exception supports fast interrupts. In ARM state, FIQ
mode has eight private registers to reduce, or even remove the requirement for register
saving. This minimizes the overhead of context switching.
An FIQ is externally generated by taking the nFIQ signal input LOW. The nFIQ input
is registered internally to the processor. It is the output of this register that the processor
control logic uses.
2-36 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
Irrespective of whether exception entry is from ARM state, Thumb state, or Java state,
an FIQ handler returns from the interrupt by executing:
SUBS PC,R14_fiq,#4
You can disable FIQ exceptions within a privileged mode by setting the CPSR F flag.
When the F flag is clear, the processor checks for a LOW level on the output of the nFIQ
register at the end of each instruction.
The FW bit and FIQ bit in the SCR register configure the FIQ as:
• nonmaskable in Nonsecure state (FW bit in SCR)
• branch to either current FIQ mode or Monitor mode (FIQ bit in SCR).
FIQs and IRQs are disabled when an FIQ occurs. You can use nested interrupts but it is
up to you to save any corruptible registers and to re-enable FIQs and interrupts.
The IRQ exception is a normal interrupt caused by a LOW level on the nIRQ input. IRQ
has a lower priority than FIQ, and is masked on entry to an FIQ sequence.
Irrespective of whether exception entry is from ARM state, Thumb state, or Java state,
an IRQ handler returns from the interrupt by executing:
SUBS PC,R14_irq,#4
You can disable IRQ exceptions within a privileged mode by setting the CPSR I flag.
When the I flag is clear, the processor checks for a LOW level on the output of the nIRQ
register at the end of each instruction.
IRQs are disabled when an IRQ occurs. You can use nested interrupts but it is up to you
to save any corruptible registers and to re-enable IRQs.
The IRQ bit in the SCR register configures the IRQ to branch to either the current IRQ
mode or to the Monitor mode.
2.15.6 Aborts
An abort is an exception that indicates to the operating system that the value associated
with a memory access is invalid. Attempting to access invalid instruction or data
memory typically causes an abort.
An abort is either:
• an internal abort signaled by the MMU
• an internal abort signaled by an error condition in the L1 or L2 cache
• an external abort signaled by the AXI interface because of an AXI error response.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-37
Programmer’s Model
In addition, aborts can be precise or imprecise. A precise abort occurs on the instruction
associated with the access that triggers the abort exception. An imprecise abort can
occur on an instruction subsequent to the instruction associated with the access that
triggers the abort exception.
Note
All aborts from the TLB are internal except for aborts from translation table walks that
are external precise aborts. If the EA bit is 1 for translation aborts, the core branches to
Monitor mode in the same way as it does for all other external aborts. See c1, Secure
Configuration Register on page 3-67.
IRQs are disabled when an abort occurs. When the aborts are configured to branch to
Monitor mode, the FIQ is also disabled.
Prefetch abort
When a prefetch abort occurs, the processor marks the prefetched instruction as invalid,
but does not take the exception until it executes the instruction. If the processor does not
execute the instruction, for example because a branch occurs while it is in the pipeline,
the abort does not take place.
After dealing with the cause of the abort, the handler executes the following instruction
irrespective of the processor operating state:
SUBS PC,R14_abt,#4
This action restores both the PC and the CPSR, and retries the aborted instruction.
Data abort
Internal precise data aborts are those generated by data load or store accesses that the
MMU checks:
• alignment faults
• translation faults
2-38 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
Note
Instruction memory system operations performed with the system control coprocessors
can also generate internal precise data aborts.
Externally generated data aborts can be precise or imprecise. Two separate FSR
encodings indicate if the external abort is precise or imprecise:
• all external aborts to loads or stores to strongly ordered memory are precise
• all external aborts to loads to the Program Counter or the CSPR are precise
• all external aborts on the load part of a SWP are precise
• all other external aborts are imprecise.
External aborts are supported on cacheable locations. The abort is transmitted to the
processor only if the processor requests a word that had an external abort.
The state of the system presented to the abort exception handler for a precise abort is
always the state for the instruction that caused the abort. It cannot be the state for a
subsequent instruction. As a result, it is straightforward to restart the processor after the
exception handler has rectified the cause of the abort.
The processor implements the base restored Data Abort model, which differs from the
base updated Data Abort model implemented by the ARM7TDMI-S processor.
With the base restored Data Abort model, when a data abort exception occurs during the
execution of a memory access instruction, the processor hardware always restores the
base register to the value it contained before the instruction was executed. This removes
the requirement for the Data Abort handler to unwind any base register update, that the
aborted instruction might have specified. This simplifies the software Data Abort
handler. See the ARM Architecture Reference Manual for more details.
After dealing with the cause of the abort, the handler executes the following return
instruction, irrespective of the processor operating state at the point of entry:
SUBS PC,R14_abt,#8
This restores both the PC and the CPSR, and retries the aborted instruction.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-39
Programmer’s Model
The state of the system presented to the abort exception handler for an imprecise data
abort can be the state for an instruction after the instruction that caused the abort. As a
result, it is not often possible to restart the processor from the point at which the
exception occurred.
Data aborts that occur because of watchpoints are imprecise. However, the processor
does not execute any load or store instruction between the instruction that caused the
watchpoint and the instruction that stopped during the watchpoint exception. As a
result, it is possible to restart the processor after the watchpoint.
An imprecise data abort caused, for example, by an external error on a write that has
been held in a write buffer, is asynchronous to the execution of the causing instruction.
The imprecise data abort can occur many cycles after the instruction that caused the
memory access has retired. For this reason, the imprecise data abort can occur at a time
that the processor is in Abort mode because of a precise data abort, or can have live state
in Abort mode, but be handling an interrupt.
To avoid the loss of the Abort mode state (r14_abt and SPSR_abt) in these cases, that
leads the processor to enter an unrecoverable state, the system must hold the existence
of a pending imprecise data abort until a time when the Abort mode can safely be
entered.
A mask is included in the CPSR to indicate that an imprecise data abort can be accepted.
This bit is referred to as the A bit. The imprecise data abort causes a data abort to be
taken when imprecise data aborts are not masked. When imprecise data aborts are
masked, then the implementation is responsible for holding the presence of a pending
imprecise data abort until the mask is cleared and the abort is taken.The A bit is set
automatically on entry into Abort Mode, IRQ, and FIQ Modes, and on Reset. See the
ARM Architecture Reference Manual for more information.
Note
You cannot change the CPSR A bit in the Nonsecure state if the SCR bit [5] is reset. You
can change the SPSR A bit in the Nonsecure state but this does not update the CPSR if
the SCR bit [5] does not permit it.
2-40 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
You can use the Software Interrupt Instruction (SWI) to enter Supervisor mode, usually
to request a particular supervisor function. The SWI handler reads the opcode to extract
the SWI function number. A SWI handler returns by executing the following
instruction, irrespective of the processor operating state:
MOVS PC, R14_svc
This action restores the PC and CPSR, and returns to the instruction following the SWI.
IRQs are disabled when a software interrupt occurs.
When the processor executes the Software Monitor Instruction (SMI) the core enters
Monitor mode to execute the Secure Monitor code.
Note
An attempt by a User process to execute an SMI makes the processor enter the
Undefined exception trap.
When the processor encounters an instruction that neither it nor any coprocessor in the
system can handle, it takes the Undefined instruction trap. Software can use this
mechanism to extend the ARM instruction set by emulating Undefined coprocessor
instructions.
After emulating the failed instruction, the trap handler executes the following
instruction, irrespective of the processor operating state:
MOVS PC,R14_und
This action restores the CPSR and returns to the next instruction after the Undefined
instruction.
IRQs are disabled when an Undefined instruction trap occurs. See the ARM Architecture
Reference Manual for more information about undefined instructions.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-41
Programmer’s Model
After dealing with the breakpoint, the handler executes the following instruction
irrespective of the processor operating state:
SUBS PC,R14_abt,#4
This action restores both the PC and the CPSR, and retries the breakpointed instruction.
Note
If the EmbeddedICE-RT logic is configured into Halting debug-mode, a breakpoint
instruction causes the processor to enter debug state. See Halting debug-mode
debugging on page 12-4.
The Secure Configuration Register bits [3:1] determine which mode is entered when an
IRQ, a FIQ, or an external abort exception occurs. The CP15 c12, Secure or Nonsecure
Vector Base Address Register and the Monitor Vector Base Address Register define the
base address of the Nonsecure, Secure, and Secure Monitor vector tables. If high vectors
are enabled using CP15 c1 bit[13], the base address of the Nonsecure and Secure vector
tables is 0xFFFF0000, regardless of the value of these registers. Enabling high vectors has
no effect on the Secure Monitor vector addresses.
When multiple exceptions arise at the same time, a fixed priority system determines the
order that they are handled. Table 2-13 shows the order of exception priorities.
Priority Exception
Highest 1 Reset
3 FIQ
2-42 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
Priority Exception
4 IRQ
5 Prefetch abort
Lowest 7 BKPT
Undefined Instruction
SWI
SMI
Note
If the data abort is a precise external abort and bit [3] EA of SCR is set, the processor
enters Monitor mode where aborts and FIQs are disabled automatically. Therefore the
processor does not proceed to FIQ vector afterwards.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-43
Programmer’s Model
All ARM implementations ensure that the processor cannot execute the prefetched
instructions that follow MOVS, SUBS, or equivalents, with secure access permissions.
It is strongly recommended that you do not use an MSR instruction to switch from the
Secure to the Nonsecure state. There is no guarantee enforced in the architecture that,
after the NS bit is set in Monitor mode, an MSR instruction avoids execution of
prefetched instructions with secure access permission. This is because the processor
prefetches the instructions that follow the MSR with secure privileged permissions.
This might form a security hole in the system if the prefetched instructions then execute
in the Nonsecure state.
If the prefetched instructions are in nonsecure memory, with the MSR at the boundary
between secure and nonsecure memory, they might be corrupted when giving secure
information to the Nonsecure state.
To avoid this problem with the MSR instruction, you can use an IMB sequence shortly
after the MSR. If you use the IMB sequence you must ensure that the instructions
executed after the MSR and before the IMB do not leak any information to the
Nonsecure state and do not rely on the secure permission level.
It is strongly recommended that you do not set the NS bit in privileged modes other than
in Monitor mode. If you do so, you face the same problem as a return to the Nonsecure
state with the MSR instruction. To avoid leakage after an MSR instruction, use an IMB
sequence.
To enter the Secure Monitor, the processor executes the following instruction:
SMI {<cond>} <imm16>
where:
<imm16> The processor ignores this 16-bit immediate value, but the Secure
Monitor can use it to determine the service to provide.
To return from the Secure Monitor, the processor executes the following instruction:
MOVS PC, R14_mon
2-44 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
Caution
TrustZone computing enables a secure software environment. The technology does not
protect the processor from hardware attacks, and you must make sure that the hardware
containing the boot code is appropriately secure.
The processor always boots in the privileged Supervisor mode in the Secure state, that
is the NS bit is 0. This means that code not written for TrustZone always runs in the
Secure state, but has no way to switch to the Nonsecure state. Because the Secure and
Nonsecure states mirror each other, this secure operation does not affect the
functionality of code not written for TrustZone. Peripherals boot in the Secure state.
1. Initialize the secure OS. This includes normal boot actions such as:
a. Generate translation tables and switch on the MMU if the design uses
caches or memory protection.
b. Switch on the stack.
c. Set up the run time environment and program stacks for each processor
mode.
The overall security of the software relies on the security of the boot code along with
the code for the Secure Monitor.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-45
Programmer’s Model
The processor pin CP15SDISABLE disables write access to certain registers in the
system control coprocessor. Attempts to write to these registers when
CP15SDISABLE is HIGH result in an Undefined exception. Reads from the registers
are still permitted. See Chapter 3 System Control Coprocessor for more information
about the registers affected by this pin.
A change to the CP15SDISABLE pin takes effect on the instructions decoded by the
processor as quickly as practically possible. Software must perform an ISB instruction,
after a change to this pin on the boundary of the macrocell, to ensure that its effect is
recognized for following instructions. It it is expected that:
• control of the CP15SDISABLE pin remains within the SoC that embodies the
macrocell
You can use the CP15SDISABLE pin to disable subsequent access to the system
control processor registers after the secure boot code runs and protect the configuration
that the secure boot code applies.
Note
The register accesses affected by the CP15SDISABLE pin are only accessible in secure
privileged modes.
Caution
You must ensure that the SECMONOUT signals do not compromise the security of the
processor.
See Appendix A Signal Descriptions for a list of signals that appear on the secure
monitor bus SECMONOUT[86:0].
2-46 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Programmer’s Model
SECMONOUT protocol
if SECMONOUT[86] = 1, then
valid L1 data address present on SECMONOUT[59:40]
else
invalid L1 data address
if SECMONOUT[85] = 1, then
valid exception data present on SECMONOUT[64:60]
else
invalid exception data
if SECMONOUT[82] = 1, then
valid pipeline 1 instruction address on SECMONOUT[39:20]
valid pipeline 1 condition code fail on SECMONOUT[84]
else
invalid instruction or condition code in pipeline 1
if SECMONOUT[81] = 1, then
valid pipeline 0 instruction address on SECMONOUT[19:0]
valid pipeline 0 condition code fail on SECMONOUT[83]
else
invalid instruction or condition code in pipeline 0
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 2-47
Programmer’s Model
The CP15 coprocessor is also known as the system control coprocessor and is used to
control and provide status information for the functions implemented in the processor.
See Chapter 3 System Control Coprocessor for more information on the system control
coprocessor.
The CP14 coprocessor is also known as the debug coprocessor and is used for various
debug functions. See Chapter 12 Debug for more information on the debug coprocessor.
2-48 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 3
System Control Coprocessor
This chapter describes the purpose of the system control coprocessor, its structure,
operation, and how to use it. It contains the following sections:
• About the system control coprocessor on page 3-2
• System control coprocessor registers on page 3-9.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-1
System Control Coprocessor
The purpose of the system control coprocessor, CP15, is to control and provide status
information for the functions implemented in the processor. The main functions of the
system control coprocessor are:
• overall system control and configuration
• cache configuration and management
• Memory Management Unit (MMU) configuration and management
• preloading engine for L2 cache
• system performance monitoring.
The system control coprocessor does not exist in a distinct physical block of logic.
At reset, the following CP15 instructions are valid NOP instructions. This behavior is
strongly recommended for best performance. Following reset, software can configure
the instructions to operate in the traditional manner by programming the Auxiliary
Control Register. See c1, Auxiliary Control Register on page 3-61 for more details.
MCR p15, 0, <Rd>, c7, c5, 6 ; NOP (invalidate entire branch predictor array)
MCR p15, 0, <Rd>, c7, c5, 7 ; NOP (invalidate branch predictor array line by
; MVA)
The system control coprocessor is a set of registers that you can write to and read from.
Some of the registers permit more than one type of operation. The functional groups for
the registers are:
• System control and configuration on page 3-5
• MMU control and configuration on page 3-7
• Cache control and configuration on page 3-7
• L2 cache preload engine control and configuration on page 3-7
• System performance monitor on page 3-8
• Array debug on page 3-8.
3-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
The system control coprocessor controls the TrustZone operation of the processor:
• some of the registers are only accessible in the Secure state
• some of the registers are banked for Secure and Nonsecure states
• some of the registers are common to Secure and Nonsecure states.
Note
When Monitor mode is active, the core is in the Secure state. The processor treats all
accesses as secure and the system control coprocessor behaves as if it operates in the
Secure state regardless of the value of the NS bit, see c1, Secure Configuration Register
on page 3-67. In Monitor mode the NS bit defines which copies of the banked registers
in the system control coprocessor the processor can access:
NS = 0 Access to Secure state CP15 registers.
NS = 1 Access to Nonsecure state CP15 registers.
Registers that are only accessible in the Secure state are always accessible in Monitor
mode, regardless of the value of the NS bit.
Table 3-1 shows the overall functionality of the system control coprocessor registers.
Secure Debug Enable c1, Secure Debug Enable Register on page 3-69
Nonsecure Access Control c1, Nonsecure Access Control Register on page 3-70
Coprocessor Access Control c1, Coprocessor Access Control Register on page 3-65
Secure or Nonsecure Vector Base c12, Secure or Nonsecure Vector Base Address Register on
Address page 3-149
Monitor Vector Base Address c12, Monitor Vector Base Address Register on page 3-150
Product Features c0, Memory Model Feature Register 0 on page 3-34 - c0,
Instruction Set Attributes Registers 5-7 on page 3-50
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-3
System Control Coprocessor
MMU control and TLB Type c0, TLB Type Register on page 3-27
configuration
Translation Table Base 0 c2, Translation Table Base Register 0 on page 3-72
Translation Table Base 1 c2, Translation Table Base Register 1 on page 3-74
Translation Table Base Control c2, Translation Table Base Control Register on page 3-76
Domain Access Control c3, Domain Access Control Register on page 3-78
Data Fault Status c5, Data Fault Status Register on page 3-80
Auxiliary Fault Status c5, Auxiliary Fault Status Registers on page 3-84
Instruction Fault Status c6, Instruction Fault Address Register on page 3-85
Instruction Fault Address c6, Instruction Fault Address Register on page 3-85
Data Fault Address c6, Data Fault Address Register on page 3-84
Memory region remap c10, Memory Region Remap Registers on page 3-127
Thread and Process ID c13, Thread and Process ID Registers on page 3-157
Cache control and Cache Type c0, Cache Type Register on page 3-26
configuration
Current Cache Level Identification c0, Current Cache Level ID Register on page 3-50
Current Cache Size Identification c0, Current Cache Size Identification Registers on
page 3-53
Cache Size Selection c0, Cache Size Selection Register on page 3-56
3-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
L2 cache PLE Identification and Status c11, PLE Identification and Status Registers on page 3-133
PreLoad Engine
(PLE) control and PLE User Accessibility c11, PLE User Accessibility Register on page 3-135
configuration
PLE Channel Number c11, PLE Channel Number Register on page 3-137
L2 cache PLE PLE Internal Start Address c11, PLE Internal Start Address Register on page 3-142
control and
configuration PLE Internal End Address c11, PLE Internal End Address Register on page 3-144
PLE Channel Status c11, PLE Channel Status Register on page 3-145
L1 instruction L1 Instruction and Data cache, BTB, c15, L1 system array debug data registers on page 3-159
and data cache, GHB, and TLB Debug
and TLB Debug
L2 unified cache L2 unified cache c15, L2 system array debug data registers on page 3-174
System Performance monitoring c9, Performance Monitor Control Register on page 3-97 -
performance c9, Interrupt Enable Clear Register on page 3-115
monitor
The purpose of the system control and configuration registers is to provide overall
management of:
• TrustZone behavior
• memory functionality
• interrupt behavior
• exception handling
• program flow prediction
• coprocessor access rights for CP0-CP13.
The system control and configuration registers also provide the processor ID. Some of
the functionality depends on how you set external signals at reset.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-5
System Control Coprocessor
The processor supports a primary input pin, CP15SDISABLE, to disable write access
to the CP15 registers.
When the input is set, CP15SDISABLE is 1. Any attempt to write to the secure version
of the banked register, NS-bit is 0, or any nonbanked register, NS-state is 0 results in an
Undefined instruction exception.
At reset, it is expected that this pin is set to logic 0 by the SoC hardware. Control of this
pin is expected to remain within the SoC chip that implements the processor.
Table 3-2 shows the CP15 registers affected by the primary input pin,
CP15SDISABLE.
Register Instruction
3-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Register Instruction
• allocate physical address locations from the Virtual Addresses (VAs) that the
processor generates
• provide information on the size and architecture of the instruction and data caches
• control cache maintenance operations that include clean and invalidate caches,
drain and flush buffers, and address translation
The purpose of the L2 cache PLE control and configuration control registers is to:
• enable software to control transfers to or from the L2 RAM
• transfer large blocks of data
• determine accessibility
• select the PLE channel.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-7
System Control Coprocessor
Code can execute several PLE operations while in User mode if these operations are
enabled by the PLE User Accessibility Register.
If the PLE control registers attempt to execute a privileged operation in User mode, the
processor takes an Undefined instruction trap.
The PLE control registers operation specifies the block of data for transfer, the location
of the transfer, and the direction of the PLE. See L2 PLE on page 8-7 for more
information on the operation.
System performance monitoring counts system events, such as cache misses, TLB
misses, pipeline stalls, and other related features to enable system developers to profile
the performance of their systems. It can generate interrupts when the number of events
reaches a given value.
The purpose of array debug is to enable debug of the Cortex-A8 process by accessing
data, only in a secure state and privilege state, in the following arrays:
• L1:
— instruction and data cache data RAMs
— instruction and data cache tag RAMs
— TLB entries
— branch predictor arrays.
• L2 cache RAMs
• parity error detection registers.
You can use the registers to observe the contents of the cache without executing a load
or store instruction to debug:
• frequency issues
• Real Time Operating System (RTOS).
3-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
See the ARM Architecture Reference Manual for more information on using system
control coprocessors and the general method on how to access CP15 registers.
Table 3-3 shows a summary the register allocation and reset values of the system control
coprocessor where:
• CRn is the register number within CP15
• Op1 is the Opcode_1 value for the register
• CRm is the operational register
• Op2 is the Opcode_2 value for the register
• Security state can be Secure, S, or Nonsecure, NS, and is:
— B, registers banked in Secure and Nonsecure states. If the registers are not
banked then they are common to Secure or Nonsecure states or only
accessible in one state.
— NA, no access
— RO, read-only access
— RO, read-only access in privileged modes only
— R/W, read/write access
— R/W, read/write access in privileged modes only
— WO, write-only access
— WO, write-only access in privileged modes only
— X, access depends on another register or external signal.
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-9
System Control Coprocessor
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
3-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
2-6 Undefined - - - -
1-7 Undefined - - - -
3-7 Undefined - - - -
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-11
System Control Coprocessor
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
c1 0 c1 3-7 Undefined - - - -
3-7 Undefined - - - -
1-7 Undefined - - - -
2-7 Undefined - - - -
3-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
c5 0 c1 2-7 Undefined - - - -
1 Undefined - - - -
3-7 Undefined - - - -
c7 0 c0 0-3 Undefined - - - -
5-7 Undefined - - - -
1-7 Undefined - - - -
2-3 Undefined - - - -
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-13
System Control Coprocessor
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
c7 0 c5 5 Undefined - - - -
c6 0 Undefined - - - -
3-7 Undefined - - - -
c7 0-7 Undefined - - - -
c9 0-7 Undefined - - - -
c10 0 Undefined - - - -
3-14 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
3 Undefined - - - -
6-7 Undefined - - - -
c11 0 Undefined - - - -
2-7 Undefined - - - -
c14 0 Undefined - - - -
3-7 Undefined - - - -
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-15
System Control Coprocessor
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
3-7 Undefined - - - -
3-7 Undefined - - - -
3-7 Undefined - - - -
3-16 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
6-7 Undefined - - - -
3-7 Undefined - - - -
3-7 Undefined - - - -
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-17
System Control Coprocessor
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
1 Undefined - - - -
3-7 Undefined - - - -
2-7 Undefined - - - -
2-7 Undefined - - - -
2-7 Undefined - - - -
3-18 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
4-7 Undefined - - - -
1-7 Undefined - - - -
1-7 Undefined - - - -
3-7 Undefined - - - -
1-7 Undefined - - - -
1-7 Undefined - - - -
c6 0-7 Undefined - - - -
1-7 Undefined - - - -
1-7 Undefined - - - -
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-19
System Control Coprocessor
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
2-7 Undefined - - - -
1-7 Undefined - - - -
5-7 Undefined - - - -
3-20 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-21
System Control Coprocessor
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
c2 0-1 Undefined - - - -
c3 0-1 Undefined NA - - -
c4 0-7 Undefined - - - -
3-22 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
4-7 Undefined - - - -
c6 0-7 Undefined - - - -
c7 0-1 Undefined - - - -
4-7 Undefined - - - -
6-7 Undefined - - - -
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-23
System Control Coprocessor
Security state
Register or
CRn Op1 CRm Op2 Reset value Page
operation
NS S
5-7 Undefined - - - -
a. Reset value depends on the cache size implemented. The value here is for 16KB instruction and data caches.
b. Reset value depends on external signals, that is, SILICONID[31:0].
c. Some bits in this register are banked and some are secure modify only.
d. Reset value depends on external signals, that is, VINITHI, CFGTE, and CFGNMFI. The value shown in this table assumes
these signals are set to zero.
e. Reset value depends on the number of PLE channels implemented.
f. Reset value depends on external signals, that is, nFIQ and nIRQ. The value shown in this table assumes these signals are set
to zero.
g. This register is read/write in privileged modes and read-only in User mode.
The purpose of the Main ID Register is to return the device ID code that contains
information about the processor.
Figure 3-1 on page 3-25 shows the bit arrangement of the Main ID Register.
3-24 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
The contents of the Main ID Register depend on the specific implementation. Table 3-4
shows how the bit values correspond with the Main ID Register functions.
[19:16] Architecture Indicates that the architecture is given in the feature registers:
0xF
Note
If an Opcode_2 value corresponding to an unimplemented or reserved ID register with
CRm equal to c0 and Opcode_1 = 0 is encountered, the system control coprocessor
returns the value of the Main ID Register.
Table 3-5 shows the results of attempted access for each mode.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-25
System Control Coprocessor
See c0, Processor Feature Register 0 on page 3-30 - c0, Instruction Set Attributes
Registers 5-7 on page 3-50 for more information on the processor features.
The purpose of the Cache Type Register is to determine the instruction and data cache
minimum line length in bytes to enable a range of addresses to be invalidated.
The contents of the Cache Type Register depend on the specific implementation.
Figure 3-2 shows the bit arrangement of the Cache Type Register.
5$=
'0LQ/LQH ,0LQ/LQH
/,SROLF\
Table 3-6 shows how the bit values correspond with the Cache Type Register functions.
3-26 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-7 shows the results of attempted access for each mode.
The processor does not implement Tightly Coupled Memory (TCM). The TCM Type
Register specifies that the processor does not implement instruction and data TCMs.
Table 3-8 shows the results of attempted access for each mode.
The purpose of the TLB Type Register is to return the number of lockable entries for
both the instruction and data TLBs.
Each TLB has 32 entries organized as fully associative and lockable TLB.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-27
System Control Coprocessor
Figure 3-3 shows the bit arrangement of the TLB Type Register.
Table 3-9 shows how the bit values correspond with the TLB Type Register functions.
[23:16] ILsize Instruction lockable size specifies the number of instruction TLB lockable entries.
0x20 = Processor has 32 lockable entries.
[15:8] DLsize Data lockable size specifies the number of unified or data TLB lockable entries.
0x20 = Processor has 32 lockable entries.
[0] U Unified specifies if the TLB is unified or if there are separate instruction and data TLBs.
0x1 = Processor has separate instruction and data TLBs.
Table 3-10 shows the results of attempted access for each mode.
3-28 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
The MPU Type Register indicates that the processor does not implement Memory
Protection Unit (MPU).
Table 3-11 shows the results of attempted access for each mode.
Table 3-12 shows the results of attempted access for each mode.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-29
System Control Coprocessor
Figure 3-4 shows the bit arrangement of the Processor Feature Register 0.
Table 3-13 shows how the bit values correspond with the Processor Feature Register 0
functions.
[7:4] State1 Indicates the type of Thumb encoding that the processor supports.
0x3 = Processor supports Thumb-2 encoding with all Thumb-2 instructions.
3-30 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-14 shows the results of attempted access for each mode.
Figure 3-5 shows the bit arrangement of the Processor Feature Register 1.
5HVHUYHG
0LFURFRQWUROOHUSURJUDPPHU¶VPRGHO
6HFXULW\H[WHQVLRQ
3URJUDPPHU¶VPRGHO
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-31
System Control Coprocessor
Table 3-15 shows how the bit values correspond with the Processor Feature Register 1
functions.
[7:4] Security extension Indicates support for Security Extensions Architecture v1.
0x1 = Processor supports Security Extensions Architecture v1, TrustZone.
[3:0] Programmer’s model Indicates support for standard ARMv4 programmer’s model. All processor operating
modes are supported.
0x1 = Processor supports the ARMv4 model.
Table 3-16 shows the results of attempted access for each mode.
The purpose of Debug Feature Register 0 is to provide information about the debug
system for the processor.
Figure 3-6 on page 3-33 shows the bit arrangement of the Debug Feature Register 0.
3-32 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
5HVHUYHG
0LFURFRQWUROOHUGHEXJPRGHO±PHPRU\PDSSHG
7UDFHGHEXJPRGHO±PHPRU\PDSSHG
7UDFHGHEXJPRGHO±FRSURFHVVRUEDVHG
&RUHGHEXJPRGHO±PHPRU\PDSSHG
6HFXUHGHEXJPRGHO±FRSURFHVVRUEDVHG
&RUHGHEXJPRGHO±FRSURFHVVRUEDVHG
Table 3-17 shows how the bit values correspond with the Debug Feature Register 0
functions.
[19:16] Trace debug model – Indicates support for the trace debug model – memory-mapped.
memory-mapped 0x1 = Processor supports the trace debug model – memory-mapped.
0x0 = Processor does not support the trace debug model – memory-mapped.a
[15:12] Trace debug model – Indicates support for the coprocessor-based trace debug model.
coprocessor-based 0x0 = Processor does not support the trace debug model – coprocessor.
[11:8] Core debug model – Indicates support for the memory-mapped debug model.
memory mapped 0x4 = Processor supports the memory mapped debug model.
[7:4] Secure debug model – Indicates support for the secure debug model – coprocessor.
coprocessor-based 0x0 = Processor does not support the secure debug model – coprocessor.
[3:0] Core debug model – Indicates support for the coprocessor debug model.
coprocessor-based 0x0 = Processor does not support the coprocessor debug model.
a. A value of 0x0 indicates that the ETM option is not configured for the processor, see Configurable options on page 1-11
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-33
System Control Coprocessor
Table 3-18 shows the results of attempted access for each mode.
Table 3-19 shows the results of attempted access for each mode.
The purpose of the Memory Model Feature Register 0 is to provide information about
the memory model, memory management, cache support, and TLB operations of the
processor.
3-34 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Figure 3-7 shows the bit arrangement of the Memory Model Feature Register 0.
,QVWUXFWLRQ
)&6( 7&0 306$ 906$
W\SH
$X[LOLDU\&RQWURO5HJLVWHU &DFKHFRKHUHQF\±&38DJHQW
&DFKHFRKHUHQF\±3/(DJHQW
Table 3-20 shows how the bit values correspond with the Memory Model Feature
Register 0 functions.
[27:24] FCSE Indicates support for fast context switch memory mappings.
0x1 = Processor supports FCSE.
[15:12] Cache coherency - Indicates support for cache coherency with PLE agent, shared memory.
PLE agent 0x0 = Processor does not support this model.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-35
System Control Coprocessor
[11:8] Cache coherency - Indicates support for cache coherency support with CPU agent, shared
CPU agent memory.
0x0 = Processor does not support this model.
[7:4] PMSA Indicates support for Physical Memory System Architecture (PMSA).
0x0 = Processor does not support PMSA.
[3:0] VMSA Indicates support for Virtual Memory System Architecture (VMSA).
0x3 = Processor supports:
• VMSA v7 including cache and TLB type register
• Extensions to ARMv6.
Table 3-21 shows the results of attempted access for each mode.
The purpose of the Memory Model Feature Register 1 is to provide information about
the memory model, memory management, cache support, and TLB operations of the
processor.
Figure 3-8 on page 3-37 shows the bit arrangement of the Memory Model Feature
Register 1.
3-36 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
%7%
/WHVWFOHDQRSHUDWLRQV
/XQLILHGFDFKHPDLQWHQDQFHRSHUDWLRQV
/+DUYDUGFDFKHPDLQWHQDQFHRSHUDWLRQV
/XQLILHGFDFKHOLQHPDLQWHQDQFHRSHUDWLRQVE\VHWDQGZD\
/+DUYDUGFDFKHOLQHPDLQWHQDQFHRSHUDWLRQVE\VHWDQGZD\
/XQLILHGFDFKHOLQHPDLQWHQDQFHRSHUDWLRQVE\09$
/+DUYDUGFDFKHOLQHPDLQWHQDQFHRSHUDWLRQVE\09$
Table 3-22 shows how the bit values correspond with the Memory Model Feature
Register 1 functions.
[27:24] L1 test clean operations Indicates support for test and clean operations on data cache, Harvard or unified
architecture.
0x0 = no support in processor.
[23:20] L1 unified cache Indicates support for L1 cache, all maintenance operations, unified architecture.
maintenance operations 0x0 = no support in processor.
[19:16] L1 Harvard cache Indicates support for L1 cache, all maintenance operations, Harvard architecture.
maintenance operations 0x0 = Processor supports:
• invalidate instruction cache including branch target buffer
• invalidate data cache
• invalidate instruction and data cache including branch target buffer.
The processor does not support Harvard version.
[15:12] L1 unified cache line Indicates support for L1 cache line maintenance operations by set and way, unified
maintenance operations architecture.
by set and way 0x0 = no support in processor.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-37
System Control Coprocessor
[11:8] L1 Harvard cache line Indicates support for L1 cache line maintenance operations by set and way,
maintenance operations Harvard architecture.
by set and way 0x0 = Processor supports:
• clean data cache line by set and way
• clean and invalidate data cache line by set and way
• invalidate data cache line by set and way
• invalidate instruction cache line by set and way.
[7:4] L1 unified cache line Indicates support for L1 cache line maintenance operations by MVA, unified
maintenance operations architecture.
by MVA 0x0 = no support in processor.
[3:0] L1 Harvard cache line Indicates support for L1 cache line maintenance operations by MVA, Harvard
maintenance operations architecture.
by MVA 0x0 = Processor supports:
• clean data cache line by MVA
• invalidate data cache line by MVA
• invalidate instruction cache line by MVA
• clean and invalidate data cache line by MVA
• invalidation of branch target buffer by MVA.
Table 3-23 shows the results of attempted access for each mode.
The purpose of the Memory Model Feature Register 2 is to provide information about
the memory model, memory management, cache support, and TLB operations of the
processor.
3-38 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Figure 3-9 shows the bit arrangement of the Memory Model Feature Register 2.
0HPRU\
+DUGZDUH
:), EDUULHU
DFFHVVIODJ
IHDWXUHV
8QLILHG7/%PDLQWHQDQFHRSHUDWLRQV
+DUYDUG7/%PDLQWHQDQFHRSHUDWLRQV
+DUYDUG/FDFKHPDLQWHQDQFHUDQJHRSHUDWLRQV
+DUYDUG/EDFNJURXQGSUHIHWFKFDFKHUDQJHRSHUDWLRQV
+DUYDUG/IRUHJURXQGSUHIHWFKFDFKHUDQJHRSHUDWLRQV
Table 3-24 shows how the bit values correspond with the Memory Model Feature
Register 2 functions.
[19:16] Unified TLB Indicates support for TLB maintenance operations, unified architecture.
maintenance 0x0 = Processor does not support:
operations • invalidate all entries
• invalidate TLB entry by MVA
• invalidate TLB entries by ASID match.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-39
System Control Coprocessor
[15:12] Harvard TLB Indicates support for TLB maintenance operations, Harvard architecture.
maintenance 0x2 = Processor supports:
operations • invalidate instruction and data TLB, all entries
• invalidate instruction TLB, all entries
• invalidate data TLB, all entries
• invalidate instruction TLB by MVA
• invalidate data TLB by MVA
• invalidate instruction and data TLB entries by ASID match
• invalidate instruction TLB entries by ASID match
• invalidate data TLB entries by ASID match.
[11:8] Harvard L1 cache Indicates support for cache maintenance range operations, Harvard architecture.
maintenance 0x0 = no support in processor.
range operations
[7:4] Harvard L1 Indicates support for background prefetch cache range operations, Harvard architecture.
background 0x0 = no support in processor.
prefetch cache
range operations
[3:0] Harvard L1 Indicates support for foreground prefetch cache range operations, Harvard architecture.
foreground 0x0 = no support in processor.
prefetch cache
range operations
Table 3-25 shows the results of attempted access for each mode.
3-40 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
The purpose of the Memory Model Feature Register 3 is to provide information about
the memory model, memory management, cache support, and TLB operations of the
processor.
Figure 3-10 shows the bit arrangement of the Memory Model Feature Register 3.
5HVHUYHG
+LHUDUFKLFDOFDFKHPDLQWHQDQFHRSHUDWLRQVE\VHWDQGZD\
+LHUDUFKLFDOFDFKHPDLQWHQDQFHRSHUDWLRQVE\09$
Table 3-26 shows how the bit values correspond with the Memory Model Feature
Register 3 functions.
[7:4] Hierarchical cache Indicates support for invalidate cache by set and way, clean by set and way, and
maintenance operations invalidate and clean by set and way.
by set and way 0x1 = Processor supports invalidate cache by set and way, clean by set and way, and
invalidate and clean by set and way.
[3:0] Hierarchical cache Indicates support for invalidate cache by MVA, clean by MVA, invalidate and clean
maintenance operations by MVA, and invalidate all.
by MVA 0x1 = Processor supports invalidate cache by MVA, clean by MVA, invalidate and
clean by MVA, and invalidate all.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-41
System Control Coprocessor
Table 3-27 shows the results of attempted access for each mode.
The purpose of the Instruction Set Attributes Register 0 is to provide information about
the instruction set that the processor supports beyond the basic set.
Figure 3-11 shows the bit arrangement of the Instruction Set Attributes Register 0.
5HVHUYHG
'LYLGHLQVWUXFWLRQV $WRPLFLQVWUXFWLRQV
'HEXJLQVWUXFWLRQV %LWFRXQWLQVWUXFWLRQV
&RSURFHVVRULQVWUXFWLRQV %LWILHOGLQVWUXFWLRQV
&RPSDUHDQGEUDQFKLQVWUXFWLRQV
3-42 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-28 shows how the bit values correspond with the Instruction Set Attributes
Register 0 functions.
[15:12] Compare and branch Indicates support for combined compare and branch instructions.
instructions 0x1 = Processor supports combined compare and branch instructions.
[3:0] Atomic instructions Indicates support for atomic load and store instructions.
0x1 = Processor supports SWP and SWPB.
Table 3-29 shows the results of attempted access for each mode.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-43
System Control Coprocessor
MRC p15, 0, <Rd>, c0, c2, 0 ; Read Instruction Set Attributes Register 0
The purpose of the Instruction Set Attributes Register 1 is to provide information about
the instruction set that the processor supports beyond the basic set.
Figure 3-12 shows the bit arrangement of the Instruction Set Attributes Register 1.
,QWHU
-D]HOOH ,PPHGLDWH ,7( ([WHQG ([FHSWLRQ ([FHSWLRQ (QGLDQ
ZRUNLQJ
LQVWUXFWLRQV LQVWUXFWLRQV LQVWUXFWLRQV LQVWUXFWLRQV LQVWUXFWLRQV LQVWUXFWLRQV LQVWUXFWLRQV
LQVWUXFWLRQV
Table 3-30 shows how the bit values correspond with the Instruction Set Attributes
Register 1 functions.
[27:24] Interworking instructions Indicates support for instructions that branch between ARM and Thumb code.
0x2 = Processor supports:
• BX, and T bit in PSRs
• BLX, and PC loads have BX behavior.
[15:12] Extend instructions Indicates support for sign or zero extend instructions.
0x2 = Processor supports:
• SXTB, SXTB16, SXTH, UXTB, UXTB16, and UXTH
• SXTAB, SXTAB16, SXTAH, UXTAB, UXTAB16, and UXTAH.
3-44 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-31 shows the results of attempted access for each mode.
The purpose of the Instruction Set Attributes Register 2 is to provide information about
the instruction set that the processor supports beyond the basic set.
Figure 3-13 shows the bit arrangement for the Instruction Set Attributes Register 2.
8QVLJQHG 6LJQHG 0HPRU\ /RDGDQG
5HYHUVDO 365 0XOWLSO\ ,QWHUUXSWLEOH
PXOWLSO\ PXOWLSO\ KLQW VWRUH
LQVWUXFWLRQV LQVWUXFWLRQV LQVWUXFWLRQV LQVWUXFWLRQV
LQVWUXFWLRQV LQVWUXFWLRQV LQVWUXFWLRQV LQVWUXFWLRQV
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-45
System Control Coprocessor
Table 3-32 shows how the bit values correspond with the Instruction Set Attributes
Register 2 functions.
[3:0] Load and Indicates support for load and store instructions.
store 0x1 = Processor supports LDRD and STRD.
instructions
3-46 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-33 shows the results of attempted access for each mode.
The purpose of the Instruction Set Attributes Register 3 is to provide information about
the instruction set that the processor supports beyond the basic set.
Figure 3-14 shows the bit arrangement of Instruction Set Attributes Register 3.
7KXPE 7DEOH
7KXPE 123 6:, 6,0' 6DWXUDWH
FRS\ EUDQFK
H[WHQVLRQV LQVWUXFWLRQV LQVWUXFWLRQV LQVWUXFWLRQV LQVWUXFWLRQV
LQVWUXFWLRQV LQVWUXFWLRQV
6\QFKURQL]DWLRQSULPLWLYHLQVWUXFWLRQV
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-47
System Control Coprocessor
Table 3-34 shows how the bit values correspond with the Instruction Set Attributes
Register 3 functions.
[7:4] SIMD Indicates support for Single Instruction Multiple Data (SIMD) instructions.
instructions 0x3 = Processor supports:
PKHBT, PKHTB, QADD16, QADD8, QADDSUBX, QSUB16, QSUB8, QSUBADDX,
SADD16, SADD8, SADDSUBX, SEL, SHADD16, SHADD8, SHADDSUBX,
SHSUB16, SHSUB8, SHSUBADDX, SSAT, SSAT16, SSUB16, SSUB8, SSUBADDX,
SXTAB16, SXTB16, UADD16, UADD8, UADDSUBX, UHADD16, UHADD8,
UHADDSUBX, UHSUB16, UHSUB8, UHSUBADDX, UQADD16, UQADD8,
UQADDSUBX, UQSUB16, UQSUB8, UQSUBADDX, USAD8, USADA8, USAT,
USAT16, USUB16, USUB8, USUBADDX, UXTAB16, UXTB16, and the GE[3:0] bits in
the PSRs.
3-48 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-35 shows the results of attempted access for each mode.
The purpose of Instruction Set Attributes Register 4 is to provide information about the
instruction set that the processor supports beyond the basic set.
Figure 3-15 shows the bit arrangement of the Instruction Set Attributes Register 4.
([FOXVLYH %DUULHU 60, :ULWHEDFN :LWKVKLIW 8QSULYLOHJHG
5HVHUYHG
LQVWUXFWLRQV LQVWUXFWLRQV LQVWUXFWLRQV LQVWUXFWLRQV LQVWUXFWLRQV LQVWUXFWLRQV
Table 3-36 shows how the bit values correspond with the Instruction Set Attributes
Register 4 functions.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-49
System Control Coprocessor
Table 3-37 shows the results of attempted access for each mode.
The purpose of the Instruction Set Attributes Registers 5-7 are reserved, and they read
as 0x00000000.
The purpose of the Current Cache Level ID Register is to indicate the cache levels that
are implemented. The register indicates the level of unification, LoU, and the level of
coherency, LoC. For example, in the CortexA8 processor, the point at which both data
3-50 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
and instruction are unified is the Level 2 cache; therefore, the LoU is 3'b001. And the
point at which both data and instruction are coherent is the AMBA AXI interface;
therefore, the LoC is 3'b010.
Figure 3-16 shows the bit arrangement of the Current Cache Level ID Register.
/R8 /R& &/ &/ &/ &/ &/ &/ &/ &/
5HVHUYHG
Table 3-38 shows how the bit values correspond with the Current Cache Level ID
Register functions.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-51
System Control Coprocessor
Table 3-39 shows the results of attempted access for each mode.
The purpose of the Silicon ID Register is to enable software to identify the silicon
manufacturer and revision. The reset value of this register is the SILICONID[31:0]
input.
Figure 3-17 on page 3-53 shows the bit arrangement of the Silicon ID Register.
3-52 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
0DMRU 0LQRU
,PSOHPHQWRU )HDWXUH 5HVHUYHG
UHYLVLRQ UHYLVLRQ
Table 3-40 shows how the bit values correspond with the Silicon ID Register functions.
[31:24] Implementor This field contains a code that identifies the silicon manufacturer. ARM assigns this code.
Table 3-41 shows the results of attempted access for each mode.
The purpose of these registers is to provide cache size information for up to eight levels
of cache containing instruction, data, or unified caches. The processor contains L1 and
L2 cache. The Cache Size Selection Register determines which Current Cache Size
Identification Register to select.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-53
System Control Coprocessor
Figure 3-18 shows the bit arrangement of the Current Cache Size Identification
Register.
: : 5 : /LQH
1XP6HWV $VVRFLDWLYLW\
7 % $ $ 6L]H
Table 3-42 shows how the bit values correspond with the Current Cache Size
Identification Register functions. See Table 3-43 on page 3-55 for valid bit field
encodings.
3-54 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-43 shows the individual bit field and complete register encodings for the
Current Cache Size Identification Register. Use this to match the cache size and level of
cache set by the Cache Size Selection Register (CSSR). See c0, Cache Size Selection
Register on page 3-56.
Table 3-44 shows the results of attempted access for each mode.
Table 3-44 Results of access to the Current Cache Size Identification Register
To access the Current Cache Size Identification Register, read CP15 with:
MRC p15, 1, <Rd>, c0, c0, 0; Current Cache Size Identification Register
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-55
System Control Coprocessor
The purpose of the Cache Size Selection Register is to hold the value that the processor
uses to select which Current Cache Size Identification Register to use.
Figure 3-19 shows the bit arrangement of the Cache Size Selection Register.
5HVHUYHG /HYHO
,Q'
Table 3-45 shows how the bit values correspond with the Cache Size Selection Register
functions.
Table 3-46 shows the results of attempted access for each mode.
3-56 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
The purpose of the Control Register is to provide control and configuration of:
• memory alignment, endianness, protection, and fault behavior
• MMU, cache enables, and cache replacement strategy
• interrupts and behavior of interrupt latency
• location for exception vectors
• program flow prediction.
$ 7
7 (
) 5 5HVHUYHG 9 , = 5HVHUYHG & $ 0
( (
( (
5HVHUYHG
10),
5HVHUYHG
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-57
System Control Coprocessor
Table 3-47 shows how the bit values correspond with the Control Register functions.
[29] AFE Banked This is the Access Flag Enable bit. It controls whether VMSAv7 redefines the AP[0]
bit as an access flag or whether the software maintains binary compatibility with
VMSAv6:
0 = AP[0] behavior defined, reset value
1 = access flag behavior defined.
The TLB must be invalidated after changing the AFE bit.
[28] TRE Banked This bit controls the TEX remap functionality in the MMU, see MMU
software-accessible registers on page 6-8:
0 = TEX remap disabled. Normal ARMv6 or later behavior, reset value.
1 = TEX remap enabled. TEX[2:1] become translation table bits for OS.
[27] NMFI Read-only This is the Non-Maskable Fast Interrupt enable bit. The reset value is determined by
CFGNMFI. The pin cannot be configured by software:
0 = FIQ exceptions can be masked by software
1 = FIQ exceptions cannot be masked by software.
[25] EE bit Banked Determines how the E bit in the CPSR is set on an exception:
0 = CPSR E bit is set to 0 on an exception
1 = CPSR E bit is set to 1 on an exception.
The primary input CFGEND0 defines the reset value of the EE bit.
3-58 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
[13] V bit Banked Determines the location of exception vectors, see c12, Secure or Nonsecure Vector
Base Address Register on page 3-149. The primary input VINITHI defines the reset
value of the V bit:
0 = Normal exception vectors selected, reset value. The Vector Base Address Registers
determine the address range.
1 = High exception vectors selected, address range = 0xFFFF0000-0xFFFF001C.
[12] I bit Banked Determines if instructions can be cached in any instruction cache at any cache level:
0 = instruction caching disabled at all levels, reset value
1 = instruction caching enabled.
[6:3] - - Read As One (RAO) on reads, Should Be One or Preserved (SBOP) on writes.
[2] C bit Banked Determines if data can be cached in a data or unified cache at any cache level:
0 = data caching disabled at all levels, reset value
1 = data caching enabled.
[1] A bit Banked Enables strict alignment of data to detect alignment faults in data accesses:
0 = strict alignment fault checking disabled, reset value
1 = strict alignment fault checking enabled.
Attempts to read or write the Control Register from secure or nonsecure User modes
result in an Undefined exception.
Attempts to write secure modify only bit in nonsecure privileged modes are ignored.
Attempts to read secure modify only bits return the secure bit value.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-59
System Control Coprocessor
Table 3-48 shows the actions that result from attempted access for each mode.
Secure Secure Secure Secure bit Ignored Undefined Undefined Undefined Undefined
modify bit bit exception exception exception exception
only
Table 3-49 shows the behavior of the processor caching instructions or data for the I bit
and C bit of the c1, Control Register on page 3-57 and the L2EN bit of the c1, Auxiliary
Control Register on page 3-61.
0 0 - Instruction cache, data cache, L2 cache disabled for all instruction and data requests
0 1 0 Instruction cache disabled, data cache enabled, L2 cache disabled for all instruction and
data requests
0 1 1 Instruction cache disabled, data cache enabled, L2 cache enabled for all instruction and
data requests
1 0 0 Instruction cache enabled, data cache disabled, L2 cache disabled for all instruction and
data requests
1 0 1 Instruction cache enabled, data cache disabled, L2 cache disabled for all instruction and
data requests
1 1 0 Instruction cache enabled, data cache enabled, L2 cache disabled for all instruction and
data requests
1 1 1 Instruction cache, data cache, and L2 cache enabled for all requests
3-60 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Figure 3-21 shows the bit arrangement of the Auxiliary Control Register.
5HVHUYHG
)RUFH(70FORFN
)RUFH1(21FORFN
)RUFHPDLQFORFN
)RUFH1(21VLQJOHLVVXH
)RUFHORDGVWRUHVLQJOHLVVXH
)RUFHVLQJOHLVVXH
3/'123
:),123
'LVDEOHEUDQFKVL]HPLVSUHGLFWV
,%(
/1(21
$6$
/3(
5HVHUYHG
/(1
/$/,$6
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-61
System Control Coprocessor
Table 3-50 shows how the bit values correspond with the Auxiliary Control Register
functions.
Security State
Bits Field Function
NS S
[15] Force ETM clock R R/W Forces ETM clock enable active:
0 = does not prevent the processor clock generator from
stopping the ETM clock, reset value
1 = prevents the processor clock generator from stopping the
ETM clock.
[14] Force NEON clock R R/W Forces NEON clock enable active:
0 = does not prevent the processor clock generator from
stopping the NEON clock, reset value
1 = prevents the processor clock generator from stopping the
NEON clock.
[13] Force main clock R R/W Forces the main processor clock enable active:
0 = does not prevent the processor clock generator from
stopping the main clock, reset value
1 = prevents the processor clock generator from stopping the
main clock.
[12] Force NEON single R R/W Forces single issue of NEON instructions:
issue 0 = does not force single issue of NEON instructions, reset
value
1 = forces single issue of NEON instructions.
[10] Force single issue R R/W Forces single issue of all instructions:
0 = does not force single issue of all instructions, reset value
1 = forces single issue of all instructions.
3-62 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Security State
Bits Field Function
NS S
[7] Disable branch size R R/W Prevents BTB branch size mispredicts:
mispredicts 0 = enables BTB branch size mispredicts, reset value
1 = executes the CP15 Invalidate All and Invalidate by MVA
instructions as specified and prevents BTB branch size
mispredicts.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-63
System Control Coprocessor
Security State
Bits Field Function
NS S
[5] L1NEON R R/W Enables caching NEON data within the L1 data cache:
0 = disables caching NEON data within the L1 data cache,
reset value
1 = enables caching NEON data within the L1 data and L2
cache.
Table 3-51 shows the results of attempted access for each mode.
To access the Auxiliary Control Register you must use a read modify write technique.
To access the Auxiliary Control Register, read or write CP15 with:
MRC p15, 0, <Rd>, c1, c0, 1 ; Read Auxiliary Control Register
3-64 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
The purpose of the Coprocessor Access Control Register is to set access rights for the
coprocessors CP0 through CP13. This register has no effect on access to CP14, the
debug control coprocessor, or CP15, the system control coprocessor. This register also
provides a means for software to determine if any particular coprocessor, CP0-CP13,
exists in the system.
Figure 3-22 shows the bit arrangement of the Coprocessor Access Control Register.
5HVHUYHG FS FS FS FS FS FS FS FS FS FS FS FS FS FS
Table 3-52 shows how the bit values correspond with the Coprocessor Access Control
Register functions.
- cp<n>a Defines access permissions for each coprocessor. Access denied is the reset condition and is the
behavior for nonexistent coprocessors:
b00 = Access denied, reset value. Attempted access generates an Undefined exception.
b01 = Privileged mode access only.
b10 = Reserved.
b11 = Privileged and User mode access.
a. n is the coprocessor number between 0 and 13.
Access to coprocessors in the Nonsecure state depends on the permissions set in the c1,
Nonsecure Access Control Register on page 3-70.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-65
System Control Coprocessor
Attempts to read or write the Coprocessor Access Control Register access bits depend
on the corresponding bit for each coprocessor in c1, Nonsecure Access Control Register
on page 3-70. Table 3-53 shows the results of attempted access to coprocessor access
bits for each mode.
To access the Coprocessor Access Control Register, read or write CP15 with:
MRC p15, 0, <Rd>, c1, c0, 2 ; Read Coprocessor Access Control Register
MCR p15, 0, <Rd>, c1, c0, 2 ; Write Coprocessor Access Control Register
You must execute an Instruction Memory Barrier (IMB) sequence immediately after an
update of the Coprocessor Access Control Register, see Memory Barriers in the ARM
Architecture Reference Manual. You must not attempt to execute any instructions that
are affected by the change of access rights between the IMB sequence and the register
update.
To determine if any particular coprocessor exists in the system, write the access bits for
the coprocessor of interest with a value other than b00. If the coprocessor does not exist
in the system the access rights remain set to b00.
Note
• For the processor, there is a direct relationship between the CPEXIST[13:0]
inputs and the Coprocessor Access Control Register bits cp13-cp01.
Each CPEXIST input represents the existence of a coprocessor that you use to
enable a particular coprocessor. If the appropriate CPEXIST input is set to a:
— logical 0, access is denied to that coprocessor or reset state as defined by the
register
— logical 1, then you can reprogram that coprocessor.
• You must enable the Coprocessor Access Control Register before accessing any
NEON or VFPLite system register.
3-66 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
• You must set CPEXIST[11:10] to 2'b00 if you configure the processor without
the NEON coprocessor.
Figure 3-23 shows the bit arrangement of the Secure Configuration Register.
) ,
$ ) ( 1
5HVHUYHG , 5
: : $ 6
4 4
Table 3-54 shows how the bit values correspond with the Secure Configuration Register
functions.
[5] AW Determines if the A bit in the CPSR can be modified when in the Nonsecure state:
0 = disable modification of the A bit in the CPSR in the Nonsecure state, reset value
1 = enable modification of the A bit in the CPSR in the Nonsecure state.
[4] FW Determines if the F bit in the CPSR can be modified when in the Nonsecure state:
0 = disable modification of the F bit in the CPSR in the Nonsecure state, reset value
1 = enable modification of the F bit in the CPSR in the Nonsecure state.
[3] EA Determines External Abort behavior for Secure and Nonsecure states:
0 = branch to abort mode on an External Abort exception, reset value
1 = branch to Monitor mode on an External Abort exception.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-67
System Control Coprocessor
[2] FIQ Determines FIQ behavior for Secure and Nonsecure states:
0 = branch to FIQ mode on an FIQ exception, reset value
1 = branch to Monitor mode on an FIQ exception.
[1] IRQ Determines IRQ behavior for Secure and Nonsecure states:
0 = branch to IRQ mode on an IRQ exception, reset value
1 = branch to Monitor mode on an IRQ exception.
Note
When the core runs in Monitor mode the state is considered secure regardless of the
state of the NS bit.
The permutations of the bits in the Secure Configuration Register have certain security
implications. Table 3-55 shows the results for combinations of the FW and FIQ bits.
FW FIQ Function
1 1 Nonsecure state able to make denial of service attack, avoid use of this function
0 0 for Nonsecure state, avoid because the core might enter an infinite loop for
nonsecure FIQ
3-68 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-56 shows the results for combinations of the AW and EA bits.
AW EA Function
1 1 all external imprecise Data Aborts trapped to Monitor mode but the Nonsecure state can hide secure aborts
from the Monitor, avoid use of this function
0 0 for Nonsecure state, avoid this because the core can unexpectedly enter an abort mode
An attempt to access the Secure Configuration Register from any state other than secure
privileged results in an Undefined exception.
The purpose of the Secure Debug Enable Register is to provide control of permissions
for debug in secure User mode. See Chapter 12 Debug for more details.
Figure 3-24 shows the bit arrangement of the Secure Debug Enable Register.
5HVHUYHG
681,'(1
68,'(1
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-69
System Control Coprocessor
Table 3-57 shows how the bit values correspond with the Secure Debug Enable Register
functions.
Table 3-58 shows the results of attempted access for each mode.
To access the Secure Debug Enable Register, read or write CP15 with:
MRC p15, 0, <Rd>, c1, c1, 1 ; Read Secure Debug Enable Register
MCR p15, 0, <Rd>, c1, c1, 1 ; Write Secure Debug Enable Register
The purpose of the Nonsecure Access Control Register is to define the nonsecure access
permission for:
• coprocessors
• internal PLE.
Note
This register has no effect on nonsecure access permissions for the debug control
coprocessor, CP14, or the system control coprocessor, CP15.
3-70 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Figure 3-25 shows the bit arrangement of the Nonsecure Access Control Register.
3 7 &
5HVHUYHG /
( / /
5HVHUYHG
&3 &3
&3 &3
&3 &3
&3 &3
&3 &3
&3 &3
&3 &3
Table 3-59 shows how the bit values correspond with the Nonsecure Access Control
Register functions.
[17] TL Determines if lockable translation table entries can be allocated in Nonsecure state:
0 = lockable TLB entries cannot be allocated, reset
1 = lockable TLB entries can be allocated.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-71
System Control Coprocessor
[16] CL Determines if lockdown entries can be allocated within the L2 cache in Nonsecure state:
0 = entries cannot be allocated, reset value
1 = entries can be allocated.
If CL is set to 0, then any L2 cache lockdown operation takes an Undefined exception.
[13:0] CP<n> Determines permission to access the given coprocessor in the Nonsecure state, <n> is the number
of coprocessor from 0 to 13:
0 = secure access only, reset value
1 = secure or nonsecure access.
To access the Nonsecure Access Control Register, read or write CP15 with:
MRC p15, 0, <Rd>, c1, c1, 2 ; Read Nonsecure Access Control Register data
MCR p15, 0, <Rd>, c1, c1, 2 ; Write Nonsecure Access Control Register data
Table 3-60 shows the results of attempted access for each mode.
The purpose of the Translation Table Base Register 0 is to hold the physical address of
the first level translation table.
You use Translation Table Base Register 0 for process-specific addresses, where each
process maintains a separate first level translation table. On a context switch you must
modify both Translation Table Base Register 0 and the Translation Table Base Control
Register, if appropriate.
3-72 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Figure 3-26 shows the bit arrangement of the Translation Table Base Register 0.
1 1
Table 3-61 shows how the bit values correspond with the Translation Table Base
Register 0 functions.
[31:14-N]a Translation table Holds the translation table base address, the physical address of the first level
base 0 translation table.
[4:3] RGN Indicates the outer cacheable attributes for translation table walking:
b00 = outer noncacheable
b01 = write-back, write allocate
b10 = write-through, no allocate on write
b11 = write-back, no allocate on write.
[2] P Read-As-Zero and ignore writes. This bit is not implemented on this processor.
[0] C Indicates the translation table walk is inner cacheable or inner noncacheable:
0 = inner noncacheable
1 = inner cacheable.
a. For an explanation of N, see c2, Translation Table Base Control Register on page 3-76.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-73
System Control Coprocessor
Table 3-62 shows the results of attempted access for each mode.
A write to the Translation Table Base Register 0 updates the address of the first level
translation table from the value in bits [31:7] of the written value, to account for the
maximum value of 7 for N. The number of bits of this address that the processor uses,
and the required alignment of the first level translation table, depends on the value of N,
see c2, Translation Table Base Control Register on page 3-76.
A read from the Translation Table Base Register 0 returns the complete address of the
first level translation table in bits [31:7] of the read value, regardless of the value of N.
To access the Translation Table Base Register 0, read or write CP15 c2 with:
MRC p15, 0, <Rd>, c2, c0, 0 ; Read Translation Table Base Register
MCR p15, 0, <Rd>, c2, c0, 0 ; Write Translation Table Base Register
Note
The processor cannot perform a translation table walk from L1 cache. Therefore, if C is
set to 1, to ensure coherency, you must store translation tables in inner write-through
memory. If you store the translation tables in an inner write-back memory region, you
must clean the appropriate cache entries after modification so that the mechanism for
the hardware translation table walks sees them.
The purpose of the Translation Table Base Register 1 is to hold the physical address of
the first level table. The expected use of the Translation Table Base Register 1 is for OS
and I/O addresses.
Figure 3-27 on page 3-75 shows the bit arrangement of the Translation Table Base
Register 1.
3-74 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-63 shows how the bit values correspond with the Translation Table Base
Register 1 functions.
[31:14] Translation table Holds the translation table base address, the physical address of the first level translation
base 1 table.
[4:3] RGN Indicates the outer cacheable attributes for translation table walking:
b00 = outer noncacheable
b01 = write-back, write allocate
b10 = write-through, no allocate on write
b11 = write-back, no allocate on write.
[2] P RAZ on reads and ignore writes. This bit is not implemented on this processor.
[0] C Indicates the translation table walk is inner cacheable or inner noncacheable:
0 = inner noncacheable
1 = inner cacheable.
Table 3-64 shows the results of attempted access for each mode.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-75
System Control Coprocessor
A write to the Translation Table Base Register 1 updates the address of the first level
translation table from the value in bits [31:14] of the written value. Bits [13:5] Should
Be Zero. The Translation Table Base Register 1 must reside on a 16KB page boundary.
To access the Translation Table Base Register 1, read or write CP15 with:
MRC p15, 0, <Rd>, c2, c0, 1 ; Read Translation Table Base Register 1
MCR p15, 0, <Rd>, c2, c0, 1 ; Write Translation Table Base Register 1
Note
The processor cannot perform a translation table walk from L1 cache. Therefore, if C is
set to 1, to ensure coherency, you must store translation tables in inner write-through
memory. If you store the translation tables in an inner write-back memory region, you
must clean the appropriate cache entries after modification so that the mechanism for
the hardware translation table walks sees them.
• Translation Table Base Register 1. The recommended use is for operating system
and I/O addresses.
Figure 3-28 shows the bit arrangement of the Translation Table Base Control Register.
3 3 6
5HVHUYHG ' ' % 1
=
3-76 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-65 shows how the bit values correspond with the Translation Table Base
Control Register functions.
[5] PD1 Specifies occurrence of a translation table walk on a TLB miss when using Translation Table Base
Register 1. When translation table walk is disabled, a section translation fault occurs instead on a TLB
miss.
0 = The processor performs a translation table walk on a TLB miss, with secure or nonsecure privilege
appropriate to the current Secure or Nonsecure state. This is the reset value.
1 = The processor does not perform a translation table walk. If a TLB miss occurs with Translation
Table Base Register 1 in use, the processor returns a section translation fault.
[4] PD0 Specifies occurrence of a translation table walk on a TLB miss when using Translation Table Base
Register 0. When translation table walk is disabled, a section translation fault occurs instead on a TLB
miss.
0 = The processor performs a translation table walk on a TLB miss, with secure or nonsecure privilege
appropriate to the current Secure or Nonsecure state. This is the reset value.
1 = The processor does not perform a translation table walk. If a TLB miss occurs with Translation
Table Base Register 0 in use, the processor returns a section translation fault.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-77
System Control Coprocessor
Table 3-66 shows the results of attempted access for each mode.
Table 3-66 Results of access to the Translation Table Base Control Register
To access the Translation Table Base Control Register, read or write CP15 with:
MRC p15, 0, <Rd>, c2, c0, 2 ; Read Translation Table Base Control Register
MCR p15, 0, <Rd>, c2, c0, 2 ; Write Translation Table Base Control Register
• If N is set to 0, always use Translation Table Base Register 0. This is the default
case at reset. It is backwards compatible with ARMv5 and earlier processors.
• If N is set greater than 0, and bits [31:32-N] of the VA are all zeros, use
Translation Table Base Register 0. Otherwise, use Translation Table Base
Register 1. N must be in the range 0-7.
Note
The processor cannot perform a translation table walk from L1 cache. Therefore, if C is
set to 1, to ensure coherency, you must store translation tables in inner write-through
memory. If you store the translation tables in an inner write-back memory region, you
must clean the appropriate cache entries after modification so that the mechanism for
the hardware translation table walks sees them.
The purpose of the Domain Access Control Register is to hold the access permissions
for a maximum of 16 domains.
Figure 3-29 on page 3-79 shows the bit arrangement of the Domain Access Control
Register.
3-78 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
Table 3-67 shows how the bit values correspond with the Domain Access Control
Register functions.
- D<n>a The fields D15-D0 in the register define the access permissions for each one of the 16 domains. These
domains can be either sections, large pages, or small pages of memory:
b00 = No access. Any access generates a domain fault.
b01 = Client. Accesses are checked against the access permission bits in the TLB entry.
b10 = Reserved. Any access generates a domain fault.
b11 = Manager. Accesses are not checked against the access permission bits in the TLB entry, so a
permission fault cannot be generated. Attempting to execute code in a page that has the TLB eXecute
Never (XN) attribute set does not generate an abort.
a. n is the Domain number in the range between 0 and 15
Table 3-68 shows the results of attempted access for each mode.
To access the Domain Access Control Register, read or write CP15 with:
MRC p15, 0, <Rd>, c3, c0, 0 ; Read Domain Access Control Register
MCR p15, 0, <Rd>, c3, c0, 0 ; Write Domain Access Control Register
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-79
System Control Coprocessor
The purpose of the Data Fault Status Register is to hold the source of the last data fault.
Figure 3-30 shows the bit arrangement of the Data Fault Status Register when the data
abort is not imprecise. When the data abort is imprecise, only bits [3:0] are valid.
6 5
5HVHUYHG 6 'RPDLQ 6WDWXV
' :
Table 3-69 shows how the bit values correspond with the Data Fault Status Register
functions.
[12] SD Indicates whether an AXI Decode or Slave error caused an abort. This bit is only valid for external
aborts. For all other aborts this bit Should Be Zero:
0 = AXI Decode error caused the abort, reset value
1 = AXI Slave error caused the abort.
[10] S Part of the Status field. See bits [3:0] in this table. The reset value is 0.
[7:4] Domain Indicates which one of the 16 domains, D15-D0, is accessed when a data fault occurs. This field
takes values 0-15.
3-80 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
[3:0] Status Indicates the type of exception generated. To determine the data fault, bits [12] and [10] must be
used in conjunction with bits [3:0]. The following encodings are in priority order, 1 is the highest:
1. 0b000001 alignment fault
2. 0b000100 instruction cache maintenance fault
3. 0bx01100 L1 translation, precise external abort
4. 0bx01110 L2 translation, precise external abort
5. 0b011100 L1 translation precise parity error
6. 0b011110 L2 translation precise parity error
7. 0b000101 translation fault, section
8. 0b000111 translation fault, page
9. 0b000011 access flag fault, section
10. 0b000110 access flag fault, page
11. 0b001001 domain fault, section
12. 0b001011 domain fault, page
13. 0b001101 permission fault, section
14. 0b001111 permission fault, page
15. 0bx01000 precise external abort, nontranslation
16. 0bx10110 imprecise external abort
17. 0b011000 imprecise error, parity or ECC
18. 0b000010 debug event.
Any unused encoding not listed is reserved.
Where x represents bit [12] in the encoding, bit [12] can be either:
0 = AXI Decode error caused the abort, reset value
1 = AXI Slave error caused the abort.
Note
When the SCR EA bit is set, see c1, Secure Configuration Register on page 3-67, the
processor writes to the Secure Data Fault Status Register on a Monitor entry caused by
an external abort.
To access the Data Fault Status Register, read or write CP15 with:
MRC p15, 0, <Rd>, c5, c0, 0 ; Read Data Fault Status Register
MCR p15, 0, <Rd>, c5, c0, 0 ; Write Data Fault Status Register
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-81
System Control Coprocessor
The purpose of the Instruction Fault Status Register (IFSR) is to hold the source of the
last instruction fault.
Figure 3-31 shows the bit arrangement of the Instruction Fault Status Register.
6
5HVHUYHG 6 5HVHUYHG 6WDWXV
'
5HVHUYHG
Table 3-70 shows how the bit values correspond with the Instruction Fault Status
Register functions.
[12] SD Indicates whether an AXI Decode or Slave error caused an abort. This bit is only valid for external
aborts. For all other aborts this bit Should Be Zero:
0 = AXI Decode error caused the abort, reset value
1 = AXI Slave error caused the abort.
3-82 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
[10] S Part of the Status field. See bits [3:0] in this table.
[3:0] Status Indicates the type of exception generated. To determine the data fault, bits [12] and [10] must be
used in conjunction with bits [3:0]. The following encodings are in priority order, 1 is the highest:
1. 0bx01100 L1 translation, precise external abort
2. 0bx01110 L2 translation, precise external abort
3. 0b011100 L1 translation precise parity error
4. 0b011110 L2 translation precise parity error
5. 0b000101 translation fault, section
6. 0b000111 translation fault, page
7. 0b000011 access flag fault, section
8. 0b000110 access flag fault, page
9. 0b001001 domain fault, section
10. 0b001011 domain fault, page
11. 0b001101 permission fault, section
12. 0b001111 permission fault, page
13. 0bx01000 precise external abort, nontranslation
14. 0b011001 precise parity error
15. 0b000010 debug event.
Any unused encoding not listed is reserved.
Where x represents bit [12] in the encoding, bit [12] can be either:
0 = AXI Decode error caused the abort, reset value
1 = AXI Slave error caused the abort.
Note
When the SCR EA bit is set, see c1, Secure Configuration Register on page 3-67, the
processor writes to the Secure Instruction Fault Status Register on a Monitor entry
caused by an external abort.
To access the Instruction Fault Status Register, read or write CP15 with:
MRC p15, 0, <Rd>, c5, c0, 1 ; Read Instruction Fault Status Register
MCR p15, 0, <Rd>, c5, c0, 1 ; Write Instruction Fault Status Register
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-83
System Control Coprocessor
The Auxiliary Fault Status Register is provided for compatibility with all ARMv7-A
designs. This is true for both the instruction and data auxiliary FSR. The processor
always reads this as RAZ. All writes are ignored.
Table 3-71 shows the results of attempted access for each mode.
To access the Auxiliary Fault Status Registers, read or write CP15 with:
MRC p15, 0, <Rd>, c5, c1, 0; Read Data Auxiliary Fault Status Register
MCR p15, 0, <Rd>, c5, c1, 0; Write Data Auxiliary Fault Status Register
MRC p15, 0, <Rd>, c5, c1, 1; Read Instruction Auxiliary Fault Status Register
MCR p15, 0, <Rd>, c5, c1, 1; Write Instruction Auxiliary Fault Status Register
There is no physical register for Auxiliary Data Fault Status Register or Auxiliary
Instruction Fault Status Register as the register is always RAZ.
The purpose of the Data Fault Address Register (DFAR) is to hold the Modified Virtual
Address (MVA) of the fault when a precise abort occurs.
The Data Fault Address Register bits [31:0] contain the MVA on which the precise abort
occurred.
3-84 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-72 shows the results of attempted access for each mode.
A write to this register sets the DFAR to the value of the data written. This is useful for
a debugger to restore the value of the DFAR.
The processor also updates the DFAR on debug exception entry because of watchpoints.
See Effect of debug exceptions on CP15 registers and WFAR on page 12-77 for more
information.
The purpose of the Instruction Fault Address Register (IFAR) is to hold the address of
instructions that cause a prefetch abort.
The Instruction Fault Address Register bits [31:1] contain the instruction fault MVA and
bit [0] is RAZ.
Table 3-73 shows the results of attempted access for each mode.
Secure data Secure data Nonsecure Nonsecure Undefined Undefined Undefined Undefined
data data exception exception exception exception
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-85
System Control Coprocessor
A write to this register sets the IFAR to the value of the data written. This is useful for
a debugger to restore the value of the IFAR.
The purpose of c7 is to manage the associated cache levels. The maintenance operations
are formed into two management groups:
• MVA:
— clean
— invalidate
— clean and invalidate.
Point of coherency
The point at which the imposition of any further cache becomes
transparent for instruction, data, and translation table walk accesses to
that address by any processor in the system.
Point of unification
The point by which the instruction and data caches, and the TLB
translation table walks have merged for a uniprocessor system.
Note
• Reading from c7, except for reads from the PA Register, causes an Undefined
exception.
3-86 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
• For information on the behavior of the invalidate, clean, and prefetch operations
in the secure and nonsecure operations, see the ARM Architecture Reference
Manual.
The possible formats for the data supplied to the cache maintenance and prefetch buffer
operations depend on the specific operation:
• Set and way on page 3-88
• MVA on page 3-89
• SBZ on page 3-89.
Table 3-74 shows the data value supplied to each cache maintenance and prefetch buffer
operations.
c5 0 Invalidate all instruction caches to PoU. Also flushes branch target cache.a SBZ
c14 1 Clean and Invalidate Data or Unified cache line by MVA to PoC. MVA
c14 2 Clean and Invalidate Data or Unified cache line by Set/Way. Set/Way
a. Only applies to separate instruction caches, does not apply to unified caches.
b. Available in User mode.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-87
System Control Coprocessor
Figure 3-32 shows the set and way format for invalidate and clean operations.
5HVHUYHG
Table 3-75 shows how the bit values correspond with the Cache Operation functions for
set and way format operations.
[31:32-A] Way Selects the way for the c7 set and way cache operation.
[31-A:L+S] - SBZ.
[L+S-1:L] Set Selects the set for the c7 set and way cache operation.
[L-1:4] - SBZ.
[3:1] Level Selects the cache level for the c7 set and way operation. 0 indicates cache level 1 is selected.
[0] - SBZ.
For the processor, the L1 and L2 cache are configurable at implementation time.
Therefore, the set and way fields are unique to the configured cache sizes. Table 3-76
shows the values of A, L, and S for L1 cache sizes, and Table 3-77 on page 3-89 shows
the values of A, L, and S for L2 cache sizes.
3-88 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-77 shows the values of A, L, and S for L2 cache sizes and the resultant bit range
for Way, Set, and Level. See Table 3-75 on page 3-88 and Figure 3-32 on page 3-88.
See c0, Cache Type Register on page 3-26 for more information on cache sizes.
MVA
Figure 3-33 shows the MVA format for invalidate, clean, and prefetch operations.
0RGLILHGYLUWXDODGGUHVV 5HVHUYHG
Table 3-78 shows how the bit values correspond with the Cache Operation functions for
MVA format operations.
[4:0] - SBZ
SBZ
The value supplied Should Be Zero. The value 0x00000000 must be written to the
register.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-89
System Control Coprocessor
VA to PA translation operations
PA Register
Table 3-79 on page 3-91 shows the purpose of the bits of the PA Register for successful
translations and Table 3-80 on page 3-92 shows the purpose of the bits of the PA
Register for unsuccessful translations.
Figure 3-34 shows the bit arrangement of the PA Register for successful translations.
1 6
3$ 3 ,11(5
6 +
5HVHUYHG
287(5
5HVHUYHG
Figure 3-35 shows the bit arrangement of the PA Register for unsuccessful translations.
5HVHUYHG )65>@
3-90 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-79 shows how the bit values correspond with the PA Register for a successful
translation.
[6:4] INNER Indicates the inner attributes from the translation table:
b000 = noncacheable
b001 = strongly ordered
b010 = reserved
b011 = device
b100 = reserved
b101 = inner write-back, allocate on write
b110 = inner write-through, no allocate on write
b111 = inner write-back, no allocate on write.
[3:2] OUTER Indicates the outer attributes from the translation table:
b00 = noncacheable
b01 = write-back, allocate on write
b10 = write-through, no allocate on write
b11 = write-back, no allocate on write.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-91
System Control Coprocessor
Table 3-80 shows how the bit values correspond with the PA Register for an
unsuccessful translation.
[6:1] FSR[12,10,3:0] Holds the FSR bits for the aborted address. See c5, Data Fault Status Register on page 3-80
and c5, Auxiliary Fault Status Registers on page 3-84.
Note
The VA to PA translation can only generate an abort to the core if the operation failed
because an external abort occurred on the possible translation table request. In this case,
the processor does not update the PA Register. The processor updates the Data Fault
Status Register and the Fault Address Register:
• if the EA bit in the Secure Configuration Register is set, the secure versions of the
two registers are updated and the processor traps the abort into Monitor mode
• if the EA bit in the Secure Configuration Register is not set, the processor updates
the secure or nonsecure versions of the two registers, depends whether the core is
in Secure or Nonsecure state when the operation was issued.
For all other cases when the VA to PA operation fails, the processor only updates the PA
Register, secure or nonsecure version, depends whether the core is in Secure or
Nonsecure state when the operation was issued, with the Fault Status Register encoding
and bit [0] set. The Data Fault Status Register and Fault Address Register remain
unchanged and the processor does not send an abort to the core.
3-92 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
The operations work for privileged or User access permissions and returns information
in the PA Register for aborts, when the translation is unsuccessful, or translation table
information, when the translation succeeds.
To access the VA to PA translation in the current Secure or Nonsecure state, write CP15
c7 with:
MCR p15, 0, <Rn>, c7, c8, 3 ; get VA = <Rn> and run VA-to-PA translation
; with User write permission.
; if the selected translation table has the
; User write permission, the PA is loaded in the PA
; Register, otherwise abort information is loaded in
; the PA Register.
MRC p15, 0, <Rd>, c7, c4, 0 ; read in <Rd> the PA value
Note
• The VA that this operation uses is the true VA not the MVA.
• General register <Rn> contains the VA for translation. The result returns in the
PA Register.
The operations work in the Secure state for nonsecure privileged or nonsecure User
access permissions and returns information in the PA Register for aborts, when the
translation is unsuccessful, or translation table information, when the translation
succeeds.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-93
System Control Coprocessor
When a VA to PA translation occurs in the other state from the Secure state, the value
of the NS bit for a successful translation is Unpredictable.
To access the VA to PA translation in the other Secure or Nonsecure state, write CP15
c7 with Opcode_2 set to:
• 4 for privileged read permission
• 5 for privileged write permission
• 6 for User read permission
• 7 for User write permission.
General register <Rn> contains the VA for translation. The result returns in the PA
Register, for example:
MCR p15, 0, <Rn>, c7, c8, 4 ; get VA = <Rn> and run nonsecure translation
; with nonsecure privileged read permission.
; if the selected translation table has privileged
; read permission, the PA is loaded in the PA
; Register, otherwise abort information is loaded
; in the PA Register.
MRC p15, 0, <Rd>, c7, c4, 0 ; read in <Rd> the PA value
The purpose of the data synchronization barrier operation is to ensure that all
outstanding explicit memory transactions complete before any following instructions
begin. This ensures that data in memory is up to date before the processor executes any
more instructions.
Table 3-81 shows the results of attempted access for each mode.
Read Write
3-94 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
See the ARM Architecture Reference Manual for more information on memory barriers.
The purpose of the data memory barrier operation is to ensure that all outstanding
explicit memory transactions complete before any following explicit memory
transactions begin. This ensures that data in memory is up to date for any memory
transaction that depends on it.
Table 3-82 shows the results of attempted access for each mode.
Read Write
See the ARM Architecture Reference Manual for more information on memory barriers.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-95
System Control Coprocessor
Functions that update the contents of the TLB occur in program order. Therefore, an
explicit data access before the TLB function uses the old TLB contents, and an explicit
data access after the TLB function uses the new TLB contents. For instruction accesses,
TLB updates are guaranteed to have taken effect before the next pipeline flush. This
includes flush prefetch buffer operations and exception return sequences.
Invalidate TLB unlocked entries invalidates all the unlocked entries in the TLB.
For an area of memory to be remapped, you can use the Invalidate TLB Entry by MVA
to invalidate any TLB entry, locked or unlocked, by either:
• matching the MVA and ASID
• matching the MVA for a globally marked TLB entry.
The operation uses both the MVA and ASID as arguments. Figure 3-36 shows the
format.
This operation invalidates all TLB entries that match the provided ASID value. This
function invalidates locked entries but does not invalidate entries marked as global.
The Invalidate TLB Entry on ASID Match function requires an ASID as an argument.
Figure 3-37 on page 3-97 shows the format.
3-96 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
5HVHUYHG $6,'
The purpose of the Performance MoNitor Control (PMNC) Register is to control the
operation of the four Performance Monitor Count Registers, and the Cycle Counter
Register:
'
,03 ,'&2'( 1 5HVHUYHG ; ' & 3 (
3
Table 3-83 shows how the bit values correspond with the PMNC Register functions.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-97
System Control Coprocessor
[4] X Enables export of the events from the event bus to an external monitoring block, such as the ETM
to trace events:
0 = export disabled, reset value
1 = export enabled.
The PMNC Register is always accessible in privileged modes. Table 3-84 shows the
results of attempted access for each mode.
a. The EN bit in c9, User Enable Register on page 3-113 enables User mode access of the Performance Monitor Registers.
3-98 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
The purpose of the CouNT ENable Set (CNTENS) Register is to enable or disable any
of the Performance Monitor Count Registers.
When reading this register, any enable that reads as 0 indicates the counter is disabled.
Any enable that reads as 1 indicates the counter is enabled.
When writing this register, any enable written with a value of 0 is ignored, that is, not
updated. Any enable written with a value of 1 indicates the counter is enabled.
3 3 3 3
& 5HVHUYHG
Table 3-85 shows how the bit values correspond with the CNTENS Register functions.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-99
System Control Coprocessor
Table 3-86 shows the results of attempted access for each mode.
a. The EN bit in c9, User Enable Register on page 3-113 enables User mode access of the Performance Monitor Registers.
The purpose of the CouNT ENable Clear (CNTENC) Register is to enable or disable
any of the Performance Monitor Count Registers.
When reading this register, any enable that reads as 0 indicates the counter is disabled.
Any enable that reads as 1 indicates the counter is enabled.
When writing this register, any enable written with a value of 0 is ignored, that is, not
updated. Any enable written with a value of 1 clears the counter enable.
3 3 3 3
& 5HVHUYHG
3-100 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-87 shows how the bit values correspond with the CNTENC Register functions.
Table 3-88 shows the results of attempted access for each mode.
a. The EN bit in c9, User Enable Register on page 3-113 enables User mode access of the Performance Monitor Registers.
You can use the enable, EN, bit [0] of the PMNC Register to disable all performance
counters including CCNT. The CNTENC Register retains its value when the enable bit
of the PMNC is cleared, even though its settings are ignored.
The purpose of the Overflow Flag Status (FLAG) Register is to enable or disable any of
the performance monitor counters producing an overflow flag.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-101
System Control Coprocessor
When reading this register, any overflow flag that reads as 0 indicates the counter has
not overflowed. Any overflow flag that reads as 1 indicates the counter has overflowed.
When writing this register, any overflow flag written with a value of 0 is ignored, that
is, not updated. Any overflow flag written with a value of 1 clears the counter overflow
flag.
3 3 3 3
& 5HVHUYHG
Table 3-89 shows how the bit values correspond with the FLAG Register functions.
3-102 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-90 shows the results of attempted access for each mode.
The purpose of the Software INCRement (SWINCR) Register is to increment the count
of a performance monitor count register.
When writing this register, a value of 1 increments the counter, and a value of 0 does
nothing.
3 3 3 3
5HVHUYHG
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-103
System Control Coprocessor
Table 3-91 shows how the bit values correspond with the SWINCR Register functions.
The SWINCR Register only has effect when counter event is set to 0x00.
Table 3-92 shows the results of attempted access for each mode.
a. The EN bit in c9, User Enable Register on page 3-113 enables User mode access of the Performance Monitor Registers.
Figure 3-43 on page 3-105 shows the bit arrangement of the PMNXSEL Register.
3-104 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
5HVHUYHG 6(/
Table 3-93 shows how the bit values correspond with the PMNXSEL Register
functions.
Any values programmed in the PMNXSEL Register other than those specified in
Table 3-93 are Unpredictable.
Table 3-94 shows the results of attempted access for each mode.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-105
System Control Coprocessor
The purpose of the Cycle CouNT (CCNT) Register is to count the number of clock
cycles since the register was reset. See bit [5] of the c9, Performance Monitor Control
Register on page 3-97.
Table 3-95 shows the results of attempted access for each mode.
a. The EN bit in c9, User Enable Register on page 3-113 enables User mode access of the Performance Monitor Registers.
The CCNT Register must be disabled before software can write to it. Any attempt by
software to write to this register when enabled is Unpredictable.
The purpose of the Event SELection (EVTSEL) Register is to select the events that you
want a Performance Monitor Count Register to count.
Figure 3-44 on page 3-107 shows the bit arrangement of the EVTSEL Register.
3-106 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
5HVHUYHG 6(/
Table 3-96 shows how the bit values correspond with the EVTSEL Register functions.
[7:0] SEL Specifies the event selected as shown in Table 3-98 on page 3-108
Table 3-97 shows the results of attempted access for each mode.
a. The EN bit in c9, User Enable Register on page 3-113 enables User mode access of the Performance Monitor Registers.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-107
System Control Coprocessor
Table 3-98 shows the range values for predefined events that you can monitor using the
EVTSEL Register.
Value Description
0x00 Software increment. The register is incremented only on writes to the Software Increment Register. See c9,
Software Increment Register on page 3-103.
0x01 Instruction fetch that causes a refill at the lowest level of instruction or unified cache. Each instruction fetch
from normal cacheable memory that causes a refill from outside of the cache is counted. Accesses that do
not cause a new cache refill, but are satisfied from refilling data of a previous miss are not counted. Where
instruction fetches consist of multiple instructions, these accesses count as single events. CP15 cache
maintenance operations do not count as events. This counter increments for speculative instruction fetches
and for fetches of instructions that reach execution.
0x02 Instruction fetch that causes a TLB refill at the lowest level of TLB. Each instruction fetch that causes a
translation table walk or an access to another level of TLB caching is counted. CP15 TLB maintenance
operations do not count as events. This counter increments for speculative instruction fetches and for fetches
of instructions that reach execution.
0x03 Data read or write operation that causes a refill at the lowest level of data or unified cache. Each data read
from or write to normal cacheable memory that causes a refill from outside of the cache is counted. Accesses
that do not cause a new cache refill, but are satisfied from refilling data of a previous miss are not counted.
Each access to a cache line to normal cacheable memory that causes a new linefill is counted, including the
multiple transaction of instructions such as LDM or STM, PUSH and POP. Write-through writes that hit in
the cache do not cause a linefill and so are not counted. CP15 cache maintenance operations do not count as
events. This counter increments for speculative data accesses and for data accesses that are explicitly made
by instructions.
0x04 Data read or write operation that causes a cache access at the lowest level of data or unified cache. Each
access to a cache line to normal cacheable memory is counted including the multiple transaction of
instructions such as LDM or STM. CP15 cache maintenance operations do not count as events. This counter
increments for speculative data accesses and for data accesses that are explicitly made by instructions.
0x05 Data read or write operation that causes a TLB refill at the lowest level of TLB. Each data read or write
operation that causes a translation table walk or an access to another level of TLB caching is counted. CP15
TLB maintenance operations do not count as events. This counter increments for speculative data accesses
and for data accesses that are explicitly made by instructions.
0x06 Data read architecturally executed. This counter increments for every instruction that explicitly read data,
including SWP. This counter only increments for instructions that are unconditional or that pass their
condition codes.
0x07 Data write architecturally executed. The counter increments for every instruction that explicitly wrote data,
including SWP. This counter only increments for instructions that are unconditional or that pass their
condition codes.
3-108 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Value Description
0x08 Instruction architecturally executed. This counter counts for all instructions, including conditional
instructions that fail their condition codes.
0x0B Instruction that writes to the Context ID Register architecturally executed. This counter only increments for
instructions that are unconditional or that pass their condition codes.
0x0C Software change of PC, except by an exception, architecturally executed. This counter only increments for
instructions that are unconditional or that pass their condition codes.
0x0D Immediate branch architecturally executed, taken or not taken. This includes B{L}, BLX, CB{N}Z, HB{L},
and HBLP. This counter counts for all immediate branch instructions that are architecturally executed,
including conditional instructions that fail their condition codes.
0x0E Procedure return, other than exception returns, architecturally executed. This includes:
• BX R14
• MOV PC, LR
• POP {..., PC}
• LDR PC, [R13], #offset
• LDMIA R9!, {...,PC}
• LDR PC, [R9], #offset
This counter only increments for instructions that are unconditional or that pass their condition codes.
0x0F Unaligned access architecturally executed. This counts each instruction that is an access to an unaligned
address. This counter only increments for instructions that are unconditional or that pass their condition
codes.
0x10 Branch mispredicted or not predicted. This counts for every pipeline flush because of a misprediction from
the program flow prediction resources.
0x11 Reserved.
0x12 Branches or other change in the program flow that could have been predicted by the branch prediction
resources of the processor.
0x13-0x3F Reserved.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-109
System Control Coprocessor
Value Description
0x42 Any bufferable store transaction from load/store to L2 cache, excluding eviction or cast out data.
0x45 The number of cycles for any active AXI read channel transactions.
0x46 The number of cycles for any active AXI write channel transactions.
0x49 Any L1 data memory access that misses in the cache as a result of the hashing algorithm. The cases covered
are:
• hash hit and physical address miss
• hash hit and physical address hit in another way
• hash miss and physical address hit.
0x4a Any L1 instruction memory access that misses in the cache as a result of the hashing algorithm. The cases
covered are:
• hash hit and physical address miss
• hash hit and physical address hit in another way
• hash miss and physical address hit.
0x4b Any L1 data memory access in which a page coloring alias occurs.
alias = virtual address [12] ! = physical address [12]
This behavior results in a data memory eviction or cast out.
0x51 Any return stack misprediction because of incorrect target address for a taken return stack pop.
3-110 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Value Description
0x56 Increment for every cycle that no instructions are available for issue.
0x57 For every cycle, this event counts the number of instructions issued in that cycle. Multi-cycle instructions
are only counted once.
0x58 Number of cycles the processor stalls waiting on MRC data from NEON.
0x59 Number of cycles that the processor stalls as a result of a full NEON instruction queue or NEON load queue.
0x5a Number of cycles that NEON and integer processors are both not idle.
0x60-0x6F Reserved.
0x72 Counts any event from both external input sources PMUEXTIN[0] and PMUEXTIN[1].
0x73-0xFF Reserved.
If this unit generates an interrupt, the processor asserts the pin nPMUIRQ. You can
route this pin to an external interrupt controller for prioritization and masking. This is
the only mechanism that signals this interrupt to the core.
The absolute counts recorded might vary because of pipeline effects. This has negligible
effect except in cases where the counters are enabled for a very short time.
In addition to the counters within the processor, most of the events that Table 3-98 on
page 3-108 shows are available to the ETM unit or other external trace hardware to
enable the events to be monitored. See Chapter 14 Embedded Trace Macrocell and
Chapter 15 Cross Trigger Interface for more information.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-111
System Control Coprocessor
Table 3-99 shows the results of attempted access for each mode.
a. The EN bit in c9, User Enable Register on page 3-113 enables User mode access of the Performance Monitor Registers.
Table 3-100 shows what signal settings are required and the Secure or Nonsecure state
and mode that you can enable the counters.
Table 3-100 Signal settings for the Performance Monitor Count Registers
0 - - - - 1'b0 No Yes
0 - - - - 1'b1 No No
1 - - No - - Yes Yes
3-112 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-100 Signal settings for the Performance Monitor Count Registers (continued)
1 0 - Yes No 1'b1 No No
The purpose of the USER ENable (USEREN) Register is to enable User mode to have
access to the Performance Monitor Registers.
Note
USEREN Register does not provide access to the registers that control interrupt
generation.
(
5HVHUYHG
1
Table 3-101 shows how the bit values correspond with the USEREN Register functions.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-113
System Control Coprocessor
Table 3-102 shows the results of attempted access for each mode.
Undefined Undefined
EN = 0 Data Data Data Data Data Data
exception exception
Undefined Undefined
EN = 1 Data Data Data Data Data Data
exception exception
The purpose of the INTerrupt ENable Set (INTENS) Register is to determine if any of
the Performance Monitor Count Registers, PMCNT0-PMCNT3 and CCNT, generate an
interrupt on overflow.
When reading this register, any interrupt overflow enable bit that reads as 0 indicates
the interrupt overflow flag is disabled. Any interrupt overflow enable bit that reads as 1
indicates the interrupt overflow flag is enabled.
When writing this register, any interrupt overflow enable bit written with a value of 0 is
ignored, that is, not updated. Any interrupt overflow enable bit written with a value of
1 sets the interrupt overflow enable bit.
3 3 3 3
& 5HVHUYHG
3-114 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-103 shows how the bit values correspond with the INTENS Register functions.
Table 3-104 shows the results of attempted access for each mode.
The purpose of the INTerrupt ENable Clear (INTENC) Register is to determine if any
of the Performance Monitor Count Registers, PMCNT0-PMCNT3 and CCNT, generate
an interrupt on overflow.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-115
System Control Coprocessor
When reading this register, any interrupt overflow enable bit that reads as 0 indicates
the interrupt overflow flag is disabled. Any interrupt overflow enable bit that reads as 1
indicates the interrupt overflow flag is enabled.
When writing this register, any interrupt overflow enable bit written with a value of 0 is
ignored, that is, not updated. Any interrupt overflow enable bit written with a value of
1 clears the interrupt overflow enable bit.
3 3 3 3
& 5HVHUYHG
Table 3-105 shows how the bit values correspond with the INTENC Register functions.
Table 3-106 shows the results of attempted access for each mode.
3-116 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
The L2 Cache Lockdown Register controls the L2 cache lockdown. The Lockdown
Format C provides a method to restrict the replacement algorithm on cache linefills to
only use selected cache ways within a set. Using this method, you can fetch or load code
into the L2 cache and protect data from being evicted, or you can use the method to
reduce cache pollution.
Figure 3-48 shows the bit arrangement of the L2 Cache Lockdown Register.
5HVHUYHG
/2&.ZD\
/2&.ZD\
/2&.ZD\
/2&.ZD\
/2&.ZD\
/2&.ZD\
/2&.ZD\
/2&.ZD\
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-117
System Control Coprocessor
Table 3-107 shows how the bit values correspond with the L2 Cache Lockdown
Register functions.
3-118 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-108 shows the results of attempted access for each mode.
The following procedure for lock down into a data or an instruction cache way i, with
N cache ways, using Format C, ensures that only the target cache way i is locked down.
1. Disable interrupts to ensure that no processor exceptions can occur during the
execution of this procedure. If this is not possible, all code and data that any
exception handlers can call must meet the conditions specified in step 2 and step
3.
2. Ensure that all data that the following code uses, apart from the data that is to be
locked down, is either:
• in a noncacheable area of memory
• in an already locked cache way.
4. Ensure that the data to be locked down is not already in the cache, using either:
• cache clean
• invalidate
• cache clean and invalidate.
See c7, cache operations on page 3-86.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-119
System Control Coprocessor
5. Enable allocation to the target cache way by writing to the Instruction or Data
Cache Lockdown Register, with the CRm field set to 0, setting L to 0 for bit i, and
L to 1 for all other ways.
6. Ensure that the memory cache line is loaded into the cache by using an LDR
instruction to load a word from the memory cache line, for each of the cache lines
to be locked down in cache way i.
7. Write to the Instruction or Data Cache Lockdown Register, setting L to 1 for bit i
and restore all the other bits to the previous values before this routine was started.
To unlock the lock down portion of the cache, write to register c9, setting L to 0 for each
bit.
The purpose of the L2 Cache Auxiliary Control Register is to enable you to configure
the L2 cache behavior.
Note
If bit [24] of the L2 Cache Auxiliary Control Register is not set, the L2 cache does not
perform a security check for the data that is placed in the L2 cache. If software requires
a higher level of security within the processor, then you must set bit [24] of this register.
By setting bit [24], the L2 cache performs an external linefill, and the AXI slave
performs the security check on that linefill.
Figure 3-49 on page 3-121 shows the bit arrangement of the L2 Cache Auxiliary
Control Register.
3-120 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
5HVHUYHG 5HVHUYHG
/LQQHU 'DWD5$0ODWHQF\
3DULW\RU(&&HQDEOH 5HVHUYHG
:ULWHDOORFDWHGLVDEOH 7DJ5$0ODWHQF\
:ULWHDOORFDWHFRPELQHGLVDEOH
:ULWHDOORFDWHGHOD\GLVDEOH
:ULWHFRPELQLQJGLVDEOH
5HVHUYHG
3/'IRUZDUGLQJGLVDEOH
(&&RU3DULW\
/GDWD5$0UHDGPXOWLSOH[HUVHOHFW
5HVHUYHG
Table 3-109 shows how the bit values correspond with the L2 Cache Auxiliary Control
Register functions.
[29] L2 data RAM read Configures the timing of the read data multiplexer select between one or two cycles
multiplexer select for all L2 data RAM read operations:
0 = two cycles, default
1 = one cycle.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-121
System Control Coprocessor
[24] Write allocate delay Enables or disables external linefill when storing an entire line with write allocate
disable permission:
0 = enables write allocate delay, default
1 = disables write allocate delay.
[23] Write allocate Enables or disables combining of data in the L2 write combining buffers:
combine disable 0 = enables write allocate combine, default
1 = disables write allocate combine.
[16] L2 inner Defines whether the L2 observes the inner or outer cacheability attributes:
0 = L2 observes outer cacheability
1 = L2 observes inner cacheability.
3-122 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-123
System Control Coprocessor
Table 3-110 shows the results of attempted access for each mode.
To access the L2 Cache Auxiliary Control Register, read or write CP15 with:
MRC p15, 1, <Rd>, c9, c0, 2 ; Read L2 Cache Auxiliary Control Register
MCR p15, 1, <Rd>, c9, c0, 2 ; Write L2 Cache Auxiliary Control Register
If you have not configured the processor to include parity and ECC RAM, then software
cannot set bit [21], parity or ECC enable bit. The following code sequence shows how
to determine if the processor was configured to include parity and ECC RAM.
MRC p15, 1, <Rd>, c9, c0, 2 ; Read L2 Cache Auxiliary Control Register
ORR <Rd>, <Rd>, #0x0020_0000; Set parity/ECC enable
MCR p15, 1, <Rd>, c9, c0, 2 ; Write L2 Cache Auxiliary Control Register
MRC p15, 1, <Rd>, c9, c0, 2 ; Read L2 Cache Auxiliary Control Register
TST <Rd>, #0x0020_0000 ; Test for parity/ECC enable
BNE no_parity_ram_setup
parity_ram_setup:
;<do parity RAM setup>
B done_parity_RAM_setup
no_parity_ram_setup:
;<do no parity/ECC RAM setup>
done_parity_RAM_setup:
;<continue>
The purpose of the TLB Lockdown Registers is to control which of the fully-associative
TLB entries to allocate on the next table walk. The TLB is normally allocated on a
rotating basis. The oldest entry is always the next allocated.
You can configure the TLB Lockdown Registers to exclude a range of entries from the
round-robin allocation scheme. You must use the TLB Lockdown Registers with the
TLB preload operation. See c10, TLB preload operation on page 3-126 for more
information.
3-124 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Figure 3-50 shows the bit arrangement of the Data and Instruction TLB Lockdown
Registers.
Table 3-111 shows how the bit values correspond with the Data and Instruction TLB
Lockdown Register functions.
[31:27] Base Defines the offset from TLB entry 0 for which entries 0 to base - 1 are locked assuming P equals 1
during a hardware translation table walk.
[26:22] Victim Specifies the entry where the next hardware translation table walk can place a TLB entry. The reset
value is 0. Each hardware translation table walk increments the value of the Victim field.
[0] P Determines if TLB entries allocated by subsequent translation table walks are not invalidated by the
Invalidate TLB unlocked entries operation.
0 = allocated TLB entries are invalidated, reset value
1 = allocated TLB entries are not invalidated.
• The TLB lockdown behavior depends on the TL bit, see c1, Nonsecure Access
Control Register on page 3-70. If the TL bit is not set, the lockdown entries are
reserved for the Secure state.
• The TLB Lockdown Register must be used with the TLB preload operation. See
c10, TLB preload operation on page 3-126.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-125
System Control Coprocessor
Note
Setting the P bit before a hardware translation table walk does not guarantee the locking
down of an entry. The Base field must be set to the first unlocked entry. The Victim field
must always be set to a value greater than or equal to the value of the Base field.
Table 3-112 shows the results of attempted access for each mode.
To access the Data TLB Lockdown Register, read or write CP15 with:
MRC p15, 0, <Rd>, c10, c0, 0 ; Read Data TLB Lockdown Register
MCR p15, 0, <Rd>, c10, c0, 0 ; Write Data TLB Lockdown Register
To access the Instruction TLB Lockdown Register, read or write CP15 with:
MRC p15, 0, <Rd>, c10, c0, 1 ; Read Instruction TLB Lockdown Register
MCR p15, 0, <Rd>, c10, c0, 1 ; Write Instruction TLB Lockdown Register
The TLB preload operations are used to load entries into either the instruction or data
TLB as specified by the virtual address. The operation performs a TLB lookup to
determine if the virtual address has been cached in the TLB array. If the TLB lookup
misses in the TLB array, a hardware translation table walk is performed. There are two
possible results of the hardware translation table walk:
• the descriptor is cached in the TLB array at the entry specified by the Victim field
in the TLB Lockdown Register
If the operation is a preload D-TLB instruction and the descriptor faults, a data abort is
indicated. The DFSR and DFAR indicate the fault type and the fault address,
respectively.
3-126 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
If the operation is a preload I-TLB instruction and the descriptor faults, a data abort is
indicated. The DFSR indicates the instruction cache maintenance fault value. The
DFAR contains the faulty virtual address, and the IFSR contains the fault type encoding.
• when CP15 c1 A-bit [1] is HIGH, no alignment faults are generated as VA[1:0]
are ignored.
The TLB preload operation and the TLB lockdown operation can be used to lock entries
into the TLB array. Example 3-1 is a code sequence that locks an entry into the TLB
array.
Note
This example assumes that the FCSE PID Register is set to 0. If the FCSE PID is not 0,
then the MVA of the TLB entry must be invalidated.
The purpose of the Memory Region Remap Registers is to remap memory region
attributes encoded by the TEX[2:0], C, and B bits in the translation tables that the data
side, instruction side, and PLE use. See MMU software-accessible registers on page 6-8
for information on memory remap.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-127
System Control Coprocessor
These registers apply to all memory accesses and this includes accesses from the data
side, instruction side, and PLE. Table 3-114 on page 3-129 shows the purposes of the
individual bits in the Primary Region Remap Register. Table 3-116 on page 3-130
shows the purposes of the individual bits in the Normal Memory Remap Register.
Note
The behavior of the Memory Region Remap Registers depends on the TEX Remap bit,
see c1, Control Register on page 3-57.
Table 3-113 describes the behavior of memory accesses when the region remapped
registers, PRRR and NMRR, are applied.
Figure 3-51 shows the bit arrangement of the Primary Region Remap Register.
5HVHUYHG
3-128 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-114 shows how the bit values correspond with the Primary Region Remap
Register functions.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-129
System Control Coprocessor
b. Shareable attributes can map for both shared and nonshared memory. If the
shared bit read from the TLB or translation tables is 0, then the bit remaps to
the nonshared attributes in this register. If the shared bit read from the TLB or
translation tables is 1, then the bit remaps to the shared attributes of this
register.
Table 3-115 shows the encoding of the remapping for the primary memory type.
Table 3-115 Encoding for the remapping of the primary memory type
b01 Device
b10 Normal
Figure 3-52 shows the bit arrangement of the Normal Memory Remap Register.
Table 3-116 shows how the bit values correspond with the Normal Memory Remap
Register functions.
3-130 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-131
System Control Coprocessor
Table 3-117 shows the encoding for the inner or outer cacheable attribute bit fields I0 to
I7 and O0 to O7.
b00 Noncacheable
Table 3-118 shows the results of attempted access for each mode.
Secure data Secure data Nonsecure Nonsecure Undefined Undefined Undefined Undefined
data data exception exception exception exception
To access the Memory Region Remap Registers read or write CP15 with:
MRC p15, 0, <Rd>, c10, c2, 0 ; Read Primary Region Remap Register
MCR p15, 0, <Rd>, c10, c2, 0 ; Write Primary Region Remap Register
MRC p15, 0, <Rd>, c10, c2, 1 ; Read Normal Memory Remap Register
MCR p15, 0, <Rd>, c10, c2, 1 ; Write Normal Memory Remap Register
1. The processor uses the Primary Region Remap Register to remap the primary
memory type, normal, device, or strongly ordered, and the shareable attribute.
2. For memory regions that the Primary Region Remap Register defines as Normal
memory, the processor uses the Normal Memory Remap Register to remap the
inner and outer cacheable attributes.
3-132 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
The behavior of the Memory Region Remap Registers depends on the TEX Remap bit,
see c1, Control Register on page 3-57. If the TEX Remap bit is set, the entries in the
Memory Region Remap Registers remap each possible value of the TEX[0], C and B
bits in the translation tables. You can therefore set your own definitions for these values.
If the TEX Remap bit is clear, the Memory Region Remap Registers are not used and
no memory remapping takes place. See MMU software-accessible registers on page 6-8
for more information.
The Memory Region Remap Registers are expected to remain static during normal
operation. When you write to the Memory Region Remap Registers, you must
invalidate the TLB and perform an IMB operation before you can rely on the new
written values. You must also stop the PLE if it is running.
Note
For security reasons, you cannot remap the NS bit.
Processes that handle PLE can read this register to determine the physical resources
implemented and their availability.
Figure 3-53 shows the bit arrangement of the PLE Identification and Status Registers
0-3.
& &
5HVHUYHG + +
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-133
System Control Coprocessor
Table 3-119 shows how the bit values correspond with the PLE Identification and Status
Registers functions.
Table 3-120 shows the Opcode_2 values for PLE channel function selection.
Table 3-120 Opcode_2 values for PLE Identification and Status Register functions
Opcode_2 Function
3-134 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Access in the Nonsecure state depends on the PLE bit, see c1, Nonsecure Access
Control Register on page 3-70. The processor can only access these registers in
privileged modes. Table 3-121 shows the results of attempted access for each mode.
Table 3-121 Results of access to the PLE Identification and Status Registers
To access the PLE Identification and Status Registers in a privileged mode, read CP15
with:
MRC p15, 0, <Rd>, c11, c0, 0 ; Read PLE Identification and Status Register present
MRC p15, 0, <Rd>, c11, c0, 2 ; Read PLE Identification and Status Register running
MRC p15, 0, <Rd>, c11, c0, 3 ; Read PLE Identification and Status Register interrupting
The purpose of the PLE User Accessibility Register is to determine if a User mode
process can access the registers for each channel. This register contains a bit for each
channel, referred to as the U bit for that channel.
Figure 3-54 shows the bit arrangement of the PLE User Accessibility Register.
8 8
5HVHUYHG
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-135
System Control Coprocessor
Table 3-122 shows how the bit values correspond with the PLE User Accessibility
Register functions.
[1] U1 Indicates if a User mode process can access the registers for channel 1:
0 = User mode cannot access channel 1, reset value. User mode accesses cause an Undefined
exception.
1 = User mode can access channel 1.
[0] U0 Indicates if a User mode process can access the registers for channel 0:
0 = User mode cannot access channel 0, reset value. User mode accesses cause an Undefined
exception.
1 = User mode can access channel 0.
Access in the Nonsecure state depends on the PLE bit, see c1, Nonsecure Access
Control Register on page 3-70. The processor can only access this register in privileged
modes. Table 3-123 shows the results of attempted access for each mode.
To access the PLE User Accessibility Register, read or write CP15 with:
MRC p15, 0, <Rd>, c11, c1, 0 ; Read PLE User Accessibility Register
MCR p15, 0, <Rd>, c11, c1, 0 ; Write PLE User Accessibility Register
The registers that you can access in User mode when the U1 or U0 bit = 1 for the current
channel are:
• c11, PLE Enable Registers on page 3-138
• c11, PLE Control Register on page 3-139
• c11, PLE Internal Start Address Register on page 3-142
• c11, PLE Internal End Address Register on page 3-144
3-136 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
You can access the PLE Channel Number Register, see c11, PLE Channel Number
Register, in User mode when the U1 or U0 bit for any channel is 1.
The contents of these registers must be preserved on a task switch if the registers are
user accessible.
If the U bit for the currently selected channel is set to 0, and a User mode process
attempts to access any of these registers, the processor takes an Undefined instruction
trap.
The purpose of the PLE Channel Number Register is to select a PLE channel.
Figure 3-55 shows the bit arrangement of the PLE Channel Number Register.
&
5HVHUYHG
1
Table 3-124 shows how the bit values correspond with the PLE Channel Number
Register functions.
Access in the Nonsecure state depends on the PLE bit, see c1, Nonsecure Access
Control Register on page 3-70. The processor can access this register in User mode if
the U bit for any channel is set to 1, see c11, PLE User Accessibility Register on
page 3-135.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-137
System Control Coprocessor
Table 3-125 shows the results of attempted access for each mode.
To access the PLE Channel Number Register, read or write CP15 with:
MRC p15, 0, <Rd>, c11, c2, 0 ; Read PLE Channel Number Register
MCR p15, 0, <Rd>, c11, c2, 0 ; Write PLE Channel Number Register
The purpose of the PLE Enable Registers is to start, stop, or clear PLE transfers for each
channel implemented.
Access in the Nonsecure state depends on the PLE bit, see c1, Nonsecure Access
Control Register on page 3-70. The processor can access these registers in User mode
if the U bit, see c11, PLE User Accessibility Register on page 3-135, for the currently
selected channel is set to 1.
3-138 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-126 shows the results of attempted access for each mode.
To access a PLE Enable Register, set the PLE Channel Number Register to the
appropriate PLE channel and write CP15 with:
MCR p15, 0, <Rd>, c11, c3, 0 ; Stop PLE Enable Register
MCR p15, 0, <Rd>, c11, c3, 1 ; Start PLE Enable Register
MCR p15, 0, <Rd>, c11, c3, 2 ; Clear PLE Enable Register
The purpose of the PLE Control Register for each channel is to control the operations
of that PLE channel.
Table 3-127 on page 3-140 shows the purposes of the individual bits in the PLE Control
Register.
Figure 3-56 on page 3-140 shows the bit arrangement of the PLE Control Register.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-139
System Control Coprocessor
' 8
,& ,( 5HVHUYHG :<
7 0
5HVHUYHG
5HVHUYHG
Table 3-127 shows how the bit values correspond with the PLE Control Register
functions.
[29] IC Indicates whether the PLE channel must assert an interrupt on completion of the PLE transfer, or if
the Stop command stops the PLE, see c11, PLE Enable Registers on page 3-138.
The interrupt is deasserted, from this source, if the processor performs a clear operation on the channel
that caused the interrupt. See c11, PLE Enable Registers on page 3-138 for more information.
Note
The U bit has no affect on whether an interrupt is generated on completion.
0 = no interrupt on completion
1 = interrupt on completion.
[28] IE Indicates that the PLE channel must assert an interrupt on an error.
The interrupt is deasserted, from this source, when the channel is set to idle with a clear operation. See
c11, PLE Enable Registers on page 3-138 for more information.
Note
If the U bit is set to 1, then an interrupt on error occurs regardless of the state of the IE bit. See c11,
PLE User Accessibility Register on page 3-135 for information on the U bit.
0 = no interrupt on error
1 = interrupt on error.
3-140 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
[26] UM Indicates that the permission checks are based on the PLE in User or privileged mode. The UM bit is
provided so that the privileged mode process can emulate a User mode. See Table 3-128 for more
details on the UM bit.
0 = transfer is a privileged transfer
1 = transfer is a User mode transfer.
[2:0] WY Indicates the selected L2 cache way for filling data. This is used in conjunction with the L2 Cache
Lockdown Register:
b000 = way0
b001 = way1
b010 = way2
b011 = way3
b100 = way4
b101 = way5
b110 = way6
b111 = way7.
Access in the Nonsecure state depends on the PLE bit, see c1, Nonsecure Access
Control Register on page 3-70. The processor can access this register in User mode if
the U bit for the currently selected channel is set to 1, see c11, PLE User Accessibility
Register on page 3-135.
Table 3-128 shows the behavior of the processor when writing the UM bit [26] for
various processor modes and U bit settings.
b1 Privileged mode b0 b1
b0 Privileged mode b0 b0
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-141
System Control Coprocessor
b1 User mode b1 b1
b0 User mode b1 b1
b1 Privileged mode b1 b1
b0 Privileged mode b1 b1
Table 3-129 shows the results of attempted access for each mode.
To access the PLE Control Register, set the PLE Channel Number Register to the
appropriate PLE channel and read or write CP15 with:
MRC p15, 0, <Rd>, c11, c4, 0 ; Read PLE Control Register
MCR p15, 0, <Rd>, c11, c4, 0 ; Write PLE Control Register
While the channel has the status of Running, any attempt to write to the PLE Control
Register results in architecturally Unpredictable behavior. For the processor, writes to
the PLE Control Register have no effect when the PLE channel is running.
The purpose of the PLE Internal Start Address Register for each channel is to define the
start address, that is, the first address that data transfers go to or from.
3-142 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
• a 32-bit read/write register with one register for each PLE channel common to
Secure and Nonsecure states
The PLE Internal Start Address Register bits [31:0] contain the Internal Start Virtual
Address (VA). Figure 3-57 shows this format.
YLUWXDODGGUHVV 8136%=
Access in the Nonsecure state depends on the PLE bit, see c1, Nonsecure Access
Control Register on page 3-70. The processor can access this register in User mode if
the U bit for the currently selected channel is set to 1, see c11, PLE User Accessibility
Register on page 3-135.
Table 3-130 shows the results of attempted access for each mode.
Table 3-130 Results of access to the PLE Internal Start Address Register
Secure Nonsecure
privileged privileged Secure User Nonsecure User
U PLE
bit bit Read Write Read Write Read Write Read Write
To access the PLE Internal Start Address Register, set the PLE Channel Number
Register to the appropriate PLE channel and read or write CP15 c11 with:
MRC p15, 0, <Rd>, c11, c5, 0 ; Read PLE Internal Start Address Register
MCR p15, 0, <Rd>, c11, c5, 0 ; Write PLE Internal Start Address Register
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-143
System Control Coprocessor
The purpose of the PLE Internal End Address Register for each channel is to define the
number of cache lines transferred.
• a 32-bit read/write register with one register for each PLE channel common to
Secure and Nonsecure states
Figure 3-58 shows the bit arrangement of the PLE Internal End Address Register
functions.
1 1
The PLE Internal End Address Register bits [N:6] contain the number of cache lines
transferred where N is determined by the L2 cache size as defined in Table 3-131.
0KB 6 0 0KBa
a. For a 0KB cache, PLE setup code must read the Current Cache Size ID Register, see
c0, Current Cache Size Identification Registers on page 3-53, before attempting PLE
access. In a 0KB environment, the PLE will do nothing.
3-144 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Access in the Nonsecure state depends on the PLE bit, see c1, Nonsecure Access
Control Register on page 3-70. The processor can access this register in User mode if
the U bit for the currently selected channel is set to 1, see c11, PLE User Accessibility
Register on page 3-135.
Table 3-132 shows the results of attempted access for each mode.
Table 3-132 Results of access to the PLE Internal End Address Register
Secure Nonsecure
privileged privileged Secure User Nonsecure User
U PLE
bit bit Read Write Read Write Read Write Read Write
To access the PLE Internal End Address Register, set the PLE Channel Number Register
to the appropriate PLE channel and read or write CP15 with:
MRC p15, 0, <Rd>, c11, c7, 0 ; Read PLE Internal End Address Register
MCR p15, 0, <Rd>, c11, c7, 0 ; Write PLE Internal End Address Register
The purpose of the PLE Channel Status Register for each channel is to define the status
of the most recently started PLE operation on that channel.
• one read-only register for each PLE channel common to Secure and Nonsecure
states
Figure 3-59 on page 3-146 shows the bit arrangement of the PLE Channel Status
Register.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-145
System Control Coprocessor
5HVHUYHG (UURUFRGH
6WDWXV
Table 3-133 shows how the bit values correspond with the PLE Channel Status Register
functions.
[8:2] Error code Indicates the status of the external address error. All other encodings are reserved:
b0xxxxxx = No error
1. b1x01100 = precise external abort, L1 translation
2. b1x01110 = precise external abort, L2 translation
3. b1011100 = parity/ECC error on L1 translation
4. b1011110 = parity/ECC error on L2 translation
5. b1000101 = translation fault, section
6. b1000111 = translation fault, page
7. b1000011 = access flag fault, section
8. b1000110 = access flag fault, page
9. b1001001 = domain fault, section
10. b1001011 = domain fault, page
11. b1001101 = permission fault, section
12. b1001111 = permission fault, page
13. b1x10110 = imprecise external abort
14. b1011000 = imprecise parity or ECC error, nontranslation.
Any unused encoding not listed is reserved.
Where x represents bit [7] in the encoding, bit [7] can be either:
0 = AXI Decode error caused the abort, reset value
1 = AXI Slave error caused the abort.
3-146 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Access in the Nonsecure state depends on the PLE bit, see c1, Nonsecure Access
Control Register on page 3-70. You can access these registers in User mode if the U bit
for the currently selected channel is set to 1, see c11, PLE User Accessibility Register
on page 3-135.
Table 3-134 shows the results of attempted access for each mode.
Secure Nonsecure
privileged privileged Secure User Nonsecure User
U PLE
bit bit Read Write Read Write Read Write Read Write
To access the PLE Channel Status Register, set PLE Channel Number Register to the
appropriate PLE channel and read CP15 with:
MRC p15, 0, <Rd>, c11, c8, 0 ; Read PLE Channel Status Register
For more details on the operation of the L2 PreLoad Engine (PLE), see L2 PLE on
page 8-7.
The PLE Context ID Register for each channel contains the processor context ID of the
process that uses that channel.
• a read/write register for each PLE channel common to Secure and Nonsecure
states
Figure 3-60 on page 3-148 shows the bit arrangement of the PLE Context ID Register.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-147
System Control Coprocessor
352&,' $6,'
Table 3-135 shows how the bit values correspond with the PLE Context ID Register
functions.
[31:8] PROCID Extends the ASID to form the process ID and identifies the current process
[7:0] ASID Holds the ASID of the current process and identifies the current ASID
Access in the Nonsecure state depends on the PLE bit, see c1, Nonsecure Access
Control Register on page 3-70. Table 3-136 shows the results of attempted access for
each mode.
To access the PLE Context ID Register in a privileged mode, set the PLE Channel
Number Register to the appropriate PLE channel and read or write CP15 with:
MRC p15, 0, <Rd>, c11, c15, 0 ; Read PLE Context ID Register
MCR p15, 0, <Rd>, c11, c15, 0 ; Write PLE Context ID Register
3-148 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
The purpose of the Secure or Nonsecure Vector Base Address Register is to hold the
base address for exception vectors in the Secure and Nonsecure states. See Exceptions
on page 2-35 for more information.
Figure 3-61 shows the bit arrangement of the Secure or Nonsecure Vector Base Address
Register.
9HFWRUEDVHDGGUHVV 5HVHUYHG
Table 3-137 shows how the bit values correspond with the Secure or Nonsecure Vector
Base Address Register functions.
Table 3-137 Secure or Nonsecure Vector Base Address Register bit functions
[31:5] Vector base address Holds the base address. Determines the location that the core
branches to, on an exception. The reset value is 0.
When an exception occurs in the Secure state, the core branches to address:
When an exception occurs in the Nonsecure state, the core branches to address:
When high vectors are enabled, regardless of the value of the register the processor
branches to 0xFFFF0000 + Exception_Vector_Address.
You can configure IRQ, FIQ, and external abort exceptions to branch to Monitor mode,
see c1, Secure Configuration Register on page 3-67. In this case, the processor uses the
Monitor Vector Base Address, see c12, Monitor Vector Base Address Register, to
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-149
System Control Coprocessor
calculate the branch address. The Reset exception always branches to 0x00000000,
regardless of the value of the Vector Base Address except when the processor uses high
vectors.
Table 3-138 shows the results of attempted access for each mode.
Table 3-138 Results of access to the Secure or Nonsecure Vector Base Address Register
Secure data Secure data Nonsecure Nonsecure Undefined Undefined Undefined Undefined
data data exception exception exception exception
To access the Secure or Nonsecure Vector Base Address Register, read or write CP15
with:
MRC p15, 0, <Rd>, c12, c0, 0 ; Read Secure or Nonsecure Vector Base
; Address Register
MCR p15, 0, <Rd>, c12, c0, 0 ; Write Secure or Nonsecure Vector Base
; Address Register
The purpose of the Monitor Vector Base Address Register is to hold the base address
for the Monitor mode exception vector. See Exceptions on page 2-35 for more
information.
Figure 3-62 shows the bit arrangement of the Monitor Vector Base Address Register.
0RQLWRUYHFWRUEDVHDGGUHVV 5HVHUYHG
3-150 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-139 shows how the bit values correspond with the Monitor Vector Base Address
Register functions.
[31:5] Monitor vector Holds the base address. Determines the location that the core branches to, on a Monitor mode
base address exception. The reset value is 0.
When an exception branches to the Monitor mode, the core branches to address:
Monitor_Base_Address + Exception_Vector_Address.
Note
The Monitor Vector Base Address Register is 0x00000000 at reset. The secure boot code
must program the register with an appropriate value for the Monitor.
Table 3-140 shows the results of attempted access for each mode.
Table 3-140 Results of access to the Monitor Vector Base Address Register
To access the Monitor Vector Base Address Register, read or write CP15 with:
MRC p15, 0, <Rd>, c12, c0, 1 ; Read Monitor Vector Base Address Register
MCR p15, 0, <Rd>, c12, c0, 1 ; Write Monitor Vector Base Address Register
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-151
System Control Coprocessor
Figure 3-63 shows the bit arrangement of the Interrupt Status Register.
5HVHUYHG $ , ) 5HVHUYHG
Table 3-141 shows how the bit values correspond with the Interrupt Status Register
functions.
3-152 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Note
• The F and I bits directly reflect the state of the nFIQ and nIRQ pins respectively,
but are the inverse state.
• The A bit is set when an external abort occurs and automatically clears when the
abort is taken.
Table 3-142 shows the results of attempted access for each mode.
The A, I, and F bits map to the same format as the CPSR so that you can use the same
mask for these bits.
The Monitor can poll these bits to detect the exceptions before it completes context
switches. This can reduce interrupt latency.
The c13, Context ID Register on page 3-155 replaces the FCSE PID Register. Use of the
FCSE PID Register is deprecated.
Figure 3-64 shows the bit arrangement of the FCSE PID Register.
)&6(3,' 5HVHUYHG
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-153
System Control Coprocessor
Table 3-143 shows how the bit values correspond with the FCSE PID Register
functions.
[31:25] FCSE PID Holds the ProcID. Identifies a specific process for fast context switch. The reset value is 0.
The purpose of the FCSE PID Register is to provide the ProcID for fast context switch memory
mappings. The MMU uses the contents of this register to map memory addresses in the range
0-32MB.
Table 3-144 shows the results of attempted access for each mode.
Secure data Secure data Nonsecure Nonsecure Undefined Undefined Undefined Undefined
data data exception exception exception exception
To change the ProcID and perform a fast context switch, write to the FCSE PID
Register. You are not required to flush the contents of the TLB after the switch because
the TLB still holds the valid address tags.
Because a write to the FCSE PID Register causes a pipeline flush, the effect is
immediate. The next executed instruction is fetched with the new PID.
Note
You must not rely on this behavior for future compatibility. An IMB must be executed
between changing the ProcID and fetching from locations that are translated by the
ProcID.
3-154 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Addresses issued by the processor in the range 0-32MB are translated by the ProcID.
Address A becomes A + (ProcID x 32MB). The MMU uses this translated address, the
MVA. Addresses above 32MB are not translated. The ProcID is a 7-bit field, enabling
128 x 32MB processes to be mapped.
Note
If ProcID is 0, as it is on Reset, then there is a flat mapping between the processor and
the MMU.
Figure 3-65 shows how addresses are mapped using the FCSE PID Register.
*% *%
0%
0% 0%
&
The purpose of the Context ID Register is to provide information on the current ASID
and process ID, for example for the ETM and debug logic.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-155
System Control Coprocessor
Debug logic uses the ASID information to enable process-dependent breakpoints and
watchpoints. The ASID field of the Context ID Register and FCSE PID Register cannot
be used simultaneously. The FCSE PID Register remapping of VA to MVA has priority
over setting the ASID field to designate non-global pages. Therefore, non-global pages
cannot be used if the FCSE PID Register is set to a non-zero value.
352&,' $6,'
Table 3-145 shows how the bit values correspond with the Context ID Register
functions.
[31:8] PROCID Extends the ASID to form the process ID and identifies the current process. The reset value is 0.
[7:0] ASID Holds the ASID of the current process to identify the current ASID. The reset value is 0.
Table 3-146 shows the results of attempted access for each mode.
Secure data Secure data Nonsecure Nonsecure Undefined Undefined Undefined Undefined
data data exception exception exception exception
The current ASID value in the Context ID Register is exported to the MMU.
3-156 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
You must ensure that software executes a Data Synchronization Barrier operation
before changes to this register. This ensures that all accesses are related to the correct
context ID.
You must execute an IMB instruction immediately after changes to the Context ID
Register. You must not attempt to execute any instructions that are from an
ASID-dependent memory region between the change to the register and the IMB
instruction. Code that updates the ASID must execute from a global memory region.
You must program each process with a unique number to ensure that the ETM and
debug logic can correctly distinguish between processes.
The purpose of the Thread and Process ID Registers is to provide locations to store the
IDs of software threads and processes for OS management purposes.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-157
System Control Coprocessor
Table 3-147 shows the results of attempted access to each register for each mode.
Secure
privileged Nonsecure privileged Secure User Nonsecure User
To access the Thread and Process ID Registers, read or write CP15 with:
MRC p15, 0, <Rd>, c13, c0, 2 ; Read User read/write Thread and Process ID Register
MCR p15, 0, <Rd>, c13, c0, 2 ; Write User read/write Thread and Process ID Register
MRC p15, 0, <Rd>, c13, c0, 3 ; Read User read-only Thread and Process ID Register
MCR p15, 0, <Rd>, c13, c0, 3 ; Write User read-only Thread and Process ID Register
MRC p15, 0, <Rd>, c13, c0, 4 ; Read Privileged only Thread and Process ID Register
MCR p15, 0, <Rd>, c13, c0, 4 ; Write Privileged only Thread and Process ID Register
Reading or writing the Thread and Process ID Registers has no effect on the processor
state or operation. These registers provide OS support and must be managed by the OS.
You must clear the contents of all Thread and Process ID Registers on process switches
to prevent data leaking from one process to another. This is important to ensure the
security of secure data.
3-158 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
The purpose of the L1 system array debug data registers is to hold the data:
• that is returned on instruction side or data side TLB CAM, TLB ATTR, TLB PA,
HVAB, TAG, DATA, GHB, and BTB instruction or data side read operations
• for TLB CAM, TLB ATTR, TLB PA, HVAB, TAG, DATA, GHB, and BTB
instruction side or data side write operations.
Because BTB, TLB, and data arrays are greater than 32-bits wide, the processor
contains two registers, data low register and data high register, to hold data when
retrieving or registering data as a result of read/write operations. If the data is greater
than 32-bit wide, both the low and high registers are used to transfer data. Otherwise,
only the low register is used to transfer data.
The data 0 and data 1 read/write registers are accessible in privileged modes only.
Figure 3-67 on page 3-160 shows the bit arrangement of the L1 data 0 Register when
retrieving or registering data as a result of the read/write operations.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-159
System Control Coprocessor
7/%&$0UHDGZULWH 'DWD
/'$7$',57<
DQG3$5,7< 'DWD
UHDGZULWH
%7%ORZGDWDUHDG
'DWD
ZULWH
*+%GDWDUHDGZULWH 'DWD
/HYHORQHLQVWUXFWLRQVLGHUHDGZULWHGDWDRQO\
Figure 3-67 Formats of the instruction and Data side data 0 Registers
Figure 3-68 shows the bit arrangement of the L1 data 1 Register when retrieving or
registering data as a result of the read/write operations.
/7/%&$0UHDG
5HVHUYHG 'DWD
ZULWH
%7%KLJKGDWD
5HVHUYHG 'DWD
UHDGZULWH
/'$7$',57<
DQG3$5,7< 5HVHUYHG 'DWD
UHDGZULWH
'ELWSDULW\
/HYHORQHLQVWUXFWLRQVLGHUHDGZULWHGDWDRQO\
Figure 3-68 Formats of the instruction and Data side data 1 Registers
3-160 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-148 shows how the bit values correspond with the I-L1 or D-L1 data 0 Register
functions as a result of a TLB CAM read/write operation.
Table 3-148 Functional bits of I-L1 or D-L1 data 0 Register for a TLB CAM operation
Table 3-149 shows how the bit values correspond with the I-L1 or D-L1 data 1 Register
functions as a result of a TLB CAM read/write operation.
Table 3-149 Functional bits of I-L1 or D-L1 data 1 Register for a TLB CAM operation
Table 3-150 shows how the bit values correspond with the I-L1 or D-L1 data 0 Register
functions as a result of a TLB ATTR read/write operation.
Table 3-150 Functional bits of I-L1 or D-L1 data 0 Register for a TLB ATTR operation
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-161
System Control Coprocessor
Table 3-151 shows how the bit values correspond with the I-L1 or D-L1 data 0 Register
as a result of a TLB PA array read/write operation.
Table 3-151 Functional bits of I-L1 or D-L1 data 0 Register for a TLB PA array operation
Table 3-152 shows how the bit values correspond with the I-L1 or D-L1 data 0 Register
as a result of a HVAB array read/write operation.
Table 3-152 Functional bits of I-L1 or D-L1 data 0 Register for an HVAB array operation
Table 3-153 shows how the bit values correspond with the I-L1 or D-L1 data 0 Register
as a result of a L1 TAG array read/write operation.
Table 3-153 Functional bits of I-L1 or D-L1 data 0 Register for an L1 TAG array operation
3-162 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-154 shows how the bit values correspond with the I-L1 or D-L1 data 0 Register
as a result of an L1 DATA array read/write operation.
Table 3-154 Functional bits of I-L1 or D-L1 data 0 Register for L1 DATA array operation
Table 3-155 shows how the bit values correspond with the I-L1 or D-L1 data 1 Register
as a result of an L1 DATA array read/write operation.
Table 3-155 Functional bits of I-L1 or D-L1 data 1 Register for L1 DATA array operation
To perform a DATA operation on the data 0 or data 1 Register, read or write CP15 with:
MCR p15 0, <Rd>, c15, c0, 7 ; D-L1 DATA write
MCR p15 0, <Rd>, c15, c2, 7 ; D-L1 DATA read
MCR p15 0, <Rd>, c15, c1, 7 ; I-L1 DATA write
MCR p15 0, <Rd>, c15, c3, 7 ; I-L1 DATA read
Table 3-156 shows how the bit values correspond with the I-L1 data 0 Register as a
result of a BTB array read/write operation.
Table 3-156 Functional bits of I-L1 data 0 Register for a BTB array operation
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-163
System Control Coprocessor
Table 3-157 shows how the bit values correspond with the I-L1 data 1 Register as a
result of a BTB array read/write operation.
Table 3-157 Functional bits of I-L1 data 1 Register for a BTB array operation
To perform a BTB operation on the data 0 or data 1 Register, read or write CP15 with:
MCR p15 0, <Rd>, c15, c5, 3 ; I-L1 BTB write
MCR p15 0, <Rd>, c15, c7, 3 ; I-L1 BTB read
Table 3-158 shows how the bit values correspond with the I-L1 data 0 Register as a
result of a GHB array read/write operation.
Table 3-158 Functional bits of I-L1 data 0 Register for a GHB array operation
To perform a GHB operation on the data 0 Register, read or write CP15 with:
MCR p15 0, <Rd>, c15, c5, 2 ; I-L1 GHB write
MCR p15 0, <Rd>, c15, c7, 2 ; I-L1 GHB read
• read the instruction or data side L1 TLB array contents and write into the system
debug data registers
• write into the system debug data registers and instruction or data side L1 TLB
array.
Figure 3-69 on page 3-165 shows the bit arrangement of the L1 TLB CAM read
operations.
3-164 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
$GGUHVV 7/%
5HVHUYHG $GGUHVV 5HVHUYHG DUUD\
Figure 3-70 shows the bit arrangement of the L1 TLB CAM write operations.
/GDWD
UHJLVWHU 'DWD
/GDWD 'DWD
UHJLVWHU
:ULWHGDWD
$GGUHVV 7/%
5HVHUYHG $GGUHVV 5HVHUYHG DUUD\
To write one entry in data side TLB CAM array, for example:
LDR R0, =0x03000323;
MCR p15, 0, R0, c15, c0, 0; Move R0 to D-L1 data 0 Register
LDR R2, =0x01;
MCR p15, 0, R2, c15, c0, 1; Move R0 to D-L1 data 1 Register
LDR R1, =0x00C00000;
MCR p15, 0, R1, c15, c0, 2; Write D-L1 data 0 or 1 Register to D-TLB CAM
To read one entry in data side TLB CAM array, for example:
LDR R1, =0x00C00000;
MCR p15, 0, R1, c15, c2, 2; Read D-TLB CAM into data L1 data 0/1 Register
MRC p15, 0, R0, c15, c0, 0; Move D-L1 data 0 Register to R0
MRC p15, 0, R2, c15, c0, 1; Move D-L1 data 1 Register to R2
To write one entry in instruction side TLB CAM array, for example:
LDR R0, =0x03000323;
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-165
System Control Coprocessor
To read one entry in instruction side TLB CAM array, for example:
LDR R1, =0x00C00000;
MCR p15, 0, R1, c15, c3, 2; Read I-TLB CAM into data L1 data 0/1 Register
MRC p15, 0, R0, c15, c1, 0; Move I-L1 data 0 Register to R0
MRC p15, 0, R2, c15, c1, 1; Move I-L1 data 1 Register to R2
To write one entry in data side TLB ATTR array, for example:
LDR R0, =0x252E;
MCR p15, 0, R0, c15, c0, 0; Move R0 to D-L1 data 0 Register
LDR R1, =0x00C00000;
MCR p15, 0, R1, c15, c0, 3; Write D-L1 data 0 Register to D-TLB ATTR
To read one entry in data side TLB ATTR array, for example:
LDR R1, =0x00C00000;
MCR p15, 0, R1, c15, c2, 3; Read D-TLB ATTR into data L1 data 0 Register
MRC p15, 0, R0, c15, c0, 0; Move D-L1 data 0 Register to R0
To write one entry in instruction side TLB ATTR array, for example:
LDR R0, =0x252E;
MCR p15, 0, R0, c15, c1, 0; Move R0 to I-L1 data 0 Register
LDR R1, =0x00C00000;
MCR p15, 0, R1, c15, c1, 3; Write I-L1 data 0 Register to I-TLB ATTR
To read one entry in instruction side TLB ATTR array, for example:
LDR R1, =0x00C00000;
MCR p15, 0, R1, c15, c3, 3; Read I-TLB ATTR into data L1 data 0 Register
MRC p15, 0, R0, c15, c0, 0; Move I-L1 data 0 Register to R0
3-166 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
The L1 HVAB array operation is accessible in privileged modes only. You can calculate
the value of N in Figure 3-71 and Figure 3-72 on page 3-168 using the NumSets and
LineSize fields as defined in Table 3-43 on page 3-55.
Figure 3-71 shows the bit arrangement of the L1 HVAB array read operation.
1 1
+9$%
5HVHUYHG $GGUHVV 5HVHUYHG DUUD\
$GGUHVV
$GGUHVV
Figure 3-72 on page 3-168 shows the bit arrangement of the L1 HVAB array write
operation.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-167
System Control Coprocessor
/GDWD
UHJLVWHU 5HVHUYHG 'DWD
:ULWHGDWD
1 1
$GGUHVV +9$%
5HVHUYHG $GGUHVV 5HVHUYHG DUUD\
$GGUHVV
To read one entry from data side HVAB array, for example:
LDR R1, =0x800000C0;
MCR p15, 0, R1, c15, c2, 5; Read D-HVAB into data L1 data 0 Register
MRC p15, 0, R2, c15, c0, 0; Move D-L1 data 0 Register to R2
To read one entry from instruction side HVAB array, for example:
LDR R1, =0x800000C0;
MCR p15, 0, R1, c15, c3, 5; Read I-HVAB into I-L1 data 0 Register
MRC p15, 0, R2, c15, c1, 0; Move I-L1 data 0 Register to R2
3-168 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
The L1 TAG array operation is accessible in privileged modes only. You can calculate
the value of N in Figure 3-73 and Figure 3-74 using the NumSets and LineSize fields as
defined in Table 3-43 on page 3-55.
Figure 3-73 shows the bit arrangement of the L1 TAG array read operation.
1 1
7$*
5HVHUYHG $GGUHVV 5HVHUYHG DUUD\
$GGUHVV
$GGUHVV
Figure 3-74 shows the bit arrangement of the L1 TAG array write operation.
/GDWD
UHJLVWHU 5HVHUYHG 'DWD
:ULWHGDWD
1 1
$GGUHVV 7$*
5HVHUYHG $GGUHVV 5HVHUYHG DUUD\
$GGUHVV
To write one entry to the data side L1 TAG array, for example:
LDR R0, =0x00500007;
MCR p15, 0, R0, c15, c0, 0; Move R0 to D-L1 data 0 Register
LDR R1, =0x800000C0;
MCR p15, 0, R1, c15, c0, 6; Write D-L1 data 0 Register to D-TAG
To read one entry from the data side L1 TAG array, for example:
LDR R1, =0x800000C0;
MCR p15, 0, R1, c15, c2, 6; Read D-TAG into data L1 data 0 Register
MRC p15, 0, R2, c15, c0, 0; Move D-L1 data 0 Register to R2
To write one entry to the instruction side L1 TAG array, for example:
LDR R0, =0x00500007;
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-169
System Control Coprocessor
To read one entry from the instruction side L1 TAG array, for example:
LDR R1, =0x800000C0;
MCR p15, 0, R1, c15, c3, 6; Read I-TAG into I-L1 data 0 Register
MRC p15, 0, R2, c15, c1, 0; Move I-L1 data 0 Register to R2
The L1 DATA array operation is accessible in privileged modes only. You can calculate
the value of N in Figure 3-75 and Figure 3-76 on page 3-171 using the NumSets and
LineSize fields as defined in Table 3-43 on page 3-55.
Figure 3-75 shows the bit arrangement of the L1 DATA array read operation.
1 1
/
5HVHUYHG $GGUHVV '$7$
$GGUHVV DUUD\
$GGUHVV
5HVHUYHG
Figure 3-76 on page 3-171 shows the bit arrangement of the L1 DATA array write
operation.
3-170 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
/GDWD
UHJLVWHU 'DWD
/GDWD
UHJLVWHU 5HVHUYHG 'DWD
:ULWHGDWD
1 1
/
$GGUHVV
5HVHUYHG $GGUHVV '$7$
DUUD\
$GGUHVV
5HVHUYHG
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-171
System Control Coprocessor
Note
The granularity of the dirty bits is such that two sets of dirty bits are updated for each
CP15 L1 DATA array write operation. A doubleword set of dirty bits are updated such
that if word 0 or word 1 is being updated, then the D-bit and D-bit parity bits are updated
for both word 0 and word 1.
The purpose of the Branch Target Buffer (BTB) array operations is to:
• read the BTB array contents and write into the system debug data registers
• write into the system debug data registers and into the BTB array.
Figure 3-77 shows the bit arrangement of the BTB array read operation.
%7%
5HVHUYHG $GGUHVV DUUD\
$GGUHVV
$GGUHVV
5HVHUYHG 5HVHUYHG
Figure 3-78 on page 3-173 shows the bit arrangement of the BTB array write operation.
3-172 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
,QVWUXFWLRQ/
GDWDUHJLVWHU 'DWD
,QVWUXFWLRQ/
GDWDUHJLVWHU 5HVHUYHG 'DWD
:ULWHGDWD
%7%
5HVHUYHG $GGUHVV DUUD\
$GGUHVV
$GGUHVV
5HVHUYHG 5HVHUYHG
To write one entry in the instruction side BTB array, for example:
LDR R0, =0x01234567;
MCR p15, 0, R0, c15, c1, 0; Move R0 to I-L1 data 0 Register
LDR R2, =0x0DDFFFFF;
MCR p15, 0, R2, c15, c1, 1; Move R0 to I-L1 data 1 Register
LDR R1, =0x40000408;
MCR p15, 0, R1, c15, c5, 3; Write I-L1 data 0 or 1 Register to BTB
The purpose of the Global History Buffer (GHB) array operation is to:
• read the GHB array contents and write into the system debug data registers
• write into the system debug data registers and into the GHB array.
Figure 3-79 on page 3-174 shows the bit arrangement of the GHB array read operation.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-173
System Control Coprocessor
*+%
5HVHUYHG $GGUHVV DUUD\
$GGUHVV
5HVHUYHG
Figure 3-80 shows the bit arrangement of the GHB array write operation.
,QVWUXFWLRQ/
GDWDUHJLVWHU 'DWD
:ULWHGDWD
*+%
5HVHUYHG $GGUHVV DUUD\
$GGUHVV
5HVHUYHG
To write one entry in the instruction side GHB array, for example:
LDR R0, =0x3333AAAA;
MCR p15, 0, R0, c15, c1, 0; Move R0 to I-L1 data 0 Register
LDR R1, =0x0000020C;
MCR p15, 0, R1, c15, c5, 2; Write I-L1 data 0 Register to GHB
To read one entry in the instruction side GHB array, for example:
LDR R1, =0x0000020C;
MCR p15, 0, R1, c15, c7, 2; Read GHB into I-L1 data 0 Register
MRC p15, 0, R0, c15, c1, 0; Move I-L1 data 0 Register to R0
The purpose of the L2 system array debug data registers is to hold the data:
• that is returned from the L2 TAG, DATA, PARITY/ECC read operations
• for L2 TAG, DATA, PARITY/ECC write operations.
3-174 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Because the L2 DATA arrays are greater than 32-bits wide, the processor contains three
registers, data 0, data 1, and data 2 registers, to hold data when retrieving or registering
data as a result of read/write operations. If the data is greater than 32-bit wide, all of the
registers are used to transfer data.
The data 0, data 1, and data 2 read/write registers are accessible in privileged modes
only.
Figure 3-81 shows the bit arrangement of the L2 data 0 Register when retrieving or
registering data as a result of the read/write operations.
3DULW\(&&5$0
5HVHUYHG 'DWD
UHDGZULWH
'DWD5$0UHDG
'DWD
ZULWH
5HVHUYHG
Figure 3-82 shows the bit arrangement of the L2 data 1 Register when retrieving or
registering data as a result of the read/write operations.
'DWD5$0UHDGZULWH 'DWD
Figure 3-83 on page 3-176 shows the bit arrangement of the L2 data 2 Register when
retrieving or registering data as a result of the read/write operations.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-175
System Control Coprocessor
'DWD5$0UHDGZULWH 5HVHUYHG
'DWD
Table 3-159 shows how the bit values correspond with the L2 data 0 Register functions
as a result of an L2 parity/ECC read/write operation.
Table 3-160 shows how the bit values correspond with the L2 data 0 Register functions
as a result of an L2 tag RAM read/write operation.
Table 3-160 Functional bits of L2 data 0 Register for a tag RAM operation
[31:13] Tag Holds bits [31:13] of the physical address tag read from or written to the L2 tag RAM.
3-176 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
Table 3-161 shows how the bit values correspond with the L2 data 0 Register functions
as a result of an L2 data RAM read/write operation.
Table 3-161 Functional bits of L2 data 0 Register for a data RAM operation
Table 3-162 shows how the bit values correspond with the L2 data 1 Register as a result
of a data RAM read/write operation.
Table 3-162 Functional bits of L2 data 1 Register for a data RAM operation
Table 3-163 shows how the bit values correspond with the L2 data 2 Register as a result
of a data RAM read/write operation.
Table 3-163 Functional bits of L2 data 2 Register for a data RAM operation
[0] D Holds a duplicate copy of the dirty bit that the L2 tag RAM stores
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-177
System Control Coprocessor
The L2 parity/ECC array operation is accessible in secure privileged mode only. You
can determine the value of N in Figure 3-84 and Figure 3-85 on page 3-179 from
Table 3-164.
Figure 3-84 shows the bit arrangement of the L2 parity/ECC array read operation.
1 1
(&&
5HVHUYHG $GGUHVV 5HVHUYHG DUUD\
$GGUHVV
$GGUHVV
L2 cache size N
0KB -
64KB 12
128KB 13
256KB 14
512KB 15
1024KB 16
2048KB 17
Figure 3-85 on page 3-179 shows the bit arrangement of the L2 parity/ECC array write
operation.
3-178 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
/SDULW\(&&
5$0 5HVHUYHG 'DWD
:ULWHGDWD
1 1
(&&
'DWD 5HVHUYHG $GGUHVV 5HVHUYHG DUUD\
$GGUHVV
$GGUHVV
The L2 tag array operation is accessible in privileged modes only. You can determine
the value of N in Figure 3-86 on page 3-180 and Figure 3-87 on page 3-180 from
Table 3-164 on page 3-178.
Figure 3-86 on page 3-180 shows the bit arrangement of the L2 tag array read operation.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-179
System Control Coprocessor
1 1
7DJ
5HVHUYHG $GGUHVV 5HVHUYHG DUUD\
$GGUHVV
$GGUHVV
Figure 3-87 shows the bit arrangement of the L2 tag array write operation.
1 1
5HVHUYHG
:ULWHGDWD
1 1
7DJ
5HVHUYHG $GGUHVV 5HVHUYHG DUUD\
$GGUHVV
$GGUHVV
3-180 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
System Control Coprocessor
The L2 data array operation is accessible in privileged modes only. You can determine
the value of N in Figure 3-88 and Figure 3-89 from Table 3-164 on page 3-178.
Figure 3-88 shows the bit arrangement of the L2 data RAM array read operation.
1 1
'DWD
5HVHUYHG $GGUHVV DUUD\
$GGUHVV
$GGUHVV 5HVHUYHG
Figure 3-89 shows the bit arrangement of the L2 data RAM array write operation.
'DWD
/GDWDUHJLVWHU
'DWD
/GDWDUHJLVWHU
5HVHUYHG
/GDWDUHJLVWHU
'DWD
:ULWHGDWD
1 1
'DWD
5HVHUYHG $GGUHVV DUUD\
$GGUHVV
$GGUHVV 5HVHUYHG
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 3-181
System Control Coprocessor
To read one entry from the L2 data RAM array, for example:
LDR R1, =0x400000C8;
MCR p15, 0, R1, c15, c9, 3; Read L2 data RAM into L2 data 0-2 Registers
MRC p15, 0, R2, c15, c8, 0; Move L2 data 0 Register to R2
MRC p15, 0, R3, c15, c8, 1; Move L2 data 1 Register to R3
MRC p15, 0, R4, c15, c8, 5; Move L2 data 2 Register to R4
3-182 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 4
Unaligned Data and Mixed-endian Data Support
This chapter describes the unaligned and mixed-endianness data access support for the
processor. It contains the following sections:
• About unaligned and mixed-endian data on page 4-2
• Unaligned data access support on page 4-3
• Mixed-endian access support on page 4-5.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 4-1
Unaligned Data and Mixed-endian Data Support
• EE bit in CP15 c1 Control Register 1 that controls load and store endianness
during exceptions
• ARM and Thumb instructions to change the endianness and the E flag in the
Program Status Registers (PSRs)
Note
Instructions are always little-endian and must be aligned according to the size of the
instruction:
• 32-bit ARM instructions must be word-aligned with address bits [1:0] equal to
b00.
• 16-bit or 32-bit Thumb instructions must be halfword-aligned with address bit [0]
equal to 0.
4-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Unaligned Data and Mixed-endian Data Support
Note
Data accesses that cross a word boundary can add to the access time.
Setting the A bit in the CP15 c1 Control Register enables alignment checking. When
the A bit is set, two types of memory access generate a Data Abort signal and an
Alignment fault status code:
• a 16-bit access that is not halfword-aligned
• a 32-bit load or store that is not word-aligned.
See the ARM Architecture Reference Manual for more information on unaligned data
access support.
The following sections describe NEON data access, alignment and the alignment
qualifiers.
Alignment specifiers
In vector load and vector store operations, you can specify alignment requirements in
the instruction.
Alignment faults are generated based on both memory attributes and alignment
qualifiers.
When executing NEON vector accesses, the number of memory accesses (N) is
determined based on the internal interface (128-bit) and the number of bytes being
accessed. If no alignment qualifier is specified, the number of memory accesses is equal
to N + 1. Adding alignment qualifiers improves performance by reducing extra cycles
required to access memory.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 4-3
Unaligned Data and Mixed-endian Data Support
Normal memory
@16 Address[0] = b0
• If an alignment qualifier is not specified, and A=1, the alignment fault is taken if
it is not aligned to element size.
Strongly ordered or device memory conforms to the following rules concerning NEON
alignment qualifiers:
• independent of the A bit, the alignment fault is taken if it is not aligned to element
size
4-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Unaligned Data and Mixed-endian Data Support
See the ARM Architecture Reference Manual for more information on mixed-endian
access support.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 4-5
Unaligned Data and Mixed-endian Data Support
4-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 5
Program Flow Prediction
This chapter describes how the processor performs branch prediction. It contains the
following sections:
• About program flow prediction on page 5-2
• Predicted instructions on page 5-3
• Nonpredicted instructions on page 5-6
• Guidelines for optimal performance on page 5-7
• Enabling program flow prediction on page 5-8
• Operating system and predictor context on page 5-9.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 5-1
Program Flow Prediction
To avoid this penalty, the branch prediction hardware operates at the front of the
instruction pipeline. The branch prediction hardware consists of:
• a 512-entry 2-way set associative Branch Target Buffer (BTB)
• a 4096-entry Global History Buffer (GHB)
• an 8-entry return stack.
An unpredicted branch executes in the same way as a branch that is predicted as not
taken. Incorrect or invalid prediction of the branch prediction or target address causes
the pipeline to flush, invalidating all of the following instructions.
5-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Program Flow Prediction
• B conditional
• B unconditional
• BL
• BLX(1) immediate
The BL and BLX(1) instructions act as function calls and push the return address
and ARM or Thumb state onto the return stack.
• BLX(2) register
The BLX(2) instruction acts as a function call and pushes the return address and
ARM or Thumb state onto the return stack.
• BX
The BX r14 instruction acts as a function return and pops the return address and
ARM or Thumb state from the return stack.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 5-3
Program Flow Prediction
5-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Program Flow Prediction
The return stack stores the address and the ARM or Thumb state of the instruction after
a function-call type branch instruction. This address is equal to the link register value
stored in r14.
The LDR instruction can use any of the addressing modes, as long as r13 is the base
register. Additionally, in ThumbEE state you can also use r9 as a stack pointer so the
LDR and LDM instructions with pc as a destination and r9 as a base register are also
treated as a return stack pop.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 5-5
Program Flow Prediction
• Instructions that restore the CPSR from memory or from the SPSR
These instructions change the PC. They potentially change processor state,
privilege mode, and security state. To fetch the target instructions in the new
privilege mode, the processor must flush the pipeline.
• BXJ
The processor implements the trivial Jazelle extension, so BXJ becomes BX. This
can be used as an unpredictable indirect branch instruction to force a pipeline
flush on execution.
• ENTERX/LEAVEX
Transitions between Thumb and ThumbEE state are not predicted.
5-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Program Flow Prediction
• Coding more than two likely taken branches per fetch. This can only happen in
Thumb state. Unless used as a jump table where each branch is its own basic
block, use NOPs for padding.
• Coding more than three branches per fetch that are likely to be executed in
sequence.
In Thumb state, it is possible to pack four branches in a single fetch, for example,
in a multiway branch:
BVS overflow
BGT greater_than
BLT less_than
B equal
This is a sequence of more than three branches with three conditional branches,
and the fourth branch is likely to be reached. Avoid this kind of sequence, or use
NOPs to break up the branch sequence.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 5-7
Program Flow Prediction
5-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Program Flow Prediction
These operations are not required to perform a context switch in the processor and are
implemented as NOPs. ARMv7-A generic context-switching or self-modifying code
can contain these operations without cycle penalty. These instructions can be enabled
by setting the IBE bit in the Auxiliary Control Register. See c1, Auxiliary Control
Register on page 3-61 for details.
ARMv7-A requires Instruction Memory Barriers (IMBs) after updates to certain CP15
registers or CP15 operations. The processor flushes the pipeline to ensure that the
instructions following the given CP15 instruction are fetched in the new context. In
addition, self-modifying code sequences must be preceded by an IMB. The
recommended means of implementing an IMB is the ISB instruction.
The following prefetch flush instruction is from earlier versions of the ARM
architecture. The processor supports this instruction, but its use is deprecated in
ARMv7-A.
MCR p15, 0, Rx, c7, c5, 4
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 5-9
Program Flow Prediction
5-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 6
Memory Management Unit
This chapter describes the Memory Management Unit (MMU). It contains the following
sections:
• About the MMU on page 6-2
• Memory access sequence on page 6-3
• 16MB supersection support on page 6-4
• MMU interaction with memory system on page 6-5
• External aborts on page 6-6
• TLB lockdown on page 6-7
• MMU software-accessible registers on page 6-8.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 6-1
Memory Management Unit
The processor implements the ARMv7-A MMU enhanced with TrustZone features to
provide address translation and access permission checks. The MMU controls table
walk hardware that accesses translation tables in main memory. The MMU enables
fine-grained memory system control through a set of virtual-to-physical address
mappings and memory attributes held in instruction and data TLBs.
6-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Memory Management Unit
1. Performs a lookup for the requested virtual address and current ASID and security
state in the relevant instruction or data TLB.
The MMU might not find global mapping, mapping for the currently selected ASID, or
a matching NSTID for the virtual address in the TLB. The hardware does a translation
table walk if the translation table walk is enabled by the PD0 or PD1 bit in the TTB
Control Register. If translation table walks are disabled, the processor returns a Section
Translation fault.
If the MMU finds a matching TLB entry, it uses the information in the entry as follows:
1. The access permission bits and the domain determine if the access is enabled. If
the matching entry does not pass the permission checks, the MMU signals a
memory abort. See the ARM Architecture Reference Manual for a description of
abort types and priorities, and for a description of the Instruction Fault Status
Register (IFSR) and Data Fault Status Register (DFSR).
2. The memory region attributes specified in the CP15 c10 registers control the
cache and write buffer, and determine if the access is secure or nonsecure, cached
or noncached, and device or shared.
3. The MMU translates the virtual address to a physical address for the memory
access.
If the MMU does not find a matching entry, a hardware table walk occurs.
Each TLB entry contains a virtual address, a page size, a physical address, and a set of
memory attributes.
The behavior of a TLB if two or more entries match at any time, including global and
ASID-specific entries, is Unpredictable. The operating system must ensure that only
one TLB entry matches at any time. Entries with different NSTIDs can never be hit
simultaneously.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 6-3
Memory Management Unit
6XSHUVHFWLRQEDVH
5HVHUYHG 6 7(; $3 5HVHUYHG & %
DGGUHVV
$3; ;1
16 Q*
Note
Each translation table entry for a supersection must be repeated 16 times in consecutive
memory locations in the level 1 translation tables, and each of the 16 repeated entries
must have identical translation and permission information. See the ARM Architecture
Reference Manual for more information.
6-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Memory Management Unit
After a CP15 c1 instruction enables the MMU, the processor flushes all following
instructions in the pipeline. The processor then begins refetching instructions, and the
MMU performs virtual-to-physical address mapping according to the translation table
descriptors in main memory.
After a CP15 c1 instruction disables the MMU, the processor flushes all following
instructions in the pipeline. The processor then begins refetching instructions and uses
flat address mapping. In flat address mapping, PA = VA.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 6-5
Memory Management Unit
Externally generated errors during a data read or write can be imprecise. This means
that the r14_abt on entry into the abort handler on such an abort might not hold the
address of the instruction that caused the exception.
In the case of a load multiple or store multiple operation, the address captured in the
DFAR is that of the address that generated the precise external abort.
Chapter 3 System Control Coprocessor describes precise and imprecise aborts, their
priorities, and the IFSR and DFSR. To determine a fault type, read the DFSR for a data
abort or the IFSR for an instruction abort.
The processor supports an Auxiliary Fault Status Register for software compatibility
reasons only. The processor does not modify this register because of any generated
abort.
6-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Memory Management Unit
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 6-7
Memory Management Unit
Nonsecure Access Control Register c1, Nonsecure Access Control Register on page 3-70
Translation Table Base Register 0 c2, Translation Table Base Register 0 on page 3-72
Translation Table Base Register 1 c2, Translation Table Base Register 1 on page 3-74
Translation Table Base Control Register c2, Translation Table Base Control Register on page 3-76
Domain Access Control Register c3, Domain Access Control Register on page 3-78
Data Fault Status Register (DFSR) c5, Data Fault Status Register on page 3-80
Instruction Fault Status Register (IFSR) c5, Instruction Fault Status Register on page 3-82
Data Fault Address Register (DFAR) c6, Data Fault Address Register on page 3-84
Instruction Fault Address Register (IFAR) c6, Instruction Fault Address Register on page 3-85
Primary Region Remap Register c10, Memory Region Remap Registers on page 3-127
Normal Memory Remap Register c10, Memory Region Remap Registers on page 3-127
6-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 7
Level 1 Memory System
This chapter describes the L1 memory system. It contains the following sections:
• About the L1 memory system on page 7-2
• Cache organization on page 7-3
• Memory attributes on page 7-5
• Cache debug on page 7-8
• Data cache features on page 7-9
• Instruction cache features on page 7-10
• Hardware support for virtual aliasing conditions on page 7-12
• Parity detection on page 7-13.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 7-1
Level 1 Memory System
7-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Level 1 Memory System
The system control coprocessor, CP15, handles the control of the L1 memory system
and the associated functionality, together with other system wide control attributes. See
Chapter 3 System Control Coprocessor for more information on CP15 registers.
The cache control operations that are supported by the processor are described in
Chapter 3 System Control Coprocessor.
A cache miss results when a read access is not present in the cache. The caches perform
critical word-first cache refilling.
If you disable the cache then the cache is not accessed for reads or writes. This ensures
that you can achieve maximum power savings. It is therefore important that before you
disable the cache, all of the entries are cleaned to ensure that the external memory has
been updated. In addition, if the cache is enabled with valid entries in it then it is
possible that the entries in the cache contain old data. Therefore the cache must be
completely cleaned and invalidated before being disabled. Unlike normal reads and
writes to the cache, cache maintenance operations are performed even if the cache is
disabled.
An unexpected hit is where the cache reports a hit on a memory location that is marked
as noncacheable or shared. The unexpected hit is ignored.
For writes, an unexpected cache hit does not result in the cache being updated.
The purpose of cache parity error detection is to increase the tolerance to memory faults.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 7-3
Level 1 Memory System
The instruction cache RAM is written on cache line fills. Parity error detection is done
on a fetch-wide basis, that is, a parity error on any byte in a 64-bit fetch region causes a
parity error on the first instruction within that fetch. The detection of a parity error
instruction cache RAM causes the processor to return a Prefetch Abort.
The detection of a parity error in the data cache RAM causes the processor to return a
Data Abort. The Data Fault Status Register is set to indicate the presence of a parity
error. The parity error is always imprecise on the data cache.
7-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Level 1 Memory System
7.3.2 Device
• device stores can be buffered, but must be executed with respect to other device
stores
7.3.3 Normal
Table 7-1 on page 7-6 shows how L1 and L2 memory systems handle these memory
types.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 7-5
Level 1 Memory System
Buffers
L1 inner policya L2 outer policy Description
flushed
Device shared Device shared No Device accesses are noncacheable and must be executed
nonspeculative.
Device nonshared Device nonshared No Device accesses are noncacheable and must be executed
nonspeculative.
Noncacheable, Cacheable, No Loads and stores are not cached at L1. Loads are not filled into
nonbufferable write-back, no the fill buffer but are allocated to the L2 cache. Stores bypass
write-allocate integer store buffer and are directly sent to L2.
Noncacheable, Cacheable, No Loads and stores are not cached at L1. Loads are not filled into
nonbufferable write-back, the fill buffer but are allocated to the L2 cache. Stores bypass
write-allocate integer store buffer and are directly sent to L2. L2 store misses
allocate the line into L2 cache.
Noncacheable, Cacheable, No Loads and stores are not cached at L1. Loads are not filled into
nonbufferable write-through, no the fill buffer. Stores bypass integer store buffer and are
write-allocate directly sent to L2. L2 store misses do not allocate the line into
L2 cache. Store hits are sent externally in addition to updating
L2.
Cacheable, Noncacheable, No Load misses are filled into L1. Store misses are sent to L2. L2
write-back, no nonbufferable does not allocate the line into L2 cache on an L2 miss but is
write-allocate sent externally.
Cacheable, Noncacheable, No Load misses are filled into L1. Store hits and store misses are
write-through, no nonbufferable sent to L2. L2 does not allocate the line into L2 cache on an L2
write-allocate miss because it is sent externally.
Cacheable, Cacheable, No Load misses are allocated into L1. Store misses bypass integer
write-back, no write-back, no store buffer and are sent to L2. Store hits update the cache. L2
write-allocate write-allocate does not allocate the line into L2 cache on store misses.
Cacheable, Cacheable, No Load misses are allocated into L1. Store misses bypass integer
write-back, no write-back, store buffer and are sent to L2. Store hits update the cache. L2
write-allocate write-allocate allocates the line into L2 cache for store misses.
7-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Level 1 Memory System
Buffers
L1 inner policya L2 outer policy Description
flushed
Cacheable, Cacheable, No Load misses are allocated into L1. L2 makes store hits
write-back, no write-through, no write-through at L2 cache and does not allocate the line into
write-allocate write-allocate L2 for store misses.
Cacheable, Cacheable, No Loads are allocated into L1. Store hits are made write-through
write-through, no write-back, no at L1. Store hits update the cache and are sent to L2. L2 does
write-allocate write-allocate not allocate store misses but they are sent externally.
Cacheable, Cacheable, No Loads are allocated into L1. Store hits are made write-through
write-through, no write-back, at L1. Store hits update the cache and are sent to L2. Store
write-allocate write-allocate misses are allocated into L2.
Cacheable, Cacheable, No Loads are allocated into L1. Store hits are made write-through
write-through, no write-through, no at L1. Store hits update the cache and are sent to L2. Store
write-allocate write-allocate misses are not allocated into L2.
Noncacheable, Noncacheable, No Loads are replayed and access is sent externally. Stores bypass
bufferable bufferable integer store buffer and are placed into L2 write buffer. Stores
are sent externally.
a. You can configure the L2 cache to use the inner policy attributes.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 7-7
Level 1 Memory System
7-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Level 1 Memory System
ARMv7-A specifies the PLD instruction as a preload hint instruction. The processor
uses the PLD instruction to preload cache lines to the L2 cache. If the PLD instruction
results in a L1 cache hit, L2 cache hit, or TLB miss no further action is taken. If a cache
miss and TLB hit result, the line is retrieved from external memory and is loaded into
the L2 memory cache.
The C bit in CP15 Control Register c1 enables or disables the L1 data cache. See c1,
Control Register on page 3-57 for more information on caching data when enabling the
data cache. If the C bit is disabled, then memory requests do not access any of the data
cache arrays.
An exception to this rule is the CP15 data cache operations. If the data cache is disabled,
all data cache maintenance operations can still execute normally.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 7-9
Level 1 Memory System
ARMv7-A specifies the PLI instruction as a preload hint instruction. Because the
processor implements a blocking L1 cache and to avoid the penalty associated with a
cache miss, the processor handles the PLI instruction as a NOP.
An instruction can remain in the pipeline between being fetched and being executed.
Because there can be several unresolved branches in the pipeline, instruction fetches are
speculative, meaning there is no guarantee that they are executed. A branch or
exceptional instruction in the code stream can cause a pipeline flush, discarding the
currently fetched instructions.
Fetches or instruction table walks that begin without an empty pipeline are marked
speculative. If the pipeline contains any instruction up to the point of branch and
exception resolution, then the pipeline is considered not empty. If a fetch is marked
speculative and misses the L1 instruction cache and the L2 cache, it is not forwarded to
the external interface. Fetching is suspended until all outstanding instructions are
resolved or the pipeline is flushed.
This behavior is controlled by the ASA bit in the CP15 Auxiliary Control Register c1.
See c1, Auxiliary Control Register on page 3-61 for information on the ASA bit. By
default, this bit is 0, indicating that speculative fetches or instruction table walks are not
forwarded to the external interface. If this bit is set to 1, then neither fetches nor
instruction table walks are marked speculative, and are forwarded to the external
interface.
Given the aggressive prefetching behavior, you must not place read-sensitive devices in
the same page as code. Pages containing read-sensitive devices must be marked with the
TLB XN (execute never) attribute bit.
The I bit in CP15 Control Register c1 enables or disables the L1 instruction cache. If
the I bit is disabled, then fetches do not access any of the instruction cache arrays.
7-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Level 1 Memory System
An exception to this rule is the CP15 instruction cache operations. If the instruction
cache is disabled, the instruction cache maintenance operations can still execute
normally.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 7-11
Level 1 Memory System
7-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Level 1 Memory System
The Auxiliary Control Register bit [3], L1PE, controls parity errors reported by the L1
caches. Parity errors are enabled if the L1PE bit is set.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 7-13
Level 1 Memory System
7-14 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 8
Level 2 Memory System
This chapter describes the L2 memory system. It contains the following sections:
• About the L2 memory system on page 8-2
• Cache organization on page 8-3
• Enabling and disabling the L2 cache controller on page 8-6
• L2 PLE on page 8-7
• Synchronization primitives on page 8-12
• Locked access on page 8-14
• Parity and error correction code on page 8-15.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 8-1
Level 2 Memory System
The L2 memory system is tightly coupled to the L1 data cache and L1 instruction cache.
The L2 memory system does not support hardware cache coherency, therefore software
intervention is required to maintain coherency in the system.
8-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Level 2 Memory System
You can reduce the effective cache size using lockdown format C. This feature enables
you to lock cache ways to prevent allocation to locked entries.
You can configure the L2 memory pipeline to insert wait states to take into account the
latencies of the compiled memories for the implemented RAMs.
To enable streaming of NEON read accesses from the L1 data cache, the L2 memory
system supports up to eight NEON read accesses. The write buffer handles integer
write, NEON writes, and eviction accesses from the L1 data cache. This enables
streaming of write requests from the L1 data cache.
The L2 cache incorporates a dirty bit per quadword to reduce AXI traffic. This
eliminates unnecessary transfer of clean data on the AXI interface.
The L2 cache is partitioned into multiple banks to enable parallel operations. There are
two levels of banking:
• the tag array is partitioned into multiple banks to enable up to two requests to
access different tag banks of the L2 cache simultaneously
• each tag bank is partitioned into multiple data banks to enable streaming accesses
to the data banks.
Figure 8-1 on page 8-4 shows the logical representation of the L2 cache bank structure.
The diagram shows a configuration with all possible tag and data bank combinations.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 8-3
Level 2 Memory System
7DJEDQNVHOHFWHGE\3$>@
.%0%WDJGDWD
7DJEDQNVHOHFWHGE\3$>@
E E
.%0%WDJGDWD
E 'DWDEDQN
E 'DWDEDQN
'DWDEDQN
VHOHFWHGE\ E 'DWDEDQN
3$>@
E 'DWDEDQN
7DJEDQN
.%.%WDJGDWD
Note
The number of tag banks changes depending on the L2 cache size implemented.
8-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Level 2 Memory System
Table 8-1 describes instruction and data transfers to and from the L2 cache.
Data or NEON (write) Write data −> L2 Initiates write allocate fill
Read, modify, and write to AXI (merged with write data) −> L2
recalculate error correction
code if necessary
TLB table walk (instruction or data) L2 −> TLB AXI −> TLB
AXI −> L2
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 8-5
Level 2 Memory System
To enable the L2 cache following a reset or to change the settings of the L2 Cache
Auxiliary Control Register, you must use the following sequence:
2. Program the L2 Cache Auxiliary Control Register. See c9, L2 Cache Auxiliary
Control Register on page 3-120 for details.
Note
If you have configured the processor to support parity or ECC memory, you must
enable those features before you can program the C bit.
3. Program the Auxiliary Control Register to set the L2EN bit. See c1, Auxiliary
Control Register on page 3-61 for details.
4. Program the C bit in the CP15 Control Register c1. See c1, Control Register on
page 3-57 for details.
To disable the L2 cache, but leave the L1 data cache enabled, use the following
sequence:
Note
To keep memory coherent when using cache maintenance operations, you must follow
the L2 cache disabling sequence. Cache maintenance operations have an effect on the
L1 and L2 caches when they are disabled. A cache maintenance operation can evict a
cache line from the L1 data cache. If the L2EN bit is set, the evicted cache line can be
allocated to the L2 cache. If the L2EN bit is not set, then evictions from the L1 data
cache are sent directly to external memory using the AXI interface.
8-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Level 2 Memory System
8.4 L2 PLE
The L2 cache controller supports transactions from a programmable preloading engine.
This PLE is not the same Dynamic Memory Allocation (DMA) engine used in previous
ARM family of processors but has a similar programming interface.
The L2 PLE has two channels to permit two blocks of data movement to or from the L2
cache RAM.
The L2 PLE shares the translation table base TTBR0, TTBR1 and control, TTBCR,
registers with the main translation table walk hardware.
The L2 PLE also supports the ability to lock data to a specific L2 cache way. If software
requires the data to always remain resident in the L2 cache way, software can lock the
specific cache way per channel when the PLE transfers data to or from the L2 cache
RAM. Locking of a specified way only guarantees that the PLE is within the L2 cache
RAM after completion. If the way is not locked, it is possible that the software might
have evicted or replaced data with the way that the PLE is transferring data. To lock a
cache way, you must program the L2 Cache Lockdown Register c9. See c9, L2 Cache
Lockdown Register on page 3-117 for more information.
The programming of other registers within the PLE is possible only within the Secure
privileged state with specific extensions as described in this section. You can reprogram
this capability using the Nonsecure Access Control Register and setting the PLE bit [18]
to 1. If you program any register in Nonsecure privileged state when the PLE bit [18] is
0, an Undefined exception occurs. Additionally, you can use the software to program
the L2 Preload Engine Control Register UM bit [26] to 1 to enable more accessibility
to the PLE registers.
To start the PLE, the software must program the following registers:
• L2 PLE User Accessibility
• L2 PLE Channel Number
• L2 PLE Control
• L2 PLE Internal Start Address
• L2 PLE Internal End Address
• L2 PLE Context ID.
After the software has programmed the registers, it enables the PLE by programming
the L2 PLE Enable Register with a start command. The start command triggers data
to be transferred to or from the L2 cache RAM as defined by DT bit [30] of the L2 PLE
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 8-7
Level 2 Memory System
Control Register. The internal start address defines the block of data transfer beginning
at the 64-byte aligned address and ending when the number of cache lines is transferred
to or from the L2 cache as defined by the internal end address.
Note
The number of lines is limited to the size of the L2 cache RAM way.
If the direction bit indicates that data is being transferred into the L2 RAM, then the L2
RAM cache way is loaded. However, if the software programmed the direction bit to
indicate the transferring of data from the L2 RAM, then each address performs an L2
RAM lookup. Any cache line found to be dirty is evicted from the L2 cache RAM.
Note
It is entirely possible that the L1 data cache contains the same line that is transferred by
the PLE engine to the external memory. Therefore it is possible for the line to become
valid in the L2 cache as a result of an L1 eviction.
During data transfers into the L2 cache RAM, any L2 cache RAM data present in a
different L2 cache RAM way, other than the way specified by the L2 PLE Control
Register bits [2:0], remain in the different way. The preload engine continues with the
next cache line to be loaded and the line is not relocated to the specified way.
During transfers to or from the L2 cache RAM, if the PLE crosses a page boundary, a
hardware translation table walk is performed to obtain a new physical address for that
new page. All standard fault checks are also performed. If a fault occurs, the PLE
signals an interrupt on error. The PLE updates the L2 PLE Channel Status Register to
capture the fault status. The address for which the fault occurred is captured in the L2
PLE Internal Start Address Register.
When a PLE channel completes the transfer of the data block to or from the L2 cache
RAM, it signals an interrupt. This interrupt can be either secure, nDMASIRQ, or
nonsecure, nDMAIRQ, if IC bit [29] in the L2 PLE Control Register is enabled. In
addition, there might be an interrupt-on-error, nDMAEXTERRIRQ, indicated if the
PLE aborts for any reason and if the interrupt-on-error bit is enabled.
If you program the PLE to load data into the L2 cache RAM, the PLE transfers data to
the L2 cache RAM if the memory region type is cacheable. To determine the memory
region type, the PLE performs a hardware translation table walk at the start of the
sequence and for any 4KB page boundary. The PLE channel does not save any state for
the table walk. The translation procedure is for exception checking purposes and for
determination of the memory attributes of the page. Any unexpected L2 cache RAM
hits found when using the PLE are ignored for any type of data transfer.
8-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Level 2 Memory System
Note
Both channels can run concurrently and be programmed to transfer data from external
memory to the same L2 cache RAM way. At the completion of both PLE transactions,
the data from either channel 0 or 1 might be present in the L2 cache.
When the preloading engine channel has been configured, the channel begins to transfer
data after it executes the start command. If at any time during the transfer, a preloading
engine channel command of stop or clear is executed, the following rules apply for that
command:
STOP Channel status transitions from running to idle. The start and end address
reflect the next transfer to occur. When the channel is stopped, the
address plus stride of the last transfer will be stored in the PLE Internal
Start Address Register. In addition, the remaining number of cache lines
to be transferred will be store in the PLE Internal End Address Register.
Therefore, by executing a start command, the preloading engine will
continue from the point at which it was stopped.
CLEAR Channel status transitions from error or complete to idle and the interrupt
or error flag is cleared. It has no effect on a channel status of running. The
start and end address registers are unchanged.
Note
While the PLE channel is running, the contents of the PLE Internal Start and End
Address registers are Unpredictable for that channel.
If one or more channels of the preload engine are active when the processor executes a
WFI instruction, the preload engine controller suspends the PLE channels to enable the
processor to enter WFI. When the processor wakes up from WFI, the PLE controller
restarts all suspended PLE channels.
If it is important for the PLE channels to complete the data transfer, software must poll
each PLE Channel Status Register for a status of completion or error. When each
channel has completed, software can then execute the WFI instruction.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 8-9
Level 2 Memory System
If you programmed the preload engine to load data into the L2 cache RAM, the preload
engine transfers data to the L2 cache RAM if the memory region type is cacheable.
Table 8-2 shows the memory region types that the L2 memory system considers
cacheable or noncacheable.
Strongly ordered No
Shared device No
Nonshared device No
Write-through, shared No
Noncached No
When the preload engine encounters a noncached memory region, including at the start
of the transfer, the preload engine stops the transfer and marks the transfer as complete.
8-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Level 2 Memory System
Note
You must enable the MMU for the PLE to operate. If you disabled the MMU during
preloading engine configurations, the PLE treats all memory as noncacheable
regardless of the state of the Memory Region Remap Registers.
When a CP15 operation is performed during a preloading engine transfer, the preload
engine pauses the transfer of data and waits for all outstanding AXI transactions to
complete. Following completion of the CP15 operation, the preload engine restarts.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 8-11
Level 2 Memory System
Other events might cause the tag to be cleared. In particular, for memory regions that
are not shared, it is Unpredictable whether a store by another processor to a tagged
physical address causes the tag to be cleared.
Note
An external abort on a load-exclusive can leave the processor internal monitor in its
exclusive state and might affect your software. If it does, you must execute a
store-exclusive to an unused location in your abort handler or use the CLREX
instruction to clear the processor internal monitor to an open state.
Load-exclusive performs a load from memory and causes the physical address of the
access to be tagged as exclusive-access for the requesting processor. This causes any
other physical address that has been tagged by the requesting processor to no longer be
tagged as exclusive-access.
8-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Level 2 Memory System
Store-exclusive performs a conditional store to memory. The store only takes place if
the physical address is tagged as exclusive-access for the requesting processor. This
operation returns a status value on BRESP, indicating whether the write was successful.
If BRESP is EXOKAY, then the destination register is written with a value of 0.
Otherwise, it is written with a value of 1. The exclusive monitor is cleared after
completion.
A store-exclusive that fails due to the local monitor will not cause a translation table
walk, MMF fault, or watchpoint.
The following is an example of typical usage. Suppose you are trying to claim a lock:
Lock address : LockAddr
Lock free : 0x00
Lock taken : 0xFF
MOV R1, #0xFF ; load the ‘lock taken’ value
try LDREX R0, [LockAddr] ; load the lock value
CMP R0, #0 ; is the lock free?
STREXEQ R1, R0, [LockAddr]; try and claim the lock
CMPEQ R0, #0 ; did this succeed?
BNE try ; no – try again. . .
; yes – we have the lock
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 8-13
Level 2 Memory System
If an abort occurs, the swapping of data between the register and memory is
unsuccessful. To clear the lock, the processor issues a write transaction on the AXI
interface without any byte strobes active.
Note
All transactions related to the swap instructions are issued with the lock indicator on its
respective port, ARLOCK or AWLOCK.
8-14 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Level 2 Memory System
The L2 Cache Auxiliary Control Register bits [28] and [21] control the parity and ECC
support.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 8-15
Level 2 Memory System
8-16 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 9
External Memory Interface
This chapter describes the features of the AXI interconnect used by the processor. It
contains the following sections:
• About the external memory interface on page 9-2
• AXI control signals in the processor on page 9-4
• AXI instruction transactions on page 9-6
• AXI data read/write transactions on page 9-7.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 9-1
External Memory Interface
All internal requests that require access to an external interface must use the appropriate
external interface. You can generate requests with the following:
• instruction fetch unit
• load/store unit
• table walk
• preload engine
• internal L2 cache controller.
By using the features of the AXI interconnect that enable split address and data
transactions, in addition to multiple outstanding requests, the processor can reduce the
external pin interface without reducing performance. The processor has a single AXI
master interface. It does not contain an AXI slave interface.
The L2 memory system handles all instruction-side cache misses, including those for
noncacheable memory. All instruction fetch requests are read-only and are routed to the
external read address and data channels. For cacheable memory accesses, a wrapping
burst transaction is generated to fetch an entire cache line from external memory. A
nonwrapping burst transaction is generated by the L2 memory system for noncacheable,
strongly ordered, or device memory instruction fetch accesses. See Table 9-5 on
page 9-6 for information on AXI instruction transactions.
The L2 memory system handles all data-side cache misses, including those for
noncacheable memory, and those generated by the preload engine. Read data accesses
are routed to the read address and data channels, whereas write data accesses are routed
9-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
External Memory Interface
to the write address and data channels. Swap and semaphore instruction support is also
built into the L2 memory system and external interface that are unique to data-side
accesses.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 9-3
External Memory Interface
The AXI interconnect uses identifiers with each transaction that enables requests to be
serviced out-of-order under certain circumstances. The processor supports multiple
outstanding transactions and assigns unique IDs to each specific transaction. There are
two sets of identifiers, one for the read address channel, ARRID[3:0], and one for the
write address channel, AWRID[3:0]. Table 9-1 shows the AXI ID assignment for read
address channel.
Cacheable linefill All except linefill into data cache including PLE b1000 - b1011
9-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
External Memory Interface
Table 9-2 shows the AXI ID assignment for write address channel.
The processor supports multiple read and write channel transactions as Table 9-3
shows.
The primary input pin A64n128 of the processor determines the width of the AXI
interface read/write data busses. You must ensure that this pin is driven appropriately
for your system configuration.
Value Description
0 128-bit interface
1 64-bit interface
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 9-5
External Memory Interface
See the AMBA AXI Protocol Specification for details of the other AXI signals.
a. ARADDR[31:0] is a 32-bit signal with bits [5:3] set to any value and bits [2:0] set to 0, unless otherwise indicated.
This determines the ARLEN[3:0] value depending on the transfer type and bus width. For example, a noncacheable
instruction fetch with ARADDR[5:0] = b101000 for a 64-bit bus width, results in an ARLEN[3:0] = b0010. In this
example, doublewords 5, 6, and 7 of the cache line are transferred.
b. This is for noncacheable or strongly ordered table walk only. For cacheable table walk, the bus transaction is a
cacheable linefill.
9-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
External Memory Interface
9.4.1 Linefills
An AXI wrapping burst transaction transfers a cache line from external memory to the
internal caches. The critical doubleword or quadword, depending on the 64-bit or
128-bit bus configuration, is requested first. In the event of an external abort, the cache
line is not written into the caches and the line is never marked as valid.
9.4.2 Evictions
To reduce the number of burst transfers on the AXI interface, a subset of the cache line
is written only if it is partially dirty. The burst size is dependent on the bus configuration
and which quadwords of the cache line contain dirty data.
NEON vector type transfers are based on an element size and can require multiple AXI
transfers. Each transfer consists of incrementing burst transactions of up to 128-bit bus
width boundary. For example, if the NEON instruction VLD1.16 {D0}, [r1] is executed
to address offset 0xF, then the following two burst transactions are generated on the AXI
interface. The first transaction consists of the following:
• ARBURST[1:0] = 0x1
• ARLEN[3:0] = 0x0 for single data transfer
• ARSIZE[2:0] = 0x1.
In this table:
• NA is Naturally Aligned
• BW is Bus Width
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 9-7
External Memory Interface
• BC is Boundary Cross
• NoT is Number of Transactions
• TS is transaction sequence number if multiple transactions are required
• SAO is Starting Address Offset
• AxA is AxADDR
• AxLN is AxLEN
• AxS is AxSIZE
• AxB is AxBURST
• AxLK is AxLOCK.
Table 9-6 AXI address channel for data transactions - excluding load/store multiples
9-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
External Memory Interface
Table 9-6 AXI address channel for data transactions - excluding load/store multiples (continued)
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 9-9
External Memory Interface
Table 9-6 AXI address channel for data transactions - excluding load/store multiples (continued)
9-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
External Memory Interface
Table 9-6 AXI address channel for data transactions - excluding load/store multiples (continued)
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 9-11
External Memory Interface
Table 9-6 AXI address channel for data transactions - excluding load/store multiples (continued)
9-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
External Memory Interface
Table 9-6 AXI address channel for data transactions - excluding load/store multiples (continued)
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 9-13
External Memory Interface
Table 9-6 AXI address channel for data transactions - excluding load/store multiples (continued)
a. In the Boundary cross column, HW = 16 bits, W = 32 bits, DW = 64 bits, and QW = 128 bits.
b. This is for noncacheable or strongly ordered table walk only. For cacheable table walk, the bus transaction is a cacheable
linefill.
In this table:
• ENR is Even Number Registers
• FA is First Access
9-14 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
External Memory Interface
• LA is Last Access.
Table 9-7 AXI address channel for data transactions for load/store multiples
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 9-15
External Memory Interface
Table 9-7 AXI address channel for data transactions for load/store multiples (continued)
9-16 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 10
Clock, Reset, and Power Control
This chapter describes the clock domains and reset inputs of the processor. It also
describes dynamic and static power control techniques. It contains the following
sections:
• Clock domains on page 10-2
• Reset domains on page 10-5
• Power control on page 10-9.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 10-1
Clock, Reset, and Power Control
PCLK APB clock that controls the debug interface for the processor. PCLK is
asynchronous to CLK and ATCLK. PCLK controls the debug interface
and logic in the PCLK domain.
ATCLK ATB clock that controls the ETM ATB interface for the processor.
ATCLK is asynchronous to CLK and PCLK. ATCLK controls the
ETM ATB interface.
Note
You can implement PCLK and ATCLK to be synchronous to CLK. You
can also implement PCLK and ATCLK to run synchronously to each
other.
10-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Clock, Reset, and Power Control
The processor contains a single synchronous AXI interface. The AXI interface is
clocked using a gated CLK that is gated using ACLKEN. The AXI interface can
operate at any integer multiple slower than the processor clock, CLK. In previous ARM
family of processors, sampling ACLKEN on the rising edge of CLK indicated that the
rising edge of the AXI bus clock, ACLK, had occurred. However, for the processor, the
cycle timing of ACLKEN has changed.
F\FOHV
&/.
$&/.(1
$&/.
Note
Figure 10-2 shows the timing relationship between the AXI bus clock, ACLK, and
ACLKEN, where ACLKEN asserts two CLK cycles prior to the rising edge of ACLK.
It is critical that the relationship between ACLK and ACLKEN is maintained.
Figure 10-3 shows a change to a 1:1 clock ratio. In this figure, ACLKEN remains
asserted, changing the CLK:ACLK frequency ratio from 4:1 to 1:1.
F\FOHV
&/.
$&/.(1
$&/.
All debug logic within the processor operates at an integer multiple of PCLK that is the
same frequency as or slower than the debug APB clock, PCLK, using PCLKEN.
Figure 10-4 on page 10-4 shows the behavior of PCLKEN. In this figure, PCLKEN
remains asserted, changing the PCLK:internal PCLK frequency ratio from 4:1 to 1:1.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 10-3
Clock, Reset, and Power Control
F\FOH
3&/.
3&/.(1
,QWHUQDO3&/.
Note
If PCLKEN is not used, then it must be tied HIGH. This results in all state in the debug
logic being clocked by PCLK directly.
All ETM ATB logic within the processor operates at an integer multiple of ATCLK that
is the same frequency as or slower than the ATB clock, ATCLK, using ATCLKEN.
Figure 10-5 shows the behavior of ATCLKEN. In this figure, ATCLKEN remains
asserted, changing the ATCLK:internal ATCLK frequency ratio from 4:1 to 1:1.
F\FOH
$7&/.
$7&/.(1
,QWHUQDO$7&/.
Note
If ATCLKEN is not used, then it must be tied HIGH. This results in all state in the ETM
ATB logic being clocked by ATCLK directly.
10-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Clock, Reset, and Power Control
All resets are active-LOW inputs, and each reset can affect one or more clock domains.
Table 10-1 shows the different resets and what areas of the processor are controlled by
those resets.
ARESETNEONn - Reset - - - -
ATRESETn - - - - - Reset
Note
There are specific requirements that must be met to reset each clock domain within the
processor. Not adhering to these requirements can lead to a clock domain that is not
functional.
Warning
The documented reset sequences are the only reset sequences validated. Any deviation
from the documented reset sequences might cause an improper reset of the clock
domain.
The power-on reset sequence is the most critical to the device because logic in all clock
domains must be placed in a benign state following the deassertion of the reset
sequence. Figure 10-6 on page 10-6 shows the power-on reset sequence.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 10-5
Clock, Reset, and Power Control
5()&/.
3//LQSXW
Q325(6(7 F\FOHVPLQLPXP
35(6(7Q F\FOHVPLQLPXP
$75(6(7Q F\FOHVPLQLPXP
$5(6(7Q F\FOHVPLQLPXP
$5(6(71(21Q F\FOHVPLQLPXP
3&/.DQG$7&/.
&/.
:KHQQ325(6(7LVDVVHUWHG&/.PXVWEH
FODPSHG/2:IRUDPLQLPXPRI5()&/.F\FOHV
1. At the beginning of power-on reset, CLK must be held LOW for a minimum of
the equivalent of two core clock cycles to place components within the processor
in a safe state.
2. The nPORESET, PRESETn, and ATRESETn resets must be held for eight
CLK cycles to ensure that reset has propagated to all locations within the
processor.
3. The ARESETn and ARESETNEONn resets must be held for an additional eight
CLK cycles following the release of nPORESET and PRESETn to enable those
domains to exit reset safely.
Note
• The PCLK and ATCLK domains must also be reset during a power-on reset
sequence to ensure that the interfaces between those domains and the CLK
domain are reset properly.
• Figure 10-6 shows that PRESETn must be asserted for a minimum of eight
cycles. Because PCLK is an asynchronous clock domain that can operate faster
or slower than CLK, PRESETn must be asserted for the slowest of eight CLK
or eight PCLK cycles.
10-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Clock, Reset, and Power Control
The power-on reset also controls entry and exit from a power-down state for various
power domains within the processor. See Power control on page 10-9 for more
information.
The soft reset sequence is used to trace with ETM or debug across a reset event. By
asserting only the ARESETn and ARESETNEONn signals, the reset domains
controlled by nPORESET, ETM, and debug in particular, are not reset. Therefore,
breakpoints and watchpoints are retained during a soft reset sequence. Figure 10-7
shows a soft reset sequence.
5()&/.
3//LQSXW
Q325(6(7
$5(6(7Q F\FOHVPLQLPXP
$5(6(71(21Q F\FOHVPLQLPXP
&/.
An additional reset is provided to control the NEON unit independently of the processor
reset. This reset can be used to hold the NEON unit in a reset state so that the power to
the NEON unit can be safely removed without placing any logic within the NEON unit
in a different state. The reset cycle timing requirements for ARESETNEONn are
identical to those for ARESETn. ARESETNEONn must be held for a minimum of
eight CLK cycles when asserted to guarantee that the NEON unit has entered a reset
state. If ARESETNEONn has been asserted during nPORESET, then
ARESETNEONn must be held for an additional minimum of eight CLK cycles
following the release of nPORESET.
In addition, both ARESETn and ARESETNEONn are used to manage various power
domains within the processor. See Power control on page 10-9 for information on the
management of these resets and power domains.
PRESETn is used to reset the debug hardware within the processor in addition to the
ETM CLK domain. ATRESETn is used to reset the ETM ATB interface and Cross
Trigger Interface (CTI). To safely reset the debug hardware, ATB, and CTI domains,
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 10-7
Clock, Reset, and Power Control
PRESETn and ATRESETn must be asserted for a minimum of eight clock cycles of
the slowest of CLK, PCLK, or ATCLK. Figure 10-8 shows the assertion of PRESETn
and ATRESETn.
&/.
$7&/.
3&/.
$75(6(7Q F\FOHVPLQLPXP
35(6(7Q F\FOHVPLQLPXP
Note
PRESETn and ATRESETn must always be asserted simultaneously.
10-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Clock, Reset, and Power Control
The processor has many different dynamic power management facilities. The most
common form of dynamic power management is control of the clock network within the
processor.
The processor has three levels of clock gating to manage dynamic power. The levels
correspond to the following functions:
Level 2 This is major function gating, such as NEON, ETM, or integer core
gating.
The processor contains all hardware necessary for architecture, unit, and local clock
gating. No external hardware is required to clock gate the processor.
Wait-For-Interrupt architecture
See Halting debug event on page 12-73 for information on halting debug events.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 10-9
Clock, Reset, and Power Control
Note
• If you are programming the ETM, CTI, or core domain debug registers and the
processor is in a low-power state because of a Wait-For-Interrupt instruction,
DBGNOCLKSTOP must be HIGH. Otherwise, the APB slave port does not
return a response. For information on which debug registers are in the core
domain, see Table 12-3 on page 12-9.
When executing the WFI instruction, the processor waits for the following events to
complete before entering the idle or low-power state:
• all ETM data transfers from core clock domain to ETM ATB clock domain are
complete
On entry into the low-power state, the processor asserts the STANDBYWFI signal.
Assertion of STANDBYWFI guarantees that the processor and the AXI interface are in
the idle state. The debug APB PCLK clock domain and the ETM ATB ATCLK clock
domain can remain active.
Figure 10-9 on page 10-11 shows the STANDBYWFI deassertion timing after
assertion of nIRQ or nFIQ. The integer core recognizes the wakeup event on the
second rising CLK edge after the nIRQ or nFIQ event.
10-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Clock, Reset, and Power Control
5HVWDUWLQWHJHUFRUHFORFN
&/.
Q,54RUQ),4
67$1'%<:),
'HDVVHUW
67$1'%<:),
5HFRJQL]HZDNHXSHYHQW
The cp10 and cp11 fields in the CP15 c1 Coprocessor Access Control Register control
access to the NEON and VFPLite coprocessor. See c1, Coprocessor Access Control
Register on page 3-65. Reset clears the cp10 and cp11 fields and disables the NEON and
VFPLite clocks.
The ETM Control Register enables the ETM. See the Embedded Trace Macrocell
Architecture Specification for more information. The global enable bit in the CTI
Control Register enables the ETM clocks, excluding the ETM APB clock, ATCLK,
which can only be gated external to the processor. See CTI Control Register,
CTICONTROL on page 15-13.
DFF gating
The finest level of dynamic power control is at the Delay Flip-Flop (DFF) level.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 10-11
Clock, Reset, and Power Control
The processor can accommodate many different levels of static, or leakage power
management. All of these techniques are specific to a given implementation of the
processor. Some possibilities that the processor can accommodate are:
• full retention
• power domains or islands such as integer core, ETM, L2 RAM, and NEON
• usage of multi-Vt such as high-Vt, standard-Vt, or low-Vt.
This technical reference manual does not document retention or the usage of multi-Vt.
However, the manual describes the power domains, or islands that are supported and the
methods that are required to manage those domains in a manner that has been validated
within the processor.
To completely eliminate leakage power consumption in the processor, you must remove
the power supplied to the processor. Before powering down, all architectural state must
be saved to memory and the L1 and L2 cache must be cleaned to the point of coherency.
When powering up the processor, you must apply a complete reset sequence with
software that restores the architectural state. The sequence takes significant time and
energy to perform a full power-down of the processor.
To improve the response time of a power-down sequence, the processor supports several
key features to minimize the response time and to reduce the leakage power
consumption:
• The processor enables the debug, ETM, and NEON units to be powered down
while the rest of the processor is active.
• The processor is designed so that the L2 cache can retain state while the rest of
the processor is powered down. This avoids the time and energy consuming
process of cleaning the caches before powering down.
• The processor enables the debug logic to remain powered up while the rest of the
processor is powered down. This enables system debug to continue while the
processor is powered down. All powered-down processor resources are not
available to the debugger. As a result, the debug logic indicates an error to the
debugger that the processor is in a powered-down state.
The processor supports many different power islands combinations, including a single
monolithic power grid, resulting in a single power domain. The supported power
domains are:
10-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Clock, Reset, and Power Control
• all remaining logic within the processor, excluding the previous power domain,
also known as the integer core.
(70
$7&/. 'HEXJ /GDWD /5$0
$7% &/. FDFKH
'HEXJ
3&/.
$3% ,QWHJHUFRUH
&/.
When implementing the different power domains, the following modes of operation
apply:
• Running mode
— All logic powered and operational.
— NEON powered down and all other logic powered and operational. This
mode minimizes the NEON leakage when NEON is not required.
— Debug PCLK and ETM ATCLK powered down and all other logic
powered and operational. This mode minimizes the leakage of the debug
and trace facilities when they are not required. If an implementation does
not implement the ETM CLK power domain, it can remain powered but is
not useful.
— NEON, debug PCLK, ETM ATCLK, and ETM CLK are powered down,
with all other logic powered and operational.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 10-13
Clock, Reset, and Power Control
If NEON is not required, you can reduce leakage by turning off the power to the NEON
unit. While the NEON unit is powered down, any NEON instructions executed take the
Undefined instruction exception. The OS uses the Undefined instruction exception on a
NEON instruction as a signal to apply power to the NEON unit, if powered down, or to
activate NEON, if disabled.
Powering down the NEON power domain while the processor is in reset
To power down the NEON power domain while the processor is in reset, apply the
following sequence:
10-14 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Clock, Reset, and Power Control
3. While keeping the NEON power domain off, supply power to the other active
power domains.
Warning
If ARESETNEONn is deasserted or the NEON output clamps are released without
following one of the specified NEON power-up sequences, the results are
Unpredictable and might cause the processor to deadlock.
Powering down the NEON power domain while the processor is not in reset
To power down the NEON power domain while the processor is not in reset, the NEON
power domain must be placed into an idle state. Apply the following sequence to place
the NEON power domain into an idle state:
1. Software must disable access to the NEON unit using the Coprocessor Access
Control Register, see c1, Coprocessor Access Control Register on page 3-65. All
outstanding NEON instructions retire and all subsequent NEON instruction cause
an Undefined instruction exception.
MRC p15, 0, <Rd>, c1, c0, 2; Read Coprocessor Access Control Register
BIC <Rd>, <Rd>, #0xF00000; Disable access to CP10 and CP11
MCR p15, 0, <Rd>, c1, c0, 2; Write Coprocessor Access Control Register
2. Software must signal to the external system that the NEON unit is disabled.
Warning
If ARESETNEONn is deasserted or the NEON output clamps are released without
following one of the specified NEON power-up sequences, the results are
Unpredictable and might cause the processor to deadlock.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 10-15
Clock, Reset, and Power Control
To apply power to the NEON power domain while the processor is in reset, use the
following sequence:
After the completion of the reset sequence, you can enable the NEON unit using the
Coprocessor Access Control Register. See c1, Coprocessor Access Control Register on
page 3-65.
Powering up the NEON power domain while the processor is not in reset
To apply power to the NEON power domain while the processor is not in reset, use the
sequence that follows. With the NEON power domain currently powered down, it is
assumed that ARESETNEONn is asserted.
1. Software must disable access to the NEON unit using the Coprocessor Access
Control Register, see c1, Coprocessor Access Control Register on page 3-65.
MRC p15, 0, <Rd>, c1, c0, 2; Read Coprocessor Access Control Register
BIC <Rd>, <Rd>, #0xF00000; Disable access to CP10 and CP11
MCR p15, 0, <Rd>, c1, c0, 2; Write Coprocessor Access Control Register
2. Software must signal to the external system that it is safe to power up the NEON
unit.
4. Deassert ARESETNEONn.
6. Software must poll the external system to determine that it is safe to enable the
NEON unit.
After the completion of the reset sequence, you can enable the NEON unit using the
Coprocessor Access Control Register. See c1, Coprocessor Access Control Register on
page 3-65.
10-16 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Clock, Reset, and Power Control
If the core is running in an environment where debug facilities are not required, you can
reduce leakage power by powering down the debug PCLK and ETM ATCLK power
domains. Both debug PCLK and ETM ATCLK power domains must be built using a
common power supply because separate power supplied for debug PCLK and ETM
ATCLK are not supported.
To power down the debug PCLK and ETM ATCLK power domains, the
implementation must place debug PCLK and ETM ATCLK on a separately controlled
and shared power supply. In addition, the outputs of debug PCLK and ETM ATCLK
must be clamped to benign values while powered down to indicate that the interface is
idle.
To power down the debug PCLK and ETM ATCLK power domains, apply the
following sequence:
3. Remove power from the debug PCLK and ETM ATCLK power domains.
PRESETn and ATRESETn must remain asserted while the domain is powered
down.
To power up the debug PCLK and ETM ATCLK power domains, use the sequence that
follows. It is assumed that both PRESETn and ATRESETn are asserted during the
sequence.
1. Apply power to the debug PCLK and ETM ATCLK power domains.
3. If the system uses the debug PCLK and ETM ATCLK hardware, it is safe to
deassert either PRESETn, ATRESETn, or both.
If the processor is powered down, the SoC can still be functional and used for debug
across the power domains. If the debugger accesses the processor, the debug PCLK and
ETM ATCLK domains must be powered up. See Chapter 12 Debug for more
information on debugging during power down.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 10-17
Clock, Reset, and Power Control
If the integer core power domain is powered down, the processor enables the L1 data
cache and the L2 cache to remain powered up during debug of the processor.
If the integer core power domain is powered down while the debug PCLK and ETM
ATCLK power domains are still powered up, all inputs from the integer core power
domain to the debug PCLK and ETM ATCLK power domains must be clamped to
benign values.
Apply the following sequence to power down the integer core power domain:
3. Activate the clamps to the debug PCLK and ETM ATCLK power domains from
the core.
4. Remove power from the integer core power domain while retaining power to the
debug PCLK and ETM ATCLK power domains.
Apply the following sequence to power up the integer core power domain:
1. Apply power to the integer core power domain while ARESETn and
nPORESET are asserted.
2. Release the clamps to the debug PCLK and ETM ATCLK power domains from
the core.
1. This signal is not available if the processor is configured without the ETM.
10-18 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Clock, Reset, and Power Control
The ETM CLK logic can reside in a separate power domain to manage leakage. When
the ETM CLK power domain is powered down, no tracing activities can occur and
ATRESETn must be asserted. The asynchronous PRESETn input resets the ETM
CLK power domain. This also has the effect of resetting the debug PCLK domain. It
is recommended that you power down the debug PCLK and ETM ATCLK power
domains while ETM CLK is powered down. If the reset to the ETM CLK power
domain is isolated when ETM CLK is powered down, then PRESETn can be
deasserted while ETM CLK is powered down. This permits use of the debug PCLK
hardware in the processor. ATRESETn must be asserted when ETM CLK is in a
powered-down state.
Before placing ETM CLK into a reset state, hardware must request that ETM CLK be
powered down by asserting ETMPWRDWNREQ1 to indicate that the ETM resource
is not available. In addition, hardware must wait for ETMPWRDWNACK1 to be
asserted before powering down ETM CLK.
To power down the ETM CLK power domain, the ETM CLK outputs must be clamped
to benign values.
If an implementation of the core can isolate PRESETn to ETM CLK, apply the
following sequence to power down the ETM CLK power domain:
1. Place the ETM CLK into a reset state by asserting both ATRESETn and
PRESETn.
To power up the ETM CLK power domain, apply the following sequence:
2. Apply power to the ETM CLK power domain and debug PCLK if required.
1. This signal is not present when the processor is configured without the ETM.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 10-19
Clock, Reset, and Power Control
During periods when the entire core is not required, you can stop the processor clocks
by executing a Wait For Interrupt instruction. However, leakage continues to occur. To
remove the leakage component, you must remove the power supplied to the power
domains within the processor. However, the time required to remove and restore the
power limits the advantage of a full power-down of the processor. A full power-down
sequence for the processor might include:
1. Clean and invalidate the caches, L1 data and L2 caches, to the point of coherency.
The largest potential time and energy required in the sequence is the clean and invalidate
of the caches. This operation is bounded by the time required to transfer the data into an
external memory. To reduce or remove this Clean and Invalidate operation, the
processor supports a separate power domain for the L1 data cache in addition to a
separate power domain for the L2 cache RAMs. To enable this capability, the L2 cache
does not contain hardware reset assistance. Therefore, any data within the L2 RAMs
retain their last initialized value. As a result, software must initialize those L2 RAMs to
a known invalid state by executing an Invalidate to the Point of Coherency operation.
This operation makes all lines within the L2 RAMs invalid. For the L1 data cache,
hardware resets the array. Therefore, a given implementation must isolate the L1 data
RAMs using clamps so that the inputs to those RAMs, including reset, are masked.
If an implementation places the L2 cache on a separate power domain, the reset of the
processor can be powered down while the L2 cache retains its data. This requires that
all inputs to the L2 RAMs such as tag, parity, valid, and data RAMs are clamped to safe
values to avoid corrupting the data when entering or exiting a power-down state.
Similarly, the L1 data cache can be placed on a separate power domain from the reset
of the processor. This L1 data cache power domain can be shared with the L2. However,
sharing of the two cache power domains is not required. In addition, all inputs into the
L1 data cache RAMs such as tag, HVAB, and data RAMs must be clamped to safe
values to avoid corrupting the data when entering or exiting a power-down state.
10-20 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Clock, Reset, and Power Control
Note
Data retention within the L1 instruction cache is not supported.
A power down and reset sequence of the processor with the L2 cache retained is as
follows:
4. Activate the L2 cache input clamps for the tag, parity, valid, and data RAMs.
9. Perform a software read of a memory location to determine that the L2 has valid
data and to skip the L2 software invalidation.
10. Before enabling the L2 cache or using any CP15 cache-related operations,
software must signal the system to release the L2 cache input clamps and receive
confirmation that the clamps have been released.
Power cycle the core with L1 data cache and L2 cache retaining state
A power down and reset sequence of the processor with the L1 data cache and L2 cache
is as follows:
3. Activate both the L1 data cache input clamps for the tag, HVAB, and data RAMs
and the L2 cache input clamps for the tag, parity, valid, and data RAMs.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 10-21
Clock, Reset, and Power Control
8. Perform a software read of a memory location to determine that the L1 data cache
and L2 cache have valid data and to skip the software initialization sequence.
9. Before enabling the L1 data cache or L2 cache, or using any CP15 cache-related
operations, software must signal the system to release the L1 data cache and L2
cache input clamps and receive confirmation that the clamps have been released.
Note
The details of how to clamp the inputs to various arrays are implementation-specific and
are not described in this document. Care must be taken that nPORESET does not affect
the state in the RAM arrays.
During any transition of the power supply to a component of the processor, the
asynchronous reset to that component must be asserted. This is a safety mechanism for
implementation to ensure that hardware can be protected against supply transition, DC
paths, such as precharge or discharge circuits, or bus contention. The primary inputs to
the processor that act as asynchronous resets are:
• ATRESETn
• PRESETn
• nPORESET.
10-22 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 11
Design for Test
This chapter describes the DFT features that are included in the Register Transfer
Language (RTL). It contains the following sections:
• MBIST on page 11-2
• ATPG test features on page 11-36.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-1
Design for Test
11.1 MBIST
This section describes the array architecture and operation of the MBIST:
• About MBIST
• MBIST registers on page 11-3
• MBIST operation on page 11-17
• Pattern selection on page 11-23.
CAMBIST controller
The CAMBIST controller is a slave of the L1 MBIST controller. It targets
the comparator logic of the Content-Addressable Memory (CAM). The
L1 MBIST controller tests the contents of the I-CAM and D-CAM arrays.
11-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
Table 11-1 shows the MBIST registers. See Figure 11-7 on page 11-19 for information
about the timing of an MBIST instruction load.
/BFRQILJ>@
UWIDLO +9$%BURZV>@
ELWPDS *+%BURZV>@
GVHHG>@ %7%BURZV>@
7$*BURZV>@
'$7$BURZV>@
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-3
Design for Test
pttn[5:0]
Use the pttn[5:0] field to select test patterns as Table 11-2 shows.
Note
The PTTN_SLAVE pattern (6'b111111) is for testing only the I-CAMBIST and
D-CAMBIST.
rtfail
Setting the rtfail bit to 1 enables the fail signal to assert on every cycle that a failure
occurs. Clearing the rtfail bit to 0 causes a sticky failure reporting, and the fail signal
remains asserted after the first failure that occurs. Reset clears the rtfail bit to 0.
bitmap
Setting the bitmap bit to1 enables bitmap test mode. Reset clears the instruction register
bitmap bit to 0. See Bitmap test mode on page 11-18.
11-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
dseed[3:0]
Write the data seed in the dseed field. The MBIST controller repeats the dseed data to
the full array bus width. The reset value of dseed[3:0] is 4'b0000.
L1_array_sel[22:0]
Set bits in the L1_array_sel[22:0] field to select the L1 arrays for test. The MBIST
executes the selected arrays serially beginning with the array indicated by the LSB.
Table 11-3 shows how each bit selects one of the L1 arrays. The reset value of the
L1_array_sel is 23'h1FFFFF.
[0] I-RAM word0 [31:0] parity and dirty included.a [12] D-RAM word0 [31:0] parity and dirty included.a
[1] I-RAM word1 [63:32] parity and dirty included.a [13] D-RAM word1 [63:32] parity and dirty included.a
[2] I-RAM word2 [95:64] parity and dirty included.a [14] D-RAM word2 [95:64] parity and dirty included.a
[3] I-RAM word3 [127:96] parity and dirty included.a [15] D-RAM word3 [127:96] parity and dirty included.a
[11] GHB.
a. You can test the RAM and BTB arrays by accessing the entire array width during writes. The selected words are compared
according to the L1_array_sel bit currently under test. For this reason, exercise care when creating iddq or data retention
patterns because individual word slices cannot be initialized and maintained with different data seeds.
Note
Do not test the CAMBIST arrays in the same run as other arrays.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-5
Design for Test
L1_config[14:0]
The L1_config[14:0] field contains five 3-bit fields for defining the number of physical
rows in each L1 array as Table 11-4 shows.
L1_config[14:12] HVAB_rows[2:0]
L1_config[11:9] GHB_rows[2:0]
L1_config[8:6] BTB_rows[2:0]
L1_config[5:3] TAG_rows[2:0]
L1_config[2:0] DATA_rows[2:0]
Note
Only arrays with variable row sizes are programmable. The CAM, PA, and attributes
arrays have an architecturally fixed depth of 32. Because of timing limits, physical rows
beyond 512 are not supported.
Table 11-5 shows the possible values for each of the 4-bit fields of L1_config[14:0].
b000 16
b001 32
b010 64
b011 128
b100 256
b101 512
b110-b111 Reserved
11-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
L1_ADDR_SCRAMBLE[183:0]
Proper physical mapping prevents unintended pattern sequences that result in loss of
test quality. This field defines the physical-to-logical address scramble settings for your
implementation. Refer to Design for Test implementation documentation for details on
how to program this for your design.
/BFRQILJ>@
GVHHG
,Q SWWQ>@ /B$''5B6&5$0%/(>@
>@
UWIDLO /$G/6%>@
ELWPDS /9DO6HU
/BUDPBVHO>@ /5RZV>@
/7/DW>@
/'/DW>@
The pttn[5:0], rtfail, bitmap, and dseed[3:0] fields function the same as in the L1
MBIST Instruction Register.
L2_ram_sel[4:0]
Set bits in the L2_ram_sel[4:0] field to select the L2 RAMs for test as Table 11-6 shows.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-7
Design for Test
The MBIST accesses the RAMs serially in the order shown in Table 11-6 on page 11-7,
except that the L2 tag RAM and L2 valid RAM are tested in parallel. You can set the
L2ValSer bit to test these two RAMs serially. See L2ValSer on page 11-11.
L2_config[22:0]
L2_config[22:19] L2DLat[3:0]
L2_config[18:17] L2TLat[1:0]
L2_config[16:5] L2Rows[11:0]
L2_config[4] L2ValSer
L2_config[3:0] L2AdLSB[3:0]
L2DLat[3:0]
Use the L2DLat[3:0] field to select the read and write latency of the L2 data array as
Table 11-8 shows. The reset value of the L2DLat[3:0] field is 4'b1111.
b0000 3 b1000 9
b0001 3 b1001 10
b0010 3 b1010 11
11-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
b0011 4 b1011 12
b0100 5 b1100 13
b0101 6 b1101 14
b0110 7 b1110 15
b0111 8 b1111 16
L2TLat[1:0]
Use the L2TLat[1:0] field to select the read and write latency of the L2 tag array as
Table 11-9 shows. Reset sets the L2TLat[1:0] field, selecting four wait states.
b00 2
b01 2
b10 3
b11 4
L2Rows[11:0]
The four 3-bit fields in the L2Rows[11:0] field control the number of rows in the data,
parity, tag, and valid RAMs. Table 11-10 shows the fields that control each of the four
RAMs.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-9
Design for Test
Table 11-11 shows how to configure array depth with the L2Rows fields.
b000 16
b001 32
b010 64
b011 128
b100 256
b101 512
b110-b111 Reserved
Not all row settings are valid for all RAMs in all L2 cache size configurations.
Table 11-12 shows the range of values from Table 11-11, that is possible for each RAM
type, and for each cache size.
64 1 16-256 16-32
64 2 16-512 16-64
11-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
L2ValSer
By default, the MBIST tests the L2 tag RAM and L2 valid RAM at the same time.
Table 11-13 shows that you can select serial testing of the tag and valid RAMs by setting
the L2ValSer bit. The reset value of the L2ValSer bit is 0.
When L2ValSer is 0, that is, parallel testing is selected, the address scramble
configuration for the valid RAM is the same as that of the tag RAM. This means that
the valid RAM uses the tag RAM address scramble configuration, even if the tag RAM
is not selected for test. The L2ValSer bit is provided to enable you to serially test the tag
RAM with different address scramble configurations.
1 Serial testing
0 Parallel testing
L2AdLSB[3:0]
Use the L2AdLSB[3:0] field to select how to increment or decrement the two LSBs of
the column address of L2 valid, tag, parity and data RAM accesses. This field is
provided as a way to configure non-linear address sequences found in some compiled
RAMs. Table 11-14 shows the L2 array controlled by each L2AdLSB[3:0] bit.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-11
Design for Test
Table 11-15 shows how each L2AdLSB[3:0] bit controls the increment and decrement
sequence of the two column address LSBs.
L2_ADDR_SCRAMBLE[289:0]
Proper physical mapping prevents unintended pattern sequences that result in loss of
test quality. Use the ADDR_SCRAMBLE[289:0] field to define the physical-to-logical
address scramble setting for your implementation. Refer to Design for Test
implementation documentation for details on how to program this for your design.
You can use the L1 and L2 MBIST GO-NOGO Instruction Registers to program a
custom sequence of up to eight patterns for either L1 or L2 memory. Figure 11-3 shows
the fields of the L1 and L2 MBIST GO-NOGO Instruction Registers.
Note
GO-NOGO on page 11-35 describes the default GO-NOGO sequence available at
power-up.
11-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
GNG[10] Valid
The patterns execute in order, starting with GNG1. It is not necessary to load the entire
register when fewer than eight patterns are required. If you load fewer than eight
patterns, the unloaded fields cannot execute because their valid bits are cleared at reset.
For example, to execute a READBANG with a data seed of 0x6 followed by a COLBAR
with a data seed of 0xF, you only have to load two fields:
See READBANG on page 11-34 and COLBAR on page 11-26 for more details.
Figure 11-4 shows the L1 MBIST GO-NOGO Instruction Register contents after
loading a COLBAR with a data seed of 0xF and a READBANG with a data seed of 0x6.
Figure 11-4 L1 MBIST GO-NOGO Instruction Register example with two patterns
The MBISTSHIFTL1 signal must toggle one cycle before initiation and one cycle
before completion of the MBISTDATAINL1 stream as Figure 11-7 on page 11-19
shows. During GO-NOGO instruction load, MBISTDSHIFTL1 must toggle at the
same time as MBISTSHIFTL1. See Figure 11-8 on page 11-20.
The L1 MBIST Datalog Register records information about failing arrays. Figure 11-5
on page 11-14 shows the fields of the L1 MBIST Datalog Register.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-13
Design for Test
SDWWHUQ
$UUD\)DLO>@ IDLOBDGGU>@ IDLOLQJBELWV>@
>@
H[SHFWBGDWD>@ DOJBSDVV>@
ArrayFail[22:0]
Read the ArrayFail[22:0] field to identify arrays that produce failures. The bits in this
field correspond to the bits in the L1_array_sel[22:0] field in the L1 MBIST Instruction
Register. Table 11-3 on page 11-5 shows how each bit corresponds to one of the L1
arrays. Testing more than one array while not in bitmap test mode can set more than one
ArrayFail[22:0] bit. The least-significant 1 in the ArrayFail[22:0] field indicates the
first failing array.
expect_data[3:0]
Read the expect_data[3:0] field for the expected data seed for the first failing array.
Because data seed toggling occurs throughout pattern execution, the value in this field
does not always correspond to the programmed data seed.
fail_addr[16:2]
Read the fail_addr[16:2] field for the physical address of the first failing array. See the
address scramble information contained within the Design for Test implementation
documentation for details on shows how this address is constructed.
failing_bits[37:0]
Read the failing_bits[37:0] field to identify failing bits in the first array that fails. This
field contains the EXCLUSIVE-OR of read data and expect data.
alg_pass[3:0]
For the first failing array, read the alg_pass[3:0] field to identify which pass of the
algorithm produced a failure. For example, the CKBD algorithm has four passes, wscan,
rscan, wscan, and rscan, numbered 1, 2, 3, and 4. Because failures only occur on reads,
a CKBD failure results in an alg_pass[3:0] value of 4'b0010 or 4'b0100.
pattern[5:0]
Read the pattern[5:0] field to identify the pattern running at the time of the first failure.
Table 11-2 on page 11-4 shows the pattern codes. This field is useful when running
more than one pattern during a GO-NOGO test.
11-14 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
SDWWHUQ
IDLOBDGGU>@ IDLOLQJBELWV>@
>@
failing_ram[4:0]
Read the failing_ram[4:0] field to identify the RAMs that produce failures. The bits in
this field correspond to the bits in the L2_ram_sel[4:0] field in the L2 MBIST
Instruction Register. Table 11-6 on page 11-7 shows how each bit corresponds to one of
the L2 RAMs. Testing more than one RAM while not in bitmap test mode can set more
than one failing_ram[4:0] bit. The least-significant bit that is set to 1 in the
failing_ram[4:0] field indicates the first failing RAM.
Note
When the L2ValSer bit is 0, the tag RAM and valid RAM are tested in parallel. When
testing both these RAM in parallel, a failure in either RAM sets both bit [3] and bit [4]
in the failing_ram[4:0] field. To determine if the tag RAM, valid RAM, or both failed,
process the failing_bits[32:0] field, see Table 11-18 on page 11-17.
expect_data[3:0]
Read the expect_data[3:0] field for the expected data seed for the first failing RAM.
Because data seed toggling occurs throughout algorithm execution, the value in this
field does not always correspond to the programmed data seed.
fail_addr[16:0]
Read the fail_addr[16:0] field for the physical address of the first RAM failure. This is
the address sent to the RAM through the L2 MBIST interface. See the address scramble
information contained within the Design for Test implementation documentation for
details on how you can construct this address.
When testing the data array, there are no cache way select bits, but the index value is
still right-justified with fail_addr[0]. You can ignore the values shifted out of unused
address bits. Those values reflect the values assigned to those bits in the address
scramble configuration.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-15
Design for Test
When testing the tag array, bits [16:15] of this field contain the cache way select bits,
and the tag array index value is the least-significant bits of fail_addr. Because the
fail_addr[14:12] bits are not used for the tag array, they are always zero.
Table 11-17 shows how the cache ways are grouped into two ways of read data sent
back from the tag RAMs.
0 way 1, way 0
1 way 3, way 2
2 way 5, way 4
3 way 7, way 6
a. Test sequence number is the order that the MBIST controller accesses
the cache ways.
The lower-numbered cache ways are always assigned to bits [22:0] of the read data bus
for the current test group. The valid RAM contains two data bits for each of the eight
cache ways for a total of 16 bits. To achieve a high test quality, all 16 bits are tested in
parallel when testing the first group of cache ways. Because the valid bits are typically
implemented as a single 16-bit RAM, testing all cache ways in parallel enables the full
16 bits to be accessed each time instead of testing it in slices. This provides greater
flexibility with data backgrounds and can reduce test time if the valid RAM is tested
serially after the tag RAM.
When testing tag RAMs and valid RAMs in parallel, the valid RAM chip select is
disabled to prevent the valid RAM from being accessed during testing of subsequent
groups of cache ways within the tag array.
read_mux
The read_mux bit indicates which half of the 65-bit read produced the first failure:
11-16 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
failing_bits[32:0]
Read the failing_bits[32:0] field to identify failing bits in the first RAM that fails. This
field contains the EXCLUSIVE-OR of read data and expect data. Table 11-18 shows
how to identify failing L2 bits.
Tag/valid RAMs 0 1'b0, tag RAM read bits [15:0]b, valid RAM read bits [15:0]
a. The read_mux value for the parity RAM is always 0 because it is only 16 bit-wide and is always stored
in the lower half of the 65-bit read bus.
b. For L2 cache sizes greater than 64K, not all tag RAM read bits are active. The MBIST controller masks
any unused bits and does not generate a failure.
alg_pass[3:0]
Read the alg_pass[3:0] field to identify which pass of the algorithm produced a failure
in the first failing RAM. A pass is defined as one complete pass through the entire
address space of the RAM under test. The numbering starts with 4'b0001, indicating the
first pass.
pattern[5:0]
Read the pattern[5:0] field to identify the pattern running at the time of the first failure.
Table 11-2 on page 11-4 shows the pattern codes. This field is useful in GO-NOGO
testing when more than one pattern is run during the test.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-17
Design for Test
Manufacturing test mode determines the pass or fail status of the arrays. If the failure
flag is set when the complete flag is set, you can retrieve the datalog to identify the
failing arrays. After analyzing the datalog, you can use bitmap test mode to identify the
failing bits.
In bitmap test mode, the MBIST controller stops when it detects a failure. It asserts
MBISTRESULT[1] until the tester begins datalog retrieval. After datalog retrieval, the
MBIST controller resumes the test from the point where it stopped. This handshake
continues until test completion. The collected datalogs are useful for offline bitmap and
redundancy analysis.
Figure 11-7 on page 11-19 shows the timing of an MBIST instruction load. The
MBISTMODE signal must remain asserted while the core is under reset. See
Figure 10-6 on page 10-6 for more information on reset timing. MBISTSHIFT is
asserted and instruction load data is serially loaded into the Instruction Register through
the MBISTDATAIN pin. MBISTSHIFT is deasserted upon completion of the
instruction load. MBISTDATAIN has one cycle of latency in relation to
MBISTSHIFT.
11-18 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
&/.
5(6(7Q
0%,6702'(
0%,676+,)7
0%,67'6+,)7
0%,67581
0%,675(68/7>@
2QHF\FOH0%,67'$7$,1ODWHQF\DIWHU0%,676+,)7
Figure 11-8 on page 11-20 shows an example of an MBIST instruction load followed
immediately by a GO-NOGO instruction load. During the GO-NOGO portion of the
load, MBISTDSHIFT and MBISTSHIFT both equal 1.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-19
Design for Test
&/.
5(6(7Q
0%,6702'(
0%,676+,)7
0%,67'6+,)7
0%,67581
0%,675(68/7>@
2QHF\FOH0%,67'$7$,1ODWHQF\DIWHU0%,67'6+,)7
Test execution
Figure 11-9 on page 11-21 shows an example of normal MBIST test execution. The
complete flag, MBISTRESULT[2], is asserted at the end of the test. This indicates a
pass result in the absence of MBISTRESULT[1], the fail flag. While bitmap mode is
enabled, the test execution is interrupted when a failure occurs to shift out the fail data.
Figure 11-9 on page 11-21 shows the timing wave forms for at speed test of the core.
Slow clocking is implemented during the shifting of the Instruction Register and fast
clocking is for the actual MBIST execution. It is assumed that slow clocking is required
because of packaging pin timing restrictions.
11-20 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
3//JOLWFKOHVVVZLWFKSURFHGXUHEHWZHHQ
IDVWDQGVORZFORFNLQJFDQRFFXUKHUH
&/.
5(6(7Q
0%,6702'(
0%,676+,)7
0%,67'6+,)7
0%,67'$7$,1 ,QVWU>PVE@
0%,67581
Note
During at-speed clocking with real-time fail mode active, you can ignore
MBISTRESULT[0].
Figure 11-10 on page 11-22 shows an example of retrieval of the first failure datalog
and the pass/fail status for every array. This is typically run at the end of testing. You
can use bitmap test mode on the failing arrays.
Be careful not to miss a subsequent failure that might occur near the end of the testing
sequence. For example, if a failure occurs on the last RAM access of the test sequence,
then the complete flag asserts only three at-speed cycles after the fail flag asserts. If the
fail flag signal goes through more external delay than the complete flag, the complete
flag might be visible externally before the fail flag. Before classifying a test as passing,
give adequate time after recognizing the complete flag to ensure that the fail flag does
not assert.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-21
Design for Test
&/.
5(6(7Q
0%,6702'(
0%,676+,)7
0%,67'6+,)7
0%,67'$7$,1
0%,67581
Figure 11-11 shows an example of the start of a failure datalog retrieval during bitmap
mode. The fail flag remains asserted and no further MBIST testing occurs until the
MBISTDSHIFT signal is asserted, which initiates the serial shift-out of the bitmap
datalog. This provides time to switch from fast to slow clocking required for shifting.
3//JOLWFKOHVVVZLWFKEHWZHHQ
IDVWDQGVORZFORFNLQJRFFXUVKHUH
&/.
0%,675(68/7>@ IDLOIODJ
0%,67'6+,)7
0%,67581
Figure 11-12 on page 11-23 shows an example of the end of a failure datalog retrieval
during the execution of a failure bitmap. When all of the bits are shifted out, the PLL
switches back to fast clocking and negates the MBISTDSHIFT signal. This causes the
MBIST controller to resume testing.
11-22 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
3//JOLWFKOHVVVZLWFKEHWZHHQ
IDVWDQGVORZFORFNLQJRFFXUVKHUH
&/.
0%,675(68/7>@ IDLOIODJ
0%,67'6+,)7
0%,67581
The processor implementation includes a toolbox of patterns for testing the arrays.
When creating test vectors, you can select the group of algorithms that is most effective
for your fabrication process.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-23
Design for Test
Table 11-19 shows the patterns that are selected using the pttn[5:0] field of the MBIST
Instruction Register.
Address
Pattern N updating Description
WRITEBANG 20N Row-fast Custom bitline stress test, see WRITEBANG on page 11-33
W_ R_ (wsac × 5) R_ W
READBANG 17N Row-fast Custom bitcell read stress test, see READBANG on
page 11-34
11-24 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
Address
Pattern N updating Description
FAIL 6N Row-fast R W march with built-in failures, see FAIL on page 11-34
ADDRDECODER N(1 + 2log2N) NA Detection of open decoder faults on address lines, see
ADDRESS DECODER on page 11-35
WCKBD 1N - Single pass wscan for IDDQ and data retention style tests
WCOLBAR
WROWBAR
WSOLIDS
RCKBD 1N - Single pass rscan for IDDQ and data retention style tests
RCOLBAR
RROWBAR
RSOLIDS
CAMBIST
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-25
Design for Test
Note
Normal MBIST tests CAM array entries. The CAMBIST routine checks the compare
and hit functions only.
CKBD
Figure 11-13 shows the physical array after the first CKBD pass.
5RZ
PD[
PD[
$GGUHVVLQJ PD[
&RO
GLUHFWLRQ PD[
COLBAR
invert = col_index[0]
11-26 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
Figure 11-14 shows the physical array after the first COLBAR pass.
$GGUHVVLQJ
GLUHFWLRQ
5RZ
PD[
PD[
&RO PD[
PD[
ROWBAR
invert = row_index[0]
Figure 11-15 on page 11-28 shows the physical array after the first ROWBAR pass.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-27
Design for Test
5RZ
PD[
PD[
$GGUHVVLQJ PD[
&RO
GLUHFWLRQ PD[
SOLIDS
SOLIDS is a row-fast scan pattern in which data seed inversion is not a function of
address.
RWXMARCH
Figure 11-16 on page 11-29 shows the state of row 1, column 2 in a 4 × 4 array during
pass 2.
11-28 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
5RZ 5RZ
$GGUHVVLQJ
&RO &RO
GLUHFWLRQ
5HDGGDWD :ULWHGDWDEDU
URZFROXPQ URZFROXPQ
RWYMARCH
Figure 11-17 shows the state of row 1, column 2 in a 4 × 4 array during pass 2.
$GGUHVVLQJ
GLUHFWLRQ
5RZ 5RZ
&RO &RO
5HDGGDWD :ULWHGDWDEDU
FROXPQURZ FROXPQURZ
RWRXMARCH
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-29
Design for Test
Figure 11-18 shows the state of row 1, column 2 in a 4 × 4 array during pass 2.
RWRYMARCH
Figure 11-19 shows the state of row 1, column 2 in a 4 × 4 array during pass 2.
$GGUHVVLQJ
GLUHFWLRQ
5RZ 5RZ 5RZ
11-30 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
XMARCHC
Figure 11-20 shows the state of row 1, column 2 in a 4 × 4 array during pass 2.
YMARCHC
Figure 11-21 on page 11-32 shows the state of row 1, column 2 in a 4 × 4 array during
pass 2.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-31
Design for Test
$GGUHVVLQJ
GLUHFWLRQ
5RZ 5RZ 5RZ
XADDRBAR
XADDRBAR is a write/read row-fast scan pattern with two exceptions. This algorithm
uses only half of the MBIST address space. For each address, XADDRBAR also makes
an access to the inverted address with inverted data. Unlike the standard scan pattern
that moves through the entire address space linearly, it alternates between opposite
addresses until it addresses the entire array.
11-32 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
YADDRBAR
The YADDRBAR pattern is similar to the XADDRBAR pattern with the exception of
incrementing and decrementing the array column-fast.
$GGUHVVLQJ
GLUHFWLRQ
5RZ 5RZ 5RZ
K I G E M O Q S
S Q O M E G I K
L N P R J H F D
D F H J R P N L
WRITEBANG
WRITEBANG is a row-fast bitline stress pattern. It operates on a bitline pair, that is, a
column. It tries to create slow reads from target data cells in the column that can cause
hard faults in self-timed and high-speed RAMs. It writes the bitline multiple times to
the opposite data state of the target read, trying to create an imbalance in the bitline pair
that the cell must correct. The pattern reveals insufficient bitline precharge or
equalization. The target cell has opposite data from all other cells on the bitline pair.
This is a worst-case bitline condition for a cell to drive because any leakage from other
cells in the column oppose the targeted read. In the following description, wsac
indicates a write to row 0, a sacrificial (untested) row used during test. WRITEBANG
performs the following sequence:
1. Wscan data to entire array.
2. W_, R_, wsac, wsac, wsac, wsac, wsac, R_, W, incr.
3. Wscan databar.
4. W, R, wsac_, wsac_, wsac_, wsac_, wsac_, R, W_, incr.
Figure 11-24 on page 11-34 shows the state of row 1, column 2 in a 4 × 4 array during
pass 2.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-33
Design for Test
READBANG
READBANG is a row-fast bitcell stress test pattern. The pattern operates on a bitcell,
reading it multiple times in an attempt to weaken its latched margin. It writes opposite
data to the sacrificial row, and makes a final read of the target cell. In the following
description, wsac indicates a write to row 0, a sacrificial row used during test.
READBANG performs the following sequence:
1. Wscan data to entire array.
2. R, R, R, R, R, wsac_, R, W_, incr.
3. R_, R_, R_, R_, R_, wsac, R_, W, incr.
Figure 11-25 shows the state of row 1, column 2 in a 4 × 4 array during pass 2.
FAIL
FAIL is a row-fast algorithm similar to the RWXMARCH pattern but contains injected
failures of opposite data written during the wscan portion of the algorithm in one of
every 16 accesses. Running FAIL with the production test suite ensures that the MBIST
error detection and reporting occurs properly. You can use FAIL to check bitmap mode
function in simulation.
11-34 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
ADDRESS DECODER
ADDRESS DECODER targets the address decoders in memory instead of the bitcells.
It performs the following sequence:
1. W addr.
2. W_ (Addr ^ shift_reg).
3. R Addr, shift_reg << 1.
4. Repeat steps 2 and 3 until shift_reg = Addr MSB.
5. Incr addr, repeat steps 1-4 until addr expire.
The shift register is a one-hot register with a width equal to the number of address bits.
The test time for the maximum L2 indexing (17 bits) is:
The test time for the maximum L1 indexing (11 bits) is:
GO-NOGO
You can select up to eight different pattern combinations and select the data seed of your
choice.
Note
Be sure to properly order the sequence of tests. For example, a write CKBD followed
by a read solid always fails because the data read was different from what was written.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-35
Design for Test
11.2.1 Wrapper
There are seven input signals that control the logic of the core to support the Wrapper
Boundary Register (WBR) and the IEEE 1500 standard:
• WEXTEST
• WINTEST
• WSE
• CAPTUREWR
• TESTMODE
• SERIALTEST
• SHIFTWR.
This logic:
• separates the shift and capture for IEEE 1500 compliance so that the shared
wrapper cell can hold state when neither shifting nor capturing
• requires only one external wrapper scan enable and prevents unknown states in
wrapper cells with multiple capture cycles, which is preferable for delay testing
and for testing through the memories.
Figure 11-26 on page 11-37 shows the RTL logic for a set of input WBR cells.
11-36 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
SURFHVVRU
LQSXWSRUWV 7RLQSXW
+ROGFRQWUROORJLF :%5FHOOV
&$3785(:5
FDSWXUHBLQSXWVBQ
SURFHVVRU
LQSXWSRUWV 6LQJOH:6(ORJLF
7(6702'(
:(;7(67 6(5,$/7(67
:,17(67 6(LQ
:6( VKLIWBLQSXWV
6+,)7:5
Figure 11-27 shows the RTL logic for a set of output WBR cells.
SURFHVVRU
LQSXWSRUWV 7RRXWSXW
+ROGFRQWUROORJLF :%5FHOOV
&$3785(:5
FDSWXUHBRXWSXWVBQ
SURFHVVRU
LQSXWSRUWV 6LQJOH:6(ORJLF
7(6702'(
:(;7(67 6(5,$/7(67
:,17(67 6(LQ
:6( VKLIWBRXWSXWV
6+,)7:5
The hold control logic in Figure 11-26 and Figure 11-27 has capture and shift signals
that enable the WBR cell to hold data during test mode while both these signals are
deasserted. The only difference between input wrapper and output wrapper cells is that
the WINTEST and WEXTEST connections switch polarity. The type of IEEE 1500
compliant-wrapper cell used with this logic is shown in Figure 11-28 on page 11-38.
This utilization provides the benefit of requiring only one external wrapper scan enable
and preventing unknown states from being output from the WBR cells during patterns
with multiple capture cycles. If you use a standard Mux-D flip-flop in the WBR in place
of the WBR cell as shown in Figure 11-28 on page 11-38, you can use the shift_outputs
and shift inputs signals for the scan enable to the output and input WBR cells,
respectively.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-37
Design for Test
Figure 11-28 shows the type of WBR cell required to meet IEEE 1500 compliance.
6KLIWRXWSXW
+ROG
6,
6KLIWLQSXW
FDSWXUHBLQSXWVBQ
VKLIWBLQSXWV
Note
The IEEE 1500-compliant output wrapper boundary register cell uses the shift_outputs
and capture_outputs_n signals.
Three CORTEX-A8 signals control whether or not sections of the processor can update
when MBISTMODE is asserted or when TESTMODE is asserted. These signals are:
• TESTEGATE
• TESTNGATE
• TESTCGATE.
• if the TESTEGATE signal is LOW, the flops within the ETM unit cannot be
updated
• if the TESTNGATE signal is LOW, the flops within the NEON unit cannot be
updated
• the rest of the flops within the CORTEXA8 core are not updated when the
TESTCGATE signal is LOW.
If these signals are HIGH, then the flops they control are allowed to update. When both
MBISTMODE and TESTMODE are negated, the values of the TESTEGATE,
TESTNGATE, and TESTCGATE inputs are not used.
11-38 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Design for Test
The internal asynchronous reset signals are driven from a flip-flop. SE prevents the
resettable registers from being corrupted during shift using the logic shown in
Figure 11-29.
5HVHWSLSHOLQH
UHJLVWHU
' 4
7RDFWLYH/2:DV\QFKURQRXV
6( UHVHWSRUWVRIIOLSIORSV
11.2.4 SAFESHIFTRAM
6$)(6+,)75$0
FORFNWR5$0
LQWHUQDOFORFN
One methodology for testing the shadow logic of the RAMs is to test through the
RAMs. The ATPG tool uses this gate for easier testability of this logic for this
methodology. However, if there is a scan chain or bypass wrapper within the RAM, this
gate prevents the clock from toggling during shift and causes the chain or wrapper to be
ignored during test. If you do not require this gate, you can optimize it out during
synthesis by setting SAFESHIFTRAM LOW.
Note
The SAFESHIFTRAM gate is not selective. Including this gate in a design affects all
RAMs and register files when MBISTMODE is asserted.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 11-39
Design for Test
11-40 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 12
Debug
This chapter describes the processor debug unit. This feature assists the development of
application software, operating systems, and hardware. This chapter contains the
following sections:
• Debug systems on page 12-2
• About the debug unit on page 12-4
• Debug register interface on page 12-7
• Debug register descriptions on page 12-18
• Management registers on page 12-56
• Debug events on page 12-72
• Debug exception on page 12-76
• Debug state on page 12-80
• Cache debug on page 12-90
• External debug interface on page 12-92
• Using the debug functionality on page 12-98
• Debugging systems with energy management capabilities on page 12-120.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-1
Debug
'HEXJ
+RVWFRPSXWHUUXQQLQJ5HDO9LHZ'HEXJJHU
KRVW
3URWRFRO
IRUH[DPSOH5HDO9LHZ,&(
FRQYHUWHU
'HEXJ
'HYHORSPHQWV\VWHPFRQWDLQLQJSURFHVVRU
WDUJHW
The debug host is a computer, for example a personal computer, running a software
debugger such as RealView™ Debugger. The debug host enables you to issue high-level
commands such as setting a breakpoint at a certain location, or examining the contents
of a memory address.
The debug host sends messages to the debug target using an interface such as Ethernet.
However, the debug target typically implements a different interface protocol. A device
such as RealView ICE is required to convert between the two protocols.
12-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
The debug target is the lowest level of the system. An example of a debug target is a
development system with a test chip or a silicon part with a processor.
The debug target implements system support for the protocol converter to access the
debug unit using the Advanced Peripheral Bus (APB) slave port.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-3
Debug
You can debug software running on the processor in the following ways:
• Halting debug-mode debugging
• Monitor debug-mode debugging
• trace debugging, see Chapter 14 Embedded Trace Macrocell.
The processor external debug interface is compliant with the AMBA 3 APB Protocol
Specification.
When the processor debug unit is in Halting debug-mode, the processor halts when a
debug event, such as a breakpoint, occurs. When the processor is halted, an external
debugger can examine and modify the processor state using the APB slave port. This
debug mode is invasive to program execution.
When the processor debug unit is in Monitor debug-mode and a debug event occurs, the
processor takes a debug exception instead of halting. A special piece of software, a
monitor target, can then take control to examine or alter the processor state. Monitor
debug-mode is essential in real-time systems where the processor cannot be halted to
collect debug information. Examples of these systems are engine controllers and servo
mechanisms in hard drive controllers that cannot stop the code without physically
damaging the components.
12-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
When execution of a monitor target starts, the state of the processor is preserved in the
same manner as all ARM exceptions. The monitor target then communicates with the
debugger to access processor and coprocessor state, and to access memory contents and
input/output peripherals. Monitor debug-mode requires a debug monitor program to
interface between the debug hardware and the software debugger.
Note
Monitor debug-mode, used for debugging, is not the same as Secure Monitor mode,
which is a CPSR[4:0] processor mode.
See CP14 c1, Debug Status and Control Register on page 12-23 for information on how
to select between Halting debug-mode or Monitor debug-mode.
To prevent access to secure system software or data while still permitting Nonsecure
state and optionally secure User mode to be debugged, you can set debug to one of three
levels:
• Nonsecure state only
• Nonsecure state and Secure User mode only
• any Secure or Nonsecure state.
The SPIDEN and SPNIDEN signals, and the two bits, SUIDEN and SUNIDEN, in the
Secure Debug Enable Register in CP15 coprocessor control the debug permissions. See
External debug interface on page 12-92 and c1, Secure Debug Enable Register on
page 3-69 for details.
Invasive debug
Invasive debug is defined as a debug process where you can control and
observe the processor. Most debug features in this chapter are considered
invasive debug because they enable you to halt the processor and modify
its state.
SPIDEN and SUIDEN control invasive debug permissions.
Noninvasive debug
Noninvasive debug is defined as a debug process where you can observe
the processor but not control it. The ETM interface and the performance
monitor registers are features of noninvasive debug. See Chapter 14
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-5
Debug
The processor debug unit is programmed using the APB slave port. See Table 12-3 on
page 12-9 for a complete list of memory-mapped debug registers accessible using the
APB slave port. Some features of the debug unit that you can access using the
memory-mapped registers are:
12-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Although most of the debug registers are accessible through the memory-mapped
interface, there are several registers that you can access through a coprocessor interface.
This is important for boot-strap access to the ARM register file. It enables software
running on the processor to identify the debug architecture version that the device
implements.
By default, you can access all CP14 debug registers from a nonprivileged mode.
However, you can program the processor to disable user-mode access to all coprocessor
registers using bit [12] of the DSCR, see CP14 c1, Debug Status and Control Register
on page 12-23 for more information. CP14 debug registers accesses are always
permitted while the processor is in debug state regardless of the processor mode.
Yes Xa Xa Permitted
No User b0 Permitted
No User b1 Undefined
No Privileged Xa Permitted
a. X indicates a Don’t care condition. The outcome does not depend on this
condition.
Table 12-2 on page 12-8 shows the valid CP14 debug instructions for accessing the
debug registers. All CP14 debug instructions not listed are Undefined.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-7
Debug
Note
The CP14 debug instructions are defined as having Opcode_1 set to 0.
MRC p14, 0, <Rd>, c0, c0, 0 DIDR Debug Identification Register. See CP14 c0, Debug ID Register on
page 12-19.
MRC p14, 0, <Rd>, c1, c0, 0 DRAR Debug ROM Address Register. See CP14 c0, Debug ROM Address
Register on page 12-21.
MRC p14, 0, <Rd>, c2, c0, 0 DSAR Debug Self Address Register. See CP14 c0, Debug Self Address Offset
Register on page 12-22.
MRC p14, 0, <Rd>, c0, c5, 0 DTRRX Data Transfer Register - Receive. See Data Transfer Register on
STC p14, c5, <addressing mode> page 12-32.
MCR p14, 0, <Rd>, c0, c5, 0 DTRTX Data Transfer Register - Transmit. See Data Transfer Register on
LDC p14, c5, <addressing mode> page 12-32.
MRC p14, 0, <Rd>, c0, c1, 0 DSCR Debug Status and Control Register. See CP14 c1, Debug Status and
MRC p14, 0, PC, c0, c1, 0 Control Register on page 12-23.
Table 12-3 on page 12-9 shows the complete list of memory-mapped registers
accessible using the APB slave port.
Note
You must ensure that the base address of this 4KB register region is aligned to a 4KB
boundary in physical memory.
12-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Register Power
Offset (hex) Access Mnemonic Description
number domain
0x020 c8 R - - RAZ
0x088 c34 RW DSCR Core CP14 c1, Debug Status and Control Register
on page 12-23
0x090 c36 W DRCR Debug Debug Run Control Register on page 12-38
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-9
Debug
Register Power
Offset (hex) Access Mnemonic Description
number domain
0x310 c196 RW PRCR Debug Device Power Down and Reset Control
Register on page 12-52
0x314 c197 R PRSR Debug Device Power Down and Reset Status
Register on page 12-53
The breakpoint and watchpoint comparison are done on a Virtual Address (VA).
Therefore you must program Breakpoint Value Registers (BVRs) and Watchpoint Value
Registers (WVRs) with a VA, not a Modified Virtual Address (MVA).
The Vector Catch Register (VCR) sets breakpoints on exception vectors as virtual
addresses.
The Watchpoint Fault Address Register (WFAR) reads a VA plus a processor state
dependent offset, +8 for ARM state and +4 for Thumb and ThumbEE states.
12-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
This section describes how the debug registers are split in different power domains.
Table 12-3 on page 12-9 describes which debug registers are included in which power
domain. Generally, debug registers are in the core power domain unless they must be
accessible or hold their values while the core is powered down, in which case they are
in the debug power domain. In addition, the APB port itself is also in the debug power
domain. Debug registers that are in debug power domain are:
• Registers that implement the functionality for debugging through power down
such as:
— Event Catch Register
— Debug Run Control Register
— OS Lock Access Register
— Device Power Down and Reset Control Register
— Device Power Down and Status Control Register.
The processor has three reset signals that affect the debug registers in the following
ways:
nPORESET The system asserts this signal when powering up the core domain. It sets
all of the core power domain logic to the reset value, including all debug
registers in the core power domain.
ARESETn The system asserts this signal for a warm or soft reset. It sets all the
processor logic except debug or ETM, to the reset value. Therefore, the
state of a debug or trace session is not affected by this reset signal.
PRESETn The system asserts this signal to set all of the debug and ETM logic to the
reset value.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-11
Debug
Table 12-4 shows the processor reset effect on debug and ETM logic.
Debug and ETM logic Debug and ETM logic Non-debug and non-ETM logic
The restrictions on accesses to the APB slave port are described as follows:
Locks The debugger or software running on the system might lock out different
parts of the register map so they cannot be accessed while the debug
session is in certain states.
Power down
The APB port does not permit accesses to registers inside the core power
domain when the core powers down.
When nonprivileged software tries to access the APB slave port, the system ignores or
generates an abort response on the access. You must implement this restriction at the
system level because the APB protocol does not have a control signal for privileged or
user access. You can choose to have the system either ignore or abort the access.
Although you can place additional restrictions on the memory transactions that are
permitted to access the APB port, ARM does not recommend this.
12-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Locks permission
You can lock the APB slave port so access to some debug registers is restricted. There
are two locks:
Software lock
The external debugger can set this lock to prevent software from
modifying debug registers settings. A debug monitor can also set this lock
prior to returning control to the application, to reduce the chance of
erratic code changing the debug settings. When this lock is set, writes to
all debug registers are ignored, except those writes generated by the
external debugger. See Lock Access Register on page 12-65 for more
information.
OS Lock An OS can set this lock on the debug register map so access to some
debug registers is not permitted while the OS is performing a save or
restore sequence. When this lock is set, the APB port aborts accesses to
registers in the core power domain. See Operating System Lock Access
Register on page 12-48 for more information.
Note
• The state of these locks is held on debug power domain and, therefore, is not lost
when the core powers down.
• These locks are set to their reset values only on reset of the debug power domain
(PRESETn reset).
• Be sure to set the PADDR31 input signal to 1 for accesses originated from the
external debugger for the Software Lock override feature to work. See Table 12-5
on page 12-14 for more details.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-13
Debug
Table 12-5 shows the APB slave port access permissions with relation to software lock.
Conditions Registers
1a Xb OKc OK
0 1d OK WIe
0 0 OK OK
12-14 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Access to registers inside the core power domain is not possible when the core powers
down. The APB slave port ignores accesses to powered-down registers and returns an
error response, that is, PSLVERR is set to 1.
When the core powers down, the PRSR[1] sticky power down bit is set to 1. While
PRSR[1] is set to 1, the APB slave port also ignores accesses to registers inside the core
power domain and returns an error response, that is, PSLVERR is set to 1. This bit
remains set until the debugger reads the PRSR. See Device Power Down and Reset
Status Register on page 12-53 for more details.
Table 12-6 shows the behavior of APB slave port accesses to debug registers with
relation to power-down event.
Conditions Registers
Sticky power
DBGPWRDWNREQ OS Lock DIDR, ECR, DRCR Other debuga Managementb
down
1 Xc X OKd ERRe OK
0f 0 0 OK OK OK
0 0 1g OK ERR OK
0 1h X OK ERR OK
a. This column indicates registers in the address range of 0x000 through 0xF00 except for DIDR, ECR, DRCR, and the power
management registers specified in Table 12-7 on page 12-16.
b. This column indicates registers in the address range of 0xF04 through 0xFFC.
c. X indicates a Don’t care condition. The outcome does not depend on this condition.
d. OK indicates that the access succeeds.
e. ERR indicates a PSLVERR error response; written value is ignored and reads return an Unpredictable value.
f. The DBGPWRDWNREQ signal is LOW, indicating the processor is powered up.
g. 1 indicates that OSLSR[1] is set to 1.
h. 1 indicates that PRSR[1] is set to 1.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-15
Debug
Table 12-7 shows the behavior of APB slave port accesses to power management
registers with relation to power-down event.
Table 12-7 Power management registers access with relation to power-down event
Conditions Registers
DBGPWRDWNREQ Sticky power down OS Lock OSLSR, PRCR, PRSR OSLAR OSSRR
0d 0 0 OK OK UNP
0 0 1e OK OK OK
0 1f X OK OK UNP
a. X indicates a Don’t care condition. The outcome does not depend on this condition.
b. OK indicates that the access succeeds.
c. UNP indicates that the access has Unpredictable results; reads return an Unpredictable value.
d. The DBGPWRDWNREQ signal is LOW, indicating the processor is powered up.
e. 1 indicates that OSLSR[1] is set to 1.
f. 1 indicates that PRSR[1] is set to 1.
Table 12-8 shows the behavior of APB slave port accesses to ETM and CTI registers
with relation to power-down event.
Table 12-8 ETM and CTI registers access with relation to power-down event
Conditions Registers
0g 0 OK OK UNP OK OK
0 1h OK OK OK ERR OK
a. This column indicates registers in the address range of 0x000 through 0xF00 except for OSLSR, OSLAR,
and OSSRR registers.
b. This column indicates registers in the address range of 0xF04 through 0xFFC.
c. X indicates a Don’t care condition. The outcome does not depend on this condition.
12-16 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Note
The ETMPWRDWNREQ signal is not present if the processor is configured without
the ETM.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-17
Debug
Term Description
RW Read or write.
SBZ Should Be Zero (SBZ). Should be written as zero (or all 0s for bit fields) by software. Non-zero values produce
Unpredictable results.
SBZP Should Be Zero or Preserved (SBZP). Should be written as zero (or all 0s for bit fields) or preserved by writing
the same value that has been previously read from the same fields on the same processor.
To access the CP14 debug registers you set Opcode_1 to 0. The rest of the fields of the
coprocessor instruction determine the debug register being accessed.
CRn Op1 CRm Op2 CP14 debug register name Abbreviation Reference
c2 0 c0 0 Debug Self Address Offset Register DSAR CP14 c0, Debug Self
Address Offset Register
on page 12-22
c3-c15 0 c0 0 Reserved - -
12-18 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
CRn Op1 CRm Op2 CP14 debug register name Abbreviation Reference
c0 0 c1 0 Debug Status and Control Register DSCR CP14 c1, Debug Status
and Control Register on
page 12-23
c1-c15 0 c1 0 Reserved - -
The DIDR is a read-only register that identifies the debug architecture version and
specifies the number of debug resources that the processor implements.
'HEXJDUFKLWHFWXUHYHUVLRQ
5HVHUYHG
6HFXULW\H[WHQVLRQV
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-19
Debug
Table 12-11 shows how the bit values correspond with the Debug ID Register functions.
[23:20] Context Number of Breakpoint Register Pairs with context ID comparison capability:
b0000 = 1 BRP has context ID comparison capability
b0001 = 2 BRPs have context ID comparison capability
...
b1111 = 16 BRPs have context ID comparison capability.
For the processor, this field reads b0001 to indicate 2 BRPs have context ID
capability.
[15:13} - RAZ.
12-20 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
[11:8] - RAZ.
The values of the following fields of the Debug ID Register agree with the values in
CP15 c0, Main ID Register:
• DIDR[3:0] is the same as CP15 c0 bits [3:0]
• DIDR[7:4] is the same as CP15 c0 bits [23:20].
The Debug ROM Address Register is a read-only register that returns a 32-bit Debug
ROM Address Register value. This is the physical address that indicates where in
memory a debug monitor can locate the debug bus ROM specified by the CoreSight™
multiprocessor trace and debug architecture. This ROM holds information about all the
components in the debug bus. You can configure the address read in this register using
DBGROMADDR[31:12] and DBGROMADDRV inputs. DBGROMADDRV must
be tied off to 1 if DBGROMADDR[31:12] is tied off to a valid value.
Figure 12-3 on page 12-22 shows the bit arrangement of the Debug ROM Address
Register.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-21
Debug
'HEXJEXV520SK\VLFDODGGUHVV 5HVHUYHG
9DOLGELWV
Table 12-12 shows how the bit values correspond with the Debug ROM Address
Register functions.
[31:12] Debug bus ROM Indicates bits [31:12] of the debug bus ROM physical address.
physical address
[1:0] Valid bits Reads 2'b11 if DBGROMADDRV is set to 1, reads 2'b00 otherwise. DBGROMADDRV
must be set to 1 if DBGROMADDR[31:12] is set to a valid value.
The Debug Self Address Offset Register is a read-only register that returns a 20-bit
offset value from the Debug ROM Address Register to the physical address of the
processor debug registers. The address read from this register depends on the
DBGSELFADDR[31:12] and DBGSELFADDRV inputs. DBGSELFADDRV must
be tied off to 1 if DBGSELFADDR[31:12] is tied off to a valid value.
Figure 12-4 on page 12-23 shows the bit arrangement of the Debug Self Address Offset
Register.
12-22 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
'HEXJEXVVHOIDGGUHVVRIIVHWYDOXH 5HVHUYHG
9DOLGELWV
Table 12-13 shows how the bit values correspond with the Debug Self Address Offset
Register functions.
[31:12] Debug bus Indicates bits [31:12] of the 2’s complement offset from the debug ROM physical address
self-address to the physical address of the start of the region where the debug registers are mapped. The
offset value value read by this field corresponds to the value of DBGSELFADDR[31:12].
[1:0] Valid bits Reads 2'b11 if DBGSELFADDRV is set to 1, reads 2'b00 otherwise. DBGSELFADDRV
must be set to 1 if DBGSELFADDR[31:12] is set to a valid value.
To access the Debug Self Address Offset Register, read CP14 c0 with:
MRC p14, 0, <Rd>, c2, c0, 0 ; Read Debug Self Address Offset Register
The DSCR is a read/write register that contains status and control information about the
debug unit. Figure 12-5 on page 12-24 shows the bit arrangement of the DSCR.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-23
Debug
(QWU\
&RUHKDOWHG
&RUHUHVWDUWHG
6WLFN\SUHFLVHDERUW
6WLFN\LPSUHFLVHDERUW
6WLFN\8QGHILQHG
5HVHUYHG
'EJ$FN
,QWHUUXSWGLVDEOH
&3XVHUDFFHVVGLVDEOH
([HFXWHLQVWUXFWLRQHQDEOH
+DOWLQJGHEXJPRGH
0RQLWRUGHEXJPRGH
6HFXUHSULYLOHJHGLQYDVLYHGHEXJGLVDEOHG
6HFXUHSULYLOHJHGQRQLQYDVLYHGHEXJGLVDEOHG
1RQVHFXUHZRUOGVWDWXV
'LVFDUGLPSUHFLVHDERUW
'75DFFHVVPRGH
5HVHUYHG
,QVWU&RPSOBO
6WLFN\SLSHOLQHDGYDQFH
'757;IXOOBO
'755;IXOOBO
5HVHUYHG
'757;IXOO
'755;IXOO
5HVHUYHG
12-24 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Table 12-14 shows how the bit values correspond with the Debug Status and Control
Register functions.
[27] DTRRXfull_l The latched DTRRXfull flag. This flag is read in one of the following ways:
• using CP14 instruction
• using the DSCR memory address
• using the OSSRR memory address.
CP14 instruction returns an Unpredictable value for this bit.
DSCR memory address returns the same value as DTRRXfull.
OSSRR memory address returns the latched DTRRXfull value, that is, the value of
DTRRXfull that the processor captured on the last DSCR memory address read.
If a write to the DTRRX APB address succeeds, DTRRXfull_l is set to 1.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-25
Debug
Table 12-14 Debug Status and Control Register bit functions (continued)
[26] DTRTXfull_l The latched DTRTXfull flag. This flag is read in one of the following ways:
• using CP14 instruction
• using the DSCR memory address
• using the OSSRR memory address.
CP14 instruction returns an Unpredictable value for this bit.
DSCR memory address returns the same value as DTRTXfull.
OSSRR memory address returns the latched DTRTXfull value, that is, the value of
DTRTXfull that the processor captured on the last DSCR memory address read.
If a read to the DTRTX APB address succeeds, DTRTXfull_l is cleared.
[25] Sticky Sticky pipeline advance bit. This bit enables the debugger to detect whether the processor is
pipeline idle. In some situations, this might mean that the system bus port is deadlock. This bit is set
advance to 1 every time the processor pipeline retires one instruction. A write to DRCR[3] clears this
bit. See Debug Run Control Register on page 12-38.
0 = no instruction has completed execution since the last time this bit was cleared, reset value
1 = an instruction has completed execution since the last time this bit was cleared.
[24] InstrCompl_l The latched InstrCompl flag. This flag is read in one of the following ways:
• using CP14 instruction
• using the DSCR memory address
• using the OSSRR memory address.
CP14 instruction returns an Unpredictable value for this bit.
DSCR memory address returns the same value as InstrCompl.
OSSRR memory address returns the latched InstrCompl value, that is, the value of
InstrCompl that the processor captured on the last DSCR memory address read.
If a write to the ITR APB address succeeds while in Stall or Nonblocking mode,
InstrCompl_l and InstrCompl are cleared.
If a write to the DTRRX APB address or a read to the DTRTX APB address succeeds while
in Fast mode, InstrCompl_l and InstrCompl are cleared.
InstrCompl is the instruction complete bit. This internal flag determines whether the
processor has completed execution of an instruction issued through the APB port.
0 = the processor is currently executing an instruction fetched from the ITR Register, reset
value
1 = the processor is not currently executing an instruction fetched from the ITR Register.
12-26 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Table 12-14 Debug Status and Control Register bit functions (continued)
[21:20] DTR access DTR access mode. This is a read/write field. You can use this field to optimize DTR traffic
mode between a debugger and the processor:
b00 = Nonblocking mode, reset value
b01 = Stall mode
b10 = Fast mode
b11 = reserved.
Note
• This field only affects the behavior of DSCR, DTR, and ITR accesses through the
APB port, and not through CP14 debug instructions.
• Nonblocking mode is the default setting. Improper use of the other modes might result
in the debug access bus becoming jammed.
[19] Discard Discard imprecise abort. This read-only bit is set while the processor is in debug state and is
imprecise cleared on exit from debug state. While this bit is set, the processor does not record imprecise
abort Data Aborts. However, the sticky imprecise Data Abort bit is set to 1.
0 = imprecise Data Aborts not discarded, reset value
1 = imprecise Data Aborts discarded.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-27
Debug
Table 12-14 Debug Status and Control Register bit functions (continued)
[15] Monitor The Monitor debug-mode enable bit. This is a read/write bit.
debug-mode 0 = Monitor debug-mode disabled, reset value
1 = Monitor debug-mode enabled.
If Halting debug-mode is enabled, bit [14] is set, then the processor is in Halting debug-mode
regardless of the value of bit [15]. If the external interface input DBGEN is LOW, DSCR[15]
reads as 0. If DBGEN is HIGH, then the read value reverts to the programmed value.
[14] Halting The Halting debug-mode enable bit. This is a read/write bit.
debug-mode 0 = Halting debug-mode disabled, reset value
1 = Halting debug-mode enabled.
If the external interface input DBGEN is LOW, DSCR[14] reads as 0. If DBGEN is HIGH,
then the read value reverts to the programmed value.
[13] Execute Execute ARM instruction enable bit. This is a read/write bit.
instruction 0 = disabled, reset value
enable 1 = enabled.
If this bit is set and an ITR write succeeds, the processor fetches an instruction from the ITR
for execution. If this bit is set to 1 when the processor is not in debug state, the behavior of
the processor is Unpredictable.
[12] CP14 user CP14 debug user access disable control bit. This is a read/write bit.
access disable 0 = CP14 debug user access enable, reset value
1 = CP14 debug user access disable.
If this bit is set and a User mode process tries to access any CP14 debug registers, the
Undefined instruction exception is taken.
[10] DbgAck Debug Acknowledge bit. This is a read/write bit. If this bit is set to 1, both the DBGACK
and DBGTRIGGER output signals are forced HIGH, regardless of the processor state. The
external debugger can use this bit if it wants the system to behave as if the processor is in
debug state. Some systems rely on DBGACK to determine whether the application or
debugger generates the data accesses. The reset value is 0.
12-28 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Table 12-14 Debug Status and Control Register bit functions (continued)
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-29
Debug
Table 12-14 Debug Status and Control Register bit functions (continued)
To access the Debug Status and Control Register, read or write CP14 c1 with:
MRC p14, 0, <Rd>, c0, c1, 0 ; Read Debug Status and Control Register
MCR p14, 0, <Rd>, c0, c1, 0 ; Write Debug Status and Control Register
12-30 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
You can use the DTR access mode field to optimize data transfer between a debugger
and the processor.
In Nonblocking mode, the APB reads from the DTRTX and writes to the DTRRX and
ITR are ignored if the appropriate READY flag is not set. In particular:
The debugger accessing these registers must first read the DSCR, and perform any of
the following:
• write to the DTRRX if the DTRRXfull_l flag was cleared
• write to the ITR if the InstrCompl_l flag was set
• read from the DTRTX if the DTRTXfull_l flag was set.
Failure to read the DSCR before one of these operations leads to Unpredictable
behavior.
In Stall mode, the APB accesses to DTRRX, DTRTX, and ITR stall under the following
conditions:
• writes to DTRRX are stalled until DTRRXfull is cleared
• writes to ITR are stalled until InstrCompl is set
• reads from DTRTX are stalled until DTRTXfull is set.
Fast mode is similar to Stall mode except that in Fast mode, the processor fetches an
instruction from the ITR when a DTRRX write or DTRTX read succeeds. In Stall mode
and Nonblocking mode, the processor fetches an instruction from the ITR when an ITR
write succeeds.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-31
Debug
See Debug communications channel on page 12-99 for details on the use of these
registers with the DTRRXfull and DTRTXfull flags. Figure 12-6 shows the bit
arrangement of both the DTRRX and DTRTX.
'DWD
Table 12-15 shows how the bit values correspond with the DTRRX and DTRTX
functions.
[31:0] - Data Transfer Register - receive (read-only for the CP14 interface).
Note
Reads of the DTRRX through the coprocessor interface cause the DTRRXfull flag to be cleared.
However, reads of the DTRRX through the APB port do not affect this flag.
[31:0] - Data Transfer Register - transmit (write-only for the CP14 interface).
Note
Writes to the DTRTX through the coprocessor interface cause the DTRTXfull flag to be set. However,
writes to the DTRTX through the APB port do not affect this flag.
12-32 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
The WFAR is a read/write register that holds the virtual address of the instruction that
triggers the watchpoint.
Table 12-16 shows how the bit values correspond with the WFAR functions.
[31:1] - Virtual address of the watchpointed instruction. When a watchpoint occurs in ARM state, the WFAR
contains the address of the instruction causing it plus 0x8. When a watchpoint occurs in Thumb state,
the address is plus 0x4. The reset value is Unpredictable.
The processor supports efficient exception vector catching. This is controlled by the
read/write Vector Catch Register as Figure 12-7 shows.
1RQVHFXUHZRUOG 6HFXUHZRUOG
5HVHUYHG
If one of the bits in this register is set and the corresponding vector is committed for
execution, then the processor either enters debug state or takes a debug exception.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-33
Debug
Note
• Under this model, any kind of prefetch of an exception vector can trigger a vector
catch, not only the ones caused by exception entries. An explicit branch to an
exception vector might generate a vector catch debug event.
• Catches because of bits [15:0] are only triggered when the processor is in secure
state or in Monitor mode. Catches because of bits [31:25] are only triggered when
the processor is in nonsecure state and not in Monitor mode.
• If bit [28], [27], [12], [11], [4], or [3] is set while the processor is in Monitor debug
mode, then the processor ignores the setting and does not generate a vector catch
debug event. This prevents the processor to enter an unrecoverable state. The
debugger must program these bits to zero when Monitor debug mode is selected
and enabled to ensure forward-compatibility.
Table 12-17 shows the bit field definitions of the Vector Catch Register. In this table,
VBAR is the CP15 Vector Base Address Register for secure, VBARNS is CP15 Vector
Base Address Register for nonsecure, and MVBAR is CP15 Monitor Vector Base
Address Register.
[31] RW VBARNS+0x0000001C 0xFFFF001C Vector catch enable, FIQ in Nonsecure state. The reset
value is 0.
[30] RW VBARNS+0x00000018 0xFFFF0018 Vector catch enable, IRQ in Nonsecure state. The reset
value is 0.
[28] RW VBARNS+0x00000010 0xFFFF0010 Vector catch enable, Data Abort in Nonsecure state. The
reset value is 0.
[27] RW VBARNS+0x0000000C 0xFFFF000C Vector catch enable, Prefetch Abort in Nonsecure state.
The reset value is 0.
[26] RW VBARNS+0x00000008 0xFFFF0008 Vector catch enable, SWI in Nonsecure state. The reset
value is 0.
12-34 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
[15] RW MVBAR+0x0000001C MVBAR+0x0000001C Vector catch enable, FIQ in Secure state. The reset value
is 0.
[14] RW MVBAR+0x00000018 MVBAR+0x00000018 Vector catch enable, IRQ in Secure state. The reset
value is 0.
[12] RW MVBAR+0x00000010 MVBAR+0x00000010 Vector catch enable, Data Abort in Secure state. The
reset value is 0.
[11] RW MVBAR+0x0000000C MVBAR+0x0000000C Vector catch enable, Prefetch Abort in Secure state. The
reset value is 0.
[10] RW MVBAR+0x00000008 MVBAR+0x00000008 Vector catch enable, SMI in Secure state. The reset
value is 0.
[7] RW VBAR+0x0000001C 0xFFFF001C Vector catch enable, FIQ in Secure state. The reset value
is 0.
[6] RW VBAR+0x00000018 0xFFFF0018 Vector catch enable, IRQ in Secure state. The reset
value is 0.
[4] RW VBAR+0x00000010 0xFFFF0010 Vector catch enable, Data Abort in Secure state. The
reset value is 0.
[3] RW VBAR+0x0000000C 0xFFFF000C Vector catch enable, Prefetch Abort in Secure state. The
reset value is 0.
[2] RW VBAR+0x00000008 0xFFFF0008 Vector catch enable, SWI in Secure state. The reset
value is 0.
[0] RW 0x00000000 0xFFFF0000 Vector catch enable, Reset. The reset value is 0.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-35
Debug
The ECR enables the external debugger or debug monitor to configure the debug logic
to trigger a debug state or debug exception entry on certain events.
5HVHUYHG
26XQORFNFDWFK
Table 12-18 shows how the bit values correspond with the Event Catch Register
functions.
The DSCCR controls both L1 and L2 cache behavior while the processor is in debug
state.
Figure 12-9 on page 12-37 shows the bit arrangement of the DSCCR.
See Cache debug on page 12-90 for information on the usage model of the DSCCR
register.
12-36 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
5HVHUYHG
1RWZULWHWKURXJK
5HVHUYHG
'DWDDQGXQLILHGFDFKHOLQHILOO
Table 12-19 shows how the bit values correspond with the Debug State Cache Control
Register functions.
The ITR enables the external debugger to feed instructions into the core for execution
while in debug state. The ITR is a write-only register. Reads from the ITR return an
Unpredictable value.
31 0
Data
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-37
Debug
Table 12-20 shows how the bit values correspond with the Instruction Transfer Register
functions.
[31:0] - Indicates an ARM instruction for the processor to execute while in debug state. The reset value is
Unpredictable.
Note
Writes to the ITR when the processor is not in debug state or the DSCR[13] execute instruction enable
bit is cleared are Unpredictable.
The DRCR requests the processor to enter or leave debug state. It also clears the sticky
exception bits present in the DSCR.
5HVHUYHG
&OHDUVWLFN\SLSHOLQHDGYDQFH
&OHDUVWLFN\H[FHSWLRQV
5HVWDUWUHTXHVW
+DOWUHTXHVW
12-38 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Table 12-21 shows how the bit values correspond with the Debug Run Control Register
functions.
[3] Clear sticky Clear sticky pipeline advance. Writing a 1 to this bit clears DSCR[25].
pipeline advance
[2] Clear sticky Clear sticky exceptions. Writing a 1 to this bit clears DSCR[8:6].
exceptions
[1] Restart request Restart request. Writing a 1 to this bit requests that the processor leaves debug state. This
request is held until the processor exits debug state. The debugger must poll DSCR[1] to
determine when this request succeeds. This bit always reads as zero. Writes are ignored
when the processor is not in debug state.
[0] Halt request Halt request. Writing a 1 to this bit triggers a halting debug event, that is, a request that the
processor enters debug state. This request is held until the debug state entry occurs. The
debugger must poll DSCR[0] to determine when this request succeeds. This bit always reads
as zero. Writes are ignored when the processor is already in debug state.
The BVRs are registers 64-79, at offsets 0x100-0x13C. Each BVR is associated with a
Breakpoint Control Register (BCR), for example:
• BVR0 with BCR0
• BVR1 with BCR1.
A pair of breakpoint registers, BVRn and BCRn, is called a Breakpoint Register Pair
(BRPn).
For an IVA and context ID pair, two BRPs must be linked. A debug event is generated
when both the IVA and the context ID pair match at the same time.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-39
Debug
Table 12-22 shows how the bit values correspond with the Breakpoint Value Registers
functions.
Note
• Only BRP4 and BRP5 support context ID comparison.
• The context ID value for a BVR to match with is given by the contents of the
CP15 Context ID Register. See Chapter 3 System Control Coprocessor for
information on the Context ID Register.
The BCR is a read/write register that contains the necessary control bits for setting:
• breakpoints
• linked breakpoints.
%\WH
%UHDNSRLQW
0 /LQNHG%53 5HVHUYHG DGGUHVV 6 %
DGGUHVVPDVN
VHOHFW
12-40 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Table 12-23 shows how the bit values correspond with the Breakpoint Control Registers
functions.
[28:24] Breakpoint Breakpoint address mask. This field is used to set a breakpoint on a range of addresses by
address mask masking lower order address bits out of the breakpoint comparison.a
b00000 = no mask
b00001 = reserved
b00010 = reserved
b00011 = 0x00000007 mask for instruction address
b00100 = 0x0000000F mask for instruction address
b00101 = 0x0000001F mask for instruction address
...
b11111 = 0x7FFFFFFF mask for instruction address.
[19:16] Linked BRP Linked BRP number. The binary number encoded here indicates another BRP to link this one
with.
Note
• if a BRP is linked with itself, it is Unpredictable whether a breakpoint debug event is
generated
• if this BRP is linked to another BRP that is not configured for linked context ID
matching, it is Unpredictable whether a breakpoint debug event is generated.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-41
Debug
[15:14] Secure state Secure state access control. This field enables the breakpoint to be conditional on the
access control security state of the processor.
b00 = breakpoint matches in both Secure and Nonsecure state
b01 = breakpoint only matches in Nonsecure state
b10 = breakpoint only matches in Secure state
b11 = reserved.
[8:5] Byte address Byte address select. For breakpoints programmed to match an IVA, you must write a
select word-aligned address to the BVR. You can then use this field to program the breakpoint so
it hits only if you access certain byte addresses.
If you program the BRP for IVA match:
b0000 = the breakpoint never hits
b0011 = the breakpoint hits if any of the two bytes starting at address BVR & 0xFFFFFFFC +0
is accessed
b1100 = the breakpoint hits if any of the two bytes starting at address BVR & 0xFFFFFFFC +2
is accessed
b1111 = the breakpoint hits if any of the four bytes starting at address BVR & 0xFFFFFFFC +0
is accessed.
If you program the BRP for IVA mismatch, the breakpoint hits where the corresponding IVA
breakpoint does not hit, that is, the range of addresses covered by an IVA mismatch
breakpoint is the negative image of the corresponding IVA breakpoint.
If you program the BRP for context ID comparison, this field must be set to b1111.
Otherwise, breakpoint and watchpoint debug events might not be generated as expected.
Note
Writing a value to BCR[8:5] where BCR[8] is not equal to BCR[7], or BCR[6] is not equal
to BCR[5], has Unpredictable results.
12-42 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
[2:1] S Supervisor access control. The breakpoint can be conditioned on the mode of the processor.
b00 = User, System, or Supervisor
b01 = privileged
b10 = User
b11 = any.
BVR[22:20] Meaning
b000 The corresponding BVR[31:2] is compared against the IVA bus and the state of the processor against this
BCR. It generates a breakpoint debug event on a joint IVA and state match.
b001 The corresponding BVR[31:2] is compared against the IVA bus and the state of the processor against this
BCR. This BRP is linked with the one indicated by BCR[19:16] linked BRP field. They generate a
breakpoint debug event on a joint IVA, context ID, and state match.
b010 The corresponding BVR[31:0] is compared against CP15 Context ID Register, c13 and the state of the
processor against this BCR. This BRP is not linked with any other one. It generates a breakpoint debug
event on a joint context ID and state match. For this BRP, BCR[8:5] must be set to b1111. Otherwise, it
is Unpredictable whether a breakpoint debug event is generated.
b011 The corresponding BVR[31:0] is compared against CP15 Context ID Register, c13. This BRP links
another BRP (of the BCR[21:20]=b01 type), or WRP (with WCR[20]=b1). They generate a breakpoint
or watchpoint debug event on a joint IVA or DVA and context ID match. For this BRP, BCR[8:5] must
be set to b1111, BCR[15:14] must be set to b00, and BCR[2:1] must be set to b11. Otherwise, it is
Unpredictable whether a breakpoint debug event is generated.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-43
Debug
BVR[22:20] Meaning
b100 The corresponding BVR[31:2] and BCR[8:5] are compared against the IVA bus and the state of the
processor against this BCR. It generates a breakpoint debug event on a joint IVA mismatch and state
match.
b101 The corresponding BVR[31:2] and BCR[8:5] are compared against the IVA bus and the state of the
processor against this BCR. This BRP is linked with the one indicated by BCR[19:16] linked BRP field.
It generates a breakpoint debug event on a joint IVA mismatch, state and context ID match.
The WVRs are registers 96-111, at offsets 0x180-0x1BC. Each WVR is associated with a
Watchpoint Control Register (WCR), for example:
• WVR0 with WCR0
• WVR1 with WCR1.
A pair of watchpoint registers, WVRn and WCRn, is called a Watchpoint Register Pair
(WRPn).
The watchpoint value contained in the WVR always corresponds to a Data Virtual
Address (DVA) and can be set either on:
• a DVA
• a DVA and context ID pair.
For a DVA and context ID pair, a WRP and a BRP with context ID comparison
capability must be linked. A debug event is generated when both the DVA and the
context ID pair match simultaneously. Table 12-25 shows how the bit values correspond
with the Watchpoint Value Registers functions.
12-44 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Figure 12-13 shows the bit arrangement of the Watchpoint Control Registers.
:DWFKSRLQW
( /LQNHG%53 %\WHDGGUHVVVHOHFW /6 63 :
DGGUHVVPDVN
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-45
Debug
Table 12-26 shows how the bit values correspond with the Watchpoint Control
Registers functions.
[28:24] Watchpoint Watchpoint address mask. This field is used to watch a range of addresses by masking lower
address mask order address bits out of the watchpoint comparison.
b00000 = no mask
b00001 = reserved
b00010 = reserved
b00011 = 0x00000007 mask for data address
b00100 = 0x0000000F mask for data address
b00101 = 0x0000001F mask for data address
...
b11111 = 0x7FFFFFFF mask for data address.
Note
• If WCR[28:24] is not set to b00000, then WCR[12:5] must be set to b11111111.
Otherwise, the behavior is Unpredictable.
• If WCR[28:24] is not set to b00000, then the corresponding WVR bits that are not being
included in the comparison Should Be Zero. Otherwise, the behavior is Unpredictable.
• To watch for a write to any byte in an 8-byte aligned object of size 8 bytes, ARM
recommends that a debugger sets WCR[28:24] to b00111, and WCR[12:5] to
b11111111. This is compatible with both ARMv7 debug compliant implementations
that have an eight-bit WCR[12:5] and with those that have a four-bit WCR[8:5] byte
address select field.
[19:16] Linked BRP Linked BRP number. The binary number encoded here indicates a context ID holding BRP to
link this WRP with. If this WRP is linked to a BRP that is not configured for linked context ID
matching, it is Unpredictable whether a watchpoint debug event is generated.
12-46 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
[15:14] Secure state Secure state access control. This field enables the watchpoint to be conditioned on the security
access state of the processor.
control b00 = watchpoint matches in both Secure and Nonsecure state
b01 = watchpoint only matches in Nonsecure state
b10 = watchpoint only matches in Secure state
b11 = reserved.
[12:5] Byte address Byte address select. The WVR is programmed with word-aligned address. You can use this
select field to program the watchpoint so it only hits if certain byte addresses are accessed.
For word-aligned addresses, WVRn[2]=1 indicates a 32-bit aligned address:
b00000000 = the watchpoint never hits
b0000xxx1 = the watchpoint hits if the byte at address (WVR & 0xFFFFFFFC)+0 is accessed
b0000xx1x = the watchpoint hits if the byte at address (WVR & 0xFFFFFFFC)+1 is accessed
b0000x1xx = the watchpoint hits if the byte at address (WVR & 0xFFFFFFFC)+2 is accessed
b00001xxx = the watchpoint hits if the byte at address (WVR & 0xFFFFFFFC)+3 is accessed
bxxx1xxxx = UNPREDICTABLE
bxx1xxxxx = UNPREDICTABLE
bx1xxxxxx = UNPREDICTABLE
b1xxxxxxx = UNPREDICTABLE
For double word-aligned addresses, WVRn[2]=0 indicates a 64-bit aligned address:
b00000000 = the watchpoint never hits
bxxxxxxx1 = the watchpoint hits if the byte at address (WVR & 0xFFFFFFFC) +0 is accessed
bxxxxxx1x = the watchpoint hits if the byte at address (WVR & 0xFFFFFFFC) +1 is accessed
bxxxxx1xx = the watchpoint hits if the byte at address (WVR & 0xFFFFFFFC) +2 is accessed
bxxxx1xxx = the watchpoint hits if the byte at address (WVR & 0xFFFFFFFC) +3 is accessed
bxxx1xxxx = the watchpoint hits if the byte at address (WVR & 0xFFFFFFF8) +4 is accessed
bxx1xxxxx = the watchpoint hits if the byte at address (WVR & 0xFFFFFFF8) +5 is accessed
bx1xxxxxx = the watchpoint hits if the byte at address (WVR & 0xFFFFFFF8) +6 is accessed
b1xxxxxxx = the watchpoint hits if the byte at address (WVR & 0xFFFFFFF8) +7 is accessed.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-47
Debug
[4:3] L/S Load/store access. The watchpoint can be conditioned to the type of access being done.
b00 = reserved
b01 = load, load exclusive, or swap
b10 = store, store exclusive or swap
b11 = either.
SWP and SWPB trigger a watchpoint on b01, b10, or b11. A load exclusive instruction triggers
a watchpoint on b01 or b11. A store exclusive instruction triggers a watchpoint on b10 or b11
only if it passes the local monitor within the processor.a
[2:1] S Privileged access control. The watchpoint can be conditioned to the privilege of the access
being done:
b00 = reserved
b01 = privileged, match if the processor does a privileged access to memory
b10 = User, match only on nonprivileged accesses
b11 = either, match all accesses.
Note
For all cases, the match refers to the privilege of the access, not the mode of the processor.
The OSLAR is a write-only register that locks the debug registers so that the APB slave
port returns a slave-generated error response for accesses to locked registers. This is
useful for the OS to interrupt the debug session cleanly when it wants to save the state
of the debug registers.
Figure 12-14 shows the bit arrangement of the OS Lock Access Register.
26ORFNDFFHVV
12-48 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Table 12-27 shows how the bit values correspond with the OS Lock Access Register
functions.
[31:0] OS lock access OS lock access. Writing a 0xC5ACCE55 key locks the debug registers. Access to locked registers
returns a slave-generated error response. To unlock the registers, write any other value.
Note
Writing the key also resets the Operating System Save and Restore Register (OSSRR)
sequence to the beginning.
The OSLSR contains status information about the locked debug registers.
5HVHUYHG
ELWDFFHVV
/RFNELW
/RFNLPSOHPHQWHGELW
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-49
Debug
Table 12-28 shows how the bit values correspond with the OS Lock Status Register
functions.
[31:3] - RAZ.
[2] 32-bit access Indicates that a 32-bit access is required to write the key to the OS Lock Access
Register. This bit always reads 0.
[0] Lock implemented bit Lock implemented bit. It indicates that the OS lock functionality is implemented. This
bit always reads 1.
The OSSRR is a 32-bit read/write register that enables an operating system to save
(prior to power-up) or restore (after power-down) those debug registers that reside on
the core power domain while the OS lock is set.
26VDYHDQGUHVWRUH
Table 12-29 on page 12-51 shows how the bit values correspond with the OS Save and
Restore Register functions.
12-50 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
[31:0] OS save and OS save and restore. A sequence of reads from this register returns the contents of all the
restore registers that can be saved. A sequence of writes restores the saved values. The OS must initiate
the sequence by writing a 0xC5ACCE55 key to the OSLAR to set the internal pointer to the starting
value. This is followed by a read from the OSSRR, and then followed by a series of reads or
writes. The first OSSRR read returns the length of the rest of the sequence, that is, the number
of registers to be saved or restored.
These registers are saved and restored in the following order:
1. WCR1
2. WCR0
3. WVR1
4. WVR0
5. BCR5
6. BCR4
7. BCR3
8. BCR2
9. BCR1
10. BCR0
11. BVR5
12. BVR4
13. BVR3
14. BVR2
15. BVR1
16. BVR0
17. DTRTX
18. DSCR
19. DTRRX
20. DSCCR
21. VCR
22. WFAR.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-51
Debug
Note
• If the OS issues a write to the OSSRR after the sequence has been initialized by
writing the key to the OSLAR, the behavior is Unpredictable.
• Subsequent accesses after reading the length of the sequence must be either all
reads or all writes. If the OS mixes reads and writes, the result is Unpredictable.
Additionally, if the OS performs more accesses than registers are in the sequence,
the result is also Unpredictable.
• This process restores only writable bits. Readable bits such as flags that reflect
the processor state, are not updated. This means that, after the restore sequence,
the readable bits indicate the current state of the processor rather than the state of
the processor at the time the OS saved them. The only exceptions to this rule are
the DSCR[30:29] and DSCR[27:26] bits, these can be restored.
• DTRRX writes and DTRTX reads through the OSSRR do not cause the APB port
to stall regardless of the value of the DSCR[22:21] field.
• The sequence can be abandoned and restarted from the beginning by writing the
key again to the OSLAR. However, the results of accesses issued before it was
abandoned are committed.
• If this register is read or written while the core is powered-down or the OS lock is
not set, the results are Unpredictable.
The PRCR is a read/write register that controls reset and power-down related
functionality.
5HVHUYHG
+ROGLQWHUQDOUHVHW
5HVHUYHG
1RSRZHUGRZQ
12-52 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Table 12-30 shows how the bit values correspond with the Device Power Down and
Reset Control Register functions.
[2] Hold internal reset Hold internal reset bit. This bit prevents the processor from running again before the
debugger detects a power-down event and restores the state of the debug registers in the
core power domain. This bit is also used to detect a reset (ARESETn) event. By
examining PRSR[1], the debugger can determine whether a power-down or a reset event
occurred. The effect of this bit is that if it is set to 1 and a processor reset occurs,
ARESETn or nPORESET, then the processor behaves as if ARESETn is still asserted,
until the debugger clears PRCR[2]. This bit does not have any effect on initial system
power up as PRESETn clears it.
0 = does not hold internal reset on power up or reset, reset value
1 = holds the processor nondebug logic in reset on power up or reset until this bit is cleared.
[0] No power down No power down. When set to 1, the DBGNOPWRDWN output signal is HIGH. This
output is connected to the system power controller and is interpreted as a request to operate
in emulate mode. In this mode, the core and ETM are not actually powered down when
requested by software or hardware handshakes. This mode is useful when debugging
applications on top of working operating systems.
0 = DBGNOPWRDWN is LOW, reset value
1 = DBGNOPWRDWN is HIGH.
The PRSR is a read-only register that provides information about the reset and
power-down state of the processor.
Figure 12-18 on page 12-54 shows the bit arrangement of the PRSR.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-53
Debug
5HVHUYHG
6WLFN\UHVHWVWDWXV
5HVHWVWDWXV
6WLFN\SRZHUGRZQVWDWXV
3RZHUGRZQVWDWXV
Table 12-31 shows how the bit values correspond with the PRSR functions.
[3] Sticky reset status Sticky reset status bit. This bit is cleared on read.
0 = the processor has not been reset since the last time this register was read
1 = the processor has been reset since the last time this register was read.
This sticky bit is set to 1 when either ARESETn or nPORESET is asserted.
This sticky bit is set to 0 when PRESETn is asserted.
If both PRESETn and ARESETn or nPORESET are asserted at the same time,
this bit is set to an Unpredictable value.
[1] Sticky power-down status Sticky power-down status bit. This bit is cleared on read.
0 = the processor has not powered down since the last time this register was read
1 = the processor has powered down since the last time this register was read. This
is the reset value.
[0] Power-down status Power-down status bit. This status bit reflects the invert value of the
DBGPWRDWNREQ input.
0 = the core is not powered up
1 = the core is powered up.
12-54 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Note
On system reset, PRSR[1] resets to 1. Table 12-6 on page 12-15 specified that if
PRSR[1] is set to 1, then accessing any register in the core power domain results in an
error response. For these reasons, the debugger cannot access any register in the core
power domain unless the debugger clears PRSR[1].
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-55
Debug
Table 12-32 shows the contents of the Management registers for the debug unit.
Register Power
Offset (hex) Access Mnemonic Description
number domain
0xFA0 1000 RW CLAIMSET Debug Claim Tag Set Register. See Claim Tag Set
Register on page 12-63.
0xFA4 1001 RW CLAIMCLR Debug Claim Tag Clear Register. See Claim Tag
Clear Register on page 12-64.
0xFB0 1004 W LOCKACCESS Debug Lock Access Register. See Lock Access
Register on page 12-65.
0xFB4 1005 R LOCKSTATUS Debug Lock Status Register. See Lock Status
Register on page 12-65.
12-56 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Register Power
Offset (hex) Access Mnemonic Description
number domain
0xFCC 1011 R DEVTYPE Debug Device Type Register. See Device Type
Register on page 12-67.
The Processor ID Registers are read-only registers that return the same values as the
corresponding CP15 registers.
Table 12-33 shows the offset value, register number, mnemonic, and description that are
associated with each Process ID Register.
Register
Offset (hex) Mnemonic Function
number
0xD00 832 CPUID Main ID Register, see c0, Main ID Register on page 3-24
0xD04 833 CTYPR Cache Type Register, see c0, Cache Type Register on page 3-26
0xD0C 835 TTYPR TLB Type Register, see c0, TLB Type Register on page 3-27
0xD20 840 ID_PFR0 Processor Feature Register 0, see c0, Processor Feature Register 0 on
page 3-30
0xD24 841 ID_PFR1 Processor Feature Register 1, see c0, Processor Feature Register 1 on
page 3-31
0xD28 842 ID_DFR0 Debug Feature Register 0, see c0, Debug Feature Register 0 on page 3-32
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-57
Debug
Register
Offset (hex) Mnemonic Function
number
0xD2C 843 ID_AFR0 Auxiliary Feature Register 0, see c0, Auxiliary Feature Register 0 on
page 3-34
0xD30 844 ID_MMFR0 Memory Model Feature Register 0, see c0, Memory Model Feature
Register 0 on page 3-34
0xD34 845 ID_MMFR1 Memory Model Feature Register 1, see c0, Memory Model Feature
Register 1 on page 3-36
0xD38 846 ID_MMFR2 Memory Model Feature Register 2, see c0, Memory Model Feature
Register 2 on page 3-38
0xD3C 847 ID_MMFR3 Memory Model Feature Register 3, see c0, Memory Model Feature
Register 3 on page 3-41
0xD40 848 ID_ISAR0 Instruction Set Attributes Register 0, see c0, Instruction Set Attributes
Register 0 on page 3-42
0xD44 849 ID_ISAR1 Instruction Set Attributes Register 1, see c0, Instruction Set Attributes
Register 1 on page 3-44
0xD48 850 ID_ISAR2 Instruction Set Attributes Register 2, see c0, Instruction Set Attributes
Register 2 on page 3-45
0xD4C 851 ID_ISAR3 Instruction Set Attributes Register 3, see c0, Instruction Set Attributes
Register 3 on page 3-47
0xD50 852 ID_ISAR4 Instruction Set Attributes Register 4, see c0, Instruction Set Attributes
Register 4 on page 3-49
0xD54 853 ID_ISAR5 Instruction Set Attributes Register 5, see c0, Instruction Set Attributes
Registers 5-7 on page 3-50
When the processor is in integration mode, you can use the read/write Integration
Internal Output Control Register to drive certain debug unit outputs to determine how
they are connected to the Cross Triggered Interface (CTI).
Figure 12-19 on page 12-59 shows the bit arrangement of the Integration Internal
Output Control Register.
12-58 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
5HVHUYHG
,QWHUQDO'%*75,**(5
,QWHUQDO'%*5(67$57('
,QWHUQDOQ308,54
,QWHUQDO&2007;
,QWHUQDO&2005;
,QWHUQDO'%*$&.
Table 12-34 shows how the bit values correspond with the Integration Internal Output
Control Register functions.
[5] Internal Internal DBGTRIGGER. This bit drives the internal signal that goes from the debug
DBGTRIGGER unit to the CTI to indicate early entry to the debug state. The reset value is 0.
[4] Internal Internal DBGRESTARTED. This bit drives the internal signal that goes from the
DBGRESTARTED debug unit to the CTI to acknowledge success of a debug restart command. The reset
value is 0.
[3] Internal nPMUIRQ Internal nPMUIRQ. This bit drives the internal signal equivalent to nPMUIRQ that
goes from the debug unit to the CTI. If this bit is set to 1, the corresponding internal
nPMUIRQ signal is asserted, that is, cleared. The reset value is 0.
[2] Internal COMMTX Internal COMMTX. This bit drives the internal signal equivalent to COMMTX that
goes from the debug unit to the CTI. The reset value is 0.
[1] Internal COMMRX Internal COMMRX. This bit drives the internal signal equivalent to COMMRX that
goes from the debug unit to the CTI. The reset value is 0.
[0] Internal DBGACK Internal DBGACK. This bit drives the internal signal equivalent to DBGACK that goes
from the debug unit to the CTI. The reset value is 0.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-59
Debug
Note
Both the DBGTRIGGER and DBGACK signals are asserted on entry to debug state.
The only difference is that DBGTRIGGER is asserted before the implicit Data
Synchronization Barrier (DSB) associated with the debug state entry, while DBGACK
is asserted after the DSB.
When the processor is in integration mode, you can use the read/write Integration
External Output Control Register to drive certain debug unit outputs to determine how
they are connected to other parts of the system.
Figure 12-20 shows the bit arrangement of the Integration External Output Control
Register.
5HVHUYHG
Q'0$(;7(55,54
Q'0$6,54
Q'0$,54
Q308,54
67$1'%<:),
&2007;
&2005;
'%*$&.
12-60 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Table 12-35 shows how the bit values correspond with the Integration External Output
Control Register functions.
[7] nDMAEXTERRIQ nDMAEXTERRIRQ. This signal drives the nDMAEXTERRIRQ output. If this bit is
set to 1, the corresponding internal nDMAEXTERRIRQ signal is asserted, that is,
cleared. The reset value is 0.
[6] nDMASIRQ nDMASIRQ. This signal drives the nDMASIRQ output. If this bit is set to 1, the
corresponding internal nDMASIRQ signal is asserted, that is, cleared. The reset value is
0.
[5] nDMAIRQ nDMAIRQ. This signal drives the nDMAIRQ output. If this bit is set to 1, the
corresponding internal nDMAIRQ signal is asserted, that is, cleared. The reset value is 0.
[4] nPMUIRQ nPMUIRQ. This signal drives the nPMUIRQ output. If this bit is set to 1, the
corresponding internal nPMUIRQ signal is asserted, that is, cleared. The reset value is 0.
[3] STANDBYWFI STANDBYWFI. This signal drives the STANDBYWFI output. The reset value is 0.
[2] COMMTX COMMTX. This signal drives the COMMTX output. The reset value is 0.
[1] COMMRX COMMRX. This signal drives the COMMRX output. The reset value is 0.
[0] DBGACK DBGACK. This signal drives the DBGACK output. The reset value is 0.
When the processor is in integration mode, you can use the read-only Integration Input
Status Register to read the state of the debug unit inputs to determine how they are
connected to the CTI and to other parts of the system.
Figure 12-21 on page 12-62 shows the bit arrangement of the Integration Input Status
Register.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-61
Debug
5HVHUYHG 5HVHUYHG
&7,'%*5(67$57
&7,('%*54
&7,308(;7,1>@
&7,308(;7,1>@
Q),4
Q,54
('%*54
Table 12-36 shows how the bit values correspond with the Integration Input Status
Register functions.
[11] CTI DBGRESTART CTI debug restart bit.This field reads the state of the debug restart input coming from
the CTI into the Performance Monitoring Unit.
[10] CTI EDBGRQ CTI debug request bit. This field reads the state of the debug request input coming
from the CTI into the Performance Monitoring Unit.
[9] CTI PMUEXTIN[1] CTI PMUEXTIN[1] signal. This field reads the state of the PMUEXTIN[1] input
coming from the CTI into the Performance Monitoring Unit.
[8] CTI PMUEXTIN[0] CTI PMUEXTIN[0] signal. This field reads the state of the PMUEXTIN[0] input
coming from the CTI into the Performance Monitoring Unit.
[2] nFIQ nFIQ. This field reads 1 when the nFIQ input is asserted, that is, cleared.
[1] nIRQ nIRQ. This field reads 1when the nIRQ input is asserted, that is, cleared.
[0] EDBGRQ EDBGRQ. This field reads the state of the EDBGRQ input.
12-62 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
The read/write Integration Mode Control Register enables the processor to switch from
a functional mode which is the default, into integration mode, where the inputs and
outputs of the device can be directly controlled for integration testing or topology
detection. When the processor is in this mode, you can use the Integration Internal
Output Control Register or the Integration External Output Control Register to drive
output values. You can use the Integration Input Status Register to read input values.
Figure 12-22 shows the bit arrangement of the Integration Mode Control Register.
5HVHUYHG
,QWHJUDWLRQPRGHHQDEOH
Table 12-37 shows how the bit values correspond with the Integration Mode Control
Register functions.
Bits in the Claim Tag Set Register do not have any specific functionality. The external
debugger and debug monitor set these bits to lay claims on debug resources.
Figure 12-23 on page 12-64 shows the bit arrangement of the Claim Tag Set Register.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-63
Debug
5HVHUYHG &ODLPWDJV
Table 12-38 shows how the bit values correspond wit the Claim Tag Set Register
functions.
The read/write Claim Tag Clear Register is used to read the claim status on debug
resources. Figure 12-24 shows the bit arrangement of the Claim Tag Clear Register.
5HVHUYHG &ODLPWDJV
Table 12-39 shows how the bit values correspond with the Claim Tag Clear Register
functions.
[7:0] Claim tags Indicates the claim tag status. Writing 1 to a specific claim tag clear bit clears that claim tag.
Reading this register returns the current claim tag value. For example, if you write 1 to bit [3] of
this register, it is read as 0. The reset value is 0.
12-64 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
The Lock Access Register is a write-only register that controls writes to the debug
registers. The purpose of the Lock Access Register is to reduce the risk of accidental
corruption to the contents of the debug registers. It does not prevent all accidental or
malicious damage. Because the state of the Lock Access Register is in the debug power
domain, it is not lost when the core powers down.
Figure 12-25 shows the bit arrangement of the Lock Access Register.
/RFNDFFHVVFRQWURO
Table 12-40 shows how the bit values correspond with the Lock Access Register
functions.
[31:0] Lock access control Lock access control. To unlock the debug registers, write a 0xC5ACCE55 key to this
register. To lock the debug registers, write any other value. Accesses to locked debug
registers are ignored.
Note
You can only access the Lock Access Register when the PADDR31 input is LOW.
Writes are ignored when PADDR31 is HIGH.
The Lock Status Register is a read-only register that returns the current lock status of
the debug registers.
Figure 12-26 on page 12-66 shows the bit arrangement of the Lock Status Register.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-65
Debug
5HVHUYHG
ELWDFFHVV
/RFNHGELW
/RFNLPSOHPHQWHGELW
Table 12-41 shows how the bit values correspond with the Lock Status Register
functions.
[31:3] - RAZ.
[2] 32-bit access 32-bit access. Indicates that a 32-bit access is required to write the key to the Lock
Access Register. This bit always reads 0.
[0] Lock implemented bit Lock implemented bit. Indicates that the lock functionality is implemented. This bit
always reads 1.
Note
This lock has no effect on accesses initiated by the debugger. Therefore, if PADDR31
is HIGH, all the bits in this register read 0.
The Authentication Status Register is a read-only register that reads the current values
of the configuration inputs that determine the debug permission level.
Figure 12-27 on page 12-67 shows the bit arrangement of the Authentication Status
Register.
12-66 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
5HVHUYHG
6HFXUHQRQLQYDVLYHGHEXJHQDEOHG
6HFXUHLQYDVLYHGHEXJHQDEOHG
1RQVHFXUHQRQLQYDVLYHGHEXJHQDEOHG
1RQVHFXUHLQYDVLYHGHEXJHQDEOHG
Table 12-42 shows how the bit values correspond with the Authentication Status
Register functions.
[31:8] - - RAZ
[7] Secure b1
Secure noninvasive debug enable
noninvasive debug
[6] (DBGEN || NIDEN) && (SPIDEN || SPNIDEN) field
enabled
[3] Nonsecure b1
Nonsecure noninvasive debug
noninvasive debug
[2] DBGEN || NIDEN enable field
enabled
The Device Type Register is a read-only register that indicates the type of debug
component.
Figure 12-28 on page 12-68 shows the bit arrangement of the Device Type Register.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-67
Debug
Table 12-43 shows how the bit values correspond with the Device Type Register
functions.
[31:8] - RAZ.
[7:4] Sub type Indicates that the sub-type of the processor is core. This value is 0x1.
[3:0] Main class Indicates that the main class of the processor is debug logic. This value is 0x5.
The Identification Registers are read-only registers that consist of the Peripheral
Identification Registers and the Component Identification Registers. The Peripheral
Identification Registers provide standard information required by all CoreSight
components. Only bits [7:0] of each register are used, the remaining bits Read As Zero.
Table 12-44 shows the offset value, register number, and description that are associated
with each Peripheral Identification Register.
Offset
Register number Function
(hex)
12-68 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Offset
Register number Function
(hex)
Table 12-45 shows fields that are in the Peripheral Identification Registers.
4KB Count 4 bits Indicates the Log2 of the number of 4KB blocks that the processor occupies. The debug
registers occupy a single 4KB block, therefore this field is always 0x0.
JEP106 4+7 bits Identifies the designer of the processor. This field consists of a 4-bit continuation code and a
7-bit identity code. Because the processor is designed by ARM, the continuation code is 0x4
and the identity code is 0x3B.
Part 12 bits Indicates the part number of the processor. The part number for the processor is 0xC08.
number
Revision 4 bits Indicates the major and minor revision of the product. The major revision contains
functionality changes and the minor revision contains bug fixes for the product. The revision
number starts at 0x0 and increments by 1 at both major and minor revisions. The processor
revision number is 0x1.
RevAnd 4 bits Indicates the manufacturer revision number. This number starts at 0x0 and increments by the
integrated circuit manufacturer on metal fixes. For the processor, the initial value is 0x0 but can
be changed by the manufacturer.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-69
Debug
Table 12-46 shows how the bit values correspond with the Peripheral ID Register 0
functions.
[31:8] - RAZ.
[7:0] - Indicates bits [7:0] of the part number for the processor. This value is 0x08.
Table 12-47 shows how the bit values correspond with the Peripheral ID Register 1
functions.
[31:8] - RAZ.
[7:4] - Indicates bits [3:0] of the JEDEC JEP106 Identity Code. This value is 0xB.
[3:0] - Indicates bits [11:8] of the part number for the processor. This value is 0xC.
Table 12-48 shows how the bit values correspond with the Peripheral ID Register 2
functions.
[31:8] - RAZ.
[7:4] - Indicates the revision number for the processor. This value changes based on the product major and
minor revision. This value is set to b0010.
[2:0] - Indicates bits [6:4] of the JEDEC JEP106 Identity Code. This value is set to b011.
12-70 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Table 12-49 shows how the bit values correspond with the Peripheral ID Register 3
functions.
[31:8] - RAZ.
[7:4] - Indicates the manufacturer revision number. This value changes based on the manufacturer metal fixes.
This value is set to 0x0.
Table 12-50 shows how the bit values correspond with the Peripheral ID Register 4
functions.
[31:8] - RAZ.
[7:4] - Indicates the number of blocks occupied by the processor. This field is always set to 0x0.
[3:0] - Indicates the JEDEC JEP106 Continuation Code. For the processor, this value is 0x4.
Table 12-51 shows the offset value, register number, and value that are associated with
each Component Identification Register.
Offset Register
Value Function
(hex) number
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-71
Debug
12-72 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
• A BKPT debug event. This occurs when a BKPT instruction is committed for
execution. BKPT is an unconditional instruction.
The debugger or the system can cause the core to enter into debug state by triggering
any of the following halting debug events:
• assertion of the external debug request signal, EDBGRQ
• write to the DRCR[0] Halt Request control bit
• detection of the OS unlock catch event
• assertion of the Cross Trigger Interface debug request signal.
If EDBGRQ or CTI debug request is asserted while DBGEN is HIGH but invasive
debug is not permitted, the devices that assert these signals must hold them until the
processor enters debug state, that is, until DBGACK is asserted. Otherwise, the
behavior of the processor is Unpredictable. For DRCR[0] and OS unlock catch halting
debug events, the processor records them internally until it is in a state and mode where
they can be acknowledged.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-73
Debug
This section describes how the processor behaves on debug events while not in debug
state. See Debug state on page 12-80 for information on how the processor behaves
while in debug state.When the processor is in Monitor debug-mode, Prefetch Abort and
Data Abort vector catch debug events are ignored. All other software debug events
generate a debug exception such as Data Abort for watchpoints, and Prefetch Abort for
anything else.
When debug is disabled, the BKPT instruction generates a debug exception, Prefetch
Abort. All other software debug events are ignored.
a. The BKPT instruction generates a Prefetch Abort. All other software debug events are ignored.
b. Prefetch Abort and Data Abort vector catch debug events are ignored in Monitor debug-mode. All other software debug events
generate a debug exception.
Breakpoint, IVA or CID match, vector catch, and halting debug events have the same
priority. If more than one of these events occurs on the same instruction, it is
Unpredictable which event is taken.
BKPT debug events have a lower priority than all other debug events.
12-74 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Note
Watchpoint debug events are imprecise and therefore, the instruction that is canceled by
one of them is different than the one that triggered it.
• The processor sets R14_abt to the address of the instruction to return to plus 0x08.
However, it is uncommon to return from an imprecise data abort, whereas it is
normal to return from a watchpoint exception.
• The processor updates all the registers written by the watchpointed instruction.
If the watchpointed access is subject to a precise data abort, then the precise abort takes
priority over the watchpoint because it is a higher priority exception. If the
watchpointed access is subject to an imprecise data abort, then the watchpoint takes
priority.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-75
Debug
If the processor takes a debug exception because of a breakpoint, BKPT, or vector catch
debug event, the processor performs the following actions:
• Sets the DSCR[5:2] method of entry bits to indicate that a watchpoint occurred.
• Sets the CP15 IFSR and IFAR registers as described in Effect of debug exceptions
on CP15 registers and WFAR on page 12-77.
Note
The Prefetch Abort handler checks the IFSR bit to determine if a debug exception or
other kind of Prefetch Abort exception causes the exception entry. If the cause is a
debug exception, the Prefetch Abort handler must branch to the debug monitor. You can
find the address of the instruction to restart in the R14_abt register.
If the processor takes a debug exception because of a watchpoint debug event, the
processor performs the following actions:
• sets the DSCR[5:2] method of debug entry bits to the Imprecise Watchpoint
Occurred encoding
• sets the CP15 DFSR, FAR, and WFAR registers as described in Effect of debug
exceptions on CP15 registers and WFAR on page 12-77
• performs the same sequence of actions as in a Data Abort exception by:
— updating the SPSR_abt with the saved CPSR
— changing the CPSR to abort mode and ARM state with normal interrupts
and imprecise aborts disabled
— setting R14_abt as a regular Data Abort exception, that is, this register gets
the address of the cancelled instruction plus 0x08
— setting the PC to the appropriate Data Abort vector.
12-76 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Note
The Data Abort handler checks the DFSR bits to determine if the exception entry was
caused by a Debug exception or other kind of Data Abort exception. If the cause is a
Debug exception, the Data Abort handler must branch to the debug monitor. The
address of the instruction to restart can be found in the R14_abt register.
Table 12-53 shows the values in the Link Register after exceptions.
Watchpoint RA+8 RA+8 Address of the instruction that the watchpoint event canceleda
Prefetch Abort RA+4 RA+4 Address of the instruction that the prefetch abort event canceled
Data Abort RA+8 RA+8 Address of the instruction that the data abort event canceled
a. Watchpoints are imprecise. RA is not the address of the instruction after the one that hit the watchpoint, the
processor might stop a number of instructions later. The address of the instruction that hit the watchpoint is
in the WFAR.
See Chapter 3 System Control Coprocessor for more information on these registers.
If the processor takes a debug exception because of a watchpoint debug event, the
processor performs the following actions on these registers:
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-77
Debug
• it updates the WFAR with the address of the instruction that accessed the
watchpointed address, plus a processor state dependent offset:
— + 8 for ARM state
— + 4 for Thumb and ThumbEE states.
If the processor takes a debug exception because of a breakpoint, BKPT, or vector catch
debug event, the processor performs the following actions on these registers:
• it updates the IFSR with the debug event encoding
• it writes an Unpredictable value to the IFAR
• it does not change the DFSR, DFAR, or WFAR.
The processor ignores vector catch debug events on the Prefetch or Data Abort vectors
while in Monitor debug-mode because these events put the processor in an
unrecoverable state.
The debuggers must avoid other similar cases by following these rules, that apply only
if the processor is in Monitor debug-mode:
The debugger must write BCR[2:1] for the same breakpoint as either b00 or b10, that
selects either match in only USR, SYS, SVC modes or match in only USR mode,
respectively. The debugger must not program either b01 (match in any privileged mode)
or b11 (match in any mode).
You must only request the debugger to write b00 to BCR[2:1] if you know that the abort
handler does not switch to one of the USR, SYS, or SVC mode before saving the context
that might be corrupted by a later debug event. You must also be careful about
requesting the debugger to set a breakpoint or BKPT debug event inside a Prefetch
Abort or Data Abort handler, or a watchpoint debug event on a data address that any of
these handlers might access.
In general, you must only set breakpoint or BKPT debug events inside an abort handler
after it saves the context of the abort. You can avoid breakpoint debug events in abort
handlers by setting BCR[2:1] as previously described.
12-78 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
If the debugged code is not running in a privileged mode, you can prevent watchpoint
debug events in abort handlers by setting WCR[2:1] to b10 for matching only
nonprivileged accesses.
Failure to follow these guidelines can lead to debug events occurring before the handler
is able to save the context of the abort, causing the corresponding registers to be
overwritten, and resulting in Unpredictable software behavior.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-79
Debug
• Continues to run the DMA engine. The debugger can stop and restart it using
CP15 operations if it has permission.
• Ignores interrupts.
When a debug event occurs while the processor is in Halting debug-mode, it switches
to a special state called debug state so the debugger can take control. You can configure
Halting debug-mode by setting DSCR[14].
If a halting debug event occurs, the processor enters debug state even when Halting
debug-mode is not configured.
While the processor is in debug state, the PC does not increment on instruction
execution. If the PC is read at any point after the processor has entered debug state, but
before an explicit PC write, it returns a value as described in Table 12-54 on page 12-81,
depending on the previous state and the type of debug event.
12-80 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Table 12-54 shows the read PC value after debug state entry for different debug events.
Thumb and
Debug event ARM Return address (RA) meaning
ThumbEE
Watchpoint RA+8 RA+4 Address of the instruction that the watchpoint debug event canceleda
External debug RA+8 RA+4 Address of the instruction that the external debug request signal
request signal activation canceled
activation
Debug state entry RA+8 RA+4 Address of the instruction that the debug state entry request command
request command canceled
OS unlock catch RA+8 RA+4 Address of the instruction that the OS unlock catch event canceled
event
CTI debug request RA+8 RA+4 Address of the instruction that the CTI debug request signal activation
signal activation canceled
a. Watchpoints are imprecise. RA is not the address of the instruction immediately after the one that hit the watchpoint, the
processor might stop a number of instructions later. The address of the instruction that hit the watchpoint is in the WFAR.
The behavior of the PC and CPSR registers while the processor is in debug state is as
follows:
• The PC is frozen on entry to debug state. That is, it does not increment on the
execution of ARM instructions. However, the processor still updates the PC as a
response to instructions that explicitly modify the PC.
• If the PC is read after the processor has entered debug state, it returns a value as
described in Table 12-54, depending on the previous state and the type of debug
event.
• If the debugger executes a sequence for writing a certain value to the PC and
subsequently it forces the processor to restart without any additional write to the
PC or CPSR, the execution starts at the address corresponding to the written
value.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-81
Debug
• If the debugger forces the processor to restart without performing a write to the
PC, the restart address is Unpredictable.
• While the processor is in debug state, the CPSR does not change unless an
instruction writes to it. In particular, the CPSR IT execution state bits do not
change on instruction execution. The CPSR IT execution state bits do not have
any effects on instruction execution.
In debug state, the processor executes instructions issued through the Instruction
Transfer Register (ITR). Before the debugger can force the processor to execute any
instruction, it must enable this feature through DSCR[13].
While the processor is in debug state, it always decodes ITR instructions as per the
ARM instruction set, regardless of the value of the T and J bits of the CPSR.
The following restrictions apply to instructions executed through the ITR while in
debug state:
• with the exception of branch instructions and instructions that modify the CPSR,
the processor executes any ARM instruction in the same manner as if it was not
in debug state
• instructions that load a value into the PC from memory are Unpredictable.
12-82 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
The only instruction that can update the CPSR while in debug state is the MSR
instruction. All other ARMv7 instructions that write to the CPSR are Unpredictable,
that is, the BX, BXJ, SETEND, CPS, RFE, LDM(3), and data processing instructions
with Rd == r15 and S == 1.
The behavior of the CPSR forms of the MSR and MRS instructions in debug state is
different to their behavior in normal state:
• When not in debug state, an MSR instruction that modifies the execution state bits
in the CPSR is Unpredictable. However, in debug state an MSR instruction can
update the execution state bits in the CPSR. A direct modification of the execution
state bits in the CPSR by an MSR instruction must be followed by an instruction
memory barrier sequence.
• When not in debug state, an MRS instruction reads the CPSR execution state bits
as zeros. However, in debug state an MRS instruction returns the actual values of
the execution state.
The debugger must execute an instruction memory barrier sequence after it writes to the
CPSR execution state bits using an MSR instruction. If the debugger reads the CPSR
using an MRS instruction after a write to any of these bits, but before an instruction
memory barrier sequence, the value that MRS returns is Unpredictable. Similarly, if the
debugger forces the processor to leave debug state after an MSR writes to the execution
state bits, but before any instruction memory barrier sequence, the behavior of the
processor in Unpredictable.
12.8.5 Privilege
While the processor is in debug state, ARM instructions issued through the ITR are
subject to different rules whether they can change the processor state. As a general rule,
instructions in debug state are always permitted to change the processor state, unless the
processor is in a state, mode, and configuration where there are security restrictions.
If the debugger uses the ITR to execute an instruction that is not permitted, the processor
ignores the instruction and sets the sticky undefined bit, DSCR[8].
The processor accesses register bank and memory as indicated by the CPSR mode bits.
For example, if the CPSR mode bits indicate the processor is in User mode, ARM
register reads and returns the User mode banked registers, and memory accesses are
presented to the MMU as not privileged.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-83
Debug
If the debugger writes to the CPSR a value so that it sets the CPSR[4:0] bits to a
processor mode where invasive debug is not permitted, this update of the CPSR[4:0]
bits is ignored. Similarly, if invasive debug is not permitted for privilege modes in the
current security state, writes to the CPSR privileged bits are ignored.
a. The processor is in secure state when CP15 SCR[0] nonsecure bit is set to 0.
b. This column excludes the case where the debugger attempts to change CPSR[4:0] to Monitor mode, that is, it
only includes updates of the A, I, or F bits, or the CPSR[4:0] bits to a mode other than Monitor.
While in debug state, if the debugger forces the processor to execute a CP15 MCR
instruction to write to the CP15 Secure Configuration Register (SCR), it is only
permitted to execute if either of these conditions is true:
• the processor is in a secure privileged mode including Monitor mode
• the processor is in secure User mode, and both DBGEN and SPIDEN are
asserted.
Note
• Writes to the SCR while in nonsecure state are not permitted even if both DBGEN
and SPIDEN are asserted, except if the processor is in Monitor mode because it
is considered to be a secure privileged mode regardless of the value of the SCR[0]
NS bit.
• The processor treats attempts to write to the SCR when they are not permitted as
Undefined instruction exceptions. See Exceptions in debug state on page 12-87
for details of how the processor behaves when Undefined instruction exceptions
occur while in debug state.
12-84 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Coprocessor instructions
The rules for executing coprocessor instructions other than CP14 and CP15 while in
debug state are the same as in normal state. CP14 debug instructions are always
permitted while in debug state regardless of the debug permissions, processor mode,
and security state.
Note
Nondebug CP14 instructions behave as CP15 instructions while in debug state.
• If the debugger tries to execute a CP15 instruction that is not permitted, the
processor generates an Undefined instruction exception. See Exceptions in debug
state on page 12-87 for information on how the processor behaves when
Undefined instruction exceptions occur while in debug state.
Table 12-56 shows the CP14 and CP15 instruction execution rules in detail.
Access to
Access Access to Access to
DBGEN & configurable
Mode SCR[0] to CP14 banked CP15 restricted access
SPIDEN access CP15
registers registers CP15 registers
registers
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-85
Debug
Table 12-56 Accesses to CP15 and CP14 registers in debug state (continued)
Access to
Access Access to Access to
DBGEN & configurable
Mode SCR[0] to CP14 banked CP15 restricted access
SPIDEN access CP15
registers registers CP15 registers
registers
The noninvasive debug features of the processor are the ETM and Performance
Monitoring Unit (PMU). All of these noninvasive debug features are disabled when the
processor is in debug state. See System performance monitor on page 3-8 and
Chapter 14 Embedded Trace Macrocell for more information.
On entry to debug state, the processor does not update any general-purpose or program
status register, this includes the SPSR_abt or R14_abt register. Additionally, the
processor does not update any coprocessor register, including the CP15 IFSR, DFSR,
FAR, or IFAR register, except for CP14 DSCR[5:2] method of debug entry bits. These
bits indicate which type of debug event caused the entry into debug state.
Note
On entry to debug state, the processor updates the WFAR register with the virtual
address of the instruction accessing the watchpointed address plus:
• + 8 in ARM state
• + 4 in Thumb or ThumbEE state.
12-86 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Reset This exception is taken as in normal processor state. This means the
processor leaves debug state as a result of the system reset.
Prefetch Abort
This exception cannot occur because the processor does not fetch any
instructions while in debug state.
Undefined
When an Undefined exception occurs in debug state, the behavior of the
core is as follows:
• PC, CPSR, SPSR_und, and R14_und are unchanged
• the processor remains in debug state
• DSCR[8], sticky undefined bit, is set.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-87
Debug
• the processor does not act on this imprecise Data Abort on exit
from the debug state, that is, the imprecise abort is discarded.
If the processor detects an imprecise Data Abort while already in debug state, for
example a debugger-generated imprecise abort, the processor sets the sticky imprecise
Data Abort bit, DSCR[7], but otherwise it discards it. The act of discarding these
debugger-generated imprecise Data Aborts does not affect recorded
application-generated imprecise Data Aborts.
Before forcing the processor to leave debug state, the debugger must execute a DSB
sequence to ensure that all debugger-generated imprecise Data Aborts are detected, and
therefore discarded, while still in debug state. After exiting debug state, the processor
acts on any recorded imprecise Data Aborts as indicated by the CPSR A bit.
The watchpoint exception has a higher priority than an imprecise Data Abort. If a data
access causes both a watchpoint and an imprecise Data Abort, the processor enters
debug state before taking the imprecise Data Abort. The imprecise Data Abort is
recorded. This priority order ensures correct behavior where invasive debug is not
permitted in privileged modes.
12-88 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
The debugger can force the processor to leave debug state by setting the restart request
bit, DRCR[1], to 1. Another way of forcing the processor to leave debug state is through
the CTI external restart request mechanism. When one of those restart requests occurs,
the processor:
4. Drives the DBGACK signal LOW, unless the DSCR[11] DbgAck bit is set to 1.
5. Starts executing instructions from the address last written to the PC in the
processor mode and state indicated by the current value of the CPSR.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-89
Debug
If bit [0] of the Debug State Cache Control Register (DSCCR) is set to 0 while the
processor is in debug state, then neither the L1 data cache or L2 cache performs any
eviction or line fill. However, evictions still occur in any of the following cases:
• If identical virtual addresses, except for bit [12], are mapped to the same physical
address and the line that corresponds to the first virtual address is in the L1 data
cache, then an access using the second virtual address causes an eviction of the
cache line to the L2 cache.
• The L1 data cache controller uses a hash algorithm to determine hits. If two
different virtual addresses have the same hash and the line that corresponds to the
first VA is in the L1 data cache, then an access using the second VA evicts the line
to the L2 cache.
Note
No special feature is required to prevent L1 instruction cache pollution because I-side
fetches cannot occur while in debug state.
The debugger can update memory while in debug state for the following reasons:
• to replace an instruction with a BKPT, or to restore the original instruction
• to download code for the processor to execute on leaving debug state.
12-90 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
The debugger can maintain cache coherency in both these situations with the following
features:
• If bit [2] of the DSCCR is set to 0 while the processor is in debug state, it treats
any memory access that hits in either L1 data cache or L2 cache as write-through,
regardless of the memory region attributes. This guarantees that the L1 instruction
cache can see the changes to the code region without the debugger executing a
time-consuming and device-specific sequence of cache clean operations.
• After the code is written to memory, the debugger can execute either a CP15
I-cache Invalidate All or a CP15 I-cache Invalidate Line by MVA operation.
Note
• The processor can execute CP15 I-cache Invalidate All or CP15 I-cache Invalidate
Line by MVA operation only in privileged mode. However, in debug state the
processor can execute these instructions even when invasive debug is not
permitted in privileged mode. This exception to the CP15 permission rules
described in Coprocessor instructions on page 12-85 enables the debugger to
maintain coherency in a secure user debug scenario.
• The CP15 Flush Branch Target Buffer instruction is also valid in debug state
regardless of the processor mode. Although the processor implements this
instruction as a NOP, making it available in debug state ensures software
compatibility with other ARMv7 compliant processors.
• Execution of the CP15 I-cache Invalidate All operation while in nonsecure state
flushes the secure and nonsecure lines from the I-cache.
• If bit [2] of the DSCCR is set to 0 while the processor is in debug state, then
memory writes go through all levels of cache up to the point of coherency, that is,
to external memory.
• Statistic profiling using the Performance Monitoring Unit (PMU). The processor
can count cache accesses and misses over a period of time.
• CP15 operations for accessing L1 and L2 cache tag and data arrays. These
instructions provide greater visibility into the cache state at the cost of
interrupting the program flow to execute them.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-91
Debug
The APB slave port is compliant with the AMBA 3 Advanced Peripheral Bus (APB)
interface. This APB slave interface supports 32-bits wide data, stalls, slave-generated
aborts, and ten address bits [11:2] mapping 4KB of memory. An extra PADDR31 signal
indicates to the processor the source of access. See Appendix A Signal Descriptions for
a complete list of the debug APB signals.
This section describes some of the miscellaneous debug input and output signals in
more detail.
EDBGRQ
This signal generates a halting debug event, that is, it requests the processor to enter
debug state. When this occurs, the DSCR[5:2] method of debug entry bits are set to
b0100. When EDBGRQ is asserted, it must be held until DBGACK is asserted. Failure
to do so leads to Unpredictable behavior of the processor.
DBGACK
The processor asserts DBGACK to indicate that the system has entered debug state. It
serves as a handshake for the EDBGRQ signal. The processor also drives the
DBGACK signal HIGH when the debugger sets the DSCR[10] DbgAck bit to 1.
COMMRX is asserted when the CP14 DTR has data for the processor to read, and it is
deasserted when the processor reads the data. Its value is equal to DSCR[30]
DTRRXfull flag.
COMMTX is asserted when the CP14 is ready for write data, and it is deasserted when
the processor writes the data. Its value equals the inverse of DSCR[29] DTRTXfull flag.
12-92 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
DBGNOPWRDWN
The processor asserts DBGNOPWRDWN when bit [0] of the Device Power Down and
Reset Control Register is 1. The processor power controller works in emulate mode
when this signal is HIGH.
DBGPWRDWNREQ
You must set the DBGPWRDWNREQ signal HIGH before removing power from the
core domain. Bit [0] of the Device Power Down and Reset Status Register reflects the
value of this DBGPWRDWNREQ signal.
Note
DBGPWRDWNREQ must be tied LOW if the particular implementation does not
support separate core and debug power domains.
DBGPWRDWNACK
This signal indicates to the system that it is safe to bring the core voltage down.
'%*3:5':15(4
'%*3:5':1$&.
9GG FRUH
Q325(6(7
ETMPWRDWNREQ
You must set the ETMPWRDWNREQ signal HIGH before removing power from the
ETM domain.
Note
• ETMPWRDWNREQ must be tied LOW if the particular implementation does
not support separate core and debug power domains.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-93
Debug
• This signal is not present if the processor is configured without the ETM.
ETMPWRDWNACK
This signal indicates to the system that it is safe to bring the ETM voltage down.
(703:5':15(4
(703:5':1$&.
9GG (70
35(6(7Q
Note
The ETMPWRDWNREQ and ETMPWRDWNACK signals are not present if the
processor is configured without the ETM.
DBGOSLOCKINIT
DBGROMADDR
The DBGROMADDR signal specifies bits [31:12] of the debug ROM physical
address. This is a configuration input and must be tied off or changed while the
processor is in reset. In a system with multiple debug ROMs, this address must be tied
off to point to the top-level ROM address.
12-94 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
DBGSELFADDR
The DBGSELFADDR signal specifies bits [31:12] of the offset of the debug ROM
physical address to the physical address where the APB port is mapped to the base of
the 4KB debug register map. This is a configuration input and must be tied off or
changed while the processor is in reset.
Table 12-57 shows a list of the valid combination of authentication signals along with
its associated debug permissions. Authentication signals are used to configure the
processor so its activity can only be debugged or traced in a certain subset of processor
modes and security states.
0 0 0 0 No No No No
0 0 0 1 No No No Yes
0 0 1 0 No No No No
0 0 1 1 No No Yes Yes
0 1 0 0 No Yes No Yes
0 1 0 1 No Yes No Yes
1 0 0 0 No No No No
1 0 0 1 No No Yes Yes
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-95
Debug
1 0 1 0 No No No No
1 0 1 1 No No Yes Yes
a. When DBGEN is LOW, the processor behaves as if DSCR[15:14] equals b00 with the exception that halting debug events
are ignored when this signal is LOW.
b. Invasive debug is defined as those operations that affect the behavior of the core. For example, taking a breakpoint is defined
as invasive debug but performance counters and trace are noninvasive.
The NIDEN, DBGEN, SPIDEN, and SPNIDEN input signals are either tied off to
some fixed value or controlled by some external device.
If software running on the processor has control over an external device that drives the
authentication signals, it must make the change using a safe sequence:
3. Poll the DSCR or Authentication Status Register to check whether the processor
has already detected the changed value of these signals. This is required because
the processor might not see the signal change until several cycles after the DSB
completes.
12-96 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
The software cannot perform debug or analysis operations that depend on the new value
of the authentication signals until this procedure is complete. The same rules apply
when the debugger has control of the processor through the ITR while in debug state.
The relevant combinations of the DBGEN, NIDEN, SPIDEN, and SPNIDEN values
can be determined by polling DSCR[17:16], DSCR[15:14], or the Authentication Status
Register.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-97
Debug
A basic function for using the debug state is executing an instruction through the ITR.
Example 12-1 shows the sequence for executing an ARM instruction through the ITR.
ExecuteARMInstruction(uint32 instr)
{
// Step 1. Poll DSCR until InstrCompl is set.
repeat
{
dscr := ReadDebugRegister(34);
}
until (dscr & (1<<24));
// Step 2. Write the opcode to the ITR.
WriteDebugRegister(33, instr);
// Step 3. Poll DSCR until InstrCompl is set.
repeat
{
dscr := ReadDebugRegister(34);
}
until (dscr & (1<<24);
}
12-98 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
There are two ways that an external debugger can send data to or receive data from the
core:
• The debug communications channel, when the core is not in debug state. It is
defined as a set of resources used for communicating between the external
debugger and a piece of software running on the core.
• The mechanism for forcing the core to execute ARM instructions, when the core
is in debug state. See Executing instructions in debug state on page 12-82 for
details.
• If a read of the CP14 DSCR returns 1 for the DTRRXfull flag, then a following
read of the CP14 DTR returns valid data and DTRRXfull is cleared. No prefetch
flush is required between these two CP14 instructions.
• If a read of the CP14 DSCR returns 0 for the DTRRXfull flag, then a following
read of the CP14 DTR returns an Unpredictable value.
• If a read of the CP14 DSCR returns 0 for the DTRTXfull flag, then a following
write to the CP14 DTR writes the intended 32-bit word, and sets DTRTXfull to
1. No prefetch flush is required between these two CP14 instructions.
• If a read of the CP14 DSCR returns 1 for the DTRTXfull flag, then a following
write to the CP14 DTR is Unpredictable.
When nonblocking mode is selected for DTR accesses, the following conditions are true
for memory-mapped DSCR, memory-mapped DTRRX, and DTRTX registers:
• If a read of the memory-mapped DSCR returns 0 for the DTRRXfull flag, then a
following write of the memory-mapped DTRRX passes valid data to the
processor and sets DTRRXfull to 1.
• If a read of the memory-mapped DSCR returns 1 for the DTRRXfull flag, then a
following write of the memory-mapped DTRRX is ignored, that is, both
DTRRXfull and DTRRX contents are unchanged.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-99
Debug
• If a read of the memory-mapped DSCR returns 1 for the DTRTXfull flag, then a
following read of the memory-mapped DTRTX returns valid data and clears
DTRTXfull.
• If a read of the memory-mapped DSCR returns 0 for the DTRTXfull flag, then a
following read of the memory-mapped DTRTX is ignored, for example, the
content of DTRTXfull is unchanged and the read returns an Unpredictable value.
Other uses of the DCC resources are not supported by the ARMv7 debug architecture.
In particular, ARMv7 debug does not support the following:
• polling CP14 DSCR[30:29] flags to access the memory-mapped DTRRX and
DTRTX registers
• polling memory-mapped DSCR[30:29] flags to access CP14 DTR.
Note
Using the DCC in any of the nonsupported ways can be subject to race conditions.
Software running on the processor that sends data to the debugger through the transmit
channel can use the following sequence of instructions as shown in Example 12-2.
Example 12-3 shows the sequence of instructions for sending data to the debugger
through the receive channel.
12-100 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
A debugger accessing the DCC through the external interface when not in debug state
can use the pseudo-code operations as shown in this section.
uint32 ReadDCC()
{
// Step 1. Poll DSCR until DTRRXfull is set.
repeat
{
scr := ReadDebugRegister(34);
}
until (dscr & (1<<29));
// Step 2. Read the value from DTRRX.
dtr_val := ReadDebugRegister(35);
return dtr_val;
}
WriteDCC(uint32 dtr_val)
{
// Step 1. Poll DSCR until DTRTXfull is clear.
repeat
{
dscr := ReadDebugRegister(34);
}
until (!(dscr & (1<<30)));
// Step 2. Write the value to DTRTX.
WriteDebugRegister(32, dtr_val);
}
While the processor is running, if the DCC is being used as a data channel, it might be
appropriate to poll the DCC regularly.
Example 12-6 on page 12-102 shows the code for polling the DCC.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-101
Debug
PollDCC
{
dscr := ReadDebugRegister(34);
if (dscr & (1<<29))
{
// DTRTX (data transfer register - transmit) full
dtr := ReadDebugRegister(35)
ProcessTransmitWord(dtr);
}
elseif (!(dscr & (1<<30)))
{
// DTRRX (data transfer register - receive) empty
dtr := GetNextReceiveWord();
}
}
When programming a simple breakpoint, you must set the byte address select bits in the
control register appropriately. For a breakpoint in ARM state, this is simple. For Thumb
or ThumbEE, you must calculate the value based on the address.
For a simple breakpoint, you can program the settings for the other control bits as
Table 12-58 shows:
Bit
Value to write Description
range
[23] b0 Reserved
12-102 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Bit
Value to write Description
range
Example 12-7 shows the sequence of instructions for setting a simple breakpoint.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-103
Debug
The simplest and most common type of watchpoint watches for a write to a given
address in memory. In practice, a data object spans a range of addresses but is aligned
to a boundary corresponding to its size, so you must set the byte address select bits in
the same way as for a breakpoint.
For a simple watchpoint, you can program the settings for the other control bits as
Table 12-59 shows:
[13] b0 Reserved
Example 12-8 shows the code for setting a simple aligned watchpoint.
12-104 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
when 1:
byte_address_select := (1'b1 << (address & 7));
when 2:
byte_address_select := (2'b11 << (address & 6));
when 4:
byte_address_select := (4'b1111 << (address & 4));
when 8:
byte_address_select := 8'b11111111;
}
// Step 4. Write the mask and control register to enable the watchpoint.
WriteDebugRegister(112 + watch_num, 5'b10111 | (byte_address_select << 5));
}
Using the byte address select bits, certain unaligned objects up to a double-word (64
bits) can be watched in a single watchpoint. However, not all cases can be covered and
in many cases, a second watchpoint might be required.
Address Object size First address First byte address Second address Second byte
of object in bytes value mask value address mask
Example 12-9 on page 12-106 shows the code for setting a simple unaligned
watchpoint.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-105
Debug
12.11.3 Single-stepping
You can use the breakpoint mismatch bit to implement single-stepping on the processor.
Unlike high-level stepping, single-stepping implements a low-level step that executes a
single instruction at a time. With high-level stepping, the instruction is decoded to
determine the address of the next instruction and a breakpoint is set at that address.
SingleStepOff(uint32 address)
{
bkpt := FindUnusedBreakpointWithMismatchCapability();
SetComplexBreakpoint(address, 2'b100 << 20);
}
12-106 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Note
In Example 12-10 on page 12-106, the second parameter of SetComplexBreakpoint()
indicates the value to set BCR[22:20].
This method of single-stepping steps off the instruction that might not necessarily be the
same as stepping to the next instruction executed. In certain circumstances, the next
instruction executed might be the same instruction being stepped off.
The simplest example of this is a branch to a self instruction such as (B .). In this case,
the required behavior is most likely to step off the branch to self because this is often
used as a means of waiting for an interrupt.
A more complex example is a return from function that returns to the same point. For
example, a simple recursive function might terminate with:
BL ThisFunction
POP {saved_registers, pc}
In this case, the POP instruction loads a link register that is saved at the start of the
function, and if that is the link register created by the BL instruction as shown, it points
back at the POP instruction. Therefore, this single step code unwinds the entire call
stack to the point of the original caller, rather than stepping out a level at a time.
Note
It is not possible to single step this piece of code using either the high-level or low-level
stepping method.
On entry to debug state, the debugger must first flush the load/store unit of pending
memory transactions so that it can flag imprecise Data Aborts. The debugger can then
read the processor state, including all registers and the PC, and determine the cause of
the exception from the DSCR Method of Entry bits.
OnEntryToDebugState(PROCESSOR_STATE *state)
{
// Step 1. Read the DSCR to determine the cause of debug entry.
state->dscr := ReadDebugRegister(34);
// Step 2. Issue a Data Synchronization Barrier instruction if required;
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-107
Debug
12-108 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
When exiting debug state, the program counter must always be written. If the execution
state or CPSR must be changed, this must be done before writing to the PC because
writing to the CPSR can affect the PC.
Having restored the program state, the debugger can restart by writing to bit [1] of the
Debug Run Control Register. It must then poll bit [1] of the Debug Status and Control
Register to determine if the core has restarted.
Example 12-12 shows the code for exit from debug state.
ExitDebugState(PROCESSOR_STATE *state)
{
// Step 1. Update the CPSR value
WriteCPSR(state->cpsr);
// Step 2. Restore any registers corrupted by debug state. The function
// WriteAllRegisters restores all general-purpose registers for all
// processor modes apart from R0.
WriteAllRegisters(state);
// Step 3. Write the return address.
WritePC(state->pc);
// Step 4. Writing the PC corrupts R0 therefore, restore R0 now.
WriteRegister(0, state->r0);
// Step 5. Write the restart request bit in the DRCR.
WriteDebugRegister(36, 1<<1);
// Step 6. Poll the RESTARTED flag in the DSCR.
repeat
{
dscr := ReadDebugRegister(34);
}
until (dscr & (1<<1));
}
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-109
Debug
To read a single register, the debugger can use the sequence shown in Example 12-13.
This sequence depends on two other sequences, Executing an ARM instruction through
the ITR on page 12-98 and Transmit data transfer (host end) on page 12-101.
Example 12-15 on page 12-111 shows the code to read the PC.
Note
You can use a similar sequence to write to the PC to set the return address when leaving
debug state.
12-110 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
ReadPC()
{
// Step 1. Save R0
saved_r0 := ReadRegister(0);
// Step 2. Execute the instruction MOV r0, pc through the ITR.
ExecuteARMInstruction(0xE1A0000F);
// Step 3. Read the value of r0 that now contains the PC.
pc := ReadRegister(0);
// Step 4. Restore the value of R0.
WriteRegister(0, saved_r0);
return pc;
}
ReadCPSR()
{
// Step 1. Save R0.
saved_r0 := ReadRegister(0);
// Step 2. Execute instruction MRS r0, CPSR through the ITR.
ExecuteARMInstruction(0xE10F0000);
// Step 3. Read the value of r0 that now contains the CPSR
cpsr_val := ReadRegister(0);
// Step 4. Restore the value of R0.
WriteRegister(0, saved_r0);
return cpsr_val;
}
Note
You can use similar sequences to read the SPSR in privileged modes.
Example 12-17 on page 12-112 shows the code for writing the CPSR.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-111
Debug
WriteCPSR(uint32 cpsr_val)
{
// Step 1. Save R0.
saved_r0 := ReadRegister(0);
// Step 2. Write the new CPSR value to r0.
WriteRegister(0, cpsr_val);
// Step 3. Execute instruction MSR r0, CPSR through the ITR.
ExecuteARMInstruction(0xE12FF000);
// Step 4. Execute a PrefetchFlush instruction through the ITR.
ExecuteARMInstruction(9xEE070F95);
// Step 5. Restore the value of r0.
WriteRegister(0, saved_r0);
}
Reading memory
Example 12-19 on page 12-113 shows the code for checking for aborts after a memory
access.
12-112 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
bool CheckForAborts()
{
// Step 1. Check the DSCR for a sticky abort.
dscr := ReadDebugRegister(34);
if (dscr & ((1<<6) + (1<<7))
{
// Step 2. Clear the sticky flag by writing DRCR[2].
WriteDebugRegister(36, 1<<2);
return true;
}
else
{
return false;
}
}
Note
You can use similar sequence to read half-word of memory and to write to memory.
To read or write blocks of memory, substitute the data instruction with one that uses
post-indexed addressing. For example:
LDRB r1, [r0],#1
This is done to prevent reloading the address value for each sequential word.
Example 12-20 shows the code for reading a block of bytes of memory.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-113
Debug
*data++ := ReadRegister(1);
--nbytes;
}
// Step 5. Restore the corrupted registers r0 and r1.
WriteRegister(0, saved_r0);
WriteRegister(1, saved-r1);
// Step 6. Check the DSCR for a sticky abort.
aborted := CheckForAborts();
return datum;
}
Note
A faster method is available for reading and writing words using the direct memory
access function of the DCC. See Fast memory read/write on page 12-116.
When multiple registers must be read in succession, you can optimize the process by
placing the DCC into stall mode and by writing the value 1 to the DCC access mode
bits. For more information, see CP14 c1, Debug Status and Control Register on
page 12-23.
12-114 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Example 12-22 shows the sequence to change the DTR access mode.
SetDTRAccessMode(int mode)
{
// Step 1. Write the mode value to DSCR[21:20].
dscr := ReadDebugRegister(34);
dscr := (dscr & ~(0x3<<20)) | (mode<<20);
WriteDebugRegister(34, dscr);
}
ReadRegisterStallMode(int Rd)
{
// Step 1. Write the opcode for MCR p14, 0, Rd, c5, c0 to the ITR.
// Write stalls until the ITR is ready.
WriteDebugRegister(33, 0xEE000E15 + (Rd<<12));
// Step 2. Read the register value through the DCC. Read stalls until
// DTRTX is ready
reg_val := ReadDebugRegister(32);
return reg_val;
}
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-115
Debug
Note
To transfer a register to the processor when in stall mode, you are not required to poll
the DSCR each time an instruction is written to the ITR and a value read from or written
to the DTR. The processor stalls using the signal PREADY until the previous
instruction has completed or the DTR register is ready for the operation.
This section provides example code that enable faster reads from memory by making
use of the DTR access mode.
Example 12-25 shows the sequence for reading a block of words of memory.
12-116 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
// Step 11. Write the value 2'b00 to DSCR[21:20] for normal mode.
SetDTRAccessMode(2'b00);
}
Example 12-26 shows the sequence for writing a block of words to memory.
Note
As the amount of data transferred increases, these functions reach an optimum
performance of one debug register access per data word transferred.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-117
Debug
The sequence for accessing coprocessor registers is the same as for the PC and CPSR.
That is, you must first execute an instruction to transfer the register to an ARM register,
then read the value back through the DTR.
uint32 ReadCPReg(int CPnum, int opc1, int CRn, int CRm, int opc2)
{
// Step 1. Save R0.
saved_r0 := ReadRegister(0);
// Step 2. Execute instruction MCR p15, 0, r0, c0, c1, 0 through the ITR.
ExecuteARMInstruction(0xEE000010 + (CPnum<<8) + (opc1<<21) + (CRn<<16) + CRm + (opc2<<5));
// Step 3. Read the value of r0 that now contains the CP register.
CP15c1 := ReadRegister(0);
// Step 4. Restore the value of R0.
WriteRegister(0, saved_r0);
return CP15c1;
}
Note
For banked CP15 registers, it might be necessary to switch security state to read the
required coprocessor register. Switching from secure to nonsecure state is simple
because you can write to the Secure Configuration Register (SCR) from any secure
privileged mode.
Example 12-28 shows the sequence for changing from secure to nonsecure state.
SecureToNonSecure()
{
// Step 1. Set the NS bit.
scr := ReadCPReg(15, 0, 1, 1, 0);
scr := (scr | 1);
WriteCPReg(15, 0, 1, 1, 0, scr);
}
12-118 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Example 12-29 shows the sequence to change from nonsecure to secure state, however
the processor must first be in Monitor mode.
NonSecureToSecure()
{
// Step 1. Change the processor to Monitor mode.
saved_cpsr := ReadCPSR();
new_cpsr := (saved_cpsr & ~0x1F) | 0x16;
WriteCPSR(new_cpsr);
// Step 2. Clear the NS bit.
scr := ReadCPReg(15, 0, 1, 1, 0);
scr := (scr & ~1);
WriteCPReg(15, 0, 1, 1, 0, scr);
// Step 3. Restore the processor mode.
WriteCPSR(saved_cpsr);
}
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-119
Debug
The different measures that the OS can take to save energy during an idle state are
divided into two groups:
Standby The OS takes measures that reduce energy consumption but maintain the
processor state.
Power down The OS takes measures that reduce energy consumption but do not
maintain the processor state. Recovery involves a reset of the core after
the power level has been restored, and reinstallation of the processor
state.
12.12.1 Standby
Standby is the least invasive OS energy saving state because it only implies that the core
is unavailable. It does not clear any of the debug settings. For this case, if
DBGNOCLKSTOP is HIGH, the processor guarantees the following:
• If the processor is in standby and a halting debug event occurs, the processor:
— leaves standby
— retires the Wait-For-Interrupt (WFI) instruction
— enters debug state.
By writing to bit [0] of the PRCR, the debugger asserts the DBGNOPWRDWN output.
The expected usage model of this signal is that it is connected to the system power
controller and that, when HIGH, it indicates that this controller can work in emulate
mode.
If on a power-down request from the processor, the power controller is in emulate mode.
It does not remove core or ETM power but, otherwise, it behaves exactly the same as in
normal mode.
12-120 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Emulating power down is ideal for debugging applications running on top of operating
systems that are free of errors because the debug register settings are not lost on a
power-down event. However, there are a number of disadvantages such as:
• nIRQ and nFIQ interrupts to the processor must be externally masked as part of
the emulation to prevent them from retiring the WFI instruction from the pipeline.
• The reset controller must also be aware of this emulate mode to assert ARESETn
on power up, rather than nPORESET. Asserting nPORESET on power up clears
the debug registers inside the core power domain.
• The timing effects of power down and voltage stabilization are not factored in the
power-down emulation. This is the case for systems with voltage recovery
controlled by a closed loop system that monitors the core supply voltage, rather
than a fixed timed for voltage recovery.
• State lost during power down is not modeled by the emulation, making it possible
to miss errors in the state storage and recovery routines.
• Attaching the debugger for a post-mortem debug session is not possible because
setting the DBGNOPWRDWN signal to 1 might not cause the processor to
power up. The effect of setting DBGNOPWRDWN to 1 when the processor is
already powered down is implementation-defined, and is up to the system
designer.
The processor enables the debugger to detect a power-down event occurrence so it can
attempt to restore the debug session. Power-down events are detected by the following
features:
• If the processor powers back up again before the debugger had a chance to access
the APB port, the debugger can still detect the occurrence of a power-down event.
This is because the sticky power down status bit forces the processor to generate
a slave-generated error response. See Device Power Down and Reset Status
Register on page 12-53 for more details on the sticky power down bit.
The OS Save and Restore Registers enable an operating system to save the debug
registers before power down and to recover them after power up. The debugger and the
debug monitor are prevented from accessing the debug registers from the time the OS
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-121
Debug
starts saving the registers through power down, until they are restored after power up.
This behavior minimizes the possibility of race conditions and therefore, increases the
chances that the debug agent is able to resynchronize successfully after the OS
completes the restore.
12-122 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Debug
Note
When the OSLAR is cleared, a debug event is triggered if the OS unlock catch bit is set
to 1. This can be useful for a debugger to restart a debugging session.
Some debug registers reside in the debug power domain so they can be available while
the core is powered down. This register set is chosen so the debugger can identify the
part at any time and debug the OS power-up sequence.
This section describes the different debugging scenarios for systems with energy
management capabilities along with a description of how the debug features help with
those.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 12-123
Debug
When the debugger detects a slave-generated error response, it indicates that one of the
following is true:
• the debug registers are not available because the core is powered down
• the debug registers are not available because the OS locks the APB port
• the debug registers are available but the error response warns that a previous
power-down event cleared them, that is, the sticky power down bit is set to 1.
12-124 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 13
NEON & VFPLite Programmer’s Model
This chapter gives details of the NEON and VFPLite programmer’s model. It contains
the following sections:
• About the NEON and VFPLite programmer’s model on page 13-2
• General-purpose registers on page 13-3
• Short vectors on page 13-5
• System registers on page 13-12
• Modes of operation on page 13-21
• Compliance with the IEEE 754 standard on page 13-23.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 13-1
NEON & VFPLite Programmer’s Model
The NEON coprocessor is the ARM Single Instruction Multiple Data (SIMD) media
processing architecture. It is part of ARMv7-A. The components of the NEON
coprocessor are:
The NEON coprocessor can receive up to two valid NEON instructions per cycle from
the ARM integer instruction execute unit. NEON load data can be retrieved from either
the L1 data cache or the L2 memory system. In addition, it can receive 32-bit MCR data
from or send 32-bit MRC data to the ARM integer instruction execute unit.
Designed for the processor, the VFPLite coprocessor fully supports single-precision
and double-precision add, subtract, multiply, divide, multiply and accumulate, and
square root operations. Conversions between fixed-point and floating-point data
formats, and floating-point constant instruction are provided.
13-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
NEON & VFPLite Programmer’s Model
You can reference the NEON and VFPLite register bank using three explicitly aliased
views, as described in the following sections.
Figure 13-1 on page 13-4 shows the three views of the register bank and the way the
word, doubleword, and quadword registers overlap.
• Thirty-two 32-bit single word registers, S0-S31. Only half of the register bank is
accessible in this view.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 13-3
NEON & VFPLite Programmer’s Model
6
'
6
4
6
'
6
6
'
6
4
6
'
6
6
'
6
4
6
'
6
'
4
'
'
4
'
For example, you can access the least significant half of the elements of a vector in Q6
by referring to D12, and the most significant half of the elements by referring to D13.
13-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
NEON & VFPLite Programmer’s Model
The register file is especially suited for short vector operations. The four
single-precision and eight double-precision register banks function as four hardware
circular queues.
As Figure 13-2 on page 13-6 shows, the register file is divided into four banks with
eight registers in each bank for single-precision instructions and eight banks with four
registers per bank for double-precision instructions. CDP instructions access the banks
in a circular manner. Load and store multiple instructions do not access the registers in
a circular manner but treat the register file as a linearly ordered structure.
Short vector operations on double-precision data support vector lengths of two through
four iterations. The additional registers provides the capability to double-buffer
double-precision operations in a similar way as is available for single-precision
operations.
See the ARM Architecture Reference Manual, Advanced SIMD Extension and VFPv3
supplement for more information on VFP addressing modes.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 13-5
NEON & VFPLite Programmer’s Model
6 6 6 6
' ' ' '
6 6 6 6
6 6 6 6
' ' ' '
6 6 6 6
6 6 6 6
' ' ' '
6 6 6 6
6 6 6 6
' ' ' '
6 6 6 6
A short vector CDP operation that has a source or destination vector crossing a bank
boundary wraps around and accesses the first register in the bank.
Example 13-1 on page 13-7 shows the iterations of the following short vector add
instruction:
FADDS S11, S22, S31
In this instruction, the LEN field contains b101, selecting a vector length of six
iterations, and the STRIDE field contains b00, selecting a vector stride of one.
See Floating-Point Status and Control Register, FPSCR on page 13-14 for details of the
LEN and STRIDE fields and the FPSCR Register.
13-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
NEON & VFPLite Programmer’s Model
The register file organization supports four types of operations described in the
following sections:
• Scalar-only instructions
• Short vector-only instructions on page 13-8
• Short vector instructions with scalar source on page 13-8
• Scalar instructions in short vector mode on page 13-9.
Scalar-only instructions
An instruction is a scalar-only operation if the operands are treated as scalars and the
result is a scalar.
Clearing the LEN field in the FPSCR Register selects a vector length of one iteration.
For example, if the LEN field contains b000, then the following operation writes the
sum of the single-precision values in S21 and S22 to S12:
Some instructions can operate only on scalar data regardless of the value in the LEN
field. These instructions are:
Compare operations
FCMPS/D, FCMPZS/D, FCMPES/D, and FCMPEZS/D.
Integer conversions
FTOUIS/D, FTOUIZS/D, FTOSIS/D, FTOSIZS/D, FUITOS/D, and
FSITOS/D.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 13-7
NEON & VFPLite Programmer’s Model
Precision conversions
FCVTDS and FCVTSD.
Fixed-point instructions
FSHTOS/D, FSCTOS/D, FUHTOS/D, FULTOS/D, FTOSHS/D,
FTOSLS/D, FTOUHS/D, and FTOULS/D.
Vector-only instructions require that the value in the LEN field is nonzero, and that the
destination and Fm registers are not in bank 0.
Example 13-2 shows the iterations of the following short vector instruction:
FMACS S16, S0, S8
In the example, the LEN field contains b011, selecting a vector length of four iterations,
and the STRIDE field contains b00, selecting a vector stride of one.
Example 13-3 on page 13-9 shows the iterations of the following short vector
instruction with a scalar source:
FMULD D12, D8, D2
In the example, the LEN field contains b001, selecting a vector length of two iterations,
and the STRIDE field contains b00, selecting a vector stride of one.
13-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
NEON & VFPLite Programmer’s Model
This scales the two source registers, D8 and D9, by the value in D2 and writes the new
values to D12 and D13.
You can mix scalar and short vector operations by carefully selecting the source and
destination registers. If the destination is in bank 0 or bank 4, the operation is
scalar-only regardless of the value in the LEN field. You do not have to change the LEN
field from a nonzero value to b000 to perform scalar operations.
Example 13-4 shows the sequence of operations for the following instructions:
FABSD D4, D8
FADDS S0, S0, S31
FMULS S24, S26, S1
In the example, the LEN field contains b001, selecting a vector length of two iterations,
and the STRIDE field contains b00, selecting a vector stride of one.
FABSD D4, D8 ; vector DP ABS operation on regs (D8, D9) to (D4, D5)
FABSD D5, D9
FADDS S0, S0, S31 ; scalar increment of S0 by S31
FMULS S24, S26, S1 ; vector (S26, S27) scaled by S1 and written to (S24, S25)
FMULS S25, S27, S1
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 13-9
NEON & VFPLite Programmer’s Model
The tables that follow show the four types of operations possible in the VFPv3
architecture. In the tables, Any refers to the availability of all registers in the precision
for the specified operand. S refers to a scalar operand with only a single register. V refers
to a vector operand with multiple registers. Table 13-1 describes single-precision
three-operand register usage.
13-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
NEON & VFPLite Programmer’s Model
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 13-11
NEON & VFPLite Programmer’s Model
Note
The FPSID, MVFR0, and MVFR1 Registers are read-only. Attempts to write these
registers are ignored.
Table 13-6 shows the processor modes for accessing the NEON and VFPLite system
registers.
13-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
NEON & VFPLite Programmer’s Model
Table 13-6 on page 13-12 shows that a privileged mode is sometimes required to access
a NEON and VFPLite system register. When a privileged mode is required, an
instruction that tries to access a register in a nonprivileged mode takes the Undefined
Instruction trap.
For a NEON or VFPLite system register to be accessible, it must follow the rules in
Table 13-6 on page 13-12 and it must also be accessible by the Coprocessor Access
Control Register and the Nonsecure Access Control Register. See c1, Coprocessor
Access Control Register on page 3-65 and c1, Nonsecure Access Control Register on
page 3-70 for more information.
Note
All hardware ID information is now privileged access only.
The following sections describe the NEON and VFPLite system registers:
• Floating-Point System ID Register, FPSID
• Floating-Point Status and Control Register, FPSCR on page 13-14
• Floating-point exception Register, FPEXC on page 13-17
• Media and VFP Feature Registers, MVFR0 and MVFR1 on page 13-18.
The FPSID Register is a read-only register that must be accessed in privileged mode
only. It indicates which NEON and VFP implementation is being used.
+:
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 13-13
NEON & VFPLite Programmer’s Model
Table 13-7 shows how the bit values correspond with the FPSID Register functions.
FPSCR is a read/write register that can be accessed in both privileged and unprivileged
modes. All bits described as DNM in Figure 13-4 on page 13-15 are reserved for future
expansion. They must be initialized to zeros. To ensure that these bits are not modified,
code other than initialization code must use read/modify/write techniques when writing
to FPSCR. Failure to observe this rule can cause Unpredictable results in future
systems.
Figure 13-4 on page 13-15 shows the bit arrangement of the FPSCR Register.
13-14 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
NEON & VFPLite Programmer’s Model
Table 13-8 shows how the bit values correspond with the FPSCR Register functions.
[21:20] STRIDE See Vector length and stride control on page 13-16
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 13-15
NEON & VFPLite Programmer’s Model
FPSCR[18:16] is the LEN field and controls the vector length for VFP instructions that
operate on short vectors. The vector length is the number of iterations in a short vector
instruction.
FPSCR[21:20] is the STRIDE field and controls the vector stride. The vector stride is
the increment value used to select the registers involved in the next iteration of the short
vector instruction.
13-16 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
NEON & VFPLite Programmer’s Model
The rules for vector operation do not allow a vector to use the same register more than
once. LEN and STRIDE combinations that use a register more than once produce
Unpredictable results, as Table 13-9 shows. Some combinations that work normally in
single-precision short vector instructions cause Unpredictable results in
double-precision instructions.
b000 1 b00 - All instructions are scalar All instructions are scalar
The EN bit, FPEXC[30], is the NEON and VFPLite enable bit. Clearing EN disables
the NEON and VFPLite coprocessor. The EN bit is cleared on reset.
Figure 13-5 on page 13-18 shows the bit arrangement of the FPEXC Register.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 13-17
NEON & VFPLite Programmer’s Model
5HVHUYHG
(1
5HVHUYHG
Table 13-10 shows how the bit values correspond with the FPEXC Register functions.
[31] - Reserved.
[30] EN NEON and VFPLite enable bit. Setting EN enables the NEON and VFPLite coprocessor. Reset
clears EN.
[29:0] - Reserved.
The Media and VFP Feature Registers, MVFR0 and MVFR1, describe the features
supported by the NEON and VFPLite coprocessor. These registers are accessible in
privileged modes only.
50 69 65 ' 7( '3 63 5%
13-18 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
NEON & VFPLite Programmer’s Model
Table 13-11 shows how the bit values correspond with the MVFR0 Register functions.
5HVHUYHG 63 , /6 '1 )=
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 13-19
NEON & VFPLite Programmer’s Model
Table 13-12 shows how the bit values correspond with the MVFR1 Register.
[31:20] - Reserved
13-20 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
NEON & VFPLite Programmer’s Model
When the VFPLite coprocessor is in full-compliance mode, all operations are processed
according to the IEEE 754 standard in hardware.
Setting the FZ bit, FPSCR[24], enables flush-to-zero mode and increases performance
on very small inputs and results. In flush-to-zero mode, the VFPLite coprocessor treats
all subnormal input operands of arithmetic CDP operations as zeros in the operation.
Exceptions that result from a zero operand are signaled appropriately. FABS, FNEG,
and FCPY are not considered arithmetic CDP operations and are not affected by
flush-to-zero mode. A result that is tiny, as described in the IEEE 754 standard, for the
destination precision is smaller in magnitude than the minimum normal value before
rounding and is replaced with a zero. The IDC flag, FPSCR[7], indicates when an input
flush occurs. The UFC flag, FPSCR[3], indicates when a result flush occurs.
Setting the DN bit, FPSCR[25], enables default NaN mode. In default NaN mode, the
result of any operation that involves an input NaN or generated a NaN result returns the
default NaN. Propagation of the fraction bits is maintained only by FABS, FNEG, and
FCPY operations, all other CDP operations ignore any information in the fraction bits
of an input NaN.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 13-21
NEON & VFPLite Programmer’s Model
• processes results that are tiny before rounding, that is, between the positive and
negative minimum normal values for the destination precision, as zeros
• returns the default result specified by the IEEE 754 standard for overflow, division
by zero, invalid operation, or inexact operation conditions fully in hardware and
without additional latency.
13-22 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
NEON & VFPLite Programmer’s Model
See the ARM Architecture Reference Manual for information about VFP architecture
compliance with the IEEE 754 standard.
The following operations from the IEEE 754 standard are not supplied by the VFPLite
instruction set:
• remainder
• round floating-point number to integer-valued floating-point number
• binary-to-decimal conversions
• decimal-to-binary conversions
• direct comparison of single-precision and double-precision values.
For complete implementation of the IEEE 754 standard, the VFPLite coprocessor must
be augmented with library functions that implement these operations. See Application
Note 98, VFP Support Code for details of the available library functions.
Some of the implementation choices permitted by the IEEE 754 standard and used in
the VFPv3 architecture are described in the ARM Architecture Reference Manual.
NaN handling
Single-precision Double-precision
Sign 0 0
Fraction bit [22] = 1 bits [21:0] are all zeros bit [51] = 1 bits [50:0] are all zeros
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 13-23
NEON & VFPLite Programmer’s Model
Any SNaN passed as input to an operation causes an Invalid Operation exception and
sets the IOC flag, FPSCR[0]. A default QNaN is written to the destination register. The
rules for cases involving multiple NaN operands are in the ARM Architecture Reference
Manual.
Processing of input NaNs for ARM floating-point coprocessors and libraries is defined
as follows:
• In default NaN mode, NaNs are handled completely within the hardware. SNaNs
in an arithmetic CDP operation set the IOC flag, FPSCR[0]. NaN handling by
data transfer and non-arithmetic CDP instructions is the same as in
full-compliance mode. Arithmetic CDP instructions involving NaN operands
return the default NaN regardless of the fractions of any NaN operands.
Default
Instruction NaN
type mode With QNaN operand With SNaN operand
Off The QNaN or one of the QNaN operands, if IOCa set. The SNaN is quieted and the
there is more than one, is returned result NaN is determined by the rules given
according to the rules given in the ARM in the ARM Architecture Reference
Arithmetic CDP
Architecture Reference Manual. Manual.
Non-arithmetic Off
NaN passes to destination with sign changed as appropriate.
CDP On
Off
Load/store All NaNs transferred.
On
13-24 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
NEON & VFPLite Programmer’s Model
Comparisons
Comparison results modify condition code flags in the FPSCR Register. The FMSTAT
instruction transfers the current condition code flags in the FPSCR Register to the CPSR
Register. See the ARM Architecture Reference Manual for mapping of IEEE 754
standard predicates to ARM conditions. The condition code flags used are chosen so
that subsequent conditional execution of ARM instructions can test the predicates
defined in the IEEE 754 standard.
The VFPLite coprocessor handles all comparisons of numeric and reserved values in
hardware, generating the appropriate condition code depending on whether the result is
less than, equal to, or greater than.
Compare operations
The compare operations are FCMPS, FCMPZS, FCMPD, and FCMPZD.
A compare instruction involving a QNaN produces an unordered result.
An SNaN produces an unordered result and generates an Invalid
Operation exception.
Underflow
In the generation of Underflow exceptions, the before rounding form of tininess and the
inexact result form of loss of accuracy as described in the IEEE 754 standard, are used.
In flush-to-zero mode, results that are tiny before rounding, as described in the IEEE
754 standard, are flushed to a zero, and the UFC flag, FPSCR[3], is set. See the ARM
Architecture Reference Manual for information on flush-to-zero mode.
When the VFPLite coprocessor is not in flush-to-zero mode, operations are performed
on subnormal operands. If the operation does not produce a tiny result, it returns the
computed result, and the UFC flag, FPSCR[3], is not set. The IXC flag, FPSCR[4], is
set if the operation is inexact. If the operation produces a tiny result, the result is a
subnormal or zero value, and the UFC flag, FPSCR[3], is set.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 13-25
NEON & VFPLite Programmer’s Model
Exceptions
The VFPLite coprocessor implements the VFPv3 architecture and sets all exception
status bits in the FPSCR register as required for each instruction. The VFPLite
coprocessor does not support user-mode traps. The VFPLite coprocessor ignores
exception enable bits in the FPSCR register.
13-26 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 14
Embedded Trace Macrocell
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-1
Embedded Trace Macrocell
For more information about CoreSight and ETM functionality, see the CoreSight
documentation listed in Further reading on page xxxii and the Embedded Trace
Macrocell Architecture Specification.
Core interface
The core interface monitors the behavior of the processor.
Trace generation
The ETM generates a real-time trace that can be configured to include:
• instruction tracing containing:
— the addresses of executed instructions
— passed or failed condition codes of the instructions
— information about exceptions
— context IDs.
• data address tracing containing the addresses of data transfers as
viewed by the ARM architecture.
Note
The ETM does not support tracing of data values.
14-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
Main FIFO The trace generated by ETM is in a highly compressed form. The main
FIFO enables bursts caused by the trace compression to be flattened out.
When the FIFO becomes full, the FIFO signals an overflow. The trace
generation logic does not generate any new trace until the FIFO has
emptied. This causes a gap in the trace when viewed in the debugger.
You can also configure the ETM to suppress data address tracing when
the FIFO is close to being full. This can prevent overflows from
occurring.
A software debugger provides the user interface to the ETM. The debugger enables all
the ETM facilities such as the trace port to be configured. The debugger also displays
the trace information that has been captured.
The ETM compresses the trace information and outputs it to the AMBA 3 ATB
interface. The ETM can then either:
• Export the trace information through a narrow trace port. An external Trace Port
Analyzer (TPA) captures the trace information as Figure 14-1 on page 14-4
shows.
• Write the trace information directly to an on-chip Embedded Trace Buffer (ETB).
The trace is read out at low speed using the JTAG or Serial Wire interface when
the trace capture is complete as Figure 14-1 on page 14-4 shows.
When the trace is captured, the debugger extracts the information from the TPA and
decompresses it to provide a full disassembly, with symbols, of the code that was
executed. The debugger can also link this back to the original high-level source code, to
provide you with a visualization of how the code was executed on the target system.
Figure 14-1 on page 14-4 shows how the ETM fits into the CoreSight debug
environment. See the CoreSight Architecture Specification for more information.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-3
Embedded Trace Macrocell
6\VWHPRQ&KLS
$;,RURWKHUV\VWHPEXV
&URVVWULJJHUPDWUL[
&RUWH[$ZLWK(70
&RUH
DQG&7,
&7,
7UDFH
-7$* 520
WDEOH
%ULGJHDQG
'HEXJ$3%
EXVPDWUL[
$7%
$+%
6\VWHPRQ&KLS 7UDFH
'HEXJ$FFHVV3RUW '$3 IXQQHO
5HSOLFDWRU
6HULDOZLUHSRUW -7$*SRUW
-7$*RUVHULDOZLUH
LQWHUIDFHXQLW (PEHGGHG 7UDFH3RUW
7UDFH%XIIHU ,QWHUIDFH8QLW
7UDFHSRUW
&RPSXWHUEDVHGGHEXJJLQJ 7UDFH3RUW
WRRO $QDO\]HU
In Figure 14-1, the ETM and the Cross Trigger Interface, are part of a CoreSight system
consisting of other cores with their own ETMs, and various other trace sources. The
CoreSight components are programmed using the Debug Access Port (DAP) through
the APB programming bus, and trace is output over the ATB trace bus. This is then
either exported through the Trace Port Interface Unit (TPIU), or stored in the ETB.
14-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
See the Embedded Trace Macrocell Architecture Specification for information about the
trace protocol, and about controlling tracing using triggering and filtering resources.
14.1.3 NEON
The ETM ignores data transfers to and from the NEON register file. The addresses and
data values of these transfers are not traced, and have no effect on the address
comparators.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-5
Embedded Trace Macrocell
14-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
Jazelle trace -
Data comparators 2
Context ID comparators 1
Sequencer Yes
EmbeddedICE comparators 0
External inputs 4
External outputs 2
Instrumentation resources 4
FIFOFULL No
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-7
Embedded Trace Macrocell
Load pc first No
Fetch comparisons No
14-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
Table 14-2 shows the values of the Identification registers and the Integration registers
that are implementation-defined and are not described in the ETM Architecture
Specification.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-9
Embedded Trace Macrocell
a. The value given in the Base offset column is the address offset for memory-mapped access. To get the register number used
in the ETM Architecture Specification, divide this offset by four.
b. The values of these read-only registers depend on the signals on external pins of the ETM. Therefore it is not possible to define
the register reset values.
14-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
For more details about these registers and the other registers implemented by the ETM,
see the Embedded Trace Macrocell Architecture Specification.
14.5.1 ID Register
The ID Register, at offset 0x1E4, is a 32-bit read-only register that provides information
about the ETM architecture version and options supported. Figure 14-2 shows the bit
arrangement of the ID Register.
,PSOHPHQWRU $50FRUH
IDPLO\ 0DMRU(70
7UXVW=RQHVXSSRUW DUFKLWHFWXUH
YHUVLRQ 0LQRU(70
7KXPEVXSSRUW DUFKLWHFWXUH
5HVHUYHG YHUVLRQ
/RDGSFILUVW 5HYLVLRQ
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-11
Embedded Trace Macrocell
Table 14-3 shows how the bit values correspond with the ID Register functions.
[19] TrustZone support Indicates TrustZone support. The processor supports TrustZone architectural
extensions. If this bit is not set, then the ETM behaves as if the processor is in secure
state at all times.
[18] Thumb-2 support All 32-bit Thumb instructions are traced as a single instruction, including BL and BLX
immediate.
[16] Load pc first All data transfers are traced in the same order that they appear in the ARM Architecture
Reference Manual.
[11:8] Major ETM Indicates the major ETM architecture version number, ETMv3.
architecture version
[7:4] Minor ETM Indicates the minor ETM architecture version number, ETMv3.3.
architecture version
The Configuration Code Register, at offset 0x004, is a 32-bit read-only register that
provides information about the configuration of the ETM. Figure 14-3 on page 14-13
shows the bit arrangement for the Configuration Code Register.
14-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
,'UHJLVWHU
5HVHUYHG 1XPEHURI 1XPEHURI
H[WHUQDO FRXQWHUV
6RIWZDUHDFFHVVVXSSRUW RXWSXWV
1XPEHURI 1XPEHURI
7UDFHVWRSVWDUWEORFNSUHVHQW
H[WHUQDO PHPRU\PDS
1XPEHURI&RQWH[W,'FRPSDUDWRUV LQSXWV GHFRGHUV
),)2)8//ORJLF 1XPEHURI
GDWD
6HTXHQFHU FRPSDUDWRUV
1XPEHURI
SDLUVRI
DGGUHVV
FRPSDUDWRUV
Table 14-4 shows how the bit values correspond with the Configuration Code Register
functions. The Configuration Code Register has the value 0x8D294024.
[26] Trace stop/start block Indicates that the trace start/stop block is present
[23] FIFOFULL logic Indicates that it is not possible to stall the processor to prevent
FIFO overflow, uses data suppression instead
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-13
Embedded Trace Macrocell
[12:8] Number of memory map decoders Specifies the number of memory map decoders
[3:0] Number of pairs of address comparators Specifies the number of pairs of address comparators
The Configuration Code Extension Register, at offset 0x1E8, is a read-only register that
provides additional information about the configuration of the ETM. Figure 14-4 shows
the bit arrangement of the Configuration Code Extension Register.
5HVHUYHG
1XPEHURILQVWUXPHQWDWLRQUHVRXUFHV
'DWDDGGUHVVFRPSDULVRQVQRWVXSSRUWHG
5HDGDEOHUHJLVWHUV
6L]HRIH[WHQGHGH[WHUQDOLQSXWEXV
1XPEHURIH[WHQGHGH[WHUQDOLQSXWVHOHFWRUV
Table 14-5 shows how the bit values correspond with the Configuration Code Extension
Register functions. The Configuration Code Register has the value 0x0000898A.
[12] Data address comparisons Indicates that data address comparisons are supported by ETM.
not supported
14-14 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
[11] Readable registers Indicates that all registers, except some Integration Test Registers, are
readable. See Table 14-2 on page 14-9 for details of the access permission to
the Integration Test Registers. Registers with names that start with IT are the
Integration Test Registers, for example ITATBCTR1.
[10:3] Size of extended external Specifies the size of the extended external input bus.
input bus
[2:0] Number of extended Specifies the number of extended external input selectors.
external input selectors
The ETM Peripheral Identification Registers are a set of eight read-only registers,
PeripheralID7 to PeripheralID0. These registers are defined in the ETM Architecture
Specification. Only bits [7:0] of each register are used.
Table 14-6 shows the bit field definitions of the Peripheral Identification Registers. The
ETM Architecture Specification gives a more detailed description of many of these
fields.
[7:4] 0x0 Indicates that the ETM uses one 4KB block of memory
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-15
Embedded Trace Macrocell
[3:0] 0x9 Part number 1 upper Binary Coded Decimal (BCD) value of Device
number
[7:0] 0x21 Part number 0 middle and lower BCD value of Device number
Note
In Table 14-6 on page 14-15, the Peripheral Identification Registers are listed in order
of register name, from most significant (ID7) to least significant (ID0). This does not
match the order of the register offsets. Similarly, in Table 14-7 on page 14-17, the
Component Identification Registers are listed in order of register name, from most
significant (ID3) to least significant (ID0).
Figure 14-5 on page 14-17 shows this concept of a single 32-bit component ID,
obtained from the four Component Identification Registers.
14-16 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
&RQFHSWXDOELWFRPSRQHQW,' &RPSRQHQW,'
Figure 14-5 Mapping between the Component ID Registers and the component ID value
Table 14-7 shows the bit field definitions of the Component Identification Registers.
This register structure is defined in the ETM Architecture Specification.
Register Bit
Register Value Function
offset range
The following sections describe the Integration Test Registers. To access these registers
you must first set bit [0] of the Integration Mode Control Register to 1.
• You can use the write-only Integration Test Registers to set the outputs of some
of the ETM signals. Table 14-8 on page 14-18 lists the signals that can be
controlled in this way.
• You can use the read-only Integration Test Registers to read the state of some of
the ETM input signals. Table 14-9 on page 14-18 lists the signals that can be read
in this way.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-17
Embedded Trace Macrocell
Table 14-8 Output signals that can be controlled by the Integration Test Registers
ATDATAM[31, 23, 15, 7, 0] ITATBDATA0 [4:0] See ITATBDATA0 Register on page 14-20
Table 14-9 Input signals that can be read by the Integration Test Registers
The CoreSight Design Kit Technical Reference Manual gives a full description of the
use of the Integration Test Registers to check integration. In brief:
• When bit [0] of the Integration Mode Control Register is set, values written to the
write-only Integration Test Registers map onto the specified outputs of ETM. For
example, writing 0x3 to ITMISCOUT[1:0] causes EXTOUT[1:0] to take the
value 0x3.
• When bit [0] of the Integration Mode Control Register is set, values read from the
read-only integration test registers correspond to the values of the specified inputs
of ETM. For example, if you read ITMISCIN[1:0] you obtain the value of
EXTIN.
14-18 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
ITMISCOUT Register
5HVHUYHG
(;7287>@
Table 14-10 shows how the bit values correspond with the ITMISCOUT Register
functions.
ITMISCIN Register
5HVHUYHG
'%*$&.
(;7,1>@
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-19
Embedded Trace Macrocell
Table 14-11 shows how the bit values correspond with the ITMISCIN Register
functions. The value of these fields depend on the signals on the input pins when the
register is read.
ITTRIGGER Register
The ITTRIGGER Register, trigger request, at offset 0xEE8, is write-only. This register
controls the signal outputs when bit [0] of the Integration Mode Control Register is set.
Figure 14-8 shows the bit arrangement of the ITTRIGGER Register.
5HVHUYHG
75,**(5
Table 14-12 shows how the bit values correspond with the ITTRIGGER Register
functions.
ITATBDATA0 Register
The ITATBDATA0 Register, ATB data 0, at offset 0xEEC, is write-only. This register
controls signal outputs when bit [0] of the Integration Mode Control Register is set.
Figure 14-9 on page 14-21 shows the bit assignment of the ITATBDATA0 Register.
14-20 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
5HVHUYHG
$7'$7$0>@
Table 14-13 shows how the bit values correspond with the ITATBDATA0 Register
functions.
ITATBCTR2 Register
The ITATBCTR2 Register, ATB control 2, at offset 0xEF0, is read-only. This register
enables the values of signal inputs to be read when bit [0] of the Integration Mode
Control Register is set. Figure 14-10 shows the bit assignment of the ITATBCTR2
Register.
5HVHUYHG
$)9$/,'0
$75($'<0
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-21
Embedded Trace Macrocell
Table 14-14 shows how the bit values correspond with the ITATBCTR2 Register
functions. The value of these fields depend on the signals on the input pins when the
register is read.
ITATBCTR1 Register
The ITATBCTR1 Register, ATB control 1, at offset 0xEF4, is write-only. This register
controls signal outputs when bit [0] of the Integration Mode Control Register is set.
Figure 14-11 shows the bit assignment of the ITATBCTR1 Register.
5HVHUYHG
$7,'0>@
Table 14-15 shows how the bit values correspond with the ITATBCTR1 Register
functions.
ITATBCTR0 Register
The ITATBCTR0 Register, ATB control 0, at offset 0xEF8, is write-only. This register
controls signal outputs when bit [0] of the Integration Mode Control Register is set.
Figure 14-12 on page 14-23 shows the bit assignment of the ITATBCTR0 Register.
14-22 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
5HVHUYHG 5HVHUYHG
$)5($'<0
$7%<7(60>@ $79$/,'0
Table 14-16 shows how the bit values correspond with the ITATBCTR0 Register
functions.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-23
Embedded Trace Macrocell
14.6.1 TraceEnable
• The single address comparators selected by the start/stop resource are Precise, or
TraceEnable is not configured to use the start/stop resource.
The processor can execute two instructions in a cycle. The TraceEnable enabling event
is calculated once per cycle. The other parts of TraceEnable are calculated once per
instruction.
If the processor executes two instructions in a cycle, the ETM can trace neither of them
or both of them, but cannot trace only one of them. If TraceEnable indicates that one
instruction can be traced, then trace is generated as if TraceEnable had indicated that
both instructions on that cycle can be traced. An example of a trace sequence shows that
when the following occur:
2. The first instruction causes a single address comparators to match with what is
selected as a start address.
3. The second instruction causes a single address comparators to match with what is
selected as a stop address.
14-24 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
1. The first instruction is traced because the start/stop resource was active.
2. The second instruction is traced because the first instruction was traced.
3. Instructions are not traced on subsequent cycles because the start/stop resource is
off.
14.6.2 ViewData
• the single address comparators and address range comparators selected to include
regions are Precise, or ViewData is configured for exclude regions only
• the single address comparators and address range comparators selected to exclude
regions are Precise.
The processor can perform two 32-bit data transfers in a cycle. A 64-bit data transfer is
treated as two 32-bit data transfers. The ViewData enabling event is calculated once per
cycle. The other parts of ViewData are calculated once per data transfer.
If the processor performs two 32-bit data transfers in a cycle, the ETM can trace neither,
one, or both of them. ViewData is recalculated for each transfer. However, because the
enabling event is only calculated once per cycle, address comparators selected using the
enabling event cause both data transfers to be traced as if a match occurs on either
transfer.
The TraceEnable and ViewData enabling events are Precise if only the following is
selected:
• Precise single address comparators
• Precise address range comparators
• instrumentation resources
• context ID comparator
• nonsecure state resource
• prohibited resource
• hard-wired resource, always true.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-25
Embedded Trace Macrocell
The following events are delayed by two cycles compared to the timing of their input
events, and are Imprecise:
• counters at zero
• sequence state 1, 2, or 3
• trace start/stop resource.
The following events are Imprecise and have no fixed timing relationship with other
events:
• external input
• extended external input selectors.
Single address comparators and address range comparators are always Precise if the
exact match bit for that comparator is clear. This includes cases where the address
comparator is conditional upon the context ID comparator matching.
14-26 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
If the exact match bit is set, each instruction matches if both of the following are true:
• the instruction matches the address comparison conditions
• the instruction is not followed by a cancelling exception.
If the exact match bit is clear, each instruction matches if it matches the address
comparison conditions. The match occurs at the time the instruction is traced and
therefore, cannot consider if the instruction is subsequently cancelled. This is useful
when you want to use the comparator to control tracing.
Note
Instructions that are cancelled by exceptions do not cause the comparator to match. This
is useful when you want to count the number of times an instruction has been executed.
The exact match bit does not affect whether a match occurs on a data address.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-27
Embedded Trace Macrocell
If the exact match bit is set, the address range comparator does not hold its value. An
address range comparator configured for instruction addresses with its exact match bit
clear does not match on cycles in which no instructions are executed. In addition, an
address range comparator configured for data addresses with its exact match bit clear
does not match on cycles in which no data transfers are performed.
14-28 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
Because the ETM has a secure and a nonsecure context ID, the ETM outputs a context
ID when switching between secure and nonsecure states.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-29
Embedded Trace Macrocell
The ETM can predict whether an instrumentation instruction is canceled at the time it
is traced. If an instrumentation instruction is canceled, it has no effect on the
instrumentation resources.
14-30 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
2. The ETM waits for all trace that has already been generated to reach the FIFO.
5. The ETM waits for any remaining trace on the ATB interface to be accepted.
6. The resynchronizing FIFO sets the read and write pointers that is uses to zero.
When in idle state, you can safely remove the power from the ck_gclke or ATCLK
domain. It is recommended that you use the OS Save and Restore Registers to save the
registers in the ck_gclke domain before removing the power and to restore the registers
after restoring the power. See the ETM Architecture Specification for more information.
Following a reset of the ck_gclke domain, the ETM is in idle state. The ETM is also in
idle state when any of the following occur:
• the power down bit is set
• the programming bit is set
• the ETMEN bit is cleared
• the OS Save and Restore Register lock is set
• a WFI idle request is encountered
• both the NIDEN and DBGEN inputs are LOW.
The ETM Status Register reports the programming bit as set if both:
• the programming bit, power down bit, or OS Save and Restore Register lock is set
• the ETM is in idle state.
The standard method to turn off the ETM is to set the programming bit and wait for the
ETM Status Register to report the programming bit as set. This method ensures that the
idle entry sequence is complete before you can perform further operations.
If the idle request is cancelled before the idle entry sequence is complete, the ETM
behaves as if the idle request is maintained until the idle entry sequence is complete. For
example, if the programming bit is set and cleared in quick succession without checking
the ETM Status Register, the programming bit is not cleared internally until the idle
entry sequence has completed.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-31
Embedded Trace Macrocell
When a WFI occurs, the processor waits for the idle entry sequence to complete before
stopping the clock to the ETM.
14-32 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
The PMU events are all available for use by the ETM using the extended external input
facility. Each event is mapped to one or two extended external inputs. For more
information on PMU events, see c9, Event Selection Register on page 3-106.
A PMU event uses two extended external inputs where two such events can occur in a
cycle. Both extended external inputs are active in cycle when two events occur. The
ETM Architecture Specification describes how to use extended external input selectors
to make these events available to the rest of the ETM triggering and filtering logic.
Table 14-17 shows the mapping of the PMU event numbers to the ETM extended
external input event numbers.
0x0 - -
0x1 0x1 -
0x2 0x2 -
0x3 0x3 -
0x4 0x5 -
0x5 0x6 -
0x6 0x7 -
0x7 0x8 -
0x9 0xb -
0xa 0xc -
0xb 0xd -
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-33
Embedded Trace Macrocell
0xc 0xe -
0xd 0xf -
0xe 0x10 -
0xf 0x11 -
0x10 0x12 -
0x12 0x13 -
0x40 0x14 -
0x41 0x15 -
0x42 0x16 -
0x44 0x19 -
0x45 0x1a -
0x46 0x1b -
0x47 0x1c -
0x48 0x1d -
0x49 0x1e -
0x4a 0x1f -
0x4b 0x20 -
0x4c 0x21 -
0x4d 0x22 -
0x4e 0x23 -
0x4f 0x24 -
0x50 0x25 -
0x51 0x26 -
14-34 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Embedded Trace Macrocell
0x52 0x27 -
0x53 0x28 -
0x54 0x29 -
0x56 0x2c -
0x58 0x2f -
0x59 0x30 -
0x5a 0x31 -
Table 14-18 shows the behavior of the ETM when two PMU events occur in a cycle.
0 No No
1 Yes No
2 Yes Yes
The PMU can count the two ETM external outputs as additional events by using the
CTI. You must configure the CTI to connect the ETM external outputs to the PMU.
Because the CTI is implemented in the ATCLK clock domain, the ETM events must be
resynchronized to ATCLK and back to the core clock before the PMU can use it. If the
ETM events are too close together, the resynchronization causes some events to be lost.
The CTI outputs are normally held several cycles while synchronization takes place.
CTI supports edge-detection logic that enables the PMU to count one event per ETM
event. ARM recommends that you enable edge-detection for the PMU CTI outputs.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 14-35
Embedded Trace Macrocell
You can use the ETM to qualify PMU events and then count them using the ETM
counters or pass them back to the PMU to be counted. You can count the number of
cache misses caused by a particular region of instruction addresses as follows:
1. Configure the ETM extended external input selectors to the PMU cache miss
events you want to count.
14-36 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 15
Cross Trigger Interface
This chapter describes the Cross Trigger Interface (CTI). It contains the following
sections:
• About the CTI on page 15-2
• Trigger inputs and outputs on page 15-6
• Connecting asynchronous channel interfaces on page 15-8
• About the CTI programmer’s model on page 15-9
• CTI register summary on page 15-10
• CTI register descriptions on page 15-13
• CTI Integration Test Registers on page 15-24
• CTI CoreSight defined registers on page 15-30.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-1
Cross Trigger Interface
The CTI is connected to a number of trigger inputs and trigger outputs. You can connect
each trigger input to one or more trigger outputs. Figure 15-1 shows the debug system
components and the available trigger inputs and trigger outputs.
&RUWH[$
Q308,54
308
308(;7,1>@
Q&7,,54
&2005;
&2007;
308
'HEXJ ('%*54 &7,
HYHQWV
'%*75,**(5
'%*5(67$57
(;7,1>@
(70 (;7287>@
75,**(5
The CTI also implements a synchronous channel interface as defined in the CoreSight
Architecture Specification for communication with other CoreSight components. The
The CTI connects trigger inputs to trigger outputs using four channels. The following
can cause a channel event:
• A trigger input event, if you have configured the channel for the trigger input
using the CTIINEN registers. See Trigger inputs and outputs on page 15-6 for
information on trigger inputs and outputs that are available to the CTI.
15-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
• A trigger output event, if you have configured the channel for the trigger output
using the CTIOUTEN registers. See Trigger inputs and outputs on page 15-6 for
information on trigger inputs and outputs that are available to the CTI.
• An output event on the channel interface, unless the channel interface output for
that channel has been disabled using the CTICHGATE Register.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-3
Cross Trigger Interface
&URVV7ULJJHU,QWHUIDFH
&KDQQHO &KDQQHO &KDQQHO &KDQQHO
&7,&+,1>@
&7,&+,1>@
&7,&+,1>@
&7,&+,1>@
$SSOLFDWLRQWULJJHU
$SSOLFDWLRQWULJJHU
$SSOLFDWLRQWULJJHU GHQRWHVSHUPDQHQWFRQQHFWLRQWRFKDQQHO
$SSOLFDWLRQWULJJHU
GHQRWHVFRQILJXUDEOHFRQQHFWLRQWRFKDQQHO
7ULJJHULQSXW
7ULJJHULQSXW
7ULJJHULQSXWQ
7ULJJHURXWSXW
7ULJJHURXWSXW
7ULJJHURXWSXWQ
&7,&+*$7(>@
&7,&+*$7(>@
&7,&+*$7(>@
&7,&+*$7(>@
&7,&+287>@
&7,&+287>@
&7,&+287>@
&7,&+287>@
15-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
The CoreSight Design Kit for the processor includes CTI and CTM components. You
must use a separate CTI to connect the channel interface to system-level trigger signals.
The CTI operates in the ATCLK domain, and synchronizes the trigger inputs and
outputs to ATCLK where required. The EXTIN[3:0] and PMUEXTIN[1:0] trigger
outputs support edge detection, controlled by the CTI ASICCTL Register. See ASIC
Control Register, ASICCTL on page 15-21.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-5
Cross Trigger Interface
Trigger
Name Clock domain Description
input
Edge
Trigger
Name Clock domain detection Description
Output
enable
5 PMUEXTIN[0] CLK ASICCTL[4] PMU CTI event. This input can be selected by
the Event Selection Register. See c9, Event
Selection Register on page 3-106 for more
information on PMU events.
15-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
Edge
Trigger
Name Clock domain detection Description
Output
enable
6 PMUEXTIN[1] CLK ASICCTL[5] PMU CTI event. This input can be selected by
the Event Selection Register. See c9, Event
Selection Register on page 3-106 for more
information on PMU events.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-7
Cross Trigger Interface
&+287
&+,1
4 '
&+&/.
%<3$66
$V\QFKURQRXVLQWHUIDFH
6\QFKURQRXVLQWHUIDFH
&+287$&.
' 4 ' 4
&+287
&+,1
' 4 ' 4
' 4
&+,1$&.
15-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
• all register bits are reset to 0 unless otherwise stated in the text
• all registers must be accessed as words and so are compatible with little-endian
and big-endian systems.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-9
Cross Trigger Interface
Address Reset
Register name Type Width Description
offset value
0x020- 0x03C CTIINEN R/W 4 0x00 CTI Trigger to Channel Enable Registers,
CTIINEN0-7 on page 15-16
0x0A0- 0x0BC CTIOUTEN R/W 4 0x00 CTI Channel to Trigger Enable Registers,
CTIOUTEN0-7 on page 15-17
15-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
Address Reset
Register name Type Width Description
offset value
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-11
Cross Trigger Interface
Address Reset
Register name Type Width Description
offset value
15-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
CTICONTROL is a read/write register that enables the CTI. Figure 15-4 shows the bit
arrangement of the CTICONTROL Register.
5HVHUYHG
*/%(1
Table 15-4 shows how the bit values correspond with the CTICONTROL Register
functions.
5HVHUYHG 5HVHUYHG
Q&7,,54DFNQRZOHGJH
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-13
Cross Trigger Interface
Table 15-5 shows how the bit values correspond with the CTIINTACK Register
functions.
5HVHUYHG $336(7
Table 15-6 shows how the bit value corresponds with the CTIAPPSET Register
functions.
[3:0] APPSET Setting a bit HIGH generates an event for the selected channel.
For read:
0 = application trigger inactive (reset)
1 = application trigger active.
For write:
0 = no effect
1 = generate channel event.
There is one bit of the register for each channel.
15-14 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
Note
The CTIINEN Registers do not affect the CTIAPPSET operation.
5HVHUYHG $33&/($5
Table 15-7 shows how the bit values correspond with the CTIAPPCLEAR Register
functions.
Figure 15-8 on page 15-16 shows the bit arrangement of the CTIAPPPULSE Register.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-15
Cross Trigger Interface
5HVHUYHG $338/6(
Table 15-8 shows how the bit values correspond with the CTIAPPPULSE Register
functions.
[3:0] APPULSE Setting a bit HIGH generates a channel event pulse for the selected channel.
For write:
0 = no effect
1 = channel event pulse generated for one CTICLK period.
There is one bit of the register for each channel.
Note
The CTIINEN registers do not affect the CTIAPPPULSE operation.
These registers are read/write registers that enable the signalling of an event on a CTM
channel or CTM channels when the core issues a trigger, CTITRIGIN, to the CTI.
There is one register for each of the eight CTITRIGIN inputs. Within each register
there is one bit for each of the four channels implemented. These registers do not affect
the application trigger operations.
5HVHUYHG 75,*,1(1
15-16 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
Table 15-9 shows how the bit values correspond with these registers.
[3:0] TRIGINEN Enables a cross trigger event to the corresponding channel when CTITRIGIN is activated:
0 = disables the CTITRIGIN signal from generating an event on the respective channel of the
CTM
1 = enables the CTITRIGIN signal to generate an event on the respective channel of the CTM.
There is one bit of the register for each of the four channels. For example, TRIGINEN[0] set to
1 in Register CTIINEN0, enables CTITRIGIN onto channel 0.
These registers are read/write registers that define which channel can generate a
CTITRIGOUT output. There is one register for each of the eight CTITRIGOUT
outputs. Within each register there is one bit for each of the four channels implemented.
These registers affect the mapping from application trigger to trigger outputs.
5HVHUYHG
75,*287(1
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-17
Cross Trigger Interface
Table 15-10 shows how the bit values correspond with these registers.
[3:0] TRIGOUTEN Enables a channel event for the corresponding channel to generate an CTITRIGOUT output:
0 = the channel input CTICHIN from the CTM is not routed to the CTITRIGOUT output
1 = the channel input CTICHIN from the CTM is routed to the CTITRIGOUT output.
There is one bit of the register for each of the four channels. For example, enabling bit [0] in
Register CTIOUTEN0, enables CTICHIN[0] to cause a trigger event on the
CTITRIGOUT[0] output.
5HVHUYHG 75,*,167$786
Table 15-11 shows how the bit values correspond with the CTITRIGINSTATUS
Register functions.
15-18 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
5HVHUYHG 75,*28767$786
Table 15-12 shows how the bit values corresponds with the CTITRIGOUTSTATUS
Register functions.
5HVHUYHG
&7,&+,167$786
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-19
Cross Trigger Interface
Table 15-13 shows how the bit values correspond with the CTICHINSTATUS Register
functions.
5HVHUYHG
&7,&+*$7(
&7,&+*$7(
&7,&+*$7(
&7,&+*$7(
Table 15-14 shows how the bit values correspond with the CTICHGATE Register
functions.
15-20 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
The Channel Gate Register prevents events from propagating through the channel
interface to other CTIs. This enables local cross-triggering, such as causing an interrupt
when the ETM trigger occurs. You can use the CTICHGATE Register with the
CTIAPPSET, CTIAPPCLEAR and CTIAPPPULSE Registers to assert trigger outputs
by asserting channels, without affecting the rest of the system.
Note
This register is set to 0xF on reset, this causes channel interface propagation to be
enabled for all channels.
The ASICCTL Register is a read/write register that controls edge detection on trigger
outputs. Figure 15-15 shows the bit assignments of the ASIC Control Register.
5HVHUYHG
308(;7,1('*(
308(;7,1('*(
(70(;7,1('*(
(70(;7,1('*(
(70(;7,1('*(
(70(;7,1('*(
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-21
Cross Trigger Interface
Table 15-15 shows how the bit values correspond with the ASIC Control Register
functions.
[5] PMUEXTIN1EDGE Enables edge detection for trigger output 6, PMU CTI event 1.
[4] PMUEXTIN0EDGE Enables edge detection for trigger output 5, PMU CTI event 0.
[3] ETMEXTIN4EDGE Enables edge detection for trigger output 4, ETM external input 4.
[2] ETMEXTIN3EDGE Enables edge detection for trigger output 3, ETM external input 3.
[1] ETMEXTIN2EDGE Enables edge detection for trigger output 2, ETM external input 2.
[0] ETMEXTIN1EDGE Enables edge detection for trigger output 1, ETM external input 1.
You can enable edge detection for each trigger output that is used in the CLK domain.
If edge detection is enabled:
• a single PMU CTI event is generated for every rising edge of the trigger output
• the ETM external input is HIGH for one CLK cycle for every rising edge of the
trigger output.
5HVHUYHG &7,&+28767$786
15-22 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
Table 15-16 shows how the bit values correspond with the CTICHOUTSTATUS
Register functions.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-23
Cross Trigger Interface
See the CoreSight Implementation and Integration Manual for details of how to use
these signals.
ITTRIGINACK is a write-only register. This register controls signal outputs when bit
[0] of the Integration Mode Control Register is set. Figure 15-17 shows the bit
arrangement of the ITTRIGINACK Register.
5HVHUYHG &775,*,1$&.
15-24 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
Table 15-18 shows how the bit values correspond with the ITTRIGINACK Register
functions.
Each bit of the ITTRIGINACK Register corresponds to a bit on the ITTRIGIN Register.
When in integration mode and a trigger input is cleared, you must set the appropriate
bit in the ITTRIGINACK Register to enable the previous trigger input condition to be
acknowledged and cleared. If you do not set the appropriate bit in ITTRIGINACK, the
CTI synchronization logic causes the trigger input to continue to be asserted.
No bits of the ITTRIGINACK Register are connected to other integration test registers
in the processor.
ITCHOUT is a write-only register. This register controls signal outputs when bit [0] of
the Integration Mode Control Register is set. Figure 15-18 shows the bit arrangement of
the ITCHOUT Register.
5HVHUYHG &7&+287
Table 15-19 shows how the bit values correspond with the ITCHOUT Register
functions.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-25
Cross Trigger Interface
ITTRIGOUT is a write-only register. This register controls signal outputs when bit [0]
of the Integration Mode Control Register is set. Figure 15-19 shows the bit arrangement
of the ITTRIGOUT Register.
5HVHUYHG &775,*287
Table 15-20 shows how the bit values correspond with the ITTRIGOUT Register
functions.
Each bit of the ITTRIGOUT Register corresponds to a trigger output. Table 15-21
shows how some of the bits of ITTRIGOUT are connected to other integration test
registers in the processor.
[8] !nCTIIRQ - - -
15-26 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
5HVHUYHG &775,*287$&.
Table 15-22 shows how the bit values correspond with the ITTRIGOUTACK Register
functions.
Table 15-23 shows how some of the bits of the ITTRIGOUTACK Register are
connected to other integration test registers in the processor.
[8] - - - -
[7] DBGRESTARTED Debug Integration Internal Output Control Register, 0xEF4 [4]
[6:1] - - -
[0] DBGACK Debug Integration Internal Output Control Register, 0xEF4 [0]
ITCHIN is a read-only register. This register enables the values of signal inputs to be
read when bit [0] of the Integration Mode Control Register is set. Figure 15-21 on
page 15-28 shows the bit arrangement of the ITCHIN Register.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-27
Cross Trigger Interface
5HVHUYHG &7&+,1
Table 15-24 shows how the bit values correspond with the ITCHIN Register functions.
ITTRIGIN is a read-only register. This register enables the values of signal inputs to be
read when bit [0] of the Integration Mode Control Register is set. Figure 15-22 shows
the bit arrangement of the ITTRIGIN Register.
5HVHUYHG &775,*,1
Table 15-25 shows how the bit values correspond with the ITTRIGIN Register
functions.
Each bit of the ITTRIGIN Register corresponds to a trigger input. Table 15-26 on
page 15-29 shows how some of the bits of ITTRIGIN are connected to other integration
test registers in the processor.
15-28 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
[8] - - - -
[7] - - - -
[5] COMMTX Debug Integration Internal Output Control Register, 0xEF4 [2]
[4] COMMRX Debug Integration Internal Output Control Register, 0xEF4 [1]
[1] !nPMUIRQ Debug Integration Internal Output Control Register, 0xEF4 [3]
[0] DBGTRIGGER Debug Integration Internal Output Control Register, 0xEF4 [5]
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-29
Cross Trigger Interface
The Authentication Status Register reports the required security level. Table 15-27
shows how the bit values correspond with the Authentication Status Register functions.
[3] - Noninvasive debug enabled, DBGEN or NIDEN. When this bit is LOW, all trigger inputs are
disabled.
[1] - Invasive debug enabled, DBGEN. When this bit is LOW, the following trigger outputs are
disabled:
• ETM external inputs, EXTIN[3:0]
• PMU external inputs, PMUEXTIN[3:0].
The Device ID Register reports the configuration of the CTI. For the CTI, the Device
ID is 0x40906. Table 15-28 shows how the bit values correspond with the Device ID
Register functions.
15-30 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
The Device Type Identifier Register indicates the type of CoreSight component.
Table 15-29 shows how the bit values correspond with the Device Type Identifier
Register functions.
The CTI Peripheral Identification Registers are a set of eight read-only registers,
PeripheralID7 to PeripheralID0. Only bits [7:0] of each register are used.
Table 15-30 shows the bit field definitions of the Peripheral Identification Registers.
The CoreSight Architecture Specification gives a more detailed description of many of
these fields.
Register
Register name Bits Value Function
offset
[7:4] 0x0 Indicates that the ETM uses one 4KB block of memory
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-31
Cross Trigger Interface
Register
Register name Bits Value Function
offset
[3:0] 0x9 Part number 1 upper Binary Coded Decimal (BCD) value of
Device number
[7:0] 0x22 Part number 0 middle and lower BCD value of Device number
Note
In Table 15-30 on page 15-31, the Peripheral Identification Registers are listed in order
of register name, from most significant (ID7) to least significant (ID0). This does not
match the order of the register offsets. Similarly, in Table 15-31 on page 15-33, the
Component Identification Registers are listed in order of register name, from most
significant (ID3) to least significant (ID0).
Figure 15-23 on page 15-33 shows this concept of a single 32-bit component ID,
obtained from the four Component Identification Registers.
15-32 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Cross Trigger Interface
&RQFHSWXDOELWFRPSRQHQW,' &RPSRQHQW,'
Figure 15-23 Mapping between the Component ID Registers and the component ID value
Table 15-31 shows the bit field definitions of the Component Identification Registers.
This register structure is defined in the CoreSight Architecture Specification.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 15-33
Cross Trigger Interface
15-34 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 16
Instruction Cycle Timing
This chapter describes the cycle timings of instructions on the processor. It contains the
following sections:
• About instruction cycle timing on page 16-2
• Instruction-specific scheduling for ARM instructions on page 16-3
• Dual-instruction issue restrictions on page 16-14
• Other pipeline-dependent latencies on page 16-15
• NEON instruction scheduling on page 16-19
• Instruction-specific scheduling for NEON instructions on page 16-21
• VFP instructions on page 16-43
• Scheduling example on page 16-48.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-1
Instruction Cycle Timing
This chapter provides a framework for doing basic timing estimations for instruction
sequences. The framework requires three main information components:
16-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
• source requirements are always given for the first cycle in a multi-cycle
instruction
• destination available is always given with respect to the last cycle in a multi-cycle
instruction
• flags from the CPSR Register are updated internally in the E2 stage
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-3
Instruction Cycle Timing
This section provides examples of how to read ARM instruction tables described in the
chapter. See the ARM Architecture Reference Manual for assembly syntax of
instructions.
Example 16-2 shows how to read an SMLAL multiply instruction from Table 16-4 on
page 16-8.
This is a multiply accumulate instruction. Source1, in this case R2, and Source2, in this
case R3, are both required in E1. Because this is an accumulate multiply instruction, the
result registers, R0 and R1, in this case are both required as source registers in E1. The
result, stored in R0 and R1, for this case is available in E5 for the next subsequent
instruction that requires one or both of these registers as a source operand. Assuming
no data hazards, the instruction takes a minimum of three cycles to execute as indicated
by the value in the Cycles column.
16-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
Example 16-3 shows how to read an LDR PC load instruction from Table 16-9 on
page 16-11.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-5
Instruction Cycle Timing
Move instructions
MOV, MVN
The data-processing instruction tables exclude cases where the PC is the destination.
Branch instructions on page 16-12 describes these cases.
Table 16-1 shows the operation of data-processing instructions that use a destination.
Table 16-2 shows the operation of data-processing instructions that do not use a
destination.
Immediate 1 Rn:E2 - - - - -
16-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-7
Instruction Cycle Timing
a. A multiply that is followed by a MAC with a dependency on the accumulator, Rn register, triggers a special accumulator
forwarding. This enables both instructions to issue back-to-back because Rn is required as a source in E4. If this accumulator
forwarding is not used, Rn is required in E2.
The parallel arithmetic instructions include the following base instruction types:
16-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-9
Instruction Cycle Timing
The MRS, MSR, and CPS instructions modify the CPSR and SPSR registers.
Table 16-8 shows the operation of the status register access instructions.
There are many key characteristics that define different load/store instructions including
the addressing mode, the data type, data size, whether or not register writeback is
enabled, and indexing mode. Table 16-9 on page 16-11 and Table 16-10 on page 16-11
specify the timing for various load/store instruction types based on each of these
characteristics, but only if that characteristic has an effect on timing. For example, data
type and all data sizes except 64-bit offset do not affect instruction timing.
16-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
1 2 3 4 1 2 3
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-11
Instruction Cycle Timing
The number of registers in the register list usually determines the number of cycles
required to execute a load or store multiple instruction. The processor can load or store
two 32-bit registers in each cycle. However, to access 64 bits, the address must be 64-bit
aligned. Processor scheduling is static, and it is not possible to know the address
alignment at schedule time. Therefore, scheduling for the first transfer of loads and the
last transfer of stores must be done assuming the address might be unaligned.
Use the following formula to determine the number of cycles required to execute an
LDM or STM instruction:
Any write to the PC is considered a branch. This section describes both standard B
branch instructions in addition to different instruction types with the PC as the
destination register. In general, branch instructions schedule very well and have very
few hazards that prevent superscalar issue. There are several properties to the execution
of branches that make them behave differently than other instructions.
Conditional branches
Conditional branches are executed differently than other conditional instructions. Most
conditional instructions take the destination register as an additional source and the
condition codes are resolved in E2. Branches do not require the destination register, PC,
as an additional source because they already use the PC as a source. They are also
different than normal conditional operations because the flags resolve the condition
codes in E3 rather than E2. This enables the pairing of a flag setting instruction and a
branch in the same cycle.
Using the PC as a source register does not generally result in scheduling hazards as for
the case of a general-purpose register. This is because the PC values are predicted in the
pipeline and are readily available to each instruction without any forwarding required.
The only exception to this rule is that an instruction with a PC as a source register cannot
be dual issued with an instruction that uses the PC as a destination register.
Other than the dual issue restriction, using the PC as a destination register does not
result in a hazard for subsequent instructions for the same reason.
16-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
Data processing branches can have the same data hazards of nonbranch versions of
these instructions for operands other than the PC.
Load-based branches
An LDR PC or LDM PC instruction behaves like a normal load with the exception that
it requires one additional cycle to execute.
The CP15 and CP14 instructions are used to access special-purpose registers that are
distributed across the design. They also perform very specialized operations such as
cache maintenance. The minimum time to complete a CP15 operation is 60 cycles.
However, the timing of these instructions varies highly. It can take hundreds of cycles,
depending on the operation and on the current processor activity. This is because all
portions of the design must be idle before the coprocessor operation can complete.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-13
Instruction Cycle Timing
Restriction
type Description Example Cycle Restriction
16-14 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
Whenever a control flow change occurs in the processor that the prefetch unit has not
predicted, the pipeline must be flushed. This results in a cycle stall equal in number to
the length of the integer pipeline. This branch mispredict penalty is 13 cycles. See
Chapter 5 Program Flow Prediction for details on program execution prediction.
Because the processor is a statically scheduled design, any stall from the memory
system can result in the minimum of a 9-cycle delay. This 9-cycle delay minimum is
balanced with the minimum number of possible cycles to receive data from the L2 cache
in the case of an L1 load miss. Table 16-13 gives the most common cases that can result
in an instruction replay because of a memory system stall.
Replay
Delay Description
event
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-15
Instruction Cycle Timing
Replay
Delay Description
event
Data TLB 24 cycles 1. A table walk because of a miss in the L1 TLB causes a 24-cycle delay, assuming
miss the translation table entries are found in the L2 cache.
2. If the translation table entries are not present in the L2 cache, the number of stall
cycles depends on the external system memory timing.
Store buffer 9 cycles plus 1. A store instruction miss does not result in any stalls unless the store buffer is
full latency to drain full.
fill buffer 2. In the case of a full store buffer, the delay is at least nine cycles. The delay can
be more if it takes longer to drain some entries from the store buffer.
Unaligned 9 cycles 1. If a load instruction address is unaligned and the full access is not contained
load or store within a 128-bit boundary, there is a 9-cycle penalty.
request 2. If a store instruction address is unaligned and the full access is not contained
within a 64-bit boundary, there is a 9-cycle penalty.
As a general rule, Thumb-2 instructions are executed with timing constraints identical
to their ARM counterparts. However, there are some second order effects to the cycle
timing that you must observe. First, the code footprint is smaller, which can reduce the
number of instruction cache misses and therefore reduce the cycle count. Second,
branch instructions tend to be more densely packed, slightly reducing the branch
prediction accuracy that is achieved and therefore increasing the number of branch
mispredictions. Neither of these effects can be accurately measured using hand
calculating techniques.
Note
The code footprint and densily packed branch instructions can have an impact on the
performance of the processor. In most cases, the interaction of these effects might
cancel with each other.
The majority of the Thumb-2EE instruction set is identical in both encodings and
behavior to the Thumb-2 instruction set and therefore the cycle timings are also
identical to the Thumb-2 instruction timings. The behavior of some instructions are
different when executed in ThumbEE state instead of in Thumb state. However, the
16-16 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
behavior changes for these instructions do not result in any changes to their cycle
timing. The only additional cycle timing information for Thumb-2EE is for the new
instructions.
Table 16-14 shows the timing operation of the new Thumb-2EE instructions.
ENTERX/LEAVEXa 16 - - - - - -
CHKAb 1 E2 E2 - - - -
HBc 1 - - - - - -
HBLd 1 - - - - R14:E3 -
HBPc 2 - - - - R8:E2 -
a. This instruction waits for all outstanding instructions to complete and then issues.
b. If CHKA fails the array bounds check, then an exception is taken. Otherwise, this is a single cycle instruction.
c. This instruction is predicted and behaves as a direct branch, B instruction.
d. This instruction is predicted and behaves as a direct branch and link, BL instruction.
e. Timing is identical to similar load instructions.
f. Timing is identical to similar store instructions.
All loads and stores in ThumbEE state have the additional functionality of checking the
base register for a zero value. If the base register is zero, then the processor performs a
branch to the address [HandlerBase – 4]. See the ARM Architecture Reference Manual,
Thumb-2 Execution Environment supplement for more information.
The processor handles this scenario in the same way as to an exception such as a data
abort because it does not occur in the common case. If the base register is zero, the
processor flushes the pipeline and branches to the correct address. The additional cycle
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-17
Instruction Cycle Timing
time penalty for this is variable in length, but is at least 13 cycles. The CHKA
instruction uses the same mechanism when the array bounds check fails. This is also a
rare occurrence and therefore is not optimized for performance.
All Thumb-2EE branch type instructions are predicted in ThumbEE state in the same
manner that they are predicted in ARM or Thumb state. In addition, the handler base
branch instructions, HB[L][P], are also predicted using the same branch prediction
hardware used for direct branch and branch link, B and BL instructions, respectively.
Because the Thumb-2EE instruction set uses R9 as the base register rather than R13 as
a stack pointer, LDR and STR instructions that read or write to the PC are written onto
the return stack to aid in the prediction of these indirect branches. The usage model of
the return stack in ThumbEE state, using R9 as the stack pointer, is identical to the usage
model in ARM and Thumb state, using R13 as the stack pointer.
An additional point about conditional instructions is that the destination register of the
instruction is treated as an additional source operand. This is done so the old value can
be forwarded in the case when the instruction fails the condition codes. This additional
source operand is required in the E2 stage of the machine.
16-18 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
As long as these queues are not full, the processor can continue to run and execute both
ARM and NEON instructions. When the NEON instruction or data queue is full, the
processor stalls execution of the next NEON instruction until there is room for this
instruction in the queues. In this manner, the cycle timing of NEON instructions
scheduled in the NEON engine can affect the overall timing of the instruction sequence,
but only if there are enough NEON instructions to fill the instruction or data queue.
Note
When the processor is configured without NEON, all attempted NEON and VFP
instructions result in an Undefined exception.
NEON instruction scheduling only affects the overall timing sequence if there are
enough NEON instructions to fill the data or instruction queue. If the majority of
instructions in a sequence are NEON instructions, then the NEON unit dictates the time
required for the sequence. Occasional ARM instructions in the sequence occur in
parallel with the NEON instructions. If most of the instructions in a sequence are ARM
instructions, they dominate the timing of the sequence, and a NEON data-processing
instruction typically takes one cycle. In hand calculations of cycle timing, you must
consider the type of instruction, ARM or NEON, that dominates the sequence.
Using MRC instructions to pass data from NEON to ARM takes a minimum of 20
cycles. The data transfers from the NEON register file at the back of the NEON pipeline
to the ARM register file at the beginning of the ARM pipeline. You can hide some or all
of this latency by doing multiple back-to-back MRC transfers. The processor continues
to issue instructions following a MRC until it encounters an instruction that must read
or write the ARM register file. At that point, instruction issue stalls until all pending
register transfers from NEON to ARM are complete.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-19
Instruction Cycle Timing
Using MCR instructions to pass data from ARM to NEON does not require any
additional cycles. To the NEON unit, the transfers are similar to NEON load
instructions.
The NEON engine has limited dual issue capabilities. A load/store, permute, MCR, or
MRC type instruction can be dual issued with a NEON data-processing instruction. A
load/store, permute, MCR, or MRC executes in the NEON load/store permute pipeline.
A NEON data-processing instruction executes in the NEON integer ALU, Shift, MAC,
floating-point add or multiply pipelines. This is the only dual issue pairing permitted.
There are also similar restrictions to the ARM integer pipeline in terms of dual issue
pairing with multi-cycle instructions. The NEON engine can potentially dual issue on
both the first and last cycle of a multi-cycle instruction, but not on any of the
intermediate cycles.
16-20 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
NEON load/store permute instructions are divided into the following subcategories:
• byte permute instructions
• load/store instructions
• register transfer instructions.
This section provides examples of how to read NEON instruction tables described in the
chapter. See the ARM Architecture Reference Manual, Advanced SIMD Extension and
VFPv3 supplement for assembly syntax of instructions.
In these NEON instruction tables, Q<n>Lo maps to D<2n> and Q<n>Hi maps to D<2n+1>.
Example 16-4 shows how to read a NEON integer ALU instruction from Table 16-15
on page 16-22.
This is an integer NEON vector and long instruction. Source1, in this case D1, and
Source2, in this case D2, are both required in N1. The result, stored in Q2 for this case,
is available in N3 for the next subsequent instruction that requires this register as a
source operand. Assuming no data hazards, the instruction takes a minimum of one
cycle to execute as indicated by the value in the Cycles column.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-21
Instruction Cycle Timing
Example 16-5 shows how to read a NEON floating-point multiply instruction from
Table 16-18 on page 16-30.
Table 16-15 shows the operation of the NEON integer ALU instructions.
1 2 3 4 1 2
16-22 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
1 2 3 4 1 2
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-23
Instruction Cycle Timing
1 2 3 4 1 2
16-24 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
1 2 3 4 1 2
a. VFMX and VFMN exist only for the Dd, Dn, Dm variant.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-25
Instruction Cycle Timing
Table 16-16 shows the operation of the NEON integer multiply instructions.
1 2 3 4 1 2
16-26 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
1 2 3 4 1 2
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-27
Instruction Cycle Timing
1 2 3 4 1 2
16-28 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
Table 16-17 shows the operation of the NEON integer shift instructions.
Register
Instruction
format Cycles Source1 Source2 Source3 Source4 Result1 Result2
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-29
Instruction Cycle Timing
Register
Instruction
format Cycles Source1 Source2 Source3 Source4 Result1 Result2
16-30 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
Register
Instruction
format Cycles Source1 Source2 Source3 Source4 Result1 Result2
a. The VMLA.F, VMLS.F, VRECPS.F, VRSQRTS.F instructions begin execution on the floating-point multiply pipeline. The
floating-point multiply result is then forwarded to the floating-point add pipeline to complete the accumulate portion of the
instructions. Therefore, these instructions are pipelined across ten stages, N1 through N10, where N10 is the writeback stage.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-31
Instruction Cycle Timing
Table 16-19 shows the operation of the NEON byte permute instructions.
1 2 3 4 1 2
16-32 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
1 2 3 4 1 2
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-33
Instruction Cycle Timing
VLDR and VSTR instructions transfer a single 64-bit register and require two issue
cycles. Processor scheduling is static, and it is not possible to know the address
alignment at schedule time. Therefore, scheduling of the VLDR and VSTR instructions
must be done assuming the load/store address is not 128-bit aligned.
VLDM and VSTM instructions transfer multiple 64-bit registers. The number of
registers in the register list determines the number of cycles required to execute a load
or store multiple. The NEON unit can load or store two 64-bit registers in each cycle.
The number of cycles required to execute a VLDM or VSTM instruction is given by the
following formula:
For example, VLDM and VSTM transfer of one or two registers require two cycles,
three or four registers require three cycles, five or six registers require four cycles, and
15 or 16 registers require nine cycles.
VLD and VST element and structure load/store instructions transfer one up to four
64-bit registers. The number of cycles required to execute a VLD or VST instruction
depends on both the number of registers in the register list and the alignment
requirement. Typically, you can reduce the number of cycles if you use a stronger
alignment. For example, a 2-register VLD2.16@64 requires two cycles but
VLD2.16@128 requires only one cycle.
16-34 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
1-reg 1 - - - - Dd:N1 -
(@64)
2-reg 1st - - - - - -
(unaligned, @64) 2nd - - - - Dd:N1 Dd+1:N1
3-reg 1st - - - - - -
(unaligned, @64) 2nd - - - - Dd:N1 Dd+1:N1
3rd - - - - Dd+2:N1 -
4-reg 1st - - - - - -
(unaligned, @64) 2nd - - - - Dd:N1 Dd+1:N1
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-35
Instruction Cycle Timing
4-reg 1st - - - - - -
(unaligned, @64) 2nd - - - - Dd:N2 Dd+2:N2
4th - - - - Dd+2:N2 -
4-reg 1st - - - - - -
(@128, @256) 2nd - - - - Dd:N2 Dd+1:N2
16-36 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
1-reg 1 Dd:N1 - - - - -
(@64)
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-37
Instruction Cycle Timing
16-38 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
5th - - - - Dd+2:N2 -
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-39
Instruction Cycle Timing
1-reg 1 Dd:N1 - - - - -
(.8 unaligned, .16@16,
.32@32
16-40 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
1-reg - - - - - Dd:N2 -
(.8 unaligned, .16@16,
.32@32)
2-reg 1st - - - - - -
(.16 unaligned, .32 2nd - - - - Dd:N2 Dd+1:N2
unaligned)
3rd - - - - Dd+2:N2 -
a. This table lists the VLDR instruction scheduling for little-endian mode. For VLDR in big-endian mode, results are available
in N2 and not N1.
b. This table lists the VLD instruction scheduling for little-endian mode. For VLD1 multiple 1-element in big-endian mode,
results are available in N2 and not N1. For VLD2, VLD3, VLD4 results are available in N2 regardless of the endianness
configuration. This table lists only the single-spaced register transfer variants. For single-spaced register transfer variants, the
source and destination registers are Dd, Dd+1, Dd+2, and Dd+3. For double-spaced register transfer variants, the source and
destination registers are Dd, Dd+2, Dd+4, and Dd+6.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-41
Instruction Cycle Timing
c. This table lists only the single-spaced register transfer variants. For single-spaced register transfer variants, the source and
destination registers are Dd, Dd+1, Dd+2, and Dd+3. For double-spaced register transfer variants, the source and destination
registers are Dd, Dd+2, Dd+4, and Dd+6.
Table 16-21 shows the operation of the NEON register transfer instructions.
1 2 3 4 1 2
Dm,Rd,Rn 1st - - - - - -
2nd - - - - Dm:N2 -
16-42 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
Most numbers are normal and have an internal format that consists of a sign, a fractional
number between one and two, and an exponent. Subnormal numbers are too small to
represent in the normal space. A subnormal number consists of a sign, a fractional
number between zero and one, and a zero in the exponent field. Special numbers are
zeros, NaNs, and infinities.
Table 16-22 shows the range of cycle times for VFPv3 data-processing instruction with
normal numbers. Subnormal numbers usually take more time as the Subnormal penalty
column in Table 16-22 shows. Special numbers are handled by separate logic, and
usually take less time than what is indicated in this table.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-43
Instruction Cycle Timing
FCONST 4 4 none
FABS 4 4 none
FCPY 4 4 none
FNEG 4 4 none
FCMP 4 or 7 4 or 7 none
FCMPE 4 or 7 4 or 7 none
FCMPZ 4 or 7 4 or 7 none
FCMPEZ 4 or 7 4 or 7 none
FCVTDS 5 - operand
FCVTSD - 7 intermediate
FSITO 9 9 none
FUITO 9 9 none
FTOSI 8 8 none
FTOUI 8 8 none
FTOSIZ 8 8 none
FTOUIZ 8 8 none
FSHTO 9 9 none
FUHTO 9 9 none
16-44 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
FSLTO 9 9 none
FULTO 9 9 none
FTOSH 6 8 none
FTOUH 6 8 none
FTOSL 6 8 none
FTOUL 6 8 none
The Instruction column of Table 16-22 on page 16-43 indicates the specific VFPv3
data-processing instruction. The Single precision cycles column indicates the number
of cycles required for normal single-precision inputs of the associated instruction. The
Double precision cycles column indicates the number of cycles required for normal
double-precision inputs of the associated instruction. For example, a double-precision
FMUL instruction takes any where between 11 and 17 cycles, depending on the data. A
single- or double-precision FCMP instruction takes either four or seven cycles,
depending on the data.
The reason for the wide range of cycles required for normal data is because the VFPLite
coprocessor can detect when a given problem does not require additional computation.
For example, if the VFPLite coprocessor multiplies 3 times 3, the operation takes less
time than when it multiplies pi (π) times pi (π).
The Subnormal penalty column indicates whether additional cycles are required for
subnormal operands, subnormal intermediate values, or subnormal final results. This
penalty only applies when the VFPLite coprocessor has flush-to-zero mode disabled.
For operations that have the result penalty, six to seven additional cycles are required to
format the final result.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-45
Instruction Cycle Timing
A slightly simpler way to look at 3-input operation is to split them into equivalent
multiply and add instructions. A 3-input operation takes the same amount of time as its
component multiplication and addition, usually minus one cycle.
An FMAC operation with three normal operands might have a multiplication that takes
12 cycles and an addition that takes nine cycles. The corresponding multiply followed
by add instruction takes:
12 + 9 - 1 = 20 cycles
The corresponding FMAC multiply followed by add instruction has two operand
penalties of nine to 10 cycles, an intermediate penalty of 11 to 13 cycles, and the cost
of the multiply-add of 18 to 21 cycles. The total time is between:
9 + 11 + 18 = 38 cycles and 10 + 13 + 21 = 44 cycles
The NFP pipeline can execute a subset of the VFPv3 data-processing instructions more
quickly than the VFPLite coprocessor. The following constraints define which VFP
instructions are executable by the NFP pipeline:
• single-precision data-processing operations only
• RunFast mode must be enabled
• round-to-nearest mode
• scalar only or non-short vector instructions
If these constraints are met, the following instructions can execute in the NFP pipeline:
• FADDS, FSUBS
• FABSS, FNEGS
• FMULS, FNMULS
16-46 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Instruction Cycle Timing
• FMACS, FNMACS
• FMSCS, FNMSCS
• FCMPS, FCMPES
• FCMPZS, FCMPEZS
• FUITOS, FSITOS
• FTOUIS, FTOSIS
• FTOUIZS, FTOSIZS
• FSHTOS, FSLTOS
• FUHTOS,FULTOS
• FTOSHS, FTOSLS
• FTOUHS, FTOULS.
VFP instructions that execute in the NFP pipeline have results that are 32-bit
single-precision writes to the upper or lower half of the 64-bit register value. A
restriction that applies to VFP instructions executing in the NFP pipeline is that
instruction results cannot be forwarded early to subsequent instructions.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 16-47
Instruction Cycle Timing
16-48 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Chapter 17
AC Characteristics
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 17-1
AC Characteristics
The notation for setup and hold times of input signals is:
Tis Input setup time. Tis is the amount of time the input data is valid before
the next rising clock edge.
Tih Input hold time. Tih is the amount of time the input data is valid after the
next rising clock edge.
Figure 17-1 shows the setup and hold times of an input signal.
&/.
,13876,*1$/ LQSXWGDWD
7LVVLJQDO
7LKVLJQDO
The time during which the processor can sample input data is Tissignal.
The notation for setup and hold times of output signals is:
Tov Output valid time. Tov is the amount of time after the rising clock edge
before valid output data appears.
Toh Output hold time. Toh is the amount of time the output data is valid after
the next rising clock edge.
Figure 17-2 shows the setup and hold times of an output signal.
&/.
2873876,*1$/ RXWSXWGDWD
7RYVLJQDO 7RKVLJQDO
17-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
AC Characteristics
The timing parameter tables in this chapter show setup and hold parameters of each
signal as percentages of the relevant clock as shown in Table 17-1.
The setup parameter values are based on the Slow-Slow (SS) corner under the following
conditions:
• 125 °C
• VDD = nominal operating voltage – 10%
• target frequency = fmax.
The hold parameter values are based on the Fast-Fast (FF) corner under the following
conditions:
• -40 •C
• VDD = nominal operating voltage + 10%
• target frequency = fmax.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 17-3
AC Characteristics
17-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
AC Characteristics
a. Although this is a static input, it can be timed at frequency during static timing analysis.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 17-5
AC Characteristics
17-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
AC Characteristics
PCLK is the clock for the debug APB interface, and CLK is the clock for the
miscellaneous debug signals.
Percent of Percent of
Signal Clock Setup parameter clock period Hold parameter clock period
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 17-7
AC Characteristics
Percent of Percent of
Signal Clock Setup parameter clock period Hold parameter clock period
17-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
AC Characteristics
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 17-9
AC Characteristics
17-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
AC Characteristics
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. 17-11
AC Characteristics
17-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Appendix A
Signal Descriptions
This appendix describes the signals of the processor. It contains the following sections:
• AXI interface on page A-2
• ETM ATB interface on page A-3
• MBIST and DFT interface on page A-4
• Preload engine interface on page A-7
• Debug APB interface on page A-8
• Miscellaneous signals on page A-10
• Miscellaneous debug signals on page A-13
• Miscellaneous ETM and CTI signals on page A-15.
Note
For each output signal of the processor, the value in the Reset column in the signal tables
can either be defined as a logic 1 or 0 or undefined during reset.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. A-1
Signal Descriptions
Table A-1 shows the AXI interface signals that have been added or that have different
definitions for the Cortex-A8 processor.
A-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Signal Descriptions
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. A-3
Signal Descriptions
Table A-3 shows the MBIST interface signals. All MBIST interface signals are
registered. All MBIST signals from Table A-3 must be controllable from external SoC
pins for use by ATE.
MBISTDATAINL1 I - Serial data input for loading the L1 MBIST Instruction Register
MBISTDATAINL2 I - Serial data input for loading the L2 MBIST Instruction Register.
A-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Signal Descriptions
A.3.2 DFT pins and additional MBIST pin requirements during MBIST testing
Table A-4 shows the signals necessary for DFT. It also shows the additional pins
required during MBIST testing.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. A-5
Signal Descriptions
A-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Signal Descriptions
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. A-7
Signal Descriptions
A-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Signal Descriptions
PREADY O 1'b0 APB slave ready. An APB slave can assert PREADY to
extend a transfer.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. A-9
Signal Descriptions
A-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Signal Descriptions
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. A-11
Signal Descriptions
CFGTE I - Controls the state of TE bit in the CP15 c1 Control Register at reset:
0 = TE bit is LOW
1 = TE bit is HIGH.
This pin is only sampled during reset of the processor.
CFGEND0 I - Controls the state of EE bit in the CP15 c1 Control Register at reset:
0 = EE bit is LOW
1 = EE bit is HIGH.
This pin is only sampled during reset of the processor.
SILICONID[31:0] I - Defines the reset value of the CP15 Silicon ID Register. See c0,
Silicon ID Register on page 3-52 for more information.
This pin is only sampled during reset of the processor.
A-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Signal Descriptions
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. A-13
Signal Descriptions
A-14 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Signal Descriptions
CTICHOUT[3:0] O 4'b0000 CTI channel output status. Each bit represents a valid channel output:
0 = channel output inactive
1 = channel output active.
CTICHIN[3:0] I - CTI channel input status. Each bit represents a valid channel input:
0 = channel input inactive
1 = channel input active.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. A-15
Signal Descriptions
A-16 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Glossary
This glossary describes some of the terms used in technical documents from ARM .
Abort A mechanism that indicates to a core that the value associated with a memory access is
invalid. An abort can be caused by the external or internal memory system as a result of
attempting to access invalid instruction or data memory. An abort is classified as either
a Prefetch or Data Abort, and an internal or External Abort.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. Glossary-1
Glossary
The AXI protocol also includes optional extensions to cover signaling for low-power
operation.
AXI is targeted at high performance, high clock frequency system designs and includes
a number of features that make it very suitable for high speed sub-micron interconnect.
Advanced High-performance Bus (AHB)
A bus protocol with a fixed pipeline between address/control and data phases. It only
supports a subset of the functionality provided by the AMBA AXI protocol. The full
AMBA AHB protocol specification includes a number of features that are not
commonly required for master and slave IP developments and ARM recommends only
a subset of the protocol is usually used. This subset is defined as the AMBA AHB-Lite
protocol.
Glossary-2 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Glossary
Architecture The organization of hardware and/or software that characterizes a processor and its
attached components, and enables devices with similar characteristics to be grouped
together when describing their behavior, for example, Harvard architecture, instruction
set architecture, ARMv7 architecture.
Arithmetic instruction
Any VFPv3 Coprocessor Data Processing (CDP) instruction except FCPY, FABS, and
FNEG.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. Glossary-3
Glossary
AXI terminology The following AXI terms are general. They apply to both masters and slaves:
Active transfer
A transfer for which the xVALID1 handshake has asserted, but for which
xREADY has not yet asserted.
Completed transfer
A transfer for which the xVALID/xREADY handshake is complete.
Transmit An initiator driving the payload and asserting the relevant xVALID
signal.
The following AXI terms are master interface attributes. To obtain optimum
performance, they must be specified for all components with an AXI master interface:
Glossary-4 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Glossary
Read ID capability
The maximum number of different ARID values that a master interface
can generate for all active read transactions at any one time.
Read ID width
The number of bits in the ARID bus.
Write ID capability
The maximum number of different AWID values that a master interface
can generate for all active write transactions at any one time.
Write ID width
The number of bits in the AWID and WID buses.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. Glossary-5
Glossary
Big-endian Byte ordering scheme in which bytes of decreasing significance in a data word are
stored at increasing addresses in memory.
See also Cache terminology diagram on the last page of this glossary.
Branch prediction The process of predicting if branches are to be taken or not in pipelined processors.
Successfully predicting if branches are to be taken enables the processor to prefetch the
instructions following a branch before the branch is fully resolved. Branch prediction
can be done in software or by using custom hardware. Branch prediction techniques are
categorized as static, in which the prediction decision is decided before run time, and
dynamic, in which the prediction decision can change during program execution.
Breakpoint A breakpoint is a mechanism provided by debuggers to identify an instruction at which
program execution is to be halted. Breakpoints are inserted by the programmer to enable
inspection of register contents, memory locations, variable values at fixed points in the
program execution to test that the program is operating correctly. Breakpoints are
removed after the program is successfully tested.
Glossary-6 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Glossary
Byte-invariant In a byte-invariant system, the address of each byte of memory remains unchanged
when switching between little-endian and big-endian operation. When a data item
larger than a byte is loaded from or stored to memory, the bytes making up that data item
are arranged into the correct order depending on the endianness of the memory access.
The ARM architecture supports byte-invariant systems in ARMv6 and later versions.
When byte-invariant support is selected, unaligned halfword and word memory
accesses are also supported. Multi-word accesses are expected to be word-aligned.
See also Cache terminology diagram on the last page of this glossary.
Cache hit A memory access that can be processed at high speed because the instruction or data
that it addresses is already held in the cache.
Cache line The basic unit of storage in a cache. It is always a power of two words in size (usually
four or eight words), and is required to be aligned to a suitable memory boundary.
See also Cache terminology diagram on the last page of this glossary.
Cache line index The number associated with each cache line in a cache way. Within each cache way, the
cache lines are numbered from 0 to (set associativity) -1.
See also Cache terminology diagram on the last page of this glossary.
Cache lockdown To fix a line in cache memory so that it cannot be overwritten. Cache lockdown enables
critical instructions and/or data to be loaded into the cache so that the cache lines
containing them are not subsequently reallocated. This ensures that all subsequent
accesses to the instructions/data concerned are cache hits, and therefore complete as
quickly as possible.
Cache miss A memory access that cannot be processed at high speed because the instruction/data it
addresses is not in the cache and a main memory access is required.
Cache set A cache set is a group of cache lines (or blocks). A set contains all the ways that can be
addressed with the same index. The number of cache sets is always a power of two.
See also Cache terminology diagram on the last page of this glossary.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. Glossary-7
Glossary
Cache way A group of cache lines (or blocks). It is 2 to the power of the number of index bits in size.
See also Cache terminology diagram on the last page of this glossary.
CAM See Content Addressable Memory.
Cast out See Victim.
CDP instruction Coprocessor data processing instruction. For the VFPLite coprocessor, CDP
instructions are arithmetic instructions and FCPY, FABS, and FNEG.
Glossary-8 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Glossary
CAM includes comparison logic with each bit of storage. A data value is broadcast to
all words of storage and compared with the values there. Words that match are flagged
in some way. Subsequent operations can then work on flagged words. It is possible to
read the flagged words out one at a time or write to certain bit positions in all of them.
Context The environment that each process operates in for a multitasking operating system. In
ARM processors, this is limited to mean the physical address range that it can access in
memory and the associated memory access permissions.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. Glossary-9
Glossary
Data Abort An indication from a memory system to the core of an attempt to access an illegal data
memory location. An exception must be taken if the processor attempts to use the data
that caused the abort.
Glossary-10 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Glossary
Double-precision value
Consists of two 32-bit words that must appear consecutively in memory and must both
be word-aligned, and that is interpreted as a basic double-precision floating-point
number according to the IEEE 754-1985 standard.
Doubleword A 64-bit data item. The contents are taken as being an unsigned integer unless otherwise
stated.
Doubleword-aligned
A data item having a memory address that is divisible by eight.
ECT See Embedded Cross Trigger.
Embedded Cross Trigger (ECT)
The ECT is a modular component to support the interaction and synchronization of
multiple triggering events with an SoC.
EmbeddedICE-RT The JTAG-based hardware provided by debuggable ARM processors to aid debugging
in real-time.
Embedded Trace Buffer
The ETB provides on-chip storage of trace data using a configurable sized RAM.
Embedded Trace Macrocell (ETM)
A hardware macrocell that, when connected to a processor core, outputs instruction and
data trace information on a trace port. The ETM provides processor driven trace through
a trace port compliant to the ATB protocol.
Endianness Byte ordering. The scheme that determines the order that successive bytes of a data
word are stored in memory. An aspect of the system’s memory mapping.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. Glossary-11
Glossary
In ARM processors, a fast context switch is caused by the selection of a non-zero PID
value to switch the context to that of the next process. A fast context switch causes each
Virtual Address for a memory access, generated by the ARM processor, to produce a
Modified Virtual Address that is sent to the rest of the memory system to be used in
place of a normal Virtual Address. For some cache control operations Virtual Addresses
are passed to the memory system as data. In these cases no address modification takes
place.
• arithmetic operation inputs that are in the subnormal range for the input precision
Glossary-12 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Glossary
• arithmetic operation results, other than computed zero results, that are in the
subnormal range for the input precision before rounding.
The VFPLite coprocessor does not interpret these values as subnormal values or convert
them to subnormal values.
The subnormal range for the input precision is –2Emin < x < 0 or 0< x < 2Emin.
Fm The second source operand in dyadic or triadic operations. Sm for single-precision
operations and Dm for double-precision
Fn The first source operand in dyadic or triadic operations. Sn for single-precision
operations and Dn for double-precision.
Formatter The formatter is an internal input block in the ETB and TPIU that embeds the trace
source ID within the data to create a single trace stream.
Fraction The floating-point field that lies to the right of the implied binary point.
Fully-associative cache
A cache that has one cache set that consists of the entire cache. The number of cache
entries is the same as the number of cache ways.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. Glossary-13
Glossary
IEEE 754 standard IEEE Standard for Binary Floating-Point Arithmetic, ANSI/IEEE Std. 754-1985. The
standard that defines data types, correct operation, exception types and handling, and
error bounds for floating-point systems. Most processors are built in compliance with
the standard in either hardware or a combination of hardware and software.
IGN See Ignore.
Ignore (IGN) Must ignore memory writes.
Illegal instruction An instruction that is architecturally Undefined.
IMB See Instruction Memory Barrier.
Implementation-defined
The behavior is not architecturally defined, but is defined and documented by individual
implementations.
Implementation-specific
The behavior is not architecturally defined, and does not have to be documented by
individual implementations. Used when there are a number of implementation options
available and the option chosen does not affect software compatibility.
Index See Cache index.
Infinity In the IEEE 754 standard format to represent infinity, the exponent is the maximum for
the precision and the fraction is all zeros.
Instruction cache A block of on-chip fast access memory locations, situated between the processor and
main memory, used for storing and retrieving copies of often used instructions. This is
done to greatly increase the average speed of memory accesses and so improve
processor performance.
Instruction cycle count
The number of cycles for which an instruction occupies the Execute stage of the
pipeline.
Instruction Memory Barrier (IMB)
An operation to ensure that the prefetch buffer is flushed of all out-of-date instructions.
Internal scan chain A series of registers connected together to form a path through a device, used during
production testing to import test patterns into internal nodes of the device and export the
resulting values.
Interrupt handler A program that control of the processor is passed to when an interrupt occurs.
Interrupt vector One of a number of fixed addresses in low memory, or in high memory if high vectors
are configured, that contains the first instruction of the corresponding interrupt handler.
Glossary-14 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Glossary
Invalidate To mark a cache line as being not valid by clearing the valid bit. This must be done
whenever the line does not contain a valid cache entry. For example, after a cache flush
all lines are invalid.
Jazelle architecture The ARM Jazelle architecture extends the Thumb and ARM operating states by adding
a Java state to the processor. Instruction set support for entering and exiting Java
applications, real-time interrupt handling, and debug support for mixed Java/ARM
applications is present. When in Java state, the processor fetches and decodes Java
bytecodes and maintains the Java operand stack.
Joint Test Action Group (JTAG)
The name of the organization that developed standard IEEE 1149.1. This standard
defines a boundary-scan architecture used for in-circuit testing of integrated circuit
devices. It is commonly known by the initials JTAG.
JTAG See Joint Test Action Group.
LE Little endian view of memory in both byte-invariant and word-invariant systems. See
also Byte-invariant, Word-invariant.
Line See Cache line.
Little-endian Byte ordering scheme in which bytes of increasing significance in a data word are stored
at increasing addresses in memory.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. Glossary-15
Glossary
Macrocell A complex logic block with a defined interface and behavior. A typical VLSI system
comprises several macrocells (such as a processor, an ETM, and a memory block) plus
application-specific logic.
Memory bank One of two or more parallel divisions of interleaved memory, usually one word wide,
that enable reads and writes of multiple words at a time, rather than single words. All
memory banks are addressed simultaneously and a bank enable or chip select signal
determines which of the banks is accessed for each transfer. Accesses to sequential
word addresses cause accesses to sequential banks. This enables the delays associated
with accessing a bank to occur during the access to its adjacent bank, speeding up
memory transfers.
Memory coherency A memory is coherent if the value read by a data read or instruction fetch is the value
that was most recently written to that location. Memory coherency is made difficult
when there are multiple possible physical locations that are involved, such as a system
that has main memory, a write buffer and a cache.
Memory Management Unit (MMU)
Hardware that controls caches and access permissions to blocks of memory, and
translates virtual addresses to physical addresses.
Microprocessor See Processor.
Miss See Cache miss.
MMU See Memory Management Unit.
Modified Virtual Address (MVA)
A Virtual Address produced by the ARM processor can be changed by the current
Process ID to provide a Modified Virtual Address (MVA) for the MMUs and caches.
Glossary-16 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Glossary
Java instructions that are accelerated by hardware can cause a number of reads to occur,
according to the state of the Java stack and the implementation of the Java hardware
acceleration.
RealView ICE A system for debugging embedded processor cores using a JTAG interface.
Region A partition of instruction or data memory space.
Remapping Changing the address of physical memory or devices after the application has started
executing. This is typically done to permit RAM to replace ROM when the initialization
has been completed.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. Glossary-17
Glossary
Reserved A field in a control register or instruction format is reserved if the field is to be defined
by the implementation, or produces Unpredictable results if the contents of the field are
not zero. These fields are reserved for use in future extensions of the architecture or are
implementation-specific. All reserved bits not used by the implementation must be
written as 0 and read as 0.
Rounding mode The IEEE 754 standard requires all calculations to be performed as if to an infinite
precision. For example, a multiply of two single-precision values must accurately
calculate the significand to twice the number of bits of the significand. To represent this
value in the destination precision, rounding of the significand is often required. The
IEEE 754 standard specifies four rounding modes.
In round-to-nearest mode, the result is rounded at the halfway point, with the tie case
rounding up if it would clear the least significant bit of the significand, making it even.
Round-towards-zero mode chops any bits to the right of the significand, always
rounding down, and is used by the C, C++, and Java languages in integer conversions.
Glossary-18 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Glossary
Set-associative cache
In a set-associative cache, lines can only be placed in the cache in locations that
correspond to the modulo division of the memory address by the number of sets. If there
are n ways in a cache, the cache is termed n-way set-associative. The set-associativity
can be any number greater than or equal to 1 and is not restricted to being a power of
two.
Short vector operation
A VFP coprocessor operation involving more than one destination register and perhaps
more than one source register in the generation of the result for each destination.
Should Be One (SBO)
Should be written as 1 (or all 1s for bit fields) by software. Writing a 0 produces
Unpredictable results.
Should Be Zero (SBZ)
Should be written as 0 (or all 0s for bit fields) by software. Writing a 1 produces
Unpredictable results.
Should Be Zero or Preserved (SBZP)
Should be written as 0 (or all 0s for bit fields) by software, or preserved by writing the
same value back that has been previously read from the same field on the same
processor.
Significand The component of a binary floating-point number that consists of an explicit or implicit
leading bit to the left of the implied binary point and a fraction field to the right.
SPSR See Saved Program Status Register
Stride The stride field, FPSCR[21:20], specifies the increment applied to register addresses in
short vector operations. A stride of 00, specifying an increment of +1, causes a short
vector operation to increment each vector register by +1 for each iteration, while a stride
of 11 specifies an increment of +2.
Subnormal value A value in the range (–2Emin < x < 2Emin), except for ±0. In the IEEE 754 standard
format for single-precision and double-precision operands, a subnormal value has a
zero exponent and a nonzero fraction field. The IEEE 754 standard requires that the
generation and manipulation of subnormal operands be performed with the same
precision as normal operands.
Synchronization primitive
The memory synchronization primitive instructions are those instructions that are used
to ensure memory synchronization. That is, the LDR{B,H,D}EX, STR{B,H,D}EX,
SWP, and SWPB instructions.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. Glossary-19
Glossary
Tag The upper portion of a block address used to identify a cache line within a cache. The
block address from the CPU is compared with each tag in a set in parallel to determine
if the corresponding line is in the cache. If it is, it is said to be a cache hit and the line
can be fetched from cache. If the block address does not correspond to any of the tags,
it is said to be a cache miss and the line must be fetched from the next level of memory.
See also Cache terminology diagram on the last page of this glossary.
TCM See Tightly coupled memory.
Thumb instruction A halfword that specifies an operation for an ARM processor in Thumb state to
perform. Thumb instructions must be halfword-aligned.
Thumb state A processor that is executing Thumb (16-bit) halfword aligned instructions is operating
in Thumb state.
Tightly coupled memory (TCM)
An area of low latency memory that provides predictable instruction execution or data
load timing in cases where deterministic performance is required. TCMs are suited to
holding:
• critical routines such as for interrupt handling
• scratchpad data
• data types whose locality is not suited to caching
• critical data structures, such as interrupt stacks.
Tiny A nonzero result or value that is between the positive and negative minimum normal
values for the destination precision.
TLB See Translation Look-aside Buffer.
Trace hardware A term for a device that contains an Embedded Trace Macrocell.
Trace port A port on a device, such as a processor or ASIC, used to output trace information.
Trace Port Analyzer (TPA)
A hardware device that captures trace information output on a trace port. This can be a
low-cost product designed specifically for trace acquisition, or a logic analyzer.
Translation Lookaside Buffer (TLB)
A cache of recently used translation table entries that avoid the overhead of translation
table walking on every memory access. Part of the Memory Management Unit.
Translation table A table, held in memory, that contains data that defines the properties of memory areas
of various fixed sizes.
Translation table walk
The process of doing a full translation table lookup. It is performed automatically by
hardware.
Glossary-20 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Glossary
Trap An exceptional condition in a VFP coprocessor that has the respective exception enable
bit set in the FPSCR register. The user trap handler is executed.
Trigger instruction The VFP coprocessor instruction that causes a bounce at the time it is issued. A
potentially exceptional instruction causes the VFP11 coprocessor to enter the
exceptional state. A subsequent instruction, unless it is an FMXR or FMRX instruction
accessing the FPEXC, FPINST, or FPSID register, causes a bounce, beginning
exception processing. The trigger instruction is not necessarily exceptional, and no
processing of it is performed. It is retried at the return from exception processing of the
potentially exceptional instruction.
Unpredictable behavior can affect the behavior of the entire system, because the ETM
is capable of causing the core to enter debug state, and external outputs can be used for
other purposes.
Unpredictable For reads, the data returned when reading from this location is unpredictable. It can have
any value. For writes, writing to this location causes unpredictable behavior, or an
unpredictable change in device configuration. Unpredictable instructions must not halt
or hang the processor, or any part of the system.
VA See Virtual Address.
Vector operation A VFP coprocessor operation involving more than one destination register, perhaps
involving different source registers in the generation of the result for each destination.
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. Glossary-21
Glossary
See also Fast Context Switch Extension, Modified Virtual Address, and Physical
Address.
Warm reset Also known as a core reset. Initializes the majority of the processor excluding the debug
controller and debug logic. This type of reset is useful if you are using the debugging
features of a processor.
Watchpoint A watchpoint is a mechanism provided by debuggers to halt program execution when
the data contained by a particular memory address is changed. Watchpoints are inserted
by the programmer to enable inspection of register contents, memory locations, and
variable values when memory is written to test that the program is operating correctly.
Watchpoints are removed after the program is successfully tested. See also Breakpoint.
Way See Cache way.
WB See Write-back.
Word A 32-bit data item.
Word-invariant In a word-invariant system, the address of each byte of memory changes when
switching between little-endian and big-endian operation, in such a way that the byte
with address A in one endianness has address A EOR 3 in the other endianness. As a
result, each aligned word of memory always consists of the same four bytes of memory
in the same order, regardless of endianness. The change of endianness occurs because
of the change to the byte addresses, not because the bytes are rearranged.
The ARM architecture supports word-invariant systems in ARMv3 and later versions.
When word-invariant support is selected, the behavior of load or store instructions that
are given unaligned addresses is instruction-specific, and is in general not the expected
behavior for an unaligned access. It is recommended that word-invariant systems use
the endianness that produces the desired byte addresses at all times, apart possibly from
very early in their reset handlers before they have set up the endianness, and that this
early part of the reset handler must use only aligned word memory accesses.
Glossary-22 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B
Glossary
Java instructions that are accelerated by hardware can cause a number of writes to occur,
according to the state of the Java stack and the implementation of the Java hardware
acceleration.
Write-back (WB) In a write-back cache, data is only written to main memory when it is forced out of the
cache on line replacement following a cache miss. Otherwise, writes by the processor
only update the cache. This is also known as copyback.
Write buffer A block of high-speed memory, arranged as a FIFO buffer, between the data cache and
main memory, whose purpose is to optimize stores to main memory.
Write completion The memory system indicates to the processor that a write has been completed at a point
in the transaction where the memory system is able to guarantee that the effect of the
write is visible to all processors in the system. This is not the case if the write is
associated with a memory synchronization primitive, or is to a Device or Strongly
Ordered region. In these cases the memory system might only indicate completion of
the write when the access has affected the state of the target, unless it is impossible to
distinguish between having the effect of the write visible and having the state of target
updated.
This stricter requirement for some types of memory ensures that any side-effects of the
memory access can be guaranteed by the processor to have taken place. You can use this
to prevent the starting of a subsequent operation in the program order until the
side-effects are visible.
Write-through (WT) In a write-through cache, data is written to main memory at the same time as the cache
is updated.
WT See Write-through.
Cache terminology diagram
The diagram illustrates the following cache terminology:
• block address
• cache line
• cache set
• cache way
• index
ARM DDI 0344B Copyright © 2006 ARM Limited. All rights reserved. Glossary-23
Glossary
• tag.
%ORFNDGGUHVV
7DJ ,QGH[ :RUG %\WH
7DJ
7DJ
7DJ
7DJ P
Q
&DFKHWDJ5$0 &DFKHGDWD
5$0
+LW 5HDGGDWD
ZD\QXPEHU ZD\WKDWFRUUHVSRQGV
Glossary-24 Copyright © 2006 ARM Limited. All rights reserved. ARM DDI 0344B