🔬
Microarch Simulation
L14Post-Midterm
Simulation tools and methodologies for computer architecture
Topics Covered
Why simulateSimulation typesPerformance metricsSimulator design
01
Why Simulate?
Computer architects need simulation because:
- Hardware is expensive and slow to build: Fabricating a chip takes months and millions of dollars. You need to evaluate design ideas before committing to silicon.
- Design space is enormous: Cache size, associativity, pipeline depth, branch predictor type, memory scheduling policy — too many combinations to build them all.
- Workload diversity: Need to test designs against many different applications and input sets.
- What-if analysis: "What if I double L2 cache?" "What if I add a victim cache?" Simulation lets you answer these quickly.
Types of simulators:
- Functional simulator: Only models correctness (does the ISA produce the right results?). Fast but no timing information.
- Timing simulator: Models the performance of the microarchitecture (cycle-by-cycle). Slow but gives CPI, cache miss rates, etc.
- Trace-driven: Replay a recorded instruction trace. Faster but cannot model wrong-path effects (speculative execution).
- Execution-driven: Actually executes the program, modeling microarchitecture effects. Can model speculation correctly. Slower.
Key Points
- •Simulation enables design exploration before expensive fabrication
- •Functional sim: correctness only, fast. Timing sim: performance modeling, slow
- •Trace-driven: replay recorded traces (fast, no wrong-path). Execution-driven: runs code (accurate, slower)
- •Key metrics: CPI, cache miss rate, branch misprediction rate, IPC