4.1.2 · D3Computer Architecture (Deep)

Worked examples — Harvard architecture — separate instruction - data memory

2,482 words11 min readBack to topic

Before any symbols, let's re-earn the two we lean on the whole page.


The scenario matrix

Here is every case class this topic can throw at you. Each worked example below is tagged with the cell it fills.

Cell The scenario The "edge" it tests
A Typical program, The everyday case
B (all register arithmetic) Zero input — degenerate low
C (every instruction touches data) Limiting high — the ceiling
D Collision — data & fetch want the same memory Harvard's max breaks; extra cycle appears
E Different word widths (8-bit data, 16-bit code) Non-speed advantage; word-size case
F Real chip: Modified Harvard cache miss Where the ideal model bends
G Word problem (real workload sizing) Translate English →
H Exam twist: "is Harvard always faster?" Sign/logic trap; vs cost

We now fill every cell.


Cell A — the everyday case

Figure — Harvard architecture — separate instruction - data memory

Cell B — the zero case (degenerate low)


Cell C — the limiting high (the ceiling)

Figure — Harvard architecture — separate instruction - data memory

Cell D — the collision (where max breaks)


Cell E — different word widths (a non-speed win)


Cell F — Modified Harvard cache miss (where the model bends)


Cell G — the word problem


Cell H — the exam twist

Figure — Harvard architecture — separate instruction - data memory

Recall Quick self-test across the matrix

Cell B — if , what is ? ::: (no gain; nothing to overlap). Cell C — the ceiling of and why? ::: , because so . Cell D — why does a collision add a cycle? ::: The overlap ("max") breaks; the CPU must serialize that access, +1 cycle. Cell G — 80 instr/pass, 50 passes/sec, 24 data → what are and ? ::: /sec, . Cell H — is "Harvard always faster" true? ::: No — only "never slower"; equal at , and it costs extra hardware.


Connections

  • Parent: Harvard architecture — the model these examples exercise.
  • Von Neumann architecture — the baseline every example compares to.
  • Von Neumann bottleneck — why costs add on one bus (Cell A, D).
  • Cache memory — split I/D caches drive Cell F's Modified-Harvard numbers.
  • Pipelining — collisions (Cell D) are structural hazards this removes.
  • CPU instruction cycle — the fetch that data hides under.
  • Microcontrollers (AVR PIC ARM Cortex-M) — real users of Cell E's width freedom.
  • Memory bus and bandwidth — two buses = double effective throughput.

Concept Map

Scenario matrix

Cell A typical f between 0 and 1

Cell B f = 0 no gain

Cell C f = 1 ceiling 2x

Cell D collision adds cycle

Cell E width freedom

Cell F cache miss bends model

Cell G word problem

Cell H is it always faster

S = 1 + f