I want to start this review with one criticism: I did not think the 2021 contest problem was designed very well.
As I understood the rules, we only needed to pass the provided test cases, without hidden tests. That encouraged teams to find a solution that overfit the known waveforms, rather than design a robust general-purpose circuit.
Problem overview
Each waveform contained 150 discrete samples. Every sample was 8 bits wide, with values from 0 to 255.
The relationship between the transmitted waveform and the received waveform was modeled as:
where:
- is the attenuation factor.
- is environmental random noise.
- is the delay between the two waveforms.
The suggested algorithm was:
- Apply a low-pass filter to and .
- Calculate their cross-correlation .
- Find the lag where reaches its maximum.

Hardware architecture

Interface
| Signal | Description |
|---|---|
x, y | Input waveform samples |
busy | The host can provide x and y when this is 0 |
d | Output delay |
valid | Indicates a valid delay result |
Our implementation
We noticed that the provided waveforms had a very prominent peak. Our first experiment was simply to use MATLAB to locate the maximum value of each waveform. Surprisingly, only five test cases failed.
Because the competition allowed solutions tailored to the provided cases, we abandoned the suggested cross-correlation approach and looked for something cheaper.
We tried several small variations around peak detection, but initially could not get all the cases to pass.
Eventually, we used a difference between the current sample and an earlier sample to detect the peak more reliably. I originally described this as a simple filter with coefficients like:
The area comparison in my original notes uses an eight-element version, , corresponding to a separation of seven samples. The original notation is inconsistent on this point, so the exact delay should be checked against the RTL.
Looking back, the idea was just a form of filtering. Other teams tried different small filters, including:
and
Comparing the hardware cost
Using the implementations described in my original notes, I estimated:
| Design | Filter coefficients | Estimated hardware |
|---|---|---|
| A | 7 registers, 1 adder/subtractor | |
| B | 2 registers, 2 adders/subtractors, 1 shifter | |
| C | 4 registers, 4 adders/subtractors, 3 shifters |
In Estimating Hardware Area Before Synthesis, I discussed why registers and adders can have comparable approximate costs in an early architectural estimate. Under that assumption, the rough area ranking is:
What I thought about the contest
I still feel that this problem rewarded overfitting too much. I even heard of a solution that only checked the first sample above a chosen threshold. Such a circuit could need little more than a comparator and a register.
That may be an effective way to win under those particular rules, but it does not necessarily demonstrate good hardware architecture design. I would rather see contest problems evaluate solutions that work beyond a fixed collection of known inputs.