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.
Page 11
Register organization in ARM state ................2-9 Figure 2-4 Register organization in Thumb state ..............2-10 Figure 2-5 Mapping of Thumb-state registers onto ARM-state registers ........2-11 Figure 2-6 Program status register format ................2-13 Figure 3-1 Simple memory cycle ....................3-4 Figure 3-2 Nonsequential memory cycle ..................
About this manual This is the ARM for the ARM7TDMI r4p1 processor. Product revision status The rnpn identifier indicates the revision status of the product described in this ARM, where: Identifies the major revision of the product. Identifies the minor revision or modification status of the product.
Page 17
Read this chapter for a description of the AC and DC parameters, timing diagrams, definitions, and operating data. Appendix A Signal and Transistor Descriptions Read this chapter for a description of the ARM7TDMI core signals. Appendix B Debug in Depth Read this chapter for further information on the debug interface and EmbeddedICE-RT macrocell.
Page 19
ARM Limited http://www.arm.com Frequently Asked Questions list. ARM publications This document contains information that is specific to the ARM7TDMI core. See the following documents for other relevant information: • ARM Architecture Reference Manual (ARM DDI 0100).
Preface Feedback ARM Limited welcomes feedback both on the ARM7TDMI r4p1 processor, and its documentation. Feedback on this product If you have any comments or suggestions about this product, please contact your supplier giving: • the product name • a concise explanation of your comments.
Page 21
Chapter 1 Introduction This chapter introduces the ARM7TDMI r4p1 processor. It contains the following sections: • About the ARM7TDMI core on page 1-2 • Architecture on page 1-5 • Block, core, and functional diagrams on page 1-7 • Instruction set summary on page 1-11.
EmbeddedICE-RT logic on page 1-3. 1.1.1 The instruction pipeline The ARM7TDMI core uses a pipeline to increase the speed of the flow of instructions to the processor. This enables several operations to take place simultaneously, and the processing and memory systems to operate continuously.
1.1.2 Memory access The ARM7TDMI core has a Von Neumann architecture, with a single 32-bit data bus carrying both instructions and data. Only load, store, and swap instructions can access data from memory.
1.2.2 The Thumb instruction set The Thumb instruction set is a subset of the most commonly used 32-bit ARM instructions. Thumb instructions are each 16 bits long, and have a corresponding 32-bit ARM instruction that has the same effect on the processor model. Thumb instructions operate with the standard ARM register configuration, allowing excellent interoperability between ARM and Thumb states.
Page 26
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 code, and provides 160% of the performance of ARM code when running from a 16-bit memory system. Thumb, therefore, makes the ARM7TDMI core ideally suited to embedded applications with restricted memory bandwidth, where code density and footprint is important.
The ARM7TDMI processor architecture, core, and functional diagrams are illustrated in the following figures: • Figure 1-2 on page 1-8 shows a block diagram of the ARM7TDMI processor components and major signal paths • Figure 1-3 on page 1-9 shows the main processor logic at the core of the ARM7TDMI •...
Introduction Instruction set summary This section provides a description of the instruction sets used on the ARM7TDMI processor. This section describes: • Format summary • ARM instruction summary on page 1-13 • Thumb instruction summary on page 1-20. 1.4.1 Format summary This section provides a summary of the ARM, and Thumb instruction sets: •...
Some instruction codes are not defined but do not cause the Undefined instruction trap to be taken, for instance a multiply instruction with bit [6] changed to a 1. These instructions must not be used because their action might change in future ARM implementations. The behavior of these instruction codes on the ARM7TDMI processor is unpredictable.
Introduction 1.4.2 ARM instruction summary The ARM instruction set summary is listed in Table 1-2. Table 1-2 ARM instruction summary Operation Assembly syntax Move Move MOV{cond}{S} Rd, <Oprnd2> Move NOT MVN{cond}{S} Rd, <Oprnd2> Move SPSR to register MRS{cond} Rd, SPSR...
Page 35
Software interrupt SWI 24bit_Imm Addressing modes The addressing modes are procedures shared by different instructions for generating values used by the instructions. The five addressing modes used by the ARM7TDMI processor are: Mode 1 Shifter operands for data processing instructions.
Page 47
Chapter 2 Programmer’s Model This chapter describes the ARM7TDMI core programmer’s model. It contains the following sections: • About the programmer’s model on page 2-2 • Processor operating states on page 2-3 • Memory formats on page 2-4 • Data types on page 2-6 •...
2.2.1 Switching state The operating state of the ARM7TDMI core can be switched between ARM state and Thumb state using the BX instruction. This is described in the ARM Architecture Reference Manual. All exception handling is entered in ARM state. If an exception occurs in Thumb state, the processor reverts to ARM state.
For example: • bytes zero to three hold the first stored word • bytes four to seven hold the second stored word. The ARM7TDMI processor is bi-endian and can treat words in memory as being stored in either: • Little-endian. •...
2.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 significant byte at the highest-numbered byte. So the byte at address 0 of the memory system connects to data lines 31 through 24.
Programmer’s Model Data types The ARM7TDMI processor supports the following data types: • words, 32-bit • halfwords, 16-bit • bytes, 8-bit. You must align these as follows: • word quantities must be aligned to four-byte boundaries • halfword quantities must be aligned to two-byte boundaries •...
Operating modes The ARM7TDMI processor has seven modes of operation: • User mode is the usual ARM program execution state, and is used for executing most application programs. • Fast Interrupt (FIQ) mode supports a data transfer or channel process.
2.6.1 The ARM-state register set In ARM state, 16 general registers and one or two status registers are accessible at any one time. In privileged modes, mode-specific banked registers become available. Figure 2-3 on page 2-10 shows which registers are available in each mode.
Programmer’s Model 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, IRQ, Supervisor, Abort, and undefined modes each have two banked registers mapped to r13 and r14, allowing a private SP and LR for each mode.
Programmer’s Model 2.6.2 The Thumb-state register set 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 LR • the CPSR.
Programmer’s Model 2.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: • Thumb-state r0–r7 and ARM-state r0–r7 are identical • Thumb-state CPSR and SPSRs and ARM-state CPSR and SPSRs are identical •...
Programmer’s Model The program status registers The ARM7TDMI processor contains a CPSR and five SPSRs for exception handlers to use. The program status registers: • hold information about the most recently performed ALU operation • control the enabling and disabling of interrupts •...
Page 60
Programmer’s Model All instructions can execute conditionally in ARM state. In Thumb state, only the Branch instruction can be executed conditionally. For more information about conditional execution, see the ARM Architecture Reference Manual. 2.7.2 Control bits The bottom eight bits of a PSR are known collectively as the control bits. They are the: •...
Exceptions arise whenever the normal flow of a program has to be halted temporarily, for example, to service an interrupt from a peripheral. Before attempting to handle an exception, the ARM7TDMI processor preserves the current processor state so that the original program can resume when the handler routine has finished.
Page 63
Forces the CPSR mode bits to a value that depends on the exception. Forces the PC to fetch the next instruction from the relevant exception vector. The ARM7TDMI processor can also set the interrupt disable flags to prevent otherwise unmanageable nestings of exceptions.
Page 64
FIQ exceptions can be disabled within a privileged mode by setting the CPSR F flag. When the F flag is clear, the ARM7TDMI processor checks for a LOW level on the output of the FIQ synchronizer at the end of each instruction.
Page 65
IRQ has a lower priority than FIQ, and is masked on entry to an FIQ sequence. As with the nFIQ input, nIRQ passes into the core through a synchronizer. Irrespective of whether exception entry is from ARM state or Thumb state, an IRQ handler returns from the interrupt by executing:...
Page 66
It also means that the ARM7TDMI core always preserves r15 in an aborted LDM instruction, because r15 is always either the last register in the transfer list or not present in the transfer list.
When the ARM7TDMI processor encounters an instruction that neither it, nor any coprocessor in the system can handle, the ARM7TDMI core takes the undefined instruction trap. Software can use this mechanism to extend the ARM instruction set by emulating undefined coprocessor instructions.
• When FIQs are enabled, and a Data Abort occurs at the same time as an FIQ, the ARM7TDMI processor enters the Data Abort handler, and proceeds immediately to the FIQ vector. A normal return from the FIQ causes the Data Abort handler to resume execution.
2.10 Reset When the nRESET signal goes LOW a reset occurs, and the ARM7TDMI core abandons the executing instruction and continues to increment the address bus as if still fetching word or halfword instructions. nMREQ and SEQ indicates internal cycles during this time.
Page 71
Chapter 3 Memory Interface This chapter describes the ARM7TDMI processor memory interface. It contains the following sections: • About the memory interface on page 3-2 • Bus interface signals on page 3-3 • Bus cycle types on page 3-4 •...
Memory Interface Bus interface signals The signals in the ARM7TDMI processor bus interface can be grouped into four categories: • clocking and clock control • address class signals • memory request signals • data timed signals. The clocking and clock control signals are: •...
Memory Interface 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 to the access request: • memory request signals are broadcast in the bus cycle ahead of the bus cycle to which they refer •...
I-cycle Internal cycle C-cycle Coprocessor register transfer cycle A memory controller for the ARM7TDMI processor must commit to a memory access only on an N-cycle or an S-cycle. 3.3.1 Nonsequential cycles A nonsequential cycle is the simplest form of bus cycle, and occurs when the processor requests a transfer to or from an address that is unrelated to the address used in the preceding cycle.
This happens, for example, when an instruction is executed. If you are designing a memory controller for the ARM7TDMI core, and your memory system is unable to cope with this case, use the nWAIT signal to extend the bus cycle to allow sufficient cycles for the memory system.
Figure 3-3 Sequential access cycles 3.3.3 Internal cycles During an internal cycle, the ARM7TDMI processor does not require a memory access, as an internal function is being performed, and no useful prefetching can be performed at the same time. ARM DDI 0210C...
Page 78
Memory Interface Where possible the ARM7TDMI processor broadcasts the address for the next access, so that decode can start, but the memory controller must not commit to a memory access. This is shown in Figure 3-4 and, is further described in Nonsequential memory cycle on page 3-6.
3.3.5 Coprocessor register transfer cycles During a coprocessor register transfer cycle, the ARM7TDMI processor uses the data buses to transfer data to or from a coprocessor. A memory cycle is not required and the memory controller does not initiate a transaction. The memory system must not drive onto the data bus during a coprocessor register transfer cycle.
A writable memory system for the ARM7TDMI processor must have individual byte write enables. Both the C Compiler and the ARM debug tool chain, for example, Multi-ICE, assume that arbitrary bytes in the memory can be written. If individual byte write capability is not provided, you might not be able to use either of these tools without data corruption.
These instructions perform an atomic read/write operation, and can be used to implement semaphores. 3.4.7 TBIT TBIT is used to indicate the operating state of the ARM7TDMI processor. When in: • ARM state, the TBIT signal is LOW •...
In most systems, particularly a DRAM-based system, it is desirable to obtain the address from ARM7TDMI processor as early as possible. When APE is HIGH then the ARM7TDMI processor address becomes valid after the rising edge of MCLK before the memory cycle to which it refers.
The value of APE can be held until the memory control signals denote another nonsequential access. Previous ARM processors included the ALE signal, and this is retained for backwards compatibility. This signal also enables you to modify the address timing to achieve the same results as APE, but in a dynamic manner.
3.6.1 D[31:0], DOUT[31:0], and DIN[31:0] The ARM7TDMI processor provides both unidirectional data buses, DIN[31:0], DOUT[31:0], and a bidirectional data bus, D[31:0]. The configuration input BUSEN is used to select which is active. Figure 3-11 shows the arrangement of the data buses and bus-splitter logic.
Page 89
When the ARM7TDMI processor is reading from memory DIN[31:0] is acting as an input. During write cycles the ARM7TDMI core must output data. During phase 2 of the previous cycle, the signal nRW is driven HIGH to indicate a write cycle. During the actual cycle, nENOUT is driven LOW to indicate that the processor is driving D[31:0] as an output.
Page 94
3.6.3 Byte latch enables To ease the connection of the ARM7TDMI core to subword sized memory systems, input data and instructions can be latched on a byte-by-byte basis. You can achieve this by the use of the BL[3:0] signal as follows: •...
D[7:0] 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 example, a byte read on A[1:0] = 01 in a little-endian system means that the byte is read on bits D[15:8] but is placed in the ARM register bits [7:0].
Memory Interface Stretching access times The ARM7TDMI processor does not contain any dynamic logic that relies on regular clocking to maintain the internal state. Therefore, there is no limit upon the maximum period for which MCLK can be stretched, or nWAIT held LOW. There are two methods available to stretch access times as described in: •...
They are undefined after power up. After nRESET has been taken HIGH, the ARM core does two further internal cycles before the first instruction is fetched from the reset vector (address 0x00000000 ).
Page 103
Chapter 4 Coprocessor Interface This chapter describes the ARM7TDMI core coprocessor interface. It contains the following sections: • About coprocessors on page 4-2 • Coprocessor interface signals on page 4-4 • Pipeline following signals on page 4-5 • Coprocessor interface handshaking on page 4-6 •...
• special processing logic, with its own data path. A coprocessor is connected to the same data bus as the ARM7TDMI processor in the system, and tracks the pipeline in the ARM7TDMI processor. This means that the coprocessor can decode the instructions in the instruction stream, and execute those that it supports.
4.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 ARM7TDMI core contains one internal coprocessor: • CP14, the Debug Communications Channel (DCC) coprocessor. Other coprocessor numbers have also been reserved. Coprocessor availability is listed in Table 4-1.
Coprocessor Interface Coprocessor interface signals The signals used to interface the ARM7TDMI core to a coprocessor are grouped into four categories. The clock and clock control signals are: • MCLK • nWAIT • nRESET. The pipeline following signals are: •...
An instruction must be loaded into the pipeline on the falling edge of MCLK, and only when nOPC, nMREQ, and TBIT were all LOW in the previous bus cycle. These conditions indicate that this cycle is an ARM instruction fetch, so the new opcode must be read into the pipeline.
• Coprocessor data operations on page 4-10 • Coprocessor load and store operations on page 4-10. The ARM7TDMI core and any coprocessors in the system perform a handshake using the signals shown in Table 4-2. Table 4-2 Handshaking signals Signal...
The instruction has passed its conditional execution tests. If all these requirements are met, the ARM7TDMI core signals by taking nCPI LOW, this commits the coprocessor to the execution of the coprocessor instruction.
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 instruction in the Execute stage of the pipeline. A summary of coprocessor signaling is listed in Table 4-3 on page 4-7.
Coprocessor register transfer instructions The coprocessor register transfer instructions, MCR and MRC, are used to transfer data between a register in the ARM7TDMI processor register bank and a register in the coprocessor register bank. An example sequence for a coprocessor register transfer is shown in Figure 4-2.
Coprocessor data operations, CDP instructions, perform processing operations on the data held in the coprocessor register bank. No information is transferred between the ARM7TDMI processor and the coprocessor as a result of this operation. An example sequence is shown in Figure 4-3.
Coprocessor Interface Connecting coprocessors A coprocessor in an ARM7TDMI processor system must have 32-bit connections to: • the instruction stream from memory • data written by the core, MCR • data read by the core, MRC. The coprocessor can optionally have connections to: •...
The internal coprocessor, CP14, can still be used. The coprocessor outputs from the ARM7TDMI processor are usually left unconnected but these outputs can be used in other parts of a system as follows:.
All coprocessors must monitor the state of the TBIT output from ARM7TDMI core. When the ARM7TDMI core is in Thumb state, coprocessors must drive CPA and CPB HIGH, and the instructions seen on the data bus must be ignored.
If a User mode process, with nTRANS LOW, tries to access a coprocessor instruction that can only be executed in a privileged mode, the coprocessor responds with CPA and CPB HIGH. This causes the ARM7TDMI processor to take the undefined instruction trap.
Page 121
Chapter 5 Debug Interface This chapter describes the ARM7TDMI processor debug interface. It contains the following sections: • About the debug interface on page 5-2 • Debug systems on page 5-4 • Debug interface signals on page 5-7 • ARM7TDMI core clock domains on page 5-11 •...
Store Multiple ( ) can be inserted into the instruction pipeline and this exports the contents of the ARM7TDMI core registers. This data can be serially shifted out without affecting the rest of the system. In monitor mode, the JTAG interface is used to transfer data between the debugger and a simple monitor program running on the ARM7TDMI core.
Page 123
During normal operation, the core is clocked by MCLK and internal logic holds DCLK LOW. When the ARM7TDMI processor is in halt mode, the core is clocked by DCLK under control of the TAP state machine and MCLK can free-run. The selected clock is output on the signal ECLK for use by the external system.
5.2.1 Debug host The debug host is a computer that is running a software debugger such as the ARM Debugger for Windows (ADW). The debug host enables you to issue high-level commands such as setting breakpoints or examining the contents of memory.
Debug Interface The ARM7TDMI processor has hardware extensions that ease debugging at the lowest level. The debug extensions: • enable you to halt program execution • examine and modify the core internal state of the core • view and modify the state of the memory system •...
The following sections describe: • Entry into debug state • Action of the ARM7TDMI processor in debug state on page 5-10. 5.3.1 Entry into debug state The ARM7TDMI processor is forced into debug state following a breakpoint, watchpoint, or debug request.
Figure 5-3 Debug state entry Entry into debug state on breakpoint The ARM7TDMI core marks instructions as being breakpointed as they enter the instruction pipeline, but the core does not enter debug state until the instruction reaches the Execute stage.
Page 129
Entry into debug state on debug request The ARM7TDMI processor can be forced into debug state on debug request in either of the following ways: •...
Page 130
Debug Interface instruction is a busy-waiting access to a coprocessor, the instruction terminates and ARM7TDMI processor enters debug state immediately. This is similar to the action of nIRQ and nFIQ. 5.3.2 Action of the ARM7TDMI processor in debug state In debug state, nMREQ and SEQ indicate internal cycles. This enables the rest of the memory system to ignore the core and function as normal.
5.4.1 Clock switch during debug When the ARM7TDMI processor enters halt debug state, it switches automatically from MCLK to DCLK, it then asserts DBGACK in the HIGH phase of MCLK. The switch between the two clocks occurs on the next falling edge of MCLK. This is shown in Figure 5-4.
Page 132
5.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 clocked using DCLK. MCLK must be held LOW. Entry into test is less automatic than debug and you must take care to prevent spurious clocking on the way into test.
Before you can examine the core and system state, the debugger must determine if the processor entered debug from Thumb state or ARM state, by examining bit [4] of the EmbeddedICE-RT logic debug status register. When bit [4] is HIGH, the core has entered debug from Thumb state.
The EmbeddedICE-RT logic provides integrated on-chip debug support for the ARM7TDMI core. The EmbeddedICE-RT logic is programmed serially using the ARM7TDMI processor TAP controller. Figure 5-5 illustrates the relationship between the core, the EmbeddedICE-RT logic, and the TAP controller, showing only the pertinent signals.
When DBGEN is LOW: • BREAKPT and DBGRQ are ignored by the core • DBGACK is forced LOW by the ARM7TDMI core • interrupts pass through to the processor uninhibited by the debug logic • the EmbeddedICE-RT logic enters low-power mode.
Debug Interface Debug Communications Channel The ARM7TDMI processor EmbeddedICE-RT logic contains a Debug Communications Channel (DCC) to pass information between the target and the host debugger. This is implemented as coprocessor 14 (CP14). The DCC comprises: • a 32-bit communications data read register •...
Page 140
An alternative, and potentially more efficient, method to polling the debug communications control register is to use the COMMTX and COMMRX outputs from the ARM7TDMI processor. You can use these outputs to interrupt the processor when: • a word is available to be read from the DCC data read register •...
14 (see The abort status register on page B-56). The monitor mode enable bit does not put the ARM7TDMI processor into debug state. For this reason, it is necessary to change the contents of the watchpoint registers while external memory accesses are taking place, rather than changing them when in debug state where the core is halted.
Page 143
Chapter 6 Instruction Cycle Timings This chapter describes the ARM7TDMI processor instruction cycle operations. It contains the following sections: • About the instruction cycle timing tables on page 6-3 • Branch and branch with link on page 6-4 • Thumb branch with link on page 6-5 •...
The address is incremented to prefetch instructions in most cases. Because the instruction width is four bytes in ARM state and two bytes in Thumb state, the increment varies accordingly.
The cycle timings are listed in Table 6-1 where: • pc is the address of the branch instruction • alu is the destination address calculated by the ARM7TDMI core • (alu) is the contents of that address. Table 6-1 Branch instruction cycle operations...
The first instruction acts like a simple data operation to add the PC to the upper part of the offset, storing the result in Register r14, LR. The second instruction which takes a single cycle acts in a similar fashion to the ARM state branch with link instruction. The first cycle therefore calculates the final branch destination whilst performing a prefetch from the current PC.
W and w represent the instruction width before and after the BX respectively. The width equals four bytes in ARM state and two bytes in Thumb state. For example, when changing from ARM to Thumb state, W equals four and w equals two •...
The cycle timings are listed in Table 6-4 on page 6-8 where: • pc is the address of the branch instruction • alu is the destination address calculated by the ARM7TDMI core • (alu) is the contents of that address. ARM DDI 0210C...
The coprocessor is responsible for determining the number of words to be transferred, and indicates the last transfer cycle by driving CPA and CPB HIGH. The ARM7TDMI processor spends the first cycle (and any busy-wait cycles) generating the transfer address, and updates the base address during the transfer cycles.
Instruction Cycle Timings 6.15 Coprocessor data transfer from coprocessor to memory The ARM7TDMI processor controls these instructions in the same way as for memory to coprocessor transfers, with the exception that the nRW line is inverted during the transfer cycle.
6-21, but the transfer is limited to one word, and the ARM7TDMI core puts the data into the destination register in the third cycle. The third cycle can be merged with the next prefetch cycle into one memory N-cycle as with all processor register load instructions.
Chapter 7 AC and DC Parameters This chapter gives the AC timing parameters of the ARM7TDMI core. It contains the following sections: • Timing diagrams on page 7-2 • Notes on AC parameters on page 7-20 • DC parameters on page 7-26.
Page 199
Appendix A Signal and Transistor Descriptions This appendix describes the signals and transistors in the ARM7TDMI processor. It contains the following sections: • Transistor dimensions on page A-2 • Signal types on page A-3 • Transistor dimensions on page A-2.
Signal and Transistor Descriptions Transistor dimensions Table A-1 shows the dimensions of the output driver for a 0.18µm ARM7TDMI r4p1 processor. Table A-1 Transistor gate dimensions of the output driver for a 0.18µm process MOSFET Width Length type 16.2µm 0.18µm 8.28µm...
Signal and Transistor Descriptions Signal descriptions Table A-3 describes all the signals used for the ARM7TDMI r4p1 processor. Table A-3 Signal descriptions Name Type Description A[31:0] This is the 32-bit address bus. ALE, ABE, and APE are used to control when the address bus is valid.
Page 204
Debug enable This signal must be HIGH to enable the EmbeddedICE-RT logic to function. DBGRQ This is a level-sensitive input, that when HIGH causes ARM7TDMI core to enter debug state after executing the current instruction. This enables Debug request external hardware to force the ARM7TDMI core into debug state, in addition to the debugging features provided by the EmbeddedICE-RT logic.
Page 205
Boundary scan cell enable This must be left unconnected, if an external boundary-scan chain is not connected. ECAPCLK Only used on the ARM7TDMI test chip, and must otherwise be left unconnected. EXTEST capture clock ECAPCLKBS Used to capture the device inputs of an external boundary-scan chain during EXTEST.
Page 207
See Chapter 3 Memory Interface. nENOUTI During a coprocessor register transfer C-cycle from the EmbeddedICE-RT communications channel coprocessor to the ARM core, this signal goes Not enable output LOW. This can be used to aid arbitration in shared bus systems.
Page 209
HIGH. Sequential address In ARM state the new address can be for the same word or the next. In THUMB state, the same halfword or the next. It can be used, in combination with the low-order address lines, to indicate that the next cycle can use a fast memory mode (for example DRAM page mode) or to bypass the address translation system.
Page 210
Under normal operating conditions TBE must be HIGH. TBIT When the processor is executing the THUMB instruction set, this is HIGH. It is LOW when executing the ARM instruction set. This signal changes in phase two in the first execute cycle of a BX instruction.
Appendix B Debug in Depth This appendix describes the debug features of the ARM7TDMI core in further detail and includes additional information about the EmbeddedICE-RT logic. It contains the following sections: • Scan chains and the JTAG interface on page B-3 •...
The control signals provided for this scan chain are described in Scan chain 3 on page B-20. Two additional scan chains exist (numbered four and eight), but these are reserved for ARM use only.
Figure B-1 ARM7TDMI core scan chain arrangements Scan chain 0 Scan chain 0 enables access to the entire periphery of the ARM7TDMI core, including the data bus. The scan chain functions enable inter-device testing (EXTEST) and serial testing of the core (INTEST). The order of the scan chain, from search data in to out, is: Data bus bits 0 to 31.
To minimize static current draw, these resistors are not fitted to the ARM7TDMI core. Accordingly, the four inputs to the test interface, the nTRST, TDI, and TMS signal plus TCK, must all be driven to good logic levels to achieve normal circuit operation.
Page 220
B.5.3 SAMPLE/PRELOAD (b0011) This instruction is included for production test only and must never be used on the scan chains provided by the ARM7TDMI core. It can be used on user-added scan chains such as boundary-scan chains. B.5.4 RESTART (b0100) The RESTART instruction restarts the processor on exit from debug state.
Page 222
TDI and TDO. The register is a 32-bit register that enables the manufacturer, part number, and version of a component to be read through the TAP. See ARM7TDMI core device IDentification (ID) code register on page B-14 for details of the ID register format.
The TAP controller can be used to drive external scan chains in addition to those within the ARM7TDMI macrocell. The external scan chain must be assigned a number and control signals for it can be derived from SCREG[3:0], IR[3:0], TAPSM[3:0], TCK1, and TCK2.
Page 228
During RUN-TEST-IDLE, the core is clocked. Usually, the TAP controller only spends one cycle in RUN-TEST-IDLE. The whole operation can then be repeated. For a description of the core clocks during test and debug, see The ARM7TDMI core clocks on page B-22.
Page 229
See System speed access on page B-32 for further details. After the ARM7TDMI core has entered debug state, the first time this bit is captured and scanned out, its value tells the debugger if the core entered debug state because of a breakpoint (bit [33] clear) or a watchpoint (bit [33] set).
Page 230
User defined. Scan chain 3 control signals are provided so that an optional external boundary-scan chain can be controlled through the ARM7TDMI core. Typically, this is used for a scan chain around the pad ring of a packaged device. The following control signals are provided which are generated only when scan chain 3 has been selected.
During normal operation, the core is clocked by MCLK and internal logic holds DCLK LOW. When the ARM7TDMI core is in debug state, the core is clocked by DCLK under control of the TAP state machine and MCLK can free-run. The selected clock is output on the signal ECLK for use by the external system.
Page 233
On the way into test, MCLK must be held LOW. The TAP controller can now be used to serially test the ARM7TDMI core. If scan chain 0 and INTEST are selected, DCLK is generated while the state machine is in the RUN-TEST-IDLE state. During EXTEST, DCLK is not generated.
When the processor has entered debug state from Thumb state, the simplest course of action is for the debugger to force the core back into ARM state. The debugger can then repeat the same sequence of instructions to determine the processor state.
Page 235
Executing instructions this slowly is acceptable for accessing the core state because the ARM7TDMI core is fully static. However, you cannot use this method for determining the state of the rest of the system.
Page 236
LOW, after it has synchronized back to system speed. This transition is used by the memory controller to arbitrate if the ARM7TDMI core can have the bus in the next cycle. If the bus is not available, the core can have its clock stalled indefinitely. The only way to tell that the memory access has completed is to examine the state of both nMREQ and DBGACK.
Page 237
The ARM7TDMI core synchronizes back to MCLK. Bit [33] of scan chain 1 is used to force the ARM7TDMI core to resynchronize back to MCLK, as follows: The penultimate instruction of the debug sequence is scanned in with bit [33] set HIGH.
The debugger must keep track of what happens to the program counter, so that the ARM7TDMI core can be forced to branch back to the place at which program flow was interrupted by debug. Program flow can be interrupted by any of the following: •...
Page 241
A similar sequence follows when an interrupt, or any other exception, occurs during a watchpointed memory access. The ARM7TDMI core enters debug state in the mode of the exception. The debugger must check to see if an exception has occurred by examining the current and previous mode, in the CPSR and SPSR, and the value of the PC.
Page 242
System speed instructions access the memory system and so it is possible for aborts to take place. If an abort occurs during a system-speed memory access, the ARM7TDMI core enters abort mode before returning to debug state.
If an interrupt is pending during the instruction prior to entering debug state, the ARM7TDMI core enters debug state in the mode of the interrupt. On entry to debug state, the debugger cannot assume that the ARM7TDMI core is in the mode expected by the user program.
Page 244
Debug in Depth B.10.3 Data Aborts When a Data Abort occurs on a watchpointed access, the ARM7TDMI core enters debug state in abort mode. The watchpoint, therefore, has higher priority than the abort, but the ARM7TDMI core remembers that the abort happened.
Debug in Depth B.11.2 Scan chain 1 cells The ARM7TDMI core provides data for scan chain 1 cells as listed in Table B-4. Table B-4 Scan chain 1 cells Number Signal Type D[0] Input/output D[1] Input/output D[2] Input/output D[3] Input/output...
Program its address value register with the address of the instruction to be breakpointed. For an ARM-state breakpoint, program bits [1:0] of the address mask register to b11. For a breakpoint in Thumb state, program bits [1:0] of the address mask register to b01.
Page 263
[0] of the debug control register to generate the external value of DBGACK seen at the periphery of the ARM7TDMI core. This enables the debug system to signal to the rest of the system that the core is still being debugged even when system-speed accesses are being performed (when the internal DBGACK signal from the core is LOW).
DbgAbt Figure B-12 Debug abort status register This bit is set when the ARM7TDMI core takes a prefetch or data abort as a result of a breakpoint or watchpoint. If, on a particular instruction or data fetch, both the debug abort and the external abort signal are asserted, then the external abort takes priority, and the DbgAbt bit is not set.
Cv[8:0] be the value in the control value register be the value in the control mask register Cm[7:0] be the combined control bus from the ARM7TDMI core, other C[9:0] watchpoint registers and the EXTERN signal. CHAINOUT signal The CHAINOUT signal is derived as follows:...
B.20 Programming restriction Because the monitor mode enable bit does not put the ARM7TDMI into debug state, it is necessary to change the contents of the watchpoint registers while external memory accesses are taking place, rather changing them when in debug state (where the core is halted).
Appendix C Differences Between Rev 3a and Rev 4 This appendix describes the differences between Rev 3a and Rev 4 of the ARM7TDMI processor. It contains the following sections: • Summary of differences between Rev 3a and Rev 4 on page C-2 •...
Differences Between Rev 3a and Rev 4 Summary of differences between Rev 3a and Rev 4 The changes incorporated in ARM7TDMI Rev 4 are as follows: • improved low voltage operation • addition of EmbeddedICE-RT logic • enhancement to ETM interface •...
EmbeddedICE-RT is an enhanced implementation of the EmbeddedICE logic that was part of the ARM7TDMI Rev 3a. The extra feature provided by EmbeddedICE-RT is that upon a breakpoint or watchpoint, the core can be forced to take an exception, rather than simply entering debug state.
Page 274
To improve performance, only one access is required to read both the data and the status bit, in the ARM7TDMI Rev 4 because the status bit is now included in the LSB of the address field which is read from the scan chain.
A procedure shared by many different instructions, for generating values used by the Addressing modes instructions. For four of the ARM addressing modes, the values generated are memory addresses (which is the traditional role of an addressing mode). A fifth addressing mode generates values to be used as operands by data-processing instructions.
Page 279
See Link register A complex logic block with a defined interface and behavior. A typical VLSI system Macrocell will comprise several macrocells (such as an ARM7TDMI, an ETM7, and a memory block) plus application-specific logic. Memory Management Unit Allows control of a memory system. Most of the control is provided through translation tables held in memory.
Page 281
JTAG boundary-scan architecture. The mandatory terminals are TDI, TDO, TMS, and TCK. The optional terminal is nTRST. A halfword which specifies an operation for an ARM processor in Thumb state to Thumb instruction perform. Thumb instructions must be halfword-aligned.