Exercise set
Digital Hardware, FPGA Design, and Timing Verification Exercises
Worked electronic engineering exercises for digital hardware and FPGA design covering clock period, setup slack, hold margin, throughput, latency, FIFO depth, jitter budget, dynamic power, I/O timing, reset synchronization, RPN, and bitstream release evidence.
These exercises practise digital hardware and FPGA design as timing, interface, verification, and release evidence work. They cover clock period, setup slack, hold margin, throughput, latency, FIFO depth, jitter budget, dynamic power, I/O timing, reset synchronization, risk priority, and bitstream release evidence.
The goal is not only to calculate a timing number. The goal is to decide whether RTL architecture, timing constraints, board interfaces, clocks, power, reset behavior, verification, and bring-up evidence support the same product requirement.
Assume simplified screening models unless an exercise states otherwise. Real digital hardware projects should also check complete constraints, clock-domain crossings, generated clocks, false paths, multicycle paths, I/O standards, board delay, voltage and temperature corners, tool warnings, firmware state, and production programming records.
How to Use These Exercises
For each exercise, define:
- the clock domain, interface, or state machine being assessed;
- the timing, throughput, latency, or safety requirement;
- the constraint or measurement evidence behind the number;
- the hardware behavior during reset, fault, and update states;
- the release record needed before the design can be trusted.
The common mistake is treating FPGA or digital hardware design as software that happens to run on silicon. RTL becomes physical logic with timing, power, routing, reset, and board-level consequences.
For each result, state whether it supports architecture sizing, timing closure, CDC acceptance, reset-release review, board-interface validation, power release, or bitstream configuration control. A passing calculation should not be treated as release evidence unless the matching constraint, tool report, board revision, and validation record are identified.
Exercise 1: Clock Period from Frequency
An FPGA clock runs at:
Calculate the clock period.
Solution
Clock period is:
Substitute:
Therefore:
Engineering Comment
An 8 ns period is the total budget before subtracting clock uncertainty, skew, setup time, routing, and logic delay. A design that looks simple in RTL may still fail if one combinational path consumes too much of this period.
Exercise 2: Setup Slack
A register-to-register path has clock period:
Clock uncertainty is:
Setup time is:
The data path delay is:
Compute setup slack:
Solution
Substitute:
The path has positive setup slack of:
Engineering Comment
Positive slack indicates this simplified path passes. The remaining margin may still be weak if placement changes, voltage and temperature corners are severe, or constraints fail to include board-level I/O timing.
Exercise 3: Hold Margin
A hold check has minimum data delay:
Hold requirement is:
Clock skew makes capture occur:
earlier relative to launch. Estimate hold margin:
Solution
Substitute:
The hold margin is:
Engineering Comment
Hold margin is positive but small. Hold problems cannot be fixed by lowering clock frequency. They need routing delay, constraint correction, clock-tree review, synchronizer review, or tool-driven hold fixing.
Exercise 4: Usable Data Rate
A streaming interface has data width:
Clock frequency:
Protocol efficiency:
Estimate usable data rate:
Solution
Substitute:
Therefore:
Engineering Comment
This is only a first-pass throughput estimate. Real throughput can be reduced by arbitration, backpressure, packet gaps, memory refresh, software service time, retries, and clock-domain crossings.
Exercise 5: Latency Budget
A digital measurement path has:
| Stage | Latency |
|---|---|
| ADC interface | 4 cycles |
| FPGA filter | 18 cycles |
| Packet formatter | 6 cycles |
| Output interface | 12 cycles |
The processing clock is:
Calculate total latency in microseconds.
Solution
Total cycles:
Clock period:
Total latency:
Convert:
Engineering Comment
Average latency is not enough for control, protection, or timestamping. Check worst-case buffering, interrupt scheduling, bus arbitration, clock-domain crossings, and firmware service delays.
Exercise 6: FIFO Depth for Rate Mismatch
A producer writes data at:
A consumer drains data at:
The burst duration is:
Estimate the FIFO depth needed to absorb the burst.
Solution
Rate mismatch:
Required storage:
Convert burst time:
Compute:
The FIFO needs at least about 6 kB before adding margin.
Engineering Comment
FIFO sizing should include clock tolerance, packet overhead, backpressure latency, almost-full thresholds, reset behavior, and what happens if the consumer stalls longer than expected.
Exercise 7: Jitter Budget Fraction
A serial interface has total allowed RMS jitter:
The clock source contributes:
The board and receiver budget allocate:
Assuming independent contributors, estimate total jitter:
Solution
Substitute:
Compare:
The simplified jitter budget passes.
Engineering Comment
The RSS assumption needs justification. Correlated jitter, power noise, crosstalk, PLL peaking, spread-spectrum clocking, and measurement bandwidth can make the real margin smaller.
Exercise 8: Dynamic Power Estimate
A digital block has effective switched capacitance:
Supply voltage:
Clock frequency:
Activity factor:
Estimate dynamic power:
Solution
Convert:
Substitute:
Therefore:
Engineering Comment
This is a small block estimate. FPGA total power also includes clock trees, routing, block RAM, DSP blocks, I/O banks, leakage, configuration, and simultaneous switching. Use measured activity or post-implementation power analysis before thermal release.
Exercise 9: Board I/O Timing Margin
An FPGA output interface has available clock-to-capture period:
FPGA clock-to-output delay:
Board trace delay:
Receiver setup time:
Clock uncertainty:
Calculate timing margin:
Solution
Substitute:
The interface has 2.5 ns simplified setup margin.
Engineering Comment
This margin is useful only if constraints include external device timing, board delay, clock relationship, voltage and temperature variation, and the correct I/O standard. Unconstrained I/O paths can pass internal timing and fail on the board.
Exercise 10: Reset Synchronizer Latency
A reset release is passed through a three-flip-flop synchronizer in a clock domain running at:
Estimate reset-release latency in nanoseconds.
Solution
Clock period:
Three cycles:
Engineering Comment
The synchronizer adds a small deterministic release delay and reduces unsafe asynchronous release. The reset strategy still needs review for multiple clock domains, reset ordering, external peripherals, configuration pins, and safe output states.
Exercise 11: Risk Priority Number for a CDC Fault
A clock-domain crossing fault has ratings:
Calculate risk priority number:
Solution
Compute:
Engineering Comment
CDC failures can be intermittent and hard to reproduce, so detection rating is often worse than teams expect. A high-severity CDC risk should trigger structural review, synchronizer or handshake design, CDC tool checks, simulation, and hardware stress testing.
Exercise 12: Bitstream Release Evidence Completion
A digital hardware release package requires ten evidence items:
- RTL revision identified;
- constraints file revision archived;
- static timing report clean;
- unconstrained paths reviewed;
- clock-domain crossing review complete;
- reset behavior tested;
- resource utilization archived;
- power estimate reviewed;
- board revision and bitstream ID matched;
- production programming procedure released.
Eight items are complete.
Calculate completion percentage and decide whether release is acceptable if all ten items are mandatory.
Solution
Completion fraction:
Convert:
Because all ten items are mandatory, release is not acceptable.
Engineering Comment
A bitstream without matching constraints, timing reports, board revision, and programming procedure is not a controlled product configuration. Digital hardware release is evidence control, not only successful compilation.
Review Checklist
When reviewing digital hardware or FPGA evidence, ask:
- Are all clocks, generated clocks, I/O paths, false paths, and multicycle paths intentionally constrained?
- Is setup slack positive with realistic uncertainty, and is hold timing clean?
- Are clock-domain crossings handled structurally rather than assumed safe?
- Are reset assertion and reset release safe in every clock domain?
- Do throughput and latency calculations include worst-case stalls, backpressure, and firmware interaction?
- Are power and thermal estimates based on realistic switching activity?
- Does hardware bring-up measure clocks, rails, interfaces, and fault states under real board conditions?
- Are setup, hold, CDC, reset, I/O, and power results reviewed at the voltage, temperature, and process corners used for release?
- Are waived warnings, unconstrained paths, false paths, and multicycle paths justified by design intent rather than convenience?
- Can the released bitstream be traced to RTL, constraints, tool version, board revision, and validation evidence?
Good digital hardware design is controlled timing plus controlled evidence. Logic is ready only when simulation, constraints, timing reports, board behavior, and release records all describe the same system.