Design-space exploration

Your task: $ARGUMENTS

The first argument is the path to the design’s DSE.md; the rest is the objective. Read DSE.md first. It describes the system, its parameters and their legal values, its workloads, and what each evaluation costs. Its links lead to the design’s documentation and source, if you want to read them.

The library

The library is dselib, in this skill’s directory. Every function is a call to a DSE service, which runs the tools, charges each evaluation to a ledger and enforces the budget:

import sys; sys.path.insert(0, "<this skill's directory>")
from dselib import space, golden, hls_estimate, synth, rtlsim, wait, results, budget, submit
<!-- arm:waveflow -->
from dselib import pysim
<!-- /arm -->

help(dselib.<function>) gives the full reference, with an example result for each function.

What each evaluation gives you

| function | gives you | |—|—| | golden(params, workload) | accuracy, exact (bit-exact, untimed). No cycles, no resources. | | pysim(params, workload) | accuracy, exact; cycles, per-block activity and resources, approximate, each with a confidence level. | | hls_estimate(points) | resources and, where computable, latency of each HLS kernel, estimated by the HLS compiler. Not the logic around the kernels. | | synth(points) | resources and II, measured, in total and for each part of the design. | | rtlsim(points, workload) | cycles and per-block activity, measured. |

DSE.md gives the cost of each one for this design. hls_estimate, synth and rtlsim run as jobs, a few at once; wait collects their results. The budget counts tool time on the service’s clock, not your thinking.

Rules

  • Every call is charged. budget() shows what you have spent and what is left; the run ends when the budget is spent.
  • A failure is a result, not an exception: a row with a status and the time it cost.
  • A design is synthesized part by part (DSE.md lists the parts and which parameters each depends on). A part already synthesized at the same sizes is not charged again, so a change that touches one part costs only that part’s synthesis. Some design parameters rebuild no part (DSE.md says which): a new value of one costs an RTL simulation and no synthesis. A repeated evaluation costs nothing.
  • results() returns every evaluation so far, flattened for pandas.DataFrame; results("synth") keeps one function’s rows. Use it to recover your state instead of repeating calls or relying on notes.
  • Some rows carry artifacts: paths to small files written under results/ in the working directory, such as a utilization report or a per-block activity table.
  • The design you submit must be one you have synthesized and RTL-simulated, on the workloads the objective names.
  • Work in Python. Write scripts and notes in the working directory as you like.

Hints

  • Use cheap evaluations before expensive ones.
  • Verify a design before you submit it.

Your report

End by calling submit(params, report), with report a dict:

{
    "params": {...},                  # the design submitted, as passed to synth
    "evidence": [                     # one entry per constraint and the objective
        {"metric": "lut", "value": 55400, "source": "synth"},
        {"metric": "t_upd_ms", "value": 5.9, "workload": "long_term", "source": "rtlsim"},
        {"metric": "median_loss_db", "value": 0.07,
         "workload": {"name": "accuracy", "target": "-6_3"}, "source": "golden"},
    ],
    "rationale": "a few sentences: how you searched, and why this design",
}

source names the function that produced the number. The report is checked against the ledger.