4.1.4 · D3Computer Architecture (Deep)

Worked examples — ARM architecture intro — used in embedded - aerospace

3,664 words17 min readBack to topic

The scenario matrix

Every question this topic can throw at you falls into one of these cells. The examples below are labelled with the cell they hit, and together they fill the whole grid.

Cell Case class What makes it tricky
A Small , small fill cost is not negligible — speedup far below
B Large , fixed limiting behaviour:
C Degenerate: one instruction — pipeline gives zero benefit
D Degenerate: one stage — no pipeline at all,
E Branch penalty (flush) a wrong guess wastes cycles; effective time rises
F Conditional execution vs branch predication removes the flush
G Load/store instruction count translating C to ARM, counting memory trips
H Code density (Thumb, 16-bit) same program, different instruction size, not count
I Real-world WCET word problem picking worst case, not average
J Exam twist "more stages = faster?" — find where it breaks

Reading the pipeline picture

Before the numbers, look at the timing diagram below — every pipeline example on this page is really just counting boxes in a picture like this.

Figure — ARM architecture intro — used in embedded - aerospace

Example 1 — Cell A: small , small


Example 2 — Cell B: large , the limit


Example 3 — Cell C: the degenerate


Example 4 — Cell D: the degenerate


Example 5 — Cell E: branch penalty (flush)

Figure — ARM architecture intro — used in embedded - aerospace

Example 6 — Cell F: conditional execution removes the flush


Example 7 — Cell G: load/store instruction count


Example 8 — Cell H: code density (Thumb vs ARM)


Example 9 — Cell I: real-world WCET word problem


Example 10 — Cell J: the exam twist ("more stages = faster?")


Recall Quick self-test

Which two degenerate cases both give speedup , and why? ::: (one instruction, nothing to overlap — you just pay the fill) and (one stage, nothing to split into stations). A branch that mispredicts on a -stage pipeline wastes how many cycles? ::: cycles (the half-built instructions behind the branch get flushed). Does Thumb reduce the number of instructions or their size? ::: Their size (16-bit vs 32-bit) — the instruction count is unchanged; the program gets denser, not shorter in steps. In WCET analysis, do you assume branches hit or miss? ::: Miss (worst case) — you must bound the slowest possible path, never the average.