Skip to the content ForoHackers
Log inJoin

Microarchitecture: start here

Microarchitecture
#2999 · · Quote · Report

Microarchitecture is how a processor implements its instruction set: pipeline stages, caches, predictors and execution units. Two chips can run the same programs and differ wildly in speed and energy. It is where performance, power and area are traded against each other, and where side channels come from.

Key concepts

  • Pipeline and hazards: data, control and structural hazards, solved by forwarding, stalls and prediction.
  • Out-of-order execution: instructions run when their inputs are ready, then retire in program order.
  • Branch prediction: guessing the direction of a branch so the front end never waits.
  • Cache and memory system: levels, associativity, replacement, prefetching and coherence between cores.
  • Speculation: work done before it is known to be needed, and undone if wrong, which leaves traces.

Vocabulary

  • Reorder buffer: the structure that lets instructions finish out of order but commit in order.
  • Issue width: how many instructions the core can start per cycle.
  • Cache coherence: the protocol that keeps each core's view of memory consistent.
  • Side channel: information leaked through timing or shared state rather than the program's output.

What to study, in order

  1. A five-stage in-order pipeline and its hazards, drawn cycle by cycle.
  2. Write a cycle-level simulator of that pipeline in a language you know.
  3. Add a branch predictor and measure its accuracy on real traces.
  4. Study scoreboarding and register renaming, then out-of-order execution.
  5. Microbenchmark a real machine: cache sizes, line size and branch penalties.

Related tags

#computer-architecture #digital-design #performance #hardware-security

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply