Putting jev on silicon: a model whose decisions are wires
At typesafe.ai, jev makes decisions the type-safe way: every choice is one pick from a short list of allowed answers, and nothing outside that list can happen. We wanted to know what that looks like when the "software" is the chip itself. Today we're open-sourcing the answer: jev, ported to SkyWater SKY130 silicon and signed off.
A decision you can point to
This chip holds a small model and makes a few decisions while a job moves through it. It doesn't produce an explanation. Each decision has to land on one answer from a short list. The chosen answer counts as certain and every other answer counts as impossible.
The number of the chosen answer goes into a small table, and that number is what connects the wires for that clock. An answer that isn't on the list has no wiring, so the chip can't use it. Type safety in software becomes connectivity in hardware.
The four decisions
Where a word goes. Words arrive at the top of the chip, and each one is a piece of the state, a piece of the model, an instruction to reload the model, or a marker passing through. State is kept for the local engines, with a copy sent downstream to the next chip. Model values are kept until eight are stored, and any after that go downstream. A reload instruction resets the fill count and also goes downstream, while the stored values stay until new ones replace them. Markers simply pass through.
Whether to take the word now. A model value meant for this chip is always accepted. State is accepted only when the downstream port has room and the engines are ready. Pass-through words need only downstream room. Otherwise the word waits.
When the scores may leave. Scores leave to the right only when all three conditions hold: the engines have finished, the values from the left have arrived, and the right-hand port has room. If any one is missing, the scores stay put.
What an engine multiplies. Each engine walks four steps, multiplying a state value by a model value and adding the product to a running sum. A row's score is the incoming value from the left plus both engines' sums, wrapping at 2³².

