The first project of Implementation of Digital Signal Processing (IDSP), done with Mathijs Polman. The assignment takes a second-order IIR filter (a direct-form II biquad with 5 multiplications and 4 additions) and asks you to turn its data-flow graph (DFG) into hardware: schedule the operations, assign them to functional units and registers, describe the result in Arx, then simulate it (C++ and VHDL) and synthesize it.
Timing assumptions: an addition takes 1 clock cycle, a multiplication 2, and every result is stored in a register (no chaining).
Next: Project TRA · Project GFS
MAP-1 to MAP-3: The provided designs
We first ran the two provided implementations: a parallel one (sec_df2, one operator per operation) and a serial one (sec_nov, one adder and one multiplier, 11 clock cycles per sample).
- MAP-1: In the C++ simulation, the filter gives almost no output when only low frequencies go in, and a strong output when only high frequencies go in, so it’s a high-pass filter.
- MAP-2: The VHDL simulation in QuestaSim gives exactly the same samples;
diffon the two output files shows no differences. - MAP-3: The serial version produces the same output as the parallel one, in both C++ and VHDL.
MAP-4: Which one is bigger?
We expected the serial design to be smaller: one adder and one multiplier plus some registers should beat 5 multipliers and 4 adders. Synthesis said otherwise:
| Design | Area |
|---|---|
Parallel (sec_df2) | 10,822 |
Serial (sec_nov) | 16,461 |
The serial design needs multiplexers and a control path on top of its registers, which the fixed parallel data path doesn’t, plus more wiring. From the resource report we also matched every operation to its hardware: 15-bit adders for p2–p4, an 8-bit adder for p1, two extra 8-bit adders to round 15-bit results back to 8 bits, and 7×8-bit multipliers for positive constants (the sign bit is always 0) vs 8×8-bit ones for negative constants.
MAP-5: Rate-optimal, non-overlapped schedule
We replaced the delay elements by input/output node pairs and found the critical path: 7 clock cycles (2 multiplications + 3 additions).
The DFG with the critical path in red.
From the inequality graph we computed the ASAP and ALAP times and the mobility of every operation:
| p1 | p2 | p3 | p4 | m1 | m2 | m3 | m4 | m5 | |
|---|---|---|---|---|---|---|---|---|---|
| ASAP | 3 | 6 | 2 | 2 | 4 | 0 | 0 | 0 | 0 |
| ALAP | 3 | 6 | 2 | 5 | 4 | 0 | 3 | 0 | 3 |
| Mobility | 0 | 0 | 0 | 3 | 0 | 0 | 3 | 0 | 3 |
Using the mobility of p4, m3 and m5 to fill idle hardware, the whole filter fits in 7 cycles on 2 multipliers and 1 adder:
Schedule and assignment. Bold operations have zero mobility.
To minimize registers we drew the lifetimes of all values, built a circular-arc graph and colored its conflict graph, which gave a minimum of 6 registers. The resulting data path and its schedule over several iterations:


The Arx version gives exactly the same output as the provided serial design (empty diff). After synthesis it is slightly smaller than the serial design (area 16,026 vs 16,461) and can be clocked faster (data arrival time 4.39 vs 5.00).
MAP-6: Rate-optimal, overlapped schedule
With overlapping, the iteration period is limited by the critical loop instead of the critical path, which brings the minimum down to 4 clock cycles. Within a maximum latency of 8 cycles, the schedule needs 3 multipliers and 1 adder (five multiplications don’t fit on two multipliers in 4 cycles). Register allocation via a circular-arc graph needs at least 8 registers. We used 9, keeping a dedicated register for the input.
The overlapped data path.
The output matches the serial design, apart from one extra leading zero and one missing value at the end, both explained by the extra latency. After synthesis we noticed that
Comparing all designs
| Design | Data arrival time | Area | Iteration period (cycles) | Time per result |
|---|---|---|---|---|
| Df2 (parallel) | 8.44 | 10,822 | 1 | 8.44 |
| Nov (serial) | 5.00 | 16,461 | 11 | 55.00 |
| MAP-5 (non-overlapped) | 4.39 | 16,026 | 7 | 30.73 |
| MAP-6 (overlapped) | 3.89 | 22,706 | 4 (latency 8) | 15.56 |
The time-area trade-off is clear: a shorter clock period costs area. But a shorter clock doesn’t mean a faster result, since time per result is clock period × iteration period. Here the parallel df2 design is both the fastest and the smallest, so the scheduled designs only make sense when df2’s long clock period violates the timing of the system around it.