ARM and RISC design philosophy
Notes on ARM and RISC design philosophy: why RISC ideas matter for ARM cores, key definitions and trade-offs, formulas for performance, worked numerical examples, common mistakes, exam question types and a quick check.
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
ARM processors and the RISC (Reduced Instruction Set Computer) design philosophy are the foundation of many embedded systems used in industry and products. Engineers use these ideas when choosing an MCU/core for a design, writing efficient firmware (see Embedded firmware design and development), and when reasoning about speed, power and complexity trade-offs in embedded hardware and software co-design.
Key ideas
Start from basic definitions and assumptions.
Instruction Set Architecture (ISA) — the abstract interface between software and hardware that defines the set of instructions, the register file, addressing modes and the behaviour of each instruction. Define before you design or compare cores.
RISC (Reduced Instruction Set Computer) — a design philosophy and class of ISAs that emphasises a small, regular set of simple instructions, typically a load–store architecture (see below), fixed instruction size, simple addressing modes and design for pipelining. Assumption: many simple instructions can be implemented in a fast pipeline and executed with low CPI (cycles per instruction).
CISC (Complex Instruction Set Computer) — an approach with many more complex instructions, which may perform multiple operations or memory accesses in one instruction. Often uses microcode inside the processor to implement complex instructions.
Load–store architecture — an ISA property where only explicit load and store instructions access memory; all arithmetic/logic operate on registers. Drawing to include in an answer: draw a box labelled "Register file" at centre, a box labelled "Memory" to the right, arrows labelled "Load" and "Store" from Memory to Register file, and separate arrow from Register file to an ALU box labelled "ALU (register operands)". Label that data moves between register file and ALU — not directly between memory and ALU.
Register file — the set of processor registers visible in the ISA. ARM cores typically provide many general-purpose registers (e.g., 16 visible at a time in AArch32/ARM state; some operating modes bank copies of a subset; ARMv8-A AArch64 has 31 general-purpose registers). Define "general-purpose register" before using the term (registers used by integer/ALU instructions to hold operands/results, excluding special-purpose ones like PC/SP/flags).
Pipeline — splitting instruction execution into stages so several instructions are in different stages simultaneously. Common simple pipeline stages: IF (Instruction Fetch), ID (Instruction Decode / Register read), EX (Execute / ALU), MEM (Memory access), WB (Write back). If an exam wants a diagram, draw five horizontally arranged boxes labelled IF, ID, EX, MEM, WB left-to-right; under them write clock cycles 1, 2, 3, 4, 5 for the first instruction and show the second instruction starting IF at cycle 2, etc.
Cycle time (T) — the clock period in seconds; clock frequency (f) is 1/T in Hz. Define before using.
CPI (Cycles Per Instruction) — average number of clock cycles the processor takes per instruction for a given program mix. Exact formula: CPI = Σ (fraction_i × CPI_i) where fraction_i is the fraction of instructions of type i.
CPU execution time — derived from first principles: total time for a program = (number of instructions executed) × (average cycles per instruction) × (clock cycle time). Step-by-step derivation: each instruction uses on average CPI clock cycles; each clock cycle lasts T seconds; so time per instruction = CPI·T. Multiply by instruction count to get program time.
Hazards — conditions that require pipeline stalls or special handling: structural hazards (resource conflicts), data hazards (when instruction needs result not yet written), and control hazards (branches/changes in PC). State typical ways to handle them: forwarding (data hazard mitigation), stalling, and branch prediction (control hazard mitigation).
Conditional execution (ARM feature) — many ARM architectures provide condition codes on instructions so some instructions execute only when a condition is true. This reduces the number of short branches. Note: exact availability and limitations differ between ARM versions (Thumb, Thumb-2, ARMv7, ARMv8); verify for your target. In AArch64 (ARMv8-A A64), most instructions are not generally predicated; conditional execution is mainly via conditional branches and conditional select-type instructions (e.g., CSEL/CSINC). In ARMv7-M/ARMv8-M (Thumb-2), conditional execution uses the IT (If-Then) block mechanism with limits, and some uses are deprecated in ARMv8-M.
Design trade-offs: RISC makes instruction decode simpler and aims for uniform CPI, enabling high clock rates and deep pipelines. But because instructions are simpler, a task may need more instructions (higher instruction count). CISC reduces instruction count but complicates decode and control logic, may need microcode and longer variable-latency instructions. Power, silicon area, real-time predictability and compiler quality all affect the final choice.
Formulas
CPU time = Instruction count × CPI × Clock cycle time — Instruction count: number (no unit). CPI: cycles per instruction (unitless). Clock cycle time T: seconds (s). Applies to whole-program execution time.
CPI = Σ (fraction_i × CPI_i) — fraction_i: fraction of instructions of type i (unitless), CPI_i: cycles per instruction for type i (cycles/instruction). Use when program has different instruction classes.
Clock frequency f = 1 / T — f in Hz, T in seconds. Applies to synchronous processors.
Speedup = Time_old / Time_new — unitless. Use to compare two designs.
Ideal pipeline speedup ≈ pipeline_depth — only for very large instruction counts and absent hazards/overheads; pipeline_depth is number of stages (unitless).
If you need to reason about partial improvement: Amdahl-like speedup = 1 / ( (1 − p) + p / s ) where p is fraction of execution time sped up and s is speedup for that part. Apply carefully when improving only part of processor.
Worked examples
Example 1 — Compare a RISC core and a CISC core for the same program
Given: RISC: Instruction count IC_R = 1 600 000; average CPI_R = 1.0; clock frequency f_R = 1.00 GHz. CISC: IC_C = 1 000 000; CPI_C = 3.0; f_C = 800 MHz.
Step 1: clock period: T_R = 1 / f_R = 1 / 1×10^9 = 1.0×10^−9 s; T_C = 1 / 8.00×10^8 = 1.25×10^−9 s.
Step 2: CPU time RISC = IC_R × CPI_R × T_R = 1.6×10^6 × 1.0 × 1.0×10^−9 s = 1.6×10^−3 s = 1.6 ms.
Step 3: CPU time CISC = 1.0×10^6 × 3.0 × 1.25×10^−9 s = 3.75×10^−3 s = 3.75 ms.
Step 4: Speedup = Time_CISC / Time_RISC = 3.75 ms / 1.6 ms = 2.34375 ≈ 2.34× faster (RISC).
Interpretation: despite higher instruction count, the RISC core’s lower CPI and faster clock give better overall performance. The numbers chosen are for illustration — real systems differ.
Example 2 — Pipeline speedup and branch penalty
Assume a 5-stage pipeline (IF, ID, EX, MEM, WB). For N = 1000 instructions and clock period T = 1.0 ns.
a) Non-pipelined serial execution (assume each instruction takes 5 cycles serially): Time_serial = N × 5 × T = 1000 × 5 × 1 ns = 5000 ns = 5.000 μs.
b) Ideal pipelined execution (no hazards): Pipeline fills in 4 extra cycles, so Time_pipe = (N + 4) × T = 1004 × 1 ns = 1004 ns = 1.004 μs. Speedup ≈ 5.0 (≈ 5000 / 1004).
c) Add control hazards: suppose 10% of instructions are branches, each branch causes a 2-cycle penalty (flush/stall). Extra cycles = 0.10 × N × 2 = 200 cycles. New Time = (N + 4 + 200) × T = (1000 + 4 + 200) × 1 ns = 1204 ns = 1.204 μs. Effective speedup vs serial = 5000 / 1204 ≈ 4.15.
Conclusion: branches significantly reduce pipeline speedup — ARM features such as conditional execution try to reduce branch frequency.
Common mistakes
Assuming pipelines always give linear speedup equal to depth. Must account for pipeline fill/drain and hazards.
Saying "RISC always faster than CISC" without showing numbers. Show Instruction count, CPI and clock frequency to justify.
Mixing up structural, data and control hazards or using them interchangeably.
Over-generalising ARM features: conditional execution and fixed 32-bit instruction size are architecture-version dependent (Thumb and Thumb-2 complicate the fixed-size claim). Mark these as implementation details.
For your exam
Question types you will see: definitions (define ISA, RISC, load–store), short notes (advantages of RISC, conditional execution), derivations (derive CPU time formula), numericals (compare two cores using CPU-time formula), pipeline diagrams and tracing (draw 5-stage pipeline diagram and show timing for 3 instructions), and design trade-off essays (justify RISC choice for a battery-powered embedded product).
What full-marks answers include: clear definitions of bolded terms, a correct derivation of CPU time = IC × CPI × T with units, labeled diagrams for pipeline and load–store paths, step-by-step numeric computations with units carried through, and a short reasoned discussion of trade-offs (performance, power, complexity, predictability, compiler role). If claiming ARM-specific features, name the version or state uncertainty.
Quick check
- Give the CPU time formula and explain each symbol.
- What are the three kinds of pipeline hazards? Give one hardware technique to mitigate each.
- Draw and label the five standard pipeline stages and state how many cycles it takes to execute N instructions on an ideal pipeline.
Answers: 1) CPU time = Instruction count × CPI × Clock cycle time (Instruction count = number of instructions; CPI = cycles per instruction; Clock cycle time T in seconds). 2) Structural (more hardware resources or sharing; mitigate by adding resources or time-multiplexing), Data (use forwarding or stalling; forwarding reduces stalls), Control (branch prediction or conditional execution). 3) Draw IF, ID, EX, MEM, WB left-to-right; ideal pipeline cycles = N + (pipeline_depth − 1) so for depth 5: N + 4 cycles.
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?