ARM as a company make Architecture, sell the Architecture and companies like STM, TI uses these architectures to develop their own chips and release them into market.
- A-Class
- Application grade Arch
- Used to run OS (linux, Mac), and also runs applications like chrome
- R-Class
- Used in Real time systems (time-constrant applications)
- M-Class
- Used in microcontrollers, single targeted applications
- Arch is simple (RISC based arch / load and store arch)
- Simple specification of what CPU should do or behave is called Architecture
- Implementation of the Arch is called Micro-Architecture
flowchart RL
subgraph B[Memory]
C[Instruction]
D[Data]
end
A[CPU] -- Store --> D
D -- Load --> A
flowchart TD
A(CPU) --> B((Programmer's Model))
A --> C((Exception Model))
A --> D((Memory Model))
A --> E((Debug Model))
- Programmer's Model - Details out mode of operation of cpu & internal registers
- Exception Model - Exception is internal to cpu
- Memory Model - Imagination about how cpu interact with memory, talks about features
- GPRs General Purpose registers, data will be loaded into these GPRs while computation
- We have 16 GPRs (R0 - R15)
- R13 - Stack Pointer - Holds the address of the last stacked item in memory
- R14 - Link Register - Stores address where CPU comeback to after exe of function
- R15 - Program Counter - Pointing to the addressof next instruction to fetch
- xPSR - Program status register (have 3 internal register)
- EPSR
- APSR
- IPSR
- Result is union of all three
- Control Reg used to control privilage's and control which stack pointer to use
- Status reg is to capture, whether output is -ve or +ve or zero or overflow happend or not
CPU will work in 2 modes
- Thread Mode - Normal function run
- Handler Mode - When Int or Exceptions occur runs in this mode
CPU also have 2 access modes
- Privilage - In this mode, it can access control and status registers
- Non-Privilage - It can't access control and status registers
Handler mode always privilage, but Thread mode it can be Privilaged or Non-Privilaged. Booting always starts with Privilage state in Thread mode