Draft preview. Lessons are being written and reviewed.

Digital Design / Module 12: Projects and interview preparation

67. Industry project: streaming packet engine

Work to a realistic specification.

Lecture coming soon

See it move

The goal

Build a streaming packet engine and deliver it as a professional would: specification first, then RTL, then evidence. This is the portfolio piece to discuss in interviews, so what matters is how well you can explain it.

The design

Data arrives on several valid/ready input ports, in one . Packets cross to a core clock through async . A round-robin picks one packet at a time, and keeps its grant until the end of that packet. A pipelined block computes a checksum. The output uses a , and appends the checksum.

What to deliver

  • Specification: interfaces, packet format, target, error behaviour. Write it before any RTL.
  • Architecture document: block diagram, clock domains, FIFO depth calculation, and reasons for each choice.
  • RTL: parameterised and -clean.
  • Test plan: a list of what must be proved, written before the tests.
  • Self-checking testbench: random traffic, random , a scoreboard, and coverage of the corners.
  • Reports: synthesis area and timing, using an open-source flow if you need one.
  • README: results that a reader can reproduce with a single command.

Corners to test

  • Full FIFOs with continuous input
  • A packet of minimum length, and one of maximum length
  • Different clock ratios, in both directions
  • Reset during a transfer
  • One port idle, or one port always busy

Presenting it

Structure your explanation like this: the problem, the architecture, the key trade-offs, how you verified it, the measured numbers, and what you would change. Be ready to justify every FIFO depth, and every crossing. "I chose depth 32 because the burst is 64 words at half the drain rate, plus 4 for delay" is what an experienced listener wants to hear.

Common mistake

Publishing a repository with no results. Reviewers rarely run your code. A short report containing a block diagram, timing, area, and coverage shows the work far better. Use only original work. Never include anything from an employer, or from another party's confidential documents.

Key ideas

  • Valid/ready input, async FIFO, arbitration, and checksum.
  • Write a specification, plan your tests, and report timing and area.
  • Publish on GitHub with a clean README.

Your exercise

Deliver RTL, a self-checking testbench, a synthesis report and a design document.

Interview questions

coreHow do you present a project?

basicWalk through the packet engine's blocks in data order and say what each one is for.

basicA packet carries the bytes 0x10, 0x20 and 0xF5. The engine appends the sum of the bytes, keeping only the low 8 bits. What byte is appended?

coreWhy must the arbiter keep a port's grant until that packet's last byte, and which check catches a design that does not?

coreA port's FIFO is 4 entries deep and the core reads faster than the port writes, yet the port only reaches about two thirds of its full rate. Why?

coreA test run reports zero wrong bytes. What else must the results show before that zero means anything?

coreWhy put a skid buffer on the output rather than passing ready straight back through the core?

advancedA slow port that wins the arbiter makes the engine wait for each of its bytes, while a busy port's data sits ready. How could you fix this, and what does it cost?

advancedInput ports run at 100 MHz with one byte per cycle. The core handles one byte per cycle and appends a 1-byte checksum to every packet. For one port to send at its full rate, what core clock is needed with 16-byte packets, and with 1-byte packets?

Practise these 9 questions with animations