We built the compiler before the chip, and it changed the chip

A compute-in-memory compiler has to do something a conventional one never does: place a network onto a physical array whose shape is fixed in silicon, decide how each layer is represented, and fit that representation to what the hardware can actually resolve. Building ours first is how we found that the readout rather than the array dominates our energy — a result that redirected the engineering plan before any of it was committed.

21 November 2026CurrentMeasured3 references

The claim

Most chip companies build the silicon and discover the software problem afterwards. We did it in the other order, and the order is the point: the compiler told us the thing we had wrong before any of it was committed to a floorplan.

This post is what a compute-in-memory compiler has to do, and what ours found.

Placement, not scheduling

A conventional compiler decides when operations happen. The hardware is general, the weights come from memory, and the question is ordering.

A compute-in-memory compiler decides where things physically live. The array is a fixed grid, etched in silicon, and a layer's weight matrix has to be placed into it. A matrix wider than a tile is split across tiles. A matrix narrower than one leaves the rest of that tile unused, and unused rows still cost area and still leak.

Figure 1Placing a layer onto a fixed array
A LAYER THAT FITSweightsAlmost every row carries weight.The array earns its area.A LAYER THAT DOES NOTweightsunusedSame silicon, same leakage,a fraction of the work.A LAYER THAT FITSweightsAlmost every row carries weight.A LAYER THAT DOES NOTweightsunusedSame silicon, same leakage,a fraction of the work.

The same tile, two layers. A layer shaped like the array fills it; a layer that is narrow or shallow leaves rows and columns that cost area and leak whether or not they hold anything. Utilisation is decided at placement, before a single operation runs. Drawn for this post.

This is why we report which models map badly. MobileNet v2 occupies 5.95 times the array rows its useful work needs, because depthwise convolutions mix no channels and leave most of a tile idle. The general version of the problem — achieved throughput falling well short of peak because real layer shapes do not tile onto fixed hardware — is the central subject of accelerator design [1]. For us it is decided at placement, before anything runs.

Fitting the representation, which is not optimising the model

The second job is the one most often described wrongly, including by us before we were careful about it.

NexFlow does not optimise the model. The architecture is untouched: the same layers, the same weights, the same trained network. What is fitted is the chain of representations — how each layer's values are carried through the array, calibrated against what the hardware can actually resolve.

That distinction matters commercially as well as technically. A customer handing over a network wants it back doing the same thing. A tool that rewrites the network is a different product with a different conversation attached.

Simulation that is bit-exact, and why that is the bar

The mapping is then simulated: a cycle-level run of the fabric, checked against the reference implementation. Bit-exact, not close.

That bar follows from one bit per cell. A column returns an integer, so there is a right answer and the simulator either produces it or has a bug. Architectures built on multi-level cells cannot set that bar for themselves, because their result is approximate by construction and "close enough" has to be defined rather than checked.

The compiled artefact is a bitstream. It is a configuration of an array, not an executable.

What building it first actually bought

We expected the resistive array to dominate the energy. It does not. In our end-to-end model the array is a few percent and the readout converter is the largest single line item — consistent with the best measured 22 nm foundry RRAM macro we know of, which spends roughly 60% of its energy in the same place [3], and with the tile-level accounting that first made peripheral cost visible in this class of architecture [2].

Three consequences, all of which would have been expensive to discover later:

  • The first senior technical hire is an analog converter designer, not a digital architect.
  • The first milestone is converter closure, not system integration.
  • Optimising the array harder was dropped. If it is a few percent, halving it is a rounding error.

The full finding. The model cost a fraction of what a wrong floorplan costs, and the result arrived while the floorplan was still a drawing.

What exists, and what does not

Exists today: an open model goes in; a placement across tiles and dies comes out, with INT8 statistics, simulated accuracy on the modelled array, a cycle-level fabric simulation and an energy report. It runs on real checkpoints — the eleven in what actually runs at the edge were traced through it.

Does not exist: silicon to run any of it on. No PDK, no RTL, no fabricated part. Every number the chain produces is a model of a part that has not been built, and the chain's value is precisely that it told us something true before the part existed.

Not published: how the readout resolves a column. That is the part of the design we hold.

References

  1. V. Sze, Y.-H. Chen, T.-J. Yang and J. S. Emer, “Efficient processing of deep neural networks: a tutorial and survey,” Proceedings of the IEEE, vol. 105, no. 12, pp. 2295–2329, 2017. doi:10.1109/JPROC.2017.2761740reviewMapping, dataflow and utilisation: the standard treatment of why a fixed array runs below its peak on real layer shapes.
  2. A. Shafiee et al., “ISAAC: a convolutional neural network accelerator with in-situ analog arithmetic in crossbars,” Proc. 43rd ACM/IEEE International Symposium on Computer Architecture (ISCA), pp. 14–26, 2016. doi:10.1109/ISCA.2016.12simulationAn architectural evaluation, not silicon. Cited for the tile-level accounting that made peripheral cost visible in crossbar architectures.
  3. J.-M. Hung et al., “8-b precision 8-Mb ReRAM compute-in-memory macro using direct-current-free time-domain readout scheme for AI edge devices,” IEEE Journal of Solid-State Circuits, vol. 58, no. 1, pp. 303–315, 2023. doi:10.1109/JSSC.2022.3200515measured silicon22 nm foundry RRAM, single-level cells. The closest measured silicon to the process we build on.

Corrections. If a figure here is wrong, or a citation does not support the sentence it is attached to, tell us. The post gets corrected in place and says what changed.

All research notes