S3 · Problem set 10
Problem set 10: verification, clock crossings and FIFOs
These problems use lessons 12, 23 to 25, 28 and 49: FIFOs and their pointers, clock domain crossing, testbenches, coverage and formal checks, and the asynchronous FIFO project. Take a year as s.
Check
Bursts of 64 words written at 200 MHz cross into a 150 MHz domain through an asynchronous FIFO; pointer synchronization hides 4 entries from the writer.
(a)
What backlog does a burst leave?
(b)
What power-of-two depth covers it, synchronization included?
Check
An 8-bit pointer counts up and wraps.
(a)
How many bits change in binary when it wraps from all ones to zero?
(b)
How many change in Gray code?
(c)
How many change per step on average in binary, over a full cycle?
Check
A chip has 10 identical synchronizers, each with τ = = 20 ps and 800 ps to resolve, on a 1000 MHz clock sampling data that changes at 200 MHz.
(a)
What is one synchronizer's MTBF?
(b)
What is the chip's?
Check
A design with 10 synchronizers (τ = = 30 ps, 2000 MHz clock, 100 MHz data) must reach a combined MTBF of 10 years.
(a)
How much resolution time does each synchronizer need?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
Check
A cross coverpoint combines 16 opcodes with 4 modes, all equally likely in random tests.
(a)
How many tests reach 90% expected coverage?
(b)
About how many fill every bin?
Check
A corner case has probability 1 × 10⁻⁵ per unconstrained random test; weighting the constraints raises it to 0.001.
(a)
How many unconstrained tests reach 0.99 confidence of hitting it?
(b)
By what factor does weighting cut that?
Check
A bug fires only when a 12-bit counter reaches its maximum value; formal tools can shrink the counter to 3 bits without changing the property.
(a)
How deep must bounded model checking go to find it as written?
(b)
And with the counter shrunk?
Check
Two 32-bit adders (with carry out) are compared by equivalence checking through a miter.
(a)
How many XOR gates does the miter need?
(b)
How many 2-input ORs combine them?
Check
A block has 32 input bits. A simulator runs 1000 vectors a second; an emulator runs 1 × 10⁷.
(a)
How long does exhaustive simulation take?
(b)
And on the emulator?
Check
A product's yield is 0.7, and no more than 100 parts per million shipped may be bad.
(a)
What fault coverage does the test need?
Check
A 24-bit maximal LFSR drives random stimulus at 100 MHz.
(a)
How many states does it visit before repeating?
(b)
How long until the stimulus repeats?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
Check
A design accepts 0.5 transactions per cycle on average, and each takes 20 cycles to produce its result.
(a)
How many transactions are in flight on average, so how deep must the scoreboard's expected-result queue be?
Check
A toggle synchronizer passes events from a 50 MHz domain to a 100 MHz domain; each event needs 3 destination cycles to be seen before the source may toggle again.
(a)
What is the highest event rate it can pass?
Write units the way you normally would: 1.5 MHz, 1500 kHz and 0.0015 GHz are the same answer.
(b)
How many source cycles is that spacing?
Check
An assertion requires req |-> ##[1:3] gnt. A bug makes the grant delay uniformly random from 1 to 5 cycles.
(a)
What fraction of requests violate the assertion?
(b)
How many requests give 99% confidence of catching it?
Check
A state machine has 9 states.
(a)
How many illegal codes does binary encoding leave for a formal tool to rule out?
(b)
And one-hot encoding?
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.