S3 · Problem set 8
Problem set 8: the RISC-V core, pipelining, caches, clocks, resets and physical design
These problems cover lessons 41 to 47: instruction encoding and core timing, pipeline CPI and hazards, cache organization and miss penalties, clock trees, PLLs, jitter and resets, IR drop and on-chip variation.
Check
The store sw x3, 1500(x7).
(a)
Its encoding, as eight hex digits?
(b)
The value in bits 31:25?
Check
A single-cycle core: clock-to-Q 45, instruction memory 220, register read 170, ALU 240, data memory 220, mux 25, setup 20 ps.
(a)
Clock period?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
(b)
How long does an R-type instruction actually need?
Check
A multicycle core (load 5, store 4, ALU 4, branch 3 cycles) with a 350 ps clock runs 0.22 loads, 0.08 stores, 0.18 branches and the rest ALU.
(a)
CPI?
(b)
Average time per instruction?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
Check
A pipelined core with forwarding: 0.2 loads (0.3 used at once), 0.2 branches mispredicted 0.25 of the time at a 2-cycle penalty, a 260 ps clock; the single-cycle version takes 900 ps.
(a)
CPI?
(b)
Speedup over single cycle?
Check
A five-stage pipeline resolves branches in stage 4 and runs 12 instructions with 1 load-use stalls and 3 mispredicted branches.
(a)
Misprediction penalty?
(b)
Total cycles?
Check
A 64 KB, 8-way cache with 32-byte lines and 40-bit addresses.
(a)
Index bits?
(b)
Tag bits?
(c)
Total SRAM bits, with valid and dirty bits?
Check
A cache hits in 1 cycles with a 0.02 miss rate; a miss waits 150 cycles, then moves a 128-byte line over a 16-byte bus.
(a)
Miss penalty?
(b)
AMAT?
Check
A PLL with a 20 MHz reference and dividers N = 48, M = 2, P = 4, whose output has 1 ps rms jitter.
(a)
Output frequency?
Write units the way you normally would: 1.5 MHz, 1500 kHz and 0.0015 GHz are the same answer.
(b)
Peak-to-peak jitter at (Q = 7.03)?
Check
A clock tree of fanout-6 buffers reaches 20000 flip-flops; the 1000 MHz clock has a 0.53 duty cycle.
(a)
Levels?
(b)
Time from rising to falling edge?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
Check
A 4 Ω rail carrying 40 mA drawn evenly; and a block of 20 W at 0.9 V on metal rated 2 mA per µm.
(a)
Worst drop on the rail fed from both ends?
Write units the way you normally would: 1.5 mV, 1500 µV and 0.0015 V are the same answer.
(b)
Total wire width for the block's current?
Check
A 900 ps clock: launch clock 320 ps, data 750 ps, capture clock 440 ps, setup 30 ps, derates 1.07 and 0.9; the clock paths share 200 ps.
(a)
OCV setup slack before CRPR?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
(b)
After CRPR?
Check
A 2-flop reset synchronizer at 100 MHz, and a net with pins at x = 60, 90 and 70 µm, all on one row.
(a)
Longest time from reset release to leaving reset, in whole cycles?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
(b)
Half-perimeter wire length?
Check
A cache uses 7 index bits and 5 offset bits with 8 ways, on 48-bit addresses.
(a)
How big is it?
(b)
How wide is each tag?
Check
An L1 cache hits in 1 cycle and misses 0.05 of the time to an L2 that hits in 8 cycles and misses 0.3 of its accesses to memory at 200 cycles.
(a)
What is the average memory access time?
Check
A bank of 32 flip-flops with 1.5 fF clock pins is idle 0.9 of the time; a clock-gating cell adds 8 fF that always toggles. The clock is 1 GHz at 0.7 V.
(a)
What does the bank's clock load burn ungated?
Write units the way you normally would: 1.5 µW, 1500 nW and 0.0015 mW are the same answer.
(b)
How much does gating save?
Have paper and a calculator ready. Work each problem out by hand, then enter the answer. Your first try on each one counts toward your score.
Practice
Keep practicing
15 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.