S37 of 55
0 XP
  1. Hook
  2. Problems

S3 · Problem set 1

Problem set 1: RTL design, combinational and sequential logic, and FSMs

These problems cover lessons 1 to 6: register counts and clock limits, multiplexer and comparator structures, counters, dividers and LFSRs, state machine encodings, simulation and synthesis pitfalls, and the widths and trees of parameterized hardware.

Check

A register-to-register path: 6 gates of 35 ps, clock-to-Q 40 ps, setup 40 ps.

(a)

Minimum clock period?

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

(b)

Maximum frequency?

(c)

If a register splits the logic into halves (the longer half has ⌈n/2⌉ gates)?

Check

A design: a 12-state machine, a 64-word × 8-bit register file.

(a)

Flip-flops with binary state encoding?

(b)

With one-hot encoding?

Check

Selecting one of 12 inputs, at 25 ps per 2-to-1 multiplexer level.

(a)

Multiplexers needed?

(b)

Delay as a balanced tree?

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

(c)

As a priority chain?

Check

A 12-bit equality comparator from 2-input gates of 20 ps.

(a)

Gates?

(b)

Delay (XNOR plus AND tree)?

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

Check

A 25 MHz clock must produce a 1.3 kHz tick.

(a)

Division ratio?

(b)

Counter bits?

Check

A 10-bit LFSR and a 10-bit binary counter, clocked at 50 MHz.

(a)

LFSR states?

(b)

Counter's wrap period?

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

Check

A state machine with 14 states.

(a)

Unused codes in binary?

(b)

Extra flip-flops for one-hot?

Check

A detector for a non-overlapping 5-bit pattern.

(a)

Mealy states?

(b)

Moore states?

(c)

Binary flip-flops for the Moore version?

Check

Registers a = 5, b = 1, c = 7 on one clock edge.

(a)

After a <= b; b <= c; c <= a;, what's a?

(b)

And c?

Check

A design must close timing at 100 MHz; flip-flops have 45 ps clock-to-Q and 45 ps setup; gates 50 ps.

(a)

Logic budget per cycle?

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

(b)

Maximum logic depth, in gates?

Check

Write a 4-to-1 multiplexer: A when (S1, S0) = 00, B for 01, C for 10, D for 11.

Write AND as · or & (or just AB), OR as +, XOR as ⊕, and NOT as ¬ or a trailing ': A·B + C' works.

Check

An 8-bit binary counter feeds another clock domain; a 3-state machine steps through its states in order.

(a)

Bits that change when the counter wraps to zero?

(b)

Flip-flops for the machine in Gray code?

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.