Course: Computer Architectures · Lab 03 · Results recorded 24 October 2026
Status: implementation, experiments and report completed. University upload is not established by these results.
Objective and connection to the course
The task computes a mean, population variance and normalized outputs for four single-precision values. It compares a baseline, a rescheduled version and factor-two unrolling. The purpose is to expose independent work while preserving the computation, as developed in Instruction Dependencies, Loop Unrolling and SIMD and Latency and Initiation Interval.
Three separate loops compute the mean, variance and normalization. The square root of variance plus epsilon is computed once, outside the final loop. Factor-two unrolling processes two elements each iteration, so N=4 needs no remainder loop. Temporaries are renamed to preserve data flow, and accumulation order is preserved.
Configuration and counting scope
Integer ALU/MUL/DIV latencies are 1/3/8 cycles; FP ALU/MUL/DIV are 4/6/30. Forwarding and the assignment’s out-of-order option are enabled. Precision is single, compressed instructions are disabled, and all arithmetic units except FP DIV are pipelined. Direct-memory instruction/read/write latencies are 1/1/1.
The recorded totals count executed computation instructions, excluding squashed instructions and the protected three-instruction exit block. They are ASE teaching-pipeline cycles, not raw gem5 ticks. Local stage worksheets reconstruct explicit scheduling conventions after measurement; they are not independent forecasts of undocumented hardware.
Measured results
| Version | Change | Instructions | Elapsed cycles | CPI |
|---|---|---|---|---|
program_1 | Baseline | 120 | 408 | 3.4000 |
program_1_r | Reschedule independent work | 120 | 385 | 3.2083 |
program_1_u | Unroll each loop by two | 100 | 322 | 3.2200 |
CPI = elapsed cycles / executed computation instructions. Rescheduling saves 23 cycles without changing the dynamic instruction count. The unrolled version has a slightly higher CPI than the rescheduled version, but completes sooner because it executes fewer instructions. Compare elapsed cycles for the same workload, rather than CPI in isolation.
Baseline-to-unrolled speedup is 408/322 = 1.2671; elapsed time falls by (408−322)/408 = 21.08% at the same clock. EX occupancy sums 409/409/389 are a different quantity and must not replace the elapsed values in this table. See Pipeline CPI and Stall Costs.
Correctness evidence
The stored output words were checked against an independently rounded binary32 reference, both through memory observations and the final native-export store records. Recorded reference values are mean ≈ 0.3799999952, variance ≈ 0.3316499889 and square-root result ≈ 0.5767581463. Normalized outputs are approximately [0.41611898, −1.26569521, 1.38706315, −0.53748697].
All three versions retain the supplied inputs/constants and produce the same checked output words. The stage worksheets match each executed row of the exported pipeline schedules.
Review
- Why can unrolling improve elapsed cycles even when CPI increases slightly?
- Which dependencies must rescheduling preserve, and why are separate temporaries useful?
- Why does summing EX latencies fail to measure elapsed pipeline execution?
Answers: instruction count can fall; true data flow and required memory relationships must remain intact; overlapped execution means stage occupancy is not elapsed time.
Evidence and related work
Results are transcribed from the preserved Lab 03 completion record, final program snapshots and pipeline evidence. The public measurement table gives the main numeric results. Personalized reports, assignment copies and submission archives remain outside published folders. These notes document existing results; no simulation was rerun for publication.
Lab 04 - AdaGrad Scheduling and Unrolling extends the scheduling comparison. Lecture 05 - Multicycle Operations and Lecture 07 - Instruction-Level Parallelism explain the mechanisms; use this lab’s own latency settings for its calculations.