D1012 of 13
0 XP
  1. Hook
  2. Problems

D10 · Problem set

Problem set: digital design, timing and FPGAs

These problems draw on lessons 1 to 11: concurrency, FPGA fabric, datapaths and controllers, Verilog modules and always blocks, state machines, testbenches, timing and clock domains, pipelining, memories and FIFOs, and the UART. Each takes several steps; work them out on paper before entering the answers.

Check

A video filter processes 1920 × 720 pixels at 60 frames per second, with 25 multiplications per pixel, on a 100 MHz FPGA.

(a)

How many billion multiplications per second does it need?

(b)

How many multipliers working in parallel?

Check

A 16-bit ripple-carry adder passes the carry through each bit in 50 ps, plus 4 levels of gates at each end costing 50 ps each.

(a)

What is its worst-case delay?

Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.

(b)

What would a lookahead adder with log2⁡n carry levels take?

Check

A 20-input function that only ANDs its inputs is built from 4-input LUTs; the device has 50,000 LUTs.

(a)

How many LUTs does it take?

(b)

How much LUT configuration memory does the device hold?

Check

A controller has 11 states.

(a)

How many flip-flops does binary encoding need?

(b)

How many codes are unused?

(c)

How many more flip-flops does one-hot use?

Check

A debounce counter must wait 20 ms on a 27 MHz clock, and a shift register of 32 stages runs on the same clock.

(a)

How wide is the debounce counter?

(b)

How long does a bit take to pass through the shift register?

Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.

Check

A 12-bit × 12-bit multiplier can be simulated at 10 thousand tests a second. A random testbench runs 100000 tests.

(a)

How long would exhaustive testing take?

Write units the way you normally would: 1.5 s and 1500 ms are the same answer.

(b)

What is the chance the random testbench hits one particular input pair?

Check

A path has 0.2 ns clock-to-output, 2.5 ns of logic and 0.3 ns setup. A second, short path has the same 0.2 ns clock-to-output and a 0.05 ns wire into a flip-flop that needs 0.2 ns of hold.

(a)

What is the long path's maximum clock?

Write units the way you normally would: 1.5 MHz, 1500 kHz and 0.0015 GHz are the same answer.

(b)

What is the short path's hold slack (negative for a violation)?

Check

A one-flip-flop synchronizer leaves 1 ns of settling time; τ = 50 ps, T0 = 0.1 ns, the clock is 100 MHz and data changes 10 million times a second.

(a)

What is its MTBF?

Write units the way you normally would: 1.5 s and 1500 ms are the same answer.

(b)

How many powers of ten does a second flip-flop add (one more clock period of settling)?

Check

A 12 ns job is split into 4 equal stages, each with 0.5 ns of register overhead, and 100 items flow through.

(a)

What is the clock period?

Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.

(b)

How long do all 100 items take?

(c)

What speedup is that over an unpipelined design (period L + 0.5 ns)?

Check

In a five-stage processor, 15% of instructions are loads followed by a dependent use (1 stall), and 10% are taken branches costing 3 cycle(s) each.

(a)

What is the CPI?

(b)

What share of the lost cycles comes from branches?

Check

A memory holds 8192 words of 9 bits.

(a)

How many 36-kilobit block RAMs at least?

(b)

How many address bits?

Check

Bursts of 300 words arrive at 100 MHz into a FIFO of 512 words, drained at 40 MHz.

(a)

How many words pile up?

(b)

Does the FIFO hold them (1 for yes)?

(c)

How wide are its pointers, with the extra wrap bit?

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.