Agentic DSE
This section is written alongside the experiment it describes
(examples/dse_cg, plan
plans/dse_cg.md). The flow on the real tools – the design’s adaptor,
the service on the live backend, dselib and the generated DSE.md – is written; the measured grid,
replay and the experiment’s runs come next.
What design-space exploration is
A hardware design has choices: how many multipliers, how wide a word, how deep a queue. Each set of choices gives a different design with a different area, speed and accuracy. Design-space exploration (DSE) is the search for the set of choices that best meets a goal, such as “the smallest design that solves a system in 4,000 cycles with an error below −20 dB”.
DSE is hard for two reasons. The space is large: ten parameters with five values each is about ten million designs. And the evaluations that give the true answer are slow. A synthesis takes minutes to hours, and an RTL simulation adds more. Nobody can measure every design, so the skill is in deciding which few to measure.
Parametric DSE
DSE comes in two kinds:
- Architectural DSE changes the structure: which blocks exist, how they connect, what runs in hardware and what in software.
- Parametric DSE keeps the structure fixed and searches over its parameters: the sizes, widths and depths of blocks that are already there.
This section covers parametric DSE only. The architecture is given, and the search is over the
values of its build parameters (HwParam, see Parametrization). That
is the kind a calibrated model can predict well, since every point is the same blocks at other sizes,
and the kind most design teams spend their time on once an architecture is chosen.
Who explores: an agent
The explorer here is an AI agent: a language model working in a loop, calling tools, reading what comes back and deciding what to try next. It works like an engineer with a budget of tool time. It cannot measure everything, so it has to reason about which designs are worth measuring.
The question this section is built around is whether pysim helps. pysim is Waveflow’s bit-exact, loosely-timed simulation with calibrated cycle and resource models (Model calibration). A traditional flow has two kinds of evaluation:
- a systems team’s untimed bit-exact simulation, which gives accuracy but no timing or area;
- a hardware team’s synthesis and RTL simulation, which give timing and area but are slow.
Waveflow adds a third kind in between: pysim gives exact accuracy and approximate timing and area, in seconds. The experiment gives an agent the same task twice, once without pysim and once with it, and measures how much tool time each needs to find a good design.
The running example
The running example is the LTBF system of
examples/ltbf_cg_mem_dse (its plan,
plans/ltbf_dse/ltbf_dse.md): the long-term beamforming
receiver on a shared-memory accelerator. A CPU schedules jobs onto a systolic engine and a vector
unit, which solve each sector’s conjugate-gradient system and equalize every symbol, with an Ingest
DMA and one shared memory on one crossbar. It has five build parameters (the antenna array, the
systolic array’s rows and columns, the word width and the vector unit’s lanes). The DSE work on it
lives in examples/dse_cg.
The pages
- The DSE problem: what is being searched, what is measured, what the goal is, and how all of that is written down for an agent.
- The design context: how
DSE.md, the file that describes one design to the agent, is generated from the design’s Python. - The service: the process behind every evaluation: why the adaptor is hidden, the
dselibfunctions, what the service checks and charges, the ledger, and the live and replay backends. - Skills: how the agent is given the method for using all of this, and how it reads it. If you have not worked with AI agents before, its first sections stand on their own.
For the sweep tools that run a grid of designs without an agent, see Design-space exploration in the flow overview.
Table of contents
- The DSE problem - The parametric DSE problem stated precisely: design parameters and workload parameters, legality constraints, metrics, an objective with constraints, evaluations that differ in cost and in what they can see (golden, pysim, synth, rtlsim), a budget of tool time, and the rule that the answer must be measured. Then how it is written down for an agent, in three layers: a skill (the method), a design context file DSE.md (this design), and a prompt (this task). The LTBF system of examples/ltbf_cg_mem_dse is the example throughout.
- The design context - How a design is described for DSE. A subclass of DseAdaptor defines the design's context: its parameter space and constraints, its prose, how to build its system at a design point, and its golden model. It also implements what runs its own build flow: each part's identity at a point (the service's cache keys), pysim, synthesis per part, csynth and the RTL run. The base class derives the rest: defaults and legality; the architecture (the sub-top tree and its interconnects, the same at every point, and checked to be); and which parts each parameter rebuilds. Each method, what it returns and who uses it, with the LTBF system as the example. Once the class is defined, the generator renders DSE.md, the file passed to the agent: what it contains, where each section comes from, and the rules that keep it honest.
- The service - The process that answers every dselib call: it checks the call, synthesizes part by part and charges only parts not built before, schedules synthesis and RTL jobs on k worker slots on a simulated tool clock, enforces the budget and the submit rule, writes small derived artifacts back, and keeps the ledger -- the complete record of what was evaluated and what it cost, which results() returns and score.py reads. Two backends: live (runs the tools; a user's flow, and how the ground truth is measured) and replay (answers from the recorded ground truth; every scored run). Why it runs outside the agent's sandbox.
- Skills - How an AI agent is given a method, for readers new to agents. What the model actually sees (text only; the harness reads files and runs tools for it), the three ways to give it instructions (prompt, CLAUDE.md, skill), what a skill is (a folder with SKILL.md: a description that is always listed, a body loaded on demand, files read only when needed), how a skill is invoked and expanded ($ARGUMENTS is replaced by the harness before the model sees the text), and why the DSE experiment uses one: the same skill, context and prompt serve a user in their own project and an agent in a clean sandbox.