ARM ARM7TDMI Manuel d'utilisateur

Naviguer en ligne ou télécharger Manuel d'utilisateur pour Processeurs ARM ARM7TDMI. ARM7TDMI technical reference manual Manuel d'utilisation

/ 284
Table des matières
Copyright © 1994-2001. All rights reserved.
ARM DDI 0029G

ARM7TDMI

(Rev 3)

Technical Reference Manual

Fichier PDF · ·

Imprimer

Imprimer le document

Partage

Résumé du contenu

Page 1 - ARM7TDMI

Copyright © 1994-2001. All rights reserved. ARM DDI 0029G ARM7TDMI (Rev 3) Technical Reference Manual

Page 2

ii Copyright © 1994-2001. All rights reserved. ARM DDI 0029G ARM7TDMI Technical Reference Manual Copyright © 1994-2001. All rights reserved. Release…

Page 3

ARM DDI 0029G Copyright © 1994-2001. All rights reserved. iii Confidentiality Status This document is Open Access. This document has no restriction on…

Page 4

iv Copyright © 1994-2001. All rights reserved. ARM DDI 0029G

Page 5 - Contents

ARM DDI 0029G Copyright © 1994-2001. All rights reserved. v Contents ARM7TDMI Technical Reference Manual Preface About this document xviii Further…

Page 6 - Chapter 5 Debug Interface

Contents vi Copyright © 1994-2001. All rights reserved. ARM DDI 0029G Chapter 3 Memory Interface 3.1 About the memory interface 3-2 3.2 Bus interface…

Page 7 - Appendix B Debug in Depth

Contents ARM DDI 0029G Copyright © 1994-2001. All rights reserved. vii 6.14 Coprocessor data transfer from memory to coprocessor 6-21 6.15 Coprocessor…

Page 8

Contents viii Copyright © 1994-2001. All rights reserved. ARM DDI 0029G B.8 Determining the core and system state B-24 B.9 Behavior of the program…

Page 9

ARM DDI 0029G Copyright © 1994-2001. All rights reserved. ix List of Tables ARM7TDMI Technical Reference Manual Change history ii Table 1-1 Key to…

Page 10 - List of Tables

List of Tables x Copyright © 1994-2001. All rights reserved. ARM DDI 0029G Table 4-3 Summary of coprocessor signaling 4-7 Table 4-4 Mode identifier…

Page 11

List of Tables ARM DDI 0029G Copyright © 1994-2001. All rights reserved. xi Table 7-22 APE control timing parameters 7-27 Table 7-23 AC timing…

Page 12

List of Tables xii Copyright © 1994-2001. All rights reserved. ARM DDI 0029G

Page 13 - List of Figures

ARM DDI 0029G Copyright © 1994-2001. All rights reserved. xiii List of Figures ARM7TDMI Technical Reference Manual Figure P-1 Key to timing diagram…

Page 14

List of Figures xiv Copyright © 1994-2001. All rights reserved. ARM DDI 0029G Figure 3-11 External bus arrangement 3-17 Figure 3-12 Bidirectional bus…

Page 15

List of Figures ARM DDI 0029G Copyright © 1994-2001. All rights reserved. xv Figure 7-23 APE control timing 7-27 Figure B-1 ARM7TDMI core scan chain…

Page 16

List of Figures xvi Copyright © 1994-2001. All rights reserved. ARM DDI 0029G

Page 17 - • Feedback on page xxii

ARM DDI 0029G Copyright © 1994-2001. All rights reserved. xvii Preface This preface introduces the ARM7TDMI core and its reference documentation. It…

Page 18 - About this document

Preface xviii Copyright © 1994-2001. All rights reserved. ARM DDI 0029G About this document This document is a reference manual for the ARM7TDMI core.…

Page 19 - Preface

Preface ARM DDI 0029G Copyright © 1994-2001. All rights reserved. xix Typographical conventions The following typographical conventions are used in…

Page 20

Preface xx Copyright © 1994-2001. All rights reserved. ARM DDI 0029G Timing diagram conventions The key provided in Figure P-1 explains the components…

Page 21 - Further reading

Preface ARM DDI 0029G Copyright © 1994-2001. All rights reserved. xxi Further reading This section lists publications by ARM Limited and third…

Page 22 - Feedback

Preface xxii Copyright © 1994-2001. All rights reserved. ARM DDI 0029G Feedback ARM Limited welcomes feedback both on the ARM7TDMI core, and on the…

Page 23 - Chapter 1

Chapter 1 Introduction This chapter introduces the ARM7TDMI core. It contains the following sections: • About the ARM7TDMI core on page 1-2 •…

Page 24 - 1.1 About the ARM7TDMI core

1 About the ARM7TDMI core The ARM7TDMI core is a member of the ARM family of general-purpose 32-bit microprocessors. The ARM family offers high…

Page 25

Figure 1-1 Instruction pipeline During normal operation, while one instruction is being executed, its successor is being decoded, and a third…

Page 26

The ARM7TDMI processor memory interface has been designed to allow performance potential to be realized, while minimizing the use of memory.…

Page 27 - 1.2 Architecture

2 Architecture The ARM7TDMI processor has two instruction sets: • the 32-bit ARM instruction set • the 16-bit Thumb instruction set. The ARM7TDMI…

Page 28

Thumb therefore offers a long branch range, powerful arithmetic operations, and a large address space. Thumb code is typically 65% of the size of ARM…

Page 29

3 Block, core, and functional diagrams The ARM7TDMI processor architecture, core, and functional diagrams are illustrated in the following figures: •…

Page 30 - Figure 1-3 Main processor

Figure 1-3 Main processor Scan control Instruction decoder and logic control Instruction pipeline Read data register Thumb instruction controller…

Afficher les 284 pages
Page 31

Figure 1-4 ARM7TDMI processor functional diagram 11 DIN[31:0] ARM7TDMI MCLK nWAIT ECLK nIRQ nFIQ ISYNC nRESET BUSEN HIGHZ BIGEND nENIN nENOUT nENOUTI…

Page 32 - <reglist>

4 Instruction set summary This section provides a description of the instruction sets used on the ARM7TDMI processor. This section describes: • Format…

Page 33

Refer to the ARM Architectural Reference Manual for more information about the ARM instruction set formats. Figure 1-5 ARM instruction set formats…

Page 34

Note Some instruction codes are not defined but do not cause the Undefined instruction trap to be taken, for instance a multiply instruction with bit…

Page 35

Multiply unsigned accumulate long UMLAL{cond}{S} RdLo, RdHi, Rm, Rs Multiply signed long SMULL{cond}{S} RdLo, RdHi, Rm, Rs Multiply signed accumulate…

Page 36

• Decrement after LDM{cond}DA Rd{!}, <reglist>{^} • Stack operation LDM{cond}<a_mode4L> Rd{!}, <reglist> • Stack operation, and restore CPSR…

Page 37 - Register

Addressing modes The addressing modes are procedures shared by different instructions for generating values used by the instructions. The five…

Page 38

Immediate [Rn], #+/-12bit_Offset Register [Rn], +/-Rm Scaled register [Rn], +/-Rm, LSL #5bit_shift_imm [Rn], +/-Rm, LSR #5bit_shift_imm [Rn], +/-Rm…

Page 39 - [Rn, #+/-(8bit_Offset*4)]

Mode 3, <a_mode3> Immediate offset [Rn, #+/-8bit_Offset] Pre-indexed [Rn, #+/-8bit_Offset]! Post-indexed [Rn], #+/-8bit_Offset Register [Rn, +/-Rm]…

Page 40 - Operand 2

Operand 2 An operand is the part of the instruction that references data or a peripheral device. Operand 2 is listed in Table 1-4. Fields are listed…

Page 41

Condition fields are listed in Table 1-6. 1.4.3 Thumb instruction summary The Thumb instruction set formats are shown in Figure 1-6 on page 1-20.…

Page 42

Figure 1-6 Thumb instruction set formats Format Move shifted register Move, compare, add, and subtract immediate ALU operation High register…

Page 43

The Thumb instruction set summary is listed in Table 1-7. Table 1-7 Thumb instruction set summary Operation Assembly syntax Move Immediate MOV Rd…

Page 44

EOR EOR Rd, Rs OR ORR Rd, Rs Bit clear BIC Rd, Rs Move NOT MVN Rd, Rs Test bits TST Rd, Rs Shift/Rotate Logical shift left LSL Rd, Rs, #5bit_shift_imm…

Page 45

Unconditional B label Long branch with link BL label Optional state change - • to address held in Lo reg BX Rs • to address held in Hi reg BX Hs Load…

Page 46

With register offset - • word STR Rd, [Rb, Ro] • halfword STRH Rd, [Rb, Ro] • byte STRB Rd, [Rb, Ro] SP-relative STR Rd, [SP, #10bit_offset] Multiple…

Page 47 - Chapter 2

Chapter 2 Programmer’s Model This chapter describes the ARM7TDMI core programmer’s model. It contains the following sections: • About the programmer’s…

Page 48

1 About the programmer’s model The ARM7TDMI processor core implements ARM architecture v4T, which includes the 32-bit ARM instruction set, and the…

Page 49

2 Processor operating states The ARM7TDMI processor has two operating states: ARM 32-bit, word-aligned ARM instructions are executed in this state.…

Page 50 - Word at address A

3 Memory formats The ARM7TDMI processor views memory as a linear collection of bytes numbered in ascending order from zero. For example: • bytes zero…

Page 51

3.2 Big-Endian In big-endian format, the ARM7TDMI processor stores the most significant byte of a word at the lowest-numbered byte, and the least…

Page 52 - 2.4 Data types

4 Data types The ARM7TDMI processor supports the following data types: • words, 32-bit • halfwords, 16-bit • bytes, 8-bit. You must align these as…

Page 53 - 2.5 Operating modes

5 Operating modes The ARM7TDMI processor has seven modes of operation: • User mode is the usual ARM program execution state, and is used for executing…

Page 54 - 2.6 Registers

6 Registers The ARM7TDMI processor has a total of 37 registers: • 31 general-purpose 32-bit registers • 6 status registers. These registers are not…

Page 55

FIQ mode has seven banked registers mapped to r8–r14 (r8_fiq–r14_fiq). In ARM state, many FIQ handlers do not have to save any registers. The User…

Page 56

6.2 The Thumb-state register set is a subset of the ARM-state set. The programmer has access to: • 8 general registers, r0–r7 • the PC • the SP • the…

Page 57

6.3 The relationship between ARM-state and Thumb-state registers The Thumb-state registers relate to the ARM-state registers in the following way: •…

Page 58

Note Registers r0–r7 are known as the low registers. Registers r8–r15 are known as the high registers. 2.6.4 Accessing high registers in Thumb state…

Page 59

7 The program status registers The ARM7TDMI processor contains a CPSR and five SPSRs for exception handlers to use. The program status registers: •…

Page 60

All instructions can execute conditionally in ARM state. In Thumb state, only the Branch instruction can be executed conditionally. For more…

Page 61

Mode bits Bits M[4:0] determine the processor operating mode as shown in Table 2-2. Not all combinations of the mode bits define a valid processor…

Page 62 - SUBS PC, R14_abt, #4

8 Exceptions arise whenever the normal flow of a program has to be halted temporarily, for example, to service an interrupt from a peripheral. Before…

Page 63 - SUBS PC, R14_abt, #8

8.2 Entering an exception The ARM7TDMI processor handles an exception as follows: 1. Preserves the address of the next instruction in the appropriate…

Page 64 - SUBS PC,R14_fiq,#4

Note Exceptions are always entered in ARM state. When the processor is in Thumb state and an exception occurs, the switch to ARM state takes place…

Page 65 - LDR Rn,[R14_abt,#-8]

8.5 Interrupt request The Interrupt Request (IRQ) exception is a normal interrupt caused by a LOW level on the nIRQ input. IRQ has a lower priority…

Page 66 - SUBS PC,R14_abt,#8

Prefetch Abort When a Prefetch Abort occurs, the ARM7TDMI processor marks the prefetched instruction as invalid, but does not take the exception until…

Page 67 - 0x0000000C

8.7 Software interrupt instruction The Software Interrupt instruction (SWI) is used to enter Supervisor mode, usually to request a particular…

Page 68 - 0x0000001C

8.10 Exception priorities When multiple exceptions arise at the same time, a fixed priority system determines the order in which they are handled. The…

Page 69 - 2.9 Interrupt latencies

9 Interrupt latencies The calculations for maximum and minimum latency are described in: • Maximum interrupt latencies on page 2-23 • Minimum…

Page 70 - 2.10 Reset

10 Reset When the nRESET signal goes LOW a reset occurs, and the ARM7TDMI core abandons the executing instruction and continues to increment the…

Page 71 - Chapter 3

Chapter 3 Memory Interface This chapter describes the ARM7TDMI processor memory interface. It contains the following sections: • About the memory…

Page 72

1 About the memory interface The ARM7TDMI processor has a Von Neumann architecture, with a single 32-bit data bus carrying both instructions and data.…

Page 73 - 3.2 Bus interface signals

2 Bus interface signals The signals in the ARM7TDMI processor bus interface can be grouped into four categories: • clocking and clock control •…

Page 74 - 3.3 Bus cycle types

3 Bus cycle types The ARM7TDMI processor bus interface is pipelined. This gives the maximum time for a memory cycle to decode the address and respond…

Page 75

Bus cycle types are encoded on the nMREQ and SEQ signals as listed in Table 3-1. A memory controller for the ARM7TDMI processor must commit to a…

Page 76

Figure 3-2 Nonsequential memory cycle The ARM7TDMI processor can perform back-to-back, nonsequential memory cycles. This happens, for example, when an…

Page 77

The possible burst types are listed in Table 3-2. All accesses in a burst are of the same data width, direction, and protection type. For more…

Page 78 - Figure 3-4 Internal cycles

Where possible the ARM7TDMI processor broadcasts the address for the next access, so that decode can start, but the memory controller must not commit…

Page 79 - Figure 3-5 Merged IS cycle

Figure 3-5 Merged IS cycle Note When designing a memory controller, ensure that the design also works when an I-cycle is followed by an N-cycle to a…

Page 80

Figure 3-6 Coprocessor register transfer cycles 3.3.6 Summary of ARM memory cycle timing A summary of ARM7TDMI processor memory cycle timing is shown…

Page 81 - 3.4 Addressing signals

4 Addressing signals The address class signals are: • A[31:0] on page 3-11 • nRW on page 3-11 • MAS[1:0] on page 3-11 • nOPC on page 3-12 • nTRANS on…

Page 82

The address produced by the processor is always a byte address. However, the memory system must ignore the bottom redundant bits of the address. The…

Page 83 - 1 Privileged

4.5 nTRANS The nTRANS output conveys information about the transfer. A MMU can use this signal to determine whether an access is from a privileged…

Page 84 - 3.5 Address timing

5 Address timing The ARM7TDMI processor address bus can operate in one of two configurations: • pipelined • depipelined. Note ARM Limited strongly…

Page 85

Note The AMBA specification for Advanced High-performance Bus (AHB) and Advanced System Bus (ASB) requires a pipelined address bus. This means that…

Page 86

Figure 3-10 SRAM compatible address timing Note If ALE is to be used to change address timing, then you must tie APE HIGH. Similarly, if APE is to be…

Page 87 - 3.6 Data timed signals

6 Data timed signals This section describes: • D[31:0], DOUT[31:0], and DIN[31:0] on page 3-17 • ABORT on page 3-24 • Byte latch enables on page 3-24…

Page 88

Figure 3-12 Bidirectional bus timing Unidirectional data bus When BUSEN is HIGH, all instructions and input data are presented on the input data bus…

Page 89 - DIN[31:0]

Figure 3-14 External connection of unidirectional buses Bidirectional data bus When BUSEN is LOW, the buffer between DIN[31:0] and D[31:0] is…

Page 90

Figure 3-15 Data write bus cycle Figure 3-16 Data bus control circuit MCLK A[31:0] nRW nENOUT D[31:0] memory cycle scan cell data direction control…

Page 91

The macrocell has an additional bus control signal, nENIN that allows the external system to manually tristate the bus. In the simplest systems, nENIN…

Page 92

ARM7TDMI core test chip example system Connecting the ARM7TDMI processor data bus, D[31:0] to an external shared bus requires additional logic that…

Page 93

Figure 3-17 Test chip data bus circuit Note At the core level, TBE and DBE are inactive, tied HIGH, because in a packaged part you do not have to…

Page 94

6.2 ABORT ABORT indicates that a memory transaction failed to complete successfully. ABORT is sampled at the end of the bus cycle during S-cycles and…

Page 95 - Figure 3-18 Memory access

Because two memory cycles are required, nWAIT is used to stretch the internal processor clock. nWAIT does not affect the operation of the data…

Page 96

Figure 3-19 Two cycle memory access 3.6.4 Byte and halfword accesses The processor indicates the size of a transfer by use of the MAS[1:0] signal as…

Page 97

Note For subword reads the value is placed in the ARM register in the least significant bits regardless of the byte lane used to read the data. For…

Page 98 - Figure 3-20 Data replication

Figure 3-20 Data replication 0 A B C D 781516 2331 24 ARM register Half word write (register [15:0]) CD CDCD D[31:16] D[15:0] Word write (register…

Page 99 - 3.7 Stretching access times

7 Stretching access times The ARM7TDMI processor does not contain any dynamic logic that relies on regular clocking to maintain the internal state.…

Page 100

Figure 3-21 Typical system timing Note When designing a memory controller, you are strongly advised to sample the values of nMREQ, SEQ, and the…

Page 101

8 Action of ARM7TDMI core in debug state When the ARM7TDMI core is in debug state, nMREQ and SEQ are forced to indicate internal cycles. This allows…

Page 102 - 3.9 Privileged mode access

9 Privileged mode access ARM Limited usually recommends that if only privileged mode access is required from a memory system then you are advised to…

Page 103 - Figure 3-22 Reset sequence

10 Reset sequence after power up It is good practice to reset a static device immediately on power-up, to remove any undefined conditions within the…

Page 104

Memory Interface 3-34 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G

Page 105 - Chapter 4

Chapter 4 Coprocessor Interface This chapter describes the ARM7TDMI core coprocessor interface. It contains the following sections: • About…

Page 106 - 4.1 About coprocessors

1 About coprocessors The ARM7TDMI core instruction set enables you to implement specialized additional instructions using coprocessors to extend…

Page 107

1.1 Coprocessor availability Up to 16 coprocessors can be referenced by a system, each with a unique coprocessor ID number to identify it. The…

Page 108

2 Coprocessor interface signals The signals used to interface the ARM7TDMI core to a coprocessor are grouped into four categories. The clock and clock…

Page 109

3 Pipeline following signals Every coprocessor in the system must contain a pipeline follower to track the instructions in the ARM7TDMI processor…

Page 110 - Signal Direction Meaning

4 Coprocessor interface handshaking is described as follows: • The coprocessor on page 4-6 • The ARM7TDMI processor on page 4-7 • Coprocessor…

Page 111

4.2 The ARM7TDMI processor Coprocessor instructions progress down the ARM7TDMI core pipeline in step with the coprocessor pipeline. A coprocessor…

Page 112

Figure 4-1 Coprocessor busy-wait sequence CPA and CPB are ignored by the ARM7TDMI processor when it does not have a undefined or coprocessor…

Page 113

Caution It is essential that any action taken by the coprocessor while it is busy-waiting is idempotent. This means that the actions taken by the…

Page 114

4.6 Coprocessor data operations Coprocessor data operations, CDP instructions, perform processing operations on the data held in the coprocessor…

Page 115

Figure 4-4 Coprocessor load sequence ADD SUB LDC n=4 TST SUB ADD SUB LDC TST SUB MCLK Fetch stage Decode stage Execute stage nCPI CPA CPB D[31:0] CP…

Page 116 - Coprocessor

5 Connecting coprocessors A coprocessor in an ARM7TDMI processor system must have 32-bit connections to: • the instruction stream from memory • data…

Page 117

Figure 4-6 Coprocessor connections with unidirectional bus The logic for Figure 4-6 is as follows: on FALLING MCLK ASEL = ((nMREQ = 1 and SEQ = 1) and…

Page 118

Figure 4-7 Connecting multiple coprocessors ARM core Coprocessor 1 Coprocessor 2 CPA CPB nCPI CPB1 CPA1 CPA2 CPB2 Coprocessor n CPBn CPAn

Page 119

6 If you are not using an external coprocessor If you are implementing a system that does not include any external coprocessors, you must tie both CPA…

Page 120 - 4.7 Undefined instructions

7 Undefined instructions are treated by the ARM7TDMI processor as coprocessor instructions. All coprocessors must be absent, CPA and CPB must be HIGH…

Page 121 - 4.8 Privileged instructions

8 Privileged instructions The output signal nTRANS allows the implementation of coprocessors, or coprocessor instructions, that can only be accessed…

Page 122

Coprocessor Interface 4-18 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G

Page 123 - Chapter 5

Chapter 5 Debug Interface This chapter describes the ARM7TDMI processor debug interface. It contains the following sections: • About the debug…

Page 124 - 5.1 About the debug interface

1 About the debug interface The ARM7TDMI processor debug interface is based on IEEE Std. 1149.1 - 1990, Standard Test Access Port and Boundary-Scan…

Page 125

When the ARM7TDMI processor is in the debug state, the core is clocked by DCLK under control of the TAP state machine and MCLK can free run. The…

Page 126

2 Debug systems Figure 5-1 shows a typical debug system using an ARM core. Figure 5-1 Typical debug system A debug system typically has three parts: •…

Page 127 - TAP controller

The ARM7TDMI processor has hardware extensions that ease debugging at the lowest level. The debug extensions: • allow you to halt program execution •…

Page 128 - 5.3 Debug interface signals

3 Debug interface signals There are three primary external signals associated with the debug interface: • BREAKPT and DBGRQ are system requests for…

Page 129 - Figure 5-3 Debug state entry

Figure 5-3 Debug state entry Entry into debug state on breakpoint The ARM7TDMI core marks instructions as being breakpointed as they enter the…

Page 130

• An exception occurs, causing the processor to flush the instruction pipeline and cancel the breakpoint. In normal circumstances, on exiting from an…

Page 131

3.2 Action of the processor in debug state When the ARM7TDMI core enters debug state, the core forces nMREQ and SEQ to indicate internal cycles. This…

Page 132

4 ARM7TDMI core clock domains The ARM7TDMI clocks are described in Clocks on page 5-2. This section describes: • Clock switch during debug on page…

Page 133 - MOV PC, #0

4.2 Clock switch during test When serial test patterns are being applied to the ARM7TDMI core through the JTAG interface, the processor must be…

Page 134

5 Determining the core and system state When the core is in debug state, you can examine the core and system state by forcing the load and store…

Page 135

6 About EmbeddedICE Logic The ARM7TDMI processor EmbeddedICE Logic provides integrated on-chip debug support for the ARM7TDMI core. The EmbeddedICE…

Page 136

The EmbeddedICE Logic comprises: • two real-time watchpoint units • two independent registers: — the debug control register — debug status register. •…

Page 137 - 5.7 Disabling EmbeddedICE

7 Disabling EmbeddedICE The EmbeddedICE Logic is disabled by setting DBGEN LOW. Caution Hard-wiring the DBGEN input LOW permanently disables the…

Page 138

8 Debug Communications Channel The ARM7TDMI processor EmbeddedICE Logic contains a DCC to pass information between the target and the host debugger.…

Page 139 - MRC CP14, 0, Rd, C1, C0, 0

The function of each register bit is as follows: Bits 31:28 Contain a fixed pattern that denotes the EmbeddedICE version number, in this case 0001.…

Page 140

Sending a message to the debugger When the processor has to send a message to the debugger, it must check that the communications data write register…

Page 141

• the DCC data write register is empty and available for use. These outputs are usually connected to the system interrupt controller, that drives the…

Page 142

Debug Interface 5-20 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G

Page 143 - Chapter 6

Chapter 6 Instruction Cycle Timings This chapter describes the ARM7TDMI processor instruction cycle operations. It contains the following sections: •…

Page 144

• Coprocessor register transfer, store to coprocessor on page 6-26 • Undefined instructions and coprocessor absent on page 6-27 • Unexecuted…

Page 145

1 About the instruction cycle timing tables In the following tables: • nMREQ and SEQ, are pipelined up to one cycle ahead of the cycle to which they…

Page 146 - SUB PC,R14,#4 to MOV PC,R14

2 Branch and branch with link A branch instruction calculates the branch destination in the first cycle, while performing a prefetch from the current…

Page 147 - 6.3 Thumb branch with link

3 Thumb branch with link A Thumb Branch with Link operation consists of two consecutive Thumb instructions. Refer to the ARM Architecture Reference…

Page 148 - 6.4 Branch and Exchange

4 Branch and Exchange A Branch and Exchange (BX) operation takes three cycles and is similar to a branch. In the first cycle, the branch destination…

Page 149 - 6.5 Data operations

5 Data operations A data operation executes in a single datapath cycle unless a shift is determined by the contents of a register. A register is read…

Page 150 - Thumb state

Note The shifted register operations where the destination is the PC are not available in Thumb state. Table 6-4 Data operation instruction cycles…

Page 151

6 Multiply and multiply accumulate The multiply instructions use special hardware that implements integer multiplication with early termination. All…

Page 152

m+1 pc+12 0 2 - 1 0 1 m+2 pc+12 0 2 - 0 1 1 pc+12 Table 6-7 Multiply long instruction cycle operations Cycle Address nRW MAS[1:0] Data nMREQ SEQ nOPC…

Page 153

Note The multiply accumulate, multiply long, and multiply accumulate long operations are not available in Thumb state.

Page 154 - 6.7 Load register

7 Load register The first cycle of a load register instruction performs the address calculation. During the second cycle the data is fetched from…

Page 155

Note Operations where the destination is the PC are not available in Thumb state. Table 6-9 Load register instruction cycle operations Operation type…

Page 156 - 6.8 Store register

8 Store register The first cycle of a store register instruction is similar to the first cycle of load register instruction. During the second cycle…

Page 157 - 6.9 Load multiple registers

9 Load multiple registers The first cycle of the LDM instruction is used to calculate the address of the first word to be transferred, while…

Page 158

Single register dest=pc 1 pc+2L i 0 (pc+2L) 0 0 0 2alu 2 0pc’ 101 3 pc+3L i 0 - 0 0 1 4pc’ i0(pc’)0 1 0 5pc’+L i 0 (pc’+L) 0 1 0 pc’+2L n registers…

Page 159 - 6.10 Store multiple registers

10 Store multiple registers The store multiple instruction proceeds very much as load multiple instruction, without the final cycle. The abort…

Page 160 - 6.11 Data swap

11 Data swap This is similar to the load and store register instructions, but the actual swap takes place in the second and third cycles. In the…

Page 161

12 Software interrupt and exception entry Exceptions (including software interrupts) force the PC to a particular value and cause the instruction…

Page 162

13 Coprocessor data operation A coprocessor data operation is a request from the core for the coprocessor to initiate some action. The action does not…

Page 163

14 Coprocessor data transfer from memory to coprocessor For coprocessor transfer instructions from memory the coprocessor must commit to the transfer…

Page 164

Note Coprocessor data transfer operations are not available in Thumb state. n registers 1 pc+8 2 0 (pc+8) 1 0 0 0 0 1 (n>1) 2 pc+8 2 0 - 1 0 1 0 0 1…

Page 165

15 Coprocessor data transfer from coprocessor to memory The ARM7TDMI processor controls these instructions in the same way as for memory to…

Page 166

Note Coprocessor data transfer operations are not available in Thumb state. n registers 1 pc+8 2 0 (pc+8) 1 0 0 0 0 1 (n>1) 2 pc+8 2 0 - 1 0 1 0 0 1…

Page 167

16 Coprocessor register transfer, load from coprocessor The busy-wait cycles are similar to those described in Coprocessor data transfer from memory…

Page 168

17 Coprocessor register transfer, store to coprocessor This is the same as described in Coprocessor register transfer, load from coprocessor on page…

Page 169

18 Undefined instructions and coprocessor absent When the processor attempts to execute an instruction that neither it nor a coprocessor can perform…

Page 170 - 6.19 Unexecuted instructions

19 Unexecuted instructions Any instruction whose condition code is not met does not execute and adds one cycle to the execution time of the code…

Page 171

20 Instruction speed summary Due to the pipelined architecture of the CPU, instructions overlap considerably. In a typical cycle, one instruction can…

Page 172

MULL S+(m+1)I - MLAL S+(m+2)I - CDP S+bI - LDC, STC (n-1)S+2N+bI - MCR N+bI+C - MRC S+(b+1)I+C - Table 6-23 ARM instruction speed summary (continued)…

Page 173 - Chapter 7

Chapter 7 AC and DC Parameters This chapter gives the AC timing parameters of the ARM7TDMI core. It contains the following sections: • Timing diagram…

Page 174

• Test clock and external clock timing on page 7-21 • Memory clock timing on page 7-22 • Boundary scan general timing on page 7-23 • Reset period…

Page 175

1 Timing diagram information Each timing diagram in this chapter is provided with a table that shows the timing parameters. In the tables: • the…

Page 176 - Figure 7-1 General timing

2 General timing Figure 7-1 shows the ARM7TDMI general timing. The timing parameters used in Figure 7-1 are listed in Table 7-1 on page 7-5. Figure…

Page 177

Note In Figure 7-1 on page 7-4, nWAIT, APE, ALE, and ABE are all HIGH during the cycle shown. T cdel is the delay, on either edge (whichever is…

Page 178

3 Address bus enable control Figure 7-2 shows the ARM7TDMI ABE control timing. The timing parameters used in Figure 7-2 are listed in Table 7-2.…

Page 179

4 Bidirectional data write cycle Figure 7-3 shows the ARM7TDMI processor bidirectional data write cycle timing. The timing parameters used in Figure…

Page 180

5 Bidirectional data read cycle Figure 7-4 shows the ARM7TDMI processor bidirectional data read cycle timing. The timing parameters used in Figure 7-4…

Page 181

6 Data bus control Figure 7-5 shows the ARM7TDMI data bus control timing. The timing parameters used in Figure 7-5 are listed in Table 7-5. Figure 7-5…

Page 182 - 7.7 Output 3-state timing

7 Output 3-state timing Figure 7-6 shows the ARM7TDMI processor output 3-state timing. The timing parameters used in Figure 7-6 are listed in Table…

Page 183

8 Unidirectional data write cycle timing Figure 7-7 shows the ARM7TDMI processor unidirectional data write cycle timing. The timing parameters used in…

Page 184

9 Unidirectional data read cycle timing Figure 7-8 shows the ARM7TDMI processor unidirectional data read cycle timing. The timing parameters used in…

Page 185 - 7.10 Configuration pin timing

10 Configuration pin timing Figure 7-9 shows the ARM7TDMI processor configuration pin timing. The timing parameters used in Figure 7-9 are listed in…

Page 186

11 Coprocessor timing Figure 7-10 shows the ARM7TDMI processor coprocessor timing. The timing parameters used in Figure 7-10 are listed in Table 7-10.…

Page 187

12 Exception timing Figure 7-11 shows the ARM7TDMI processor exception timing. The timing parameters used in Figure 7-11 are listed in Table 7-11.…

Page 188

13 Synchronous interrupt timing Figure 7-12 shows the ARM7TDMI processor synchronous interrupt timing. The timing parameters used in Figure 7-12 are…

Page 189

14 Debug timing Figure 7-13 shows the ARM7TDMI processor synchronous interrupt timing. The timing parameters used in Figure 7-13 are listed in Table…

Page 190

T rgh RANGEOUT0, RANGEOUT1 hold time from MCLKf Minimum T rqh DBGRQ guaranteed non-recognition time Minimum T rqs DBGRQ set up time to MCLKr for…

Page 191

15 Debug communications channel output timing Figure 7-14 shows the ARM7TDMI processor DCC output timing. The timing parameter used in Figure 7-14 is…

Page 192 - 7.16 Breakpoint timing

16 Breakpoint timing Figure 7-15 shows the ARM7TDMI processor synchronous interrupt timing. The timing parameter used in Figure 7-12 is listed in…

Page 193 - TCK to ECLK delay Maximum

17 Test clock and external clock timing Figure 7-16 shows the ARM7TDMI processor test clock and external clock timing. The timing parameter used in…

Page 194

18 Memory clock timing Figure 7-17 shows the ARM7TDMI processor memory clock timing. The timing parameters used in Figure 7-17 are listed in Table…

Page 195

19 Boundary scan general timing Figure 7-18 shows the ARM7TDMI processor boundary scan general timing. The timing parameters used in Figure 7-18 are…

Page 196 - 7.20 Reset period timing

20 Reset period timing Figure 7-19 shows the ARM7TDMI reset period timing. The timing parameters used in Figure 7-19 are listed in Table 7-19. Figure…

Page 197

21 Output enable and disable times Figure 7-20 shows the output enable and disable times due to a HIGHZ TAP instruction. Figure 7-21 shows the output…

Page 198

22 Address latch enable control Figure 7-22 shows the ARM7TDMI reset period timing. The timing parameters used in Figure 7-22 are listed in Table…

Page 199

23 Address pipeline control timing Figure 7-23 shows the ARM7TDMI APE control timing. The timing parameters used in Figure 7-23 are listed in Table…

Page 200 - In Table 7-23:

24 Notes on AC Parameters Table 7-23 lists the AC timing parameters in alphabetical order. Contact your supplier for AC timing parameter values. In…

Page 201

T brks Set up time of BREAKPT to MCLKr Minimum Figure 7-13 T bsch TCK high period Minimum Figure 7-18 T bscl TCK low period Minimum Figure 7-18 T bsdd…

Page 202

T cpih nCPI hold time from MCLKf Minimum Figure 7-10 T cpms CPA, CPB to nMREQ, SEQ Maximum Figure 7-10 T cps CPA, CPB setup to MCLKr Minimum Figure…

Page 203

T dout MCLKf to D[31:0] valid Maximum Figure 7-3 Figure 7-5 T doutu MCLKf to DOUT[31:0] valid Maximum Figure 7-7 T ecapd TCK to ECAPCLK changing…

Page 204

T rgh RANGEOUT0, RANGEOUT1 hold time from MCLKf Minimum Figure 7-13 T rm Reset guaranteed nonrecognition time Maximum Figure 7-11 T rqh DBGRQ…

Page 205

T trstd nTRSTf to every output valid Maximum - T trstd nTRSTf to TAP outputs valid Maximum - T trsts nTRSTr setup to TCKrMaximum- T wh nWAIT hold from…

Page 206 - 7.25 DC parameters

25 DC parameters Contact your supplier for information on: • operating conditions • maximum ratings.

Page 207 - Signal Description

ARM DDI 0029G Copyright © 1994-2001. All rights reserved. A-1 Appendix A Signal Description This appendix lists and describes the signals for the…

Page 208 - A.1 Signal description

Signal Description A-2 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G A.1 Signal description This section describes all of the signals for…

Page 209 - A.1.3 Signals

Signal Description ARM DDI 0029G Copyright © 1994-2001. All rights reserved. A-3 A.1.3 Signals Table A-3 lists and describes all of the signals used…

Page 210

Signal Description A-4 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G BL[3:0] Byte latch control IC The values on the data bus are latched…

Page 211

Signal Description ARM DDI 0029G Copyright © 1994-2001. All rights reserved. A-5 CPB Coprocessor busy IC Placed LOW by the coprocessor when it is…

Page 212

Signal Description A-6 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G DOUT[31:0] Data output bus O8 Unidirectional bus used to transfer…

Page 213

Signal Description ARM DDI 0029G Copyright © 1994-2001. All rights reserved. A-7 IR[3:0] TAP controller instruction register O4 Reflects the current…

Page 214

Signal Description A-8 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G nENOUT Not enable output O4 During a write cycle, this signal is…

Page 215

Signal Description ARM DDI 0029G Copyright © 1994-2001. All rights reserved. A-9 nRESET Not reset IC Used to start the processor from a known address.…

Page 216

Signal Description A-10 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G RANGEOUT0 EmbeddedICE RANGEOUT0 O4 When the EmbeddedICE watchpoint…

Page 217

Signal Description ARM DDI 0029G Copyright © 1994-2001. All rights reserved. A-11 TAPSM[3:0] TAP controller state machine O4 These reflect the current…

Page 218

Signal Description A-12 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G

Page 219 - Appendix B

Appendix B Debug in Depth This appendix describes the debug features of the ARM7TDMI core in further detail and includes additional information about…

Page 220

• Coupling breakpoints and watchpoints on page B-52 • EmbeddedICE timing on page B-54 • Programming Restriction on page B-55.

Page 221

B.1 Scan chains and JTAG interface There are three JTAG-style scan chains within the ARM7TDMI core. These enable debugging and configuration of…

Page 222 - Scan chain 2

Figure B-1 ARM7TDMI core scan chain arrangements Scan chain 0 enables access to the entire periphery of the ARM7TDMI core, including the data bus. The…

Page 223 - B.1.2 TAP state machine

B.1.2 TAP state machine The process of serial test and debug is best explained in conjunction with the JTAG state machine. Figure B-2 on page B-5…

Page 224

B.2 Resetting the TAP controller The boundary-scan (JTAG) interface includes a state machine controller named the TAP controller. To force the TAP…

Page 225 - B.3 Pullup resistors

B.3 Pullup resistors The IEEE 1149.1 standard implies that nTRST, TDI, and TMS must have internal pullup resistors. To minimize static current draw…

Page 226 - B.4 Instruction register

B.4 Instruction register The instruction register is 4 bits in length. There is no parity bit. The fixed value 0001 is loaded into the instruction…

Page 227 - B.5 Public instructions

B.5 Public instructions Table B-1 lists the public instructions. In the following instruction descriptions, TDI and TMS are sampled on the rising edge…

Page 228

The EXTEST instruction connects the selected scan chain between TDI and TDO. When the instruction register is loaded with the EXTEST instruction, all…

Page 229

B.5.5 CLAMP (0101) This instruction connects a 1 bit shift register, the BYPASS register, between TDI and TDO. When the CLAMP instruction is loaded…

Page 230

B.5.8 INTEST (1100) The INTEST instruction places the selected scan chain in test mode: • The INTEST instruction connects the selected scan chain…

Page 231

When the BYPASS instruction is loaded into the instruction register, all the scan cells assume their normal system mode of operation. The BYPASS…

Page 232 - B.6 Test data registers

B.6 Test data registers There are seven test data registers that can connect between TDI and TDO: • Bypass register on page B-14 • ARM7TDMI core…

Page 233

The 32-bit device identification code is loaded into the ID register from its parallel inputs during the CAPTURE-DR state. The least significant bit…

Page 234

TAPSM[3:0], TCK1, and TCK2.The list of scan chain numbers allocated by ARM are shown in Table B-2 on page B-16. An external scan chain can take any…

Page 235 - Figure B-4 Input scan cell

• SHIFT. For input cells, the capture stage involves copying the value of the system input to the core into the serial register. During shift, this…

Page 236

• In SYSTEM mode, the scan cells are idle. System data is applied to inputs and core outputs are applied to the system. Note The scan cells are not…

Page 237

• During UPDATE-DR, the value shifted into the data bus D[31:0] scan cells appears on the outputs. For all other outputs, the value appears as the…

Page 238

To access this serial register, scan chain 2 must first be selected using the SCAN_N TAP controller instruction. The TAP controller must then be…

Page 239

The following scan chain control signals can also be used for scan chain 3: nHIGHZ This signal can be used to drive the outputs of the scan cells to…

Page 240 - B.7 The ARM7TDMI core clocks

B.7 The ARM7TDMI core clocks The ARM7TDMI core has two clocks: • the memory clock, MCLK • an internally TCK generated clock, DCLK. During normal…

Page 241

At this point, RESTART must be clocked into the TAP instruction register. 3. The ARM7TDMI core now automatically resynchronizes back to MCLK and…

Page 242

B.8 Determining the core and system state When the ARM7TDMI core is in debug state, you examine the core and system state by forcing the load and…

Page 243

The instruction in Example B-1 on page B-24 causes the contents of the registers to appear on the data bus. You can then sample and shift out these…

Page 244

B.8.2 Determining system state To meet the dynamic timing requirements of the memory system, any attempt to access system state must occur…

Page 245

Bit 33 of scan chain 1 is used to force the ARM7TDMI core to resynchronize back to MCLK. The penultimate instruction of the debug sequence is scanned…

Page 246 - Internal cycles

Figure B-6 Debug exit sequence You can see from Figure 5-3 on page 5-7 that the final memory access occurs in the cycle after DBGACK goes HIGH, this…

Page 247 - SUB PC, PC, #28

B.9 Behavior of the program counter during debug The debugger must keep track of what happens to the PC, so that the ARM7TDMI core can be forced to…

Page 248 - 0 EAFFFFF0; B -16

Debug entry adds four addresses to the PC and every instruction adds one address. The difference from breakpoint is that the instruction that caused…

Page 249 - - (3+N+3S)

0 E1A00000; MOV R0, R0 1 E1A00000; MOV R0, R0 0 EAFFFFFA; B -6 This code restores the PC and restarts the program from the next instruction. B.9.5…

Page 250

B.10 Priorities and exceptions When a breakpoint, or a debug request occurs, the normal flow of the program is interrupted. Debug can be treated as…

Page 251 - B.11 Scan chain cell data

B.11 Scan chain cell data This section provides data for: • Scan chain 0 cells on page B-33 • Scan chain 1 cells on page B-37. B.11.1 Scan chain 0…

Page 252

20 D[19] Input/output 21 D[20] Input/output 22 D[21] Input/output 23 D[22] Input/output 24 D[23] Input/output 25 D[24] Input/output 26 D[25]…

Page 253

DCTL a Output 46 nRW Output 47 DBGACK Output 48 CGENDBGACK Output 49 nFIQ Input 50 nIRQ Input 51 nRESET Input 52 ISYNC Input 53 DBGRQ Input 54 ABORT…

Page 254

70 ABE Input 71 APE Input 72 TBIT Output 73 nWAIT Input 74 A[31] Output 75 A[30] Output 76 A[29] Output 77 A[28] Output 78 A[27] Output 79 A[26]…

Page 255 - B.11.2 Scan chain 1 cells

B.11.2 Scan chain 1 cells The ARM7TDMI core provides data for scan chain 1 cells as listed in Table B-4. 95 A[10] Output 96 A[9] Output 97 A[8] Output…

Page 256

6 D[5] Input/output 7 D[6] Input/output 8 D[7] Input/output 9 D[8] Input/output 10 D[9] Input/output 11 D[10] Input/output 12 D[11] Input/output 13…

Page 257 - Number Signal Type

31 D[30] Input/output 32 D[31] Input/output 33 BREAKPT Input Table B-4 Scan chain 1 cells (continued) Number Signal Type

Page 258 - B.12 The watchpoint registers

B.12 The watchpoint registers The two watchpoint units, known as Watchpoint 0 and Watchpoint 1, each contain three pairs of registers: • address value…

Page 259

B.12.1 Programming and reading watchpoint registers A watchpoint register is programmed by shifting data into the EmbeddedICE scan chain, scan chain…

Page 260 - 0xFFFFFFFF

The data to be written is shifted into the 32-bit data field. The address of the register is shifted into the 5-bit address field. A 1 is shifted into…

Page 261

The bits have the following functions: nRW Compares against the write signal from the core to detect the direction of bus activity. nRW is 0 for a…

Page 262

In the ARM7TDMI core EmbeddedICE Logic, the RANGEOUT output of Watchpoint 1 is connected to the RANGE input of Watchpoint 0. Connection enables the…

Page 263 - B.13 Programming breakpoints

B.13 Programming breakpoints Breakpoints are classified as hardware breakpoints or software breakpoints: Hardware breakpoints on page B-45 Typically…

Page 264 - 0x00000000

B.13.2 Software breakpoints To make a watchpoint unit cause software breakpoints on instruction fetches of a particular bit pattern: 1. Program its…

Page 265 - B.14 Programming watchpoints

B.14 Programming watchpoints To make a watchpoint unit cause watchpoints on data accesses: 1. Program its address value register with the address of…

Page 266 - INTDIS DBGRQ DBGACK

B.15 The debug control register is 3 bits wide. Writing control bits occurs during a register write access with the read/write bit HIGH. Reading…

Page 267

In the case of DBGACK, the value of DBGACK from the core is ORed with the value held in bit 0 to generate the external value of DBGACK seen at the…

Page 268

B.16 The debug status register is 5 bits wide. If it is accessed for a write, with the read/write bit set, the status bits are written. If it is…

Page 269

Figure B-11 Debug control and status register structure Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 0 Bit 2 Bit 1 Debug control register Debug status register…

Page 270

B.17 Coupling breakpoints and watchpoints You can couple watchpoint units 1 and 0 together using the CHAIN and RANGE inputs. Using CHAIN enables…

Page 271

The address comparator output of the watchpoint is used to drive the write enable for the CHAINOUT latch. The input to the latch is the output of the…

Page 272 - B.18 EmbeddedICE timing

B.18 EmbeddedICE timing EmbeddedICE samples the EXTERN[1] and EXTERN[0] inputs on the falling edge of ECLK. Sufficient set-up and hold time must…

Page 273 - B.19 Programming Restriction

B.19 Programming Restriction The EmbeddedICE Logic watchpoint units must only be programmed when the clock to the core is stopped. This can be…

Page 274

Debug in Depth B-56 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G

Page 275 - Glossary

ARM DDI 0029G Copyright © 1994-2001. All rights reserved. Glossary-1 Glossary This glossary describes some of the terms used in this manual. Where…

Page 276

Glossary Glossary-2 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G Breakpoint A location in the image. If execution reaches this location…

Page 277

Glossary ARM DDI 0029G Copyright © 1994-2001. All rights reserved. Glossary-3 IRQ Interrupt request. Joint Test Action Group The name of the…

Page 278

Glossary Glossary-4 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G Also referred to as Current PSR (CPSR), to emphasize the distinction…

Page 279

Glossary ARM DDI 0029G Copyright © 1994-2001. All rights reserved. Glossary-5 Status registers See Program Status Register. SP See Stack pointer SWI…

Page 280

Glossary Glossary-6 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G

Page 281

ARM DDI 0029G Copyright © 1994-2001. All rights reserved. Index-1 Index The items in this index are listed in alphabetical order, with symbols and…

Page 282

Index Index-2 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G coprocessor register transfer 3-9 internal 3-7 merged I-S 3-8 nonsequential…

Page 283

Index ARM DDI 0029G Copyright © 1994-2001. All rights reserved. Index-3 state 3-31 status register B-50 system sppeed access B-31 system state B-24…

Page 284

Index Index-4 Copyright © 1994-2001. All rights reserved. ARM DDI 0029G Program status register format 2-13 ProgrammerÕs model 2-2 Protocol converter…

Plus de documents pour Processeurs ARM ARM7TDMI

Questions sur ARM ARM7TDMI

Pas encore de questions sur ce manuel. Posez la première.

Poser une question

Nous répondons à partir du manuel et indiquons la page. La question est publiée sur le site après vérification.

Toutes les questions et réponses ›

Produits connexes et manuels pour Processeurs ARM ARM7TDMI