Architectural Features and Block Diagram of Arm7 Tdmi
Architectural Features and Block Diagram of Arm7 Tdmi
Architectural Features and Block Diagram of Arm7 Tdmi
FEATURES AND
BLOCK DIAGRAM OF
ARM7 TDMI
Features of ARM7 TDMI
■ It is a 32-bit microcontroller
■ 32-bit address bus so it can access 4GB size of memory
■ 32-bit data bus and ALU
So it can complete 32-bit instructions in 1 cycle. That’s 4 times
faster than 8051.
■ TDMI- Thumb Instruction, Debugger, Multiplier, ICE
ARM7, a rigid performance-based
microcontroller
■ Aligned and misaligned data
– Aligned data: 16-bit data starts at even address
– Misaligned data: 16-bit data starts at odd address
32-bit data is stored in 4 consecutive locations
Addresses:
3 2 1 0 0000
7 6 5 4 0100
B A 9 8 1000
F E D C 1100
■ ARM does not allow misaligned data, hence it is called rigid.
■ All data should be stored starting with an address that is a multiple of 4 (i.e. last 2
bits are 00).
■ Aligned 32-bit data requires only 1-cycle for transfer, hence it is performance-
oriented.
■ ARM7 follows Von Neumann model of memory
■ That is, one common 4GB memory unit stores both programs and data.
4 GB MEMORY:
PROGRAM
DATA
ARM7- Advanced RISC processor
• Scan Chains:
These enable serial access to the core logic and to EmbeddedICE Logic for programming purposes.
Each scan chain cell is fairly simple and consists of a serial register and a multiplexor. The scan
cells perform two basic functions:
• CAPTURE
• SHIFT
All the control signals for the scan cells are generated internally by the TAP controller.
TAP controller instructions to select one of the following basic modes of operation of the
scan chains:
• INTEST mode
• EXTEST mode
• SYSTEM mode
Scan chain 0
Scan chain 0 is intended primarily for inter-device testing, EXTEST, and testing the core,
INTEST.
Scan chain 1
The primary use for scan chain 1 is for debugging, although it can be used for EXTEST
on the data bus.
Scan chain 2
Enables the EmbeddedICE-RT macrocell registers to be accessed.
• D[31:0], DOUT[31:0], and DIN[31:0]:
1. 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.
2. Bus splitter latch is used to separate these buses.
3. When the bidirectional data bus is being used then BUSEN must be LOW.
4. Figure shows the arrangement of the data buses and bus-splitter logic.
• Tap Controller:
The TAP controller is a state machine that determines the state of the ARM7TDMI-S,
which controls the flow of data bits to the Instruction Register (IR) and the Data
Registers (DR).
SCREG[3:0] number of scan chain currently selected
IR[3:0] TAP controller instruction register
TAPSM[3:0] TAP controller state machine
TCK1 test clock phase 1
TCK2 test clock phase 2
nTRST Selects the system mode
TCK is not necessary to reset the device
ARM7 TDMI Main Processor Logic
ALU
■ 32 bit data bus carrying both instructions and data
■ Two 32 bit inputs: One from the register file and other from the shifter
■ Output modifies the status register flag, V-bit goes to the V flag and Cout goes
to the C flag
■ Most significant bit is the S flag
■ Output of ALU is NORed to obtain the Z flag.
Booth multiplier
■ 32-bit inputs, all inputs from the register file
■ output: 32 least significant bits of the product
■ The multiplication starts whenever the start input goes active. The output fin
goes high when finishing
Barrel Shifter
■ The barrel shifter has a 32-bit input to be shifted. This input is coming from
the register file or it could be immediate data. The shifter has other control
inputs coming from instruction register
■ Shift field in the instruction controls the operation of the barrel shifter. This
field indicates the type of shift to be performed (logical left or right,
arithmetic right or rotate right).
■ The amount by which the register should be shifted is
contained in an immediate field in the instruction or it
could be the lower 6 bits of a register in the register file
REGISTERS
■ The ARM7TDMI has a total of 37 registers:
■ 31 general-purpose 32-bit registers
■ 6 status registers.
■ These registers are not all accessible at the same time. The processor state and
operating mode determine which registers are available to the programmer.
■ 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. The
ARM-state register set contains 16 directly-accessible registers, r0 to r15.
■ A further register, the CPSR, contains condition code flags and the current mode bits.
■ Registers r0 to r13 are general-purpose registers used to hold either data or address
values.
■ By convention, r13 is used as the Stack Pointer (SP).
■ Registers r14 and r15 have the following special functions:
Link register: Register r14 is used as the subroutine Link Register (LR). Register r14
receives a copy of r15 when a Branch with Link (BL) instruction is executed. At all
other times you can treat r14 as a general-purpose register. The corresponding
banked registers r14_svc, r14_irq, r14_fiq, r14_abt and r14_und are similarly used
to hold the return values of r15 when interrupts and exceptions arise, or when BL
instructions are executed within interrupt or exception routines.
Program counter: Register r15 holds the PC. In ARM state, bits [1:0] of r15 are
undefined and must be ignored. Bits [31:2] contain the PC. In Thumb state, bit [0]
is undefined and must be ignored. Bits [31:1] contain the PC.
■ The Thumb state register set is a subset of the ARM state set. The programmer has
direct access to:
– eight general registers, r0–r7
– the PC
– a Stack Pointer (SP)
– a Link Register (LR)
– the CPSR.
■ There are banked SPs, LRs, and SPSRs for each privileged mode.
PROCESSOR MODES
■ There are 7 operating modes out of which first six are privileged modes and the last
is non privileged mode.
1) Abort mode (abt): The processor enters abort mode when there is failed attempt to
access memory.
2) FIQ (fiq): Designed to support a data transfer or channel process.
3) IRQ (irq): Used for general-purpose interrupt handling.
4) Supervisor (svc): Protected mode for the operating system.
5) System (sys): A privileged user mode for the operating system that allows full read-
write access to the CPSR.
6) Undefined (und): Entered when an undefined instruction is executed.
7) User (usr): The normal ARM program execution state and used for programs and
applications.
BANKED REGISTERS