This is a review of my experience in the 2020 IC Design Contest final. It was several years ago, so some details are based on memory and may not exactly match what I thought at the time.

I also remember the main scoring objective as area, with a relatively generous timing constraint. The version later shown on the contest website used a power–execution-time metric. For this post, I will explain our decisions from the perspective I remember: minimizing area.

Problem overview

We were given the cost of assigning each of 10 people to each of 10 jobs: a total of 100 values.

The goal was to find an assignment with the minimum total cost, while satisfying two conditions:

  • Every person receives exactly one job.
  • Every job is assigned to exactly one person.

The required approach was based on the Hungarian algorithm. The problem description divided the process into five steps:

  1. Row reduction: subtract the minimum element in each row from every value in that row.
  2. Column reduction: subtract the minimum element in each column from every value in that column.
  3. Check the assignment: determine whether the zeros allow a complete assignment. The provided tests did not require us to handle the case that would lead to step 4.
  4. Create more zeros: this step was not described in the contest material I used.
  5. Make the final assignment: when a row or column has only one available zero, assign that job and eliminate the corresponding person and job. Repeat until finished for the supported cases.
Example of reduced assignment-cost matrix Final assignment step in the Hungarian algorithm

Hardware architecture

Hardware architecture for the job assignment engine

Interface

SignalDescription
jam_in8-bit assignment cost input
enWhen asserted, the testbench sends 100 values consecutively
jam_out8-bit assignment output
costTotal assignment cost
validIndicates that jam_out is valid
Assignment engine output example

Implementing the algorithm

Row and column reduction

For the first two steps, we scanned each row or column to find its minimum and then scanned again to subtract that minimum from all relevant values.

This is not the fastest possible strategy. But it allows us to reuse a small amount of hardware instead of building a large parallel datapath.

Finding the final assignment

Our initial implementation counted the number of zeros in every row and then sorted the counts to decide which row to process first. We were following the algorithm quite literally.

Later, we realized this created unnecessary hardware.

A simpler approach was to scan through the values and make an assignment whenever we found a row with only one remaining valid zero. We could then mark the associated row and column as removed, using small flags and the same scanning structure.

We did not need extra logic to jump aggressively to the next candidate. Although jumping might reduce execution time, our objective was area, not speed.

Why regularity mattered

Early in the competition, we considered more complicated techniques: storing minimum values ahead of time, doing some operations in batches, and skipping work whenever possible.

But those tricks tended to optimize time at the expense of additional registers, counters, and control logic.

Once we recognized that, we shifted our attention toward a regular datapath that repeatedly scanned the matrix. The controller could keep a few flags and perform the necessary operations only when it reached the relevant positions.

This reinforced something I discussed in Minimizing Hardware Area Under a Timing Constraint: when the cycle budget is generous, reusing simple hardware can matter more than minimizing the number of operations.

Competition experience

I spent roughly the first 30% of our time thinking about ways to skip operations. Only later did we realize that a more regular algorithm could reduce area more effectively.

We optimized the first two steps and then moved into APR. Since it was our first competition and we were not yet very familiar with APR, we ended up with only around 10% of the time remaining.

Near the deadline, we realized that the fifth step could be simplified in the same way. The new architecture was easier to implement, so we wrote it quickly, while keeping the previous version as a fallback in case the new one was not ready for submission.

The change reduced our area by almost a factor of two. From memory, the final area was around 6,000 square micrometers, although I would need the original implementation report to confirm that number.

The biggest lesson for me was that a more clever algorithm is not always a better hardware algorithm. When area is the priority, a predictable and reusable execution pattern can win.