One-Hot Watchdog
The set-top box SoC's bus arbiter has one job: assert exactly one grant line out of eight, every cycle. Twice during bring-up it did not (once granting two DMA engines in the same burst window, once granting nobody at all), and both times the corruption took a week to trace back. So the bring-up build got a watchdog: a combinational checker on the grant bus, raising fault the moment the bus is anything other than one-hot.
Now the production netlist review has it on the chopping block. The die reads 97 percent full and the integration lead deletes anything that cannot justify its area. The offer is blunt: 30 cells in the synthesized netlist and it ships, one over and it is gone. The bring-up draft, which checks the bus against the eight legal one-hot patterns, synthesizes to 37. There are sharper ways to ask "is exactly one bit set". The team record stands at 21 cells.
Interface
| Port | Direction | Type | Description |
|---|---|---|---|
grant | in | 8-bit vector | Arbiter grant bus, one line per master |
fault | out | 1 bit | High when grant is not one-hot |
Behavior
fault = 0when exactly one bit ofgrantis 1fault = 1whengrantis all zerosfault = 1when two or more bits ofgrantare 1- The testbench drives all 256 values of
grant
Constraints
Purely combinational: no clock, no registers, no latches. The area target is 30 cells or fewer after synthesis (the team record is 21); count by adding up the Netlist tab's stats-bar categories (gates, FFs, muxes, arithmetic). The testbench cannot check cell count; it only enforces behavior. The budget is on your honor, and the Netlist tab keeps the score.
Click Run to execute your code. Output will appear here.