S3 · Problem set 4
Problem set 4: pipelining, clock domain crossing, verification and FPGA mapping
These problems cover lessons 23 to 27: pipeline throughput, latency and the iteration bound, synchronizer MTBF and handshakes, coverage and corner-case odds, formal checks, and mapping logic, memory and arithmetic onto an FPGA.
Check
A 3 ns block is split into 3 balanced stages, each with 0.15 ns of register overhead.
(a)
Clock period?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
(b)
Latency?
(c)
Throughput gain over the unpipelined block?
Check
Three pipeline stages of 0.8, 1.1 and 0.9 ns with 0.08 ns of register overhead.
(a)
Maximum clock as built?
Write units the way you normally would: 1.5 MHz, 1500 kHz and 0.0015 GHz are the same answer.
(b)
Maximum clock after retiming balances them perfectly?
Check
A loop with 3 ns of logic and 2 registers, in a design that wants 500 MHz.
(a)
Iteration bound?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
(b)
Fastest clock the loop allows?
Check
A synchronizer flip-flop: τ = 18 ps, = 20 ps, 1500 MHz clock, data at 150 MHz, and 400 ps of settling.
(a)
MTBF?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
(b)
Improvement from a second flip-flop?
Check
A crossing must reach an MTBF of 100 years, with τ = 15 ps, = 20 ps, a 1200 MHz clock and 200 MHz data.
(a)
Settling time needed?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
(b)
Settling time one extra flip-flop adds?
Check
A req/ack handshake: request through 2 flops at 100 MHz plus one cycle; acknowledge through 3 flops at 250 MHz plus one cycle. Each transfer carries 8 bits.
(a)
Time per transfer?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
(b)
Throughput?
Check
A 6-bit counter's pointer crosses clock domains.
(a)
Total bit changes over a full binary cycle?
(b)
Over a full Gray cycle?
Check
A coverpoint with 40 equally likely bins.
(a)
Coverage after 100 random tests?
(b)
Expected tests to fill it (use )?
Check
A corner case of probability 0.0005 per test, and a 14-bit adder tested at 50 million tests per second.
(a)
Tests for confidence 0.9?
(b)
Exhaustive test time for the adder?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
Check
A 40-input XOR on 4-input LUTs.
(a)
LUTs?
(b)
Levels?
Check
A 3100 × 30 memory in 4096 × 9 block RAMs, and a 54 × 54 multiply on 27 × 18 DSP slices.
(a)
Block RAMs?
(b)
DSP slices?
Check
An FPGA path: 3 LUT levels at 0.1 ns plus 0.55 ns routing each, 0.25 ns clock-to-Q, 0.05 ns setup.
(a)
Maximum clock?
Write units the way you normally would: 1.5 MHz, 1500 kHz and 0.0015 GHz are the same answer.
(b)
Maximum clock after pipelining into 3 stages (whole LUT levels per stage, the largest stage setting the clock)?
Check
A block with 2000 flip-flops and 50000 gates is unrolled 60 cycles for bounded model checking.
(a)
About how many variables?
(b)
About how many clauses at three per gate?
Check
A block with 48 input bits could be simulated exhaustively at 1 × 10⁷ vectors a second.
(a)
How long would that take?
Check
A one-hot state machine has 10 states.
(a)
How many of its flip-flop codes are illegal?
(b)
What fraction of its codes are reachable?
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.