The document discusses the history and evolution of the ARM architecture. It begins with the origins of ARM at Acorn Computers in the 1980s. Key developments include the founding of ARM Ltd. in 1990 and the licensing of the ARM architecture, which led to its widespread adoption in devices. The document outlines the major ARM architecture versions and describes some of the earliest ARM processor implementations.
78. 78
0xlab – connect your device to application – http://0xlab.org/
ARM Registers
ARM 有 37 個暫存器,皆為 32bit 長度
1 個專屬的 PC (program counter)
1 個專屬的 CPSR (current program status register)
5 個專屬的 SPSR ( saved program status registers)
30 個通用的暫存器
規劃
通用組 : r0r12 registers
挪作特別使用 : r13 (stack pointer, sp), r14 (link register, lr)
program counter, r15 (pc)
故實際僅有 16 個可見的暫存器
79. 79
0xlab – connect your device to application – http://0xlab.org/
IRQ and FIQ
• Program Status Register
– 若要抑制 interrupts ,將 "F” 或 “ I” bit 設定為 1
• 一旦 interrupt 觸發,處理器將變更至 FIQ32_mode registers
或 IRQ32_mode registers
• Switch register banks
• Copies CPSR to SPSR_mode (saves mode, interrupt flags, etc.)
• Changes the CPSR mode bits (M[4:0])
• Disables interrupts
• Copies PC to R14_mode (to provide return address)
• Sets the PC to the vector address of the exception handler
N
31 30 29 28 27 … 8 7 6 5 4 3 2 1 0
Z C V I F M4 M3 M2 M1 M0
80. 80
0xlab – connect your device to application – http://0xlab.org/
• 當 interrupt 發生時,硬體會跳躍到 interrupt handler
Interrupt Handlers
user program user program
IRQ Interrupt handler
Interrupt
• On interrupt, the processor will set the
corresponding interrupt bit in the CPSR to
disable subsequent interrupts of the
same type from occurring.
• However, interrupts of a higher priority
can still occur.
Task
IRQ
FIQ
time
81. 81
0xlab – connect your device to application – http://0xlab.org/
Nested/Reentrant Interrupts
• 但是, interrupts 也可能在執行 interrupt handlers 時
被觸發,此為 nested( 巢狀 ) interrupt
user program user program
IRQ Interrupt handler
Interrupt • On interrupt, the processor will set the
corresponding interrupt bit in the CPSR to
disable subsequent interrupts of the
same type from occurring.
• However, interrupts of a higher priority
can still occur.
Task
IRQ
FIQ
time
FIQ Interrupt handler
Second
Interrupt
89. 89
0xlab – connect your device to application – http://0xlab.org/
Serial Channel 4(CODEC)
Serial Channel 0 (USB)
Serial Channel 1
Serial Channel 2 (IrDA)
Serial Channel 3 (UART)
Power Management
Clocks, Reset and Test
JTAG
UDC-
UDC+
RXD_1
TXD_1
RXD_2
TXD_2
RXD_3
TXD_3
TXD_C
RXD_C
SCLK_C
SFRM_C
BATT_FAULT
VDD_FAULT
PWR_EN
TCK_BYP
TESTCLK
PEXTAL
PXTAL
TEXTAL
TXTAL
nRESET
nRESET_OUT
SMROM_EN
ROM_SEL
TCK
TDI
TDO
TMS
nTRST
L_DD(15:0)
L_FCLK
L_LCLK
L_PCLK
L_BIAS
GP(27:0)
GPIO PortsnCAS/ DQM(3:0)
SDCLK<2:0>
SDCKE<1:0>
nSDCAS
nSDRAS
RDY
nCS(5:0)
nWE
nOE
nRAS/ nSDCS(3:0)
LCD Control
Memory Control
RD/nWR
Transceiver Control
nPOE
nPCE<2:1>
nPIOW
nPIOR
nPWE
VDD
nIOIS16
nPWAIT
nPREG
PSKTSEL
VSS/VSSX
VDDX
PCMCIA Bus Signals
Supply
A<25:0>
D<31:0> Data Bus
Address Bus
Intelⓡ
XScale*
PXA 250
[256-pins]
PXA255 core Function Diagram
90. 90
0xlab – connect your device to application – http://0xlab.org/
PXA255 Serial/UART
Serial Channel
4(CODEC)
Serial Channel 0
(USB)
Serial Channel
1
Serial Channel 2
(IrDA)
Serial Channel 3
(UART)
Power Management
Clocks, Reset and
Test
JTAG
UDC-
UDC+
RXD_1
TXD_1
RXD_2
TXD_2
RXD_3
TXD_3
TXD_C
RXD_C
SCLK_C
SFRM_C
BATT_FAULT
VDD_FAULT
PWR_EN
TCK_BYP
TESTCLK
PEXTAL
PXTAL
TEXTAL
TXTAL
nRESET
nRESET_OUT
SMROM_EN
ROM_SEL
TCK
TDI
TDO
TMS
nTRST
L_DD(15:0)
L_FCLK
L_LCLK
L_PCLK
L_BIAS
GP(27:0)
GPIO
Ports
nCAS/ DQM(3:0)
SDCLK<2:0>
SDCKE<1:0>
nSDCAS
nSDRAS
RDY
nCS(5:0)
nWE
nOE
nRAS/ nSDCS(3:0)
LCD Control
Memory
Control
RD/nWR
Transceiver
ControlnPOE
nPCE<2:1>
nPIOW
nPIOR
nPWE
VDD
nIOIS16
nPWAIT
nPREG
PSKTSEL
VSS/VSSX
VDDX
PCMCIA Bus
Signals
Supply
A<25:0>
D<31:0> Data
Bus
Address Bus
Intelⓡ
XScale*
PXA 250
[256-pins]
ParalleltoSerial
Converter
ParalleltoSerial
Converter
CPUCPU SerialtoParallel
Converter
SerialtoParallel
Converter
RXTX
RX TX
Computer
Terminal
Serial
Link
Universal Asynchronous Receiver/Transmitter (UART): controller
91. 91
0xlab – connect your device to application – http://0xlab.org/
Serial Channel
4(CODEC)
Serial Channel 0
(USB)
Serial Channel
1
Serial Channel 2
(IrDA)
Serial Channel 3
(UART)
Power Management
Clocks, Reset and
Test
JTAG
UDC-
UDC+
RXD_1
TXD_1
RXD_2
TXD_2
RXD_3
TXD_3
TXD_C
RXD_C
SCLK_C
SFRM_C
BATT_FAULT
VDD_FAULT
PWR_EN
TCK_BYP
TESTCLK
PEXTAL
PXTAL
TEXTAL
TXTAL
nRESET
nRESET_OUT
SMROM_EN
ROM_SEL
TCK
TDI
TDO
TMS
nTRST
L_DD(15:0)
L_FCLK
L_LCLK
L_PCLK
L_BIAS
GP(27:0)
GPIO
Ports
nCAS/ DQM(3:0)
SDCLK<2:0>
SDCKE<1:0>
nSDCAS
nSDRAS
RDY
nCS(5:0)
nWE
nOE
nRAS/ nSDCS(3:0)
LCD Control
Memory
Control
RD/nWR
Transceiver
ControlnPOE
nPCE<2:1>
nPIOW
nPIOR
nPWE
VDD
nIOIS16
nPWAIT
nPREG
PSKTSEL
VSS/VSSX
VDDX
PCMCIA Bus
Signals
Supply
A<25:0>
D<31:0> Data
Bus
Address Bus
Intelⓡ
XScale*
PXA 250
[256-pins]
Universal Asynchronous Receiver/Transmitter
(UART): controller
FFUART (Full function UART) 的
(memory mapped)
base address 為 0x40100000
92. 92
0xlab – connect your device to application – http://0xlab.org/
Data Communication
• 透過 serial line 建立電腦與終端機模擬程式的通訊
– Data is converted from parallel (bytes) to serial (bits) in the bus
interface
– Bits are sent over wire (TX) to terminal (or back from terminal to
computer)
– Receiving end (RX) translates bit stream back into parallel data
(bytes)
ParalleltoSerial
Converter
ParalleltoSerial
Converter
CPUCPU SerialtoParallel
Converter
SerialtoParallel
Converter
RXTX
RX TX
Computer
Terminal
Serial
Link
102. 102
0xlab – connect your device to application – http://0xlab.org/
參考資訊
ARM Limited ARM Architecture Reference Manual, Addison
Wesley, June 2000
ARM Architecture Manual
Trevor Martin The Insiders Guide To The Philips ARM7Based
Microcontrollers, Hitex (UK) Ltd., February 2005
Steve Furber ARM SystemOnChip Architecture (2nd
edition),
Addison Wesley, March 2000
Intel Xscale Programmers Reference Manual
CortexA8 Technical Reference Manual
The Definitive Guide to the ARM CortexM3, Joseph Yiu