RFC: config.mk is the language, make is one interpreter for it (direction, not urgent)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 10/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- python
- Domaine
- build-system, tooling
Piste de recherche
This is a design RFC with no single change to make. Read flow/Makefile, variables.mk, variables.yaml and scripts/run_command.py to see how config.mk is evaluated today, then the RFC's phase table. Useful first contributions are the phase 0 pieces, such as a lint for unknown variables or a comparison of the Python reader's print-VAR output with make's. Done would mean discussion settles on the direction, not a patch.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Nothing here is on fire and nothing needs deciding soon. ORFS works, surprisingly well for how simple it is. I am writing down where I see it going, so that the cleanup and tinkering we do anyway can point the same way, and to hear whether others see the same end state.
The idea in one picture
flowchart TD
mk["make DESIGN_CONFIG=... finish<br/>shim Makefile, same commands"]
cli["orfs DESIGN_CONFIG=... finish<br/>same arguments, no make"]
py["import orfs<br/>your Python owns the loop"]
bs["bazel-orfs, or any build system<br/>owns dependencies and artifacts"]
src[/"config.mk + variables.yaml<br/>the language, unchanged"/]
subgraph O["orfs: a small Python library, BSD-3, pip install orfs"]
config["orfs.config<br/>config.mk grammar to one resolved, typed dict"]
flow["orfs.flow<br/>the step graph as data, up to date by file time"]
step["orfs.step<br/>run one step or a range: environment, logs, metrics"]
end
subgraph T["unchanged"]
openroad["openroad, stage Tcl"]
yosys["yosys, synth scripts"]
klayout["klayout"]
end
mk --> cli
cli --> config
cli --> flow
cli --> step
py --> config
py --> step
bs --> config
bs --> step
src --> config
step -->|"environment variables, unchanged"| T
This picture is the grand idea. The two doors on the left hand control to orfs; the two on the right keep control and call into it; all four read the same config.mk through the same code. The rest of this issue is detail that follows from it, and a list of things to do, and how to do them, can be hydrated from it easily, by AI as readily as by hand, whenever a piece is worth picking up.
What is good about ORFS today
- A design is one small file.
config.mkreads top to bottom, diffs well, and every design in the tree and every private one is written in it. - The command line.
make DESIGN_CONFIG=... floorplan,make gui_final,make print-VAR,make issue. Low cognitive load, in every tutorial and in people's fingers. variables.yaml. Every variable with a type, a description, a default and the stages that read it, and the docs generated from it. That is already half of a language definition.- The environment contract. Stage Tcl reads
$::envonly, neverconfig.mk. Whatever evaluatesconfig.mkcan change without touching a stage script. do-<stage>targets. Doing a step is already separate from deciding whether it is out of date, which is what lets bazel-orfs, or any other build system, sit on top as a thin layer.- Logic keeps moving to where it can be tested.
run_command.pyreplaced GNUtime,teeandstdbufin the recipes, got unit tests and started working on macOS. #4771 adds a grammar for<COMMAND>_ARGSvalues in the common subset of Python and Starlark, with a parser, error messages and tests.
The design and platform configs also use a small, regular part of make: assignments (=, ?=, +=), $(VAR), a handful of pure text functions (sort, wildcard, foreach, subst, ...), ifeq/ifneq and include. Almost no $(eval), no $(shell), no targets or recipes.
The constructs the configs use, counted on master
Counted over the 96 design .mk files (88 of them config.mk) and the 7 platform .mk files:
| Construct | Design files | Platform files | In the language? |
|---|---|---|---|
export VAR = value, ?=, +=, $(VAR) |
all | all | yes |
$(wildcard ...), mostly under $(sort ...) |
50 | 4 | yes |
ifeq / ifneq (mostly FLOW_VARIANT, BLOCKS) |
21 | 3 | yes |
include |
3 | 1 | yes |
$(foreach), $(subst), $(patsubst), $(word), $(if), $(strip), $(abspath) |
1 | 3 | yes |
$(eval) |
0 | 1 (asap7, 12 uses) | rewrite as += in $(foreach) |
$(shell), $(call), define |
0 | 0 | no |
| targets and recipes | 1 | 0 | no |
The observation
config.mk is a small DSL, and GNU Make is one interpreter for it. Make does two unrelated jobs in ORFS: it evaluates that language, and it orders about 25 steps in a line. Most of what has been awkward to maintain comes from the first job, not from the flow: variable flavor and origin leaking into behaviour, the re-entrant sub-make that unsets and re-escapes variables for every step, __SPACE__, a misspelled variable being silently accepted, FOO= and FOO=0 meaning different things, and no way to unit test "what does this config.mk evaluate to".
Who gains what
- ORFS maintainers.
flow/Makefileandvariables.mkare about 1,150 lines and took roughly 400 non-merge commits since 2022, a good share of them about make and not about the flow. Python in their place can be unit tested. - ORFS users. A misspelled variable gets an error with a suggestion.
FOO=andFOO=0mean one thing. In time,pip install. - bazel-orfs and other build systems. No pressing problem; the
do-targets are a well-defined interface. The gain is less duplication, and an ORFS bump that changes the flow failing a test in seconds.
The history behind the observation
Each of these was found and fixed, which is the flow working as it should. They are listed because they are about make's semantics, not about the flow, and a config language with one variable flavor and a stated precedence order has no room for them.
| When | Commit | What happened |
|---|---|---|
| 2026-01 | df79ba1d | "immediately expand deferred vars": a startup-time fix, because deferred variables holding $(shell) spawned a shell at every expansion. |
| 2026-04 | 8826393c, 5c190f6b | The := gave the tool paths origin "file", so the sub-make wrapper unset them. Fixed with a list of exceptions. |
| 2026-04 | 72eca884, 9f5a086b | The same again for OPENROAD_EXE under bazel-orfs: every stage failed with "openroad: No such file or directory". Fixed by preserving the origin, which brought the shells back. |
| 2026-09 | 77667171 | "v2" of the startup fix: the first approach "caused some externally-defined variables to become overwritten". |
| 2024-09 | 724df017, 42e17b0f | ifdef made make FOO= and make FOO=0 mean different things from variable to variable. |
| 2026-10 | 0772900e | PYTHON_EXE was used before it was assigned; it expanded to empty and a different Python ran, with no error. |
| 2026-01, 2026-02 | 8bb1fd17, 2b672f1e | Two race fixes for make print-FOO in parallel use. |
| 2024-10 | 89cffd7a | Spaces in defaults: $(foreach) splits on spaces, hence __SPACE__, which variables.mk calls "a workaround for whitespace hell". |
| 2026-10, 2026-11 | d779ebd9, f8fac4c6 | A step writes an .odb and an .sdc; saying so took grouped targets and a rule about which file is written first. |
| 2026-11 | 567b1721 | do-route had also run global route since before do-grt existed, unlike every other do- target. |
| 2025-08 | ecd2a172 | make versions.txt "would fail silently ($? == 0)" without valid binaries. |
| 2026-04 | 55d323b6 | GNU time and tee in the recipes replaced by run_command.py. The pattern this RFC generalises: the logic moved to Python, got unit tests and became portable. |
Two more of the same kind, not tied to one commit: the step list exists three times (the do-step calls in the Makefile, flow.tcl for the whole flow in one process, floorplan_to_place.tcl for one range), and bazel-orfs has a second reader of config.mk (config_mk_parser.py, 1,615 lines) that still asks make for the truth through make print-VAR.
Where I see this going
Roughly in this order, each step useful on its own:
- Write the language down. A grammar for the subset the configs already use,
variables.yamlas the symbol table, one stated precedence order (defaults, platform, design, variant, environment, command line). A lint that says "unknown variable, did you mean ...". - A small Python reader next to make. CI compares its
print-VARwith make's on every design and platform. Nothing changes for users. - Make asks Python. Make still orders steps, but gets variables and runs each step through the Python. The sub-make and escaping machinery goes.
- Much later, if it has proven itself:
flow/Makefilebecomes a few lines forwarding to anorfscommand with the same arguments, so everymakecommand typed today keeps working, and the step list becomes data, so one OpenROAD process per step or one for a range is a run-time choice and not a hand-written Tcl file per range. At the far end,pip install orfs.
Not goals: caching, content hashing, remote execution, sweeps, scheduling. Those belong to build systems on top. Also not a second config format; the format is config.mk.
The transition: nobody retypes anything
The steps above as phases, with what a user notices at each:
| Phase | What happens | For users |
|---|---|---|
| 0. Specify | Grammar document, lint, the config reader. CI compares the reader's print-* with make print-* on every design and platform. |
Nothing changes. |
| 1. Hollow out | Make keeps ordering steps, but asks the Python for variables and to run each step. The sub-make, escape.sh and __SPACE__ go. |
Nothing changes. |
| 2. Flip | flow/Makefile becomes a shim that forwards goals and overrides to orfs. The old Makefile stays behind ORFS_LEGACY_MAKE=1. |
Same commands. The deprecation period starts. |
| 3. Clean up | The legacy Makefile and what only it used are deleted. The shim stays. | make ... still works, through the shim. |
4. pip install orfs |
The library is published. | A clone is optional. |
Phases 0 and 1 are ordinary maintenance and can land a piece at a time. Only the flip in phase 2 is a decision point. The shim is approximately:
# flow/Makefile after phase 2
ifeq ($(ORFS_LEGACY_MAKE),1)
include Makefile.legacy
else
.DEFAULT_GOAL := finish
%: ; @$(PYTHON_EXE) $(dir $(firstword $(MAKEFILE_LIST)))scripts/orfs.py $(MAKEOVERRIDES) $@
endif
| What a user does today | During deprecation | After |
|---|---|---|
make DESIGN_CONFIG=... [target] [VAR=value] |
identical | identical through the shim, or orfs ... with the same arguments |
make gui_final, print-VAR, issue, clean_all, do-... |
identical | identical |
A config.mk within the grammar |
no edit | no edit |
A config.mk with $(shell), $(eval) or its own targets |
a lint warning naming the line and the replacement; works with ORFS_LEGACY_MAKE=1 |
must be rewritten |
A wrapper Makefile that includes flow/Makefile |
works with ORFS_LEGACY_MAKE=1 |
calls orfs or the shim as a command |
AutoTuner, CI scripts, test_helper.sh calling make |
identical | identical |
A suggested deprecation period is two ORFS release tags or twelve months after the flip, whichever is longer. The condition for flipping is mechanical: the CI comparison of the two readers has been green on all designs, and the nightly QoR runs are the same through both paths. The shim can stay forever; it is a few lines.
What would be cleaned up afterwards
| Where | Removed | Replaced by |
|---|---|---|
| ORFS | Makefile (930 lines), variables.mk (214), utils.mk |
the shim and orfs/ with unit tests |
| ORFS | UNSET_AND_MAKE, SUB_MAKE, escape.sh, test-unset-and-make-% |
nothing; one process evaluates the config once |
| ORFS | defaults.py, non_stage_variables.py, the __SPACE__ convention |
orfs.config reads variables.yaml directly |
| ORFS | flow.sh, synth.sh |
orfs.step, which absorbs run_command.py |
| ORFS | flow.tcl, floorplan_to_place.tcl, the floorplan_to_place target |
--process; the range is generated from the step table |
| ORFS | $(eval) in asap7's config.mk |
+= inside $(foreach) |
| bazel-orfs | gnumake.bzl, tools/gnumake |
nothing |
| bazel-orfs | make.tpl, the make print-LIB_FILES action |
an action that runs orfs.step with a JSON config |
| bazel-orfs | config_mk_parser.py, make print-VAR in import and export |
import orfs.config, the reader ORFS uses |
| bazel-orfs | STAGE_SUBSTEPS, STAGE_METADATA, SOURCE_VARS, RETIRED_ARGUMENTS, the script globs in orfs_source.bzl |
the extracted model, with a test that it matches the pinned ORFS |
What it could look like
orfs DESIGN_CONFIG=designs/asap7/gcd/config.mk # same as make
orfs DESIGN_CONFIG=... floorplan PLACE_DENSITY=0.4 # same targets, same overrides
orfs DESIGN_CONFIG=... print-LIB_FILES # same output format
orfs DESIGN_CONFIG=... do-3_3_place_gp # one step, no dependency check
orfs DESIGN_CONFIG=... config --json --stage place # for build systems
orfs graph --json # the step table, as data
orfs lint designs/asap7/gcd/config.mk # grammar and unknown variables
import orfs
cfg = orfs.config.load("designs/asap7/gcd/config.mk", overrides={"PLACE_DENSITY": "0.4"})
cfg.stage("place") # only what the place stage reads, from variables.yaml
orfs.step.run("3_3_place_gp", cfg, work_home="build/")
Framework or library: the caller decides who is in charge
Make is a framework: it owns the process and ORFS runs inside it. With the config reader, the step table and "run one step" as three Python parts that do not depend on each other, the same code can be used either way round:
| How it is used | Who owns the loop | Who decides what is out of date |
|---|---|---|
As a command: orfs DESIGN_CONFIG=... finish, or make through the shim |
orfs | orfs, by file time, the rule make uses |
As a library: a script, a notebook, AutoTuner or a test imports orfs and a config.mk |
the caller | the caller |
| From a build system: bazel-orfs, or a Ninja or CMake wrapper, one call per action | the build system | the build system, by content hash for Bazel |
import orfs
for density in (0.5, 0.6, 0.7):
cfg = orfs.config.load("gcd/config.mk", overrides={"PLACE_DENSITY": density},
variant=f"pd{density}")
orfs.step.run_range("floorplan", "place", cfg)
print(density, orfs.metrics(cfg, "place")["timing__setup__ws"])
The reader knows nothing about steps, running a step does no dependency checking, and only the flow part has an opinion about order and freshness. The dependency checking stays the smallest thing that replaces make for a person at a terminal; anything that pulls it towards caching or scheduling is a reason to use a build system instead.
This is not a revolutionary idea
A tool that owns the loop, used by people who already have a loop of their own, is a familiar problem with a familiar solution: make the tool a library and a command, and let the user choose what is in charge. Other fields with long turnaround times and multi-step flows went this way:
- Compilers. LLVM is a set of libraries with
clangas one caller. CMake generates for Ninja, Make or an IDE and does not pick for you. - Hardware. cocotb is a
pip installthat runs under a Makefile or a Python runner, with whichever simulator is there. LibreLane is a Python package whose flows are assembled from steps. - Geoscience. GDAL is a library with command-line tools on top, called from QGIS, Python and R alike. GMT's shell commands gained PyGMT. Madagascar keeps its seismic processing programs as plain commands and leaves the flow to SCons. Weather and climate models run under Cylc or ecFlow, which own the scheduling.
- Radio astronomy. CASA went from one monolithic application to the pip-installable
casatoolsandcasatasks. - Bioinformatics. Aligners and variant callers are plain commands; Snakemake, Nextflow or a Makefile owns the flow, and each lab chooses.
- Machine learning. PyTorch's "you write the training loop".
What these share with ORFS: steps that run for minutes to days, files as the checkpoints between them, and users who arrive with an orchestrator they already trust.
One OpenROAD process or many is the user's choice
Running several steps in one OpenROAD process works today, through hand-written Tcl that repeats the step order: flow.tcl for the whole flow and floorplan_to_place.tcl for one range, next to the list in the Makefile. With the step list as data, a range of consecutive steps can be handed to one process or to one process each, and the range can be anything:
orfs DESIGN_CONFIG=... finish # one process per step, as make does today
orfs DESIGN_CONFIG=... finish --process stage # one process per stage
orfs DESIGN_CONFIG=... finish --process flow # one process, netlist to final report
| One process per step | One process for a range | |
|---|---|---|
| What the next step sees | what is on disk; every step reproducible from its input .odb and .sdc |
in-memory state carried over; can differ from what a reload gives |
| A crash or out-of-memory | loses one step | loses the range |
| Cost | reads the database and libraries again at every step | loads once; least wall time and I/O |
By default the same files are written either way. It is a safety choice with the safe setting as the default, and a build system makes the same choice at its own granularity.
What bazel-orfs would use it for
bazel-orfs has no pressing problem here; the do- targets are a stable seam and it works. What it has is its own hand-kept description of ORFS: a second config.mk reader (config_mk_parser.py), the table of stages, substeps and their result, log and report file names (private/stages.bzl, which says of itself that it is "metainformation about the ORFS code that there is no known nice way for ORFS to provide"), a list of which variables hold files, and a hermetic GNU Make built from source (gnumake.bzl) because the host's make changes action hashes.
Bazel cannot run Python during analysis, and every output is declared before anything executes, so "import orfs" is not enough on its own. Three things together are:
- Share code where it is pure functions over strings, in the common subset of Python and Starlark, as #4771 does for the arguments grammar.
- Extract the data. An
orfs model --jsonprints what is static: steps with their inputs, outputs and scripts, variables with stages, types and defaults. A build system turns that into its own tables at each ORFS bump, and the diff is the review: a new step, a renamed report, a variable that moved stage. - Verify in execution. A small test compares the extracted model with what the pinned ORFS prints, so a bump that changes the flow fails a test in seconds, not a build three stages in.
None of this is specific to Bazel; the model is what any build system on top of ORFS needs.
What bazel-orfs holds about ORFS today, and where each piece could come from
| Knowledge about ORFS | Where in bazel-orfs | Needed at | Could come from |
|---|---|---|---|
How to read a config.mk |
config_mk_parser.py; make print-VAR in import and export |
tool time | orfs.config, imported |
How to write a config.mk |
tools/ramp/export_design.py, config_content() in private/environment.bzl |
tool time, execution | a writer in orfs.config, so reader and writer round-trip by construction |
The step table: stages, substeps, do- targets, result, log and report names |
STAGE_SUBSTEPS, STAGE_METADATA in private/stages.bzl |
analysis | the step table, extracted |
| Which variable is read in which stage | already extracted from variables.yaml by a repository rule |
analysis | the same extraction, widened to the whole model |
| Which variables hold files, so they become action inputs | SOURCE_VARS and a PRE_/POST_*_TCL pattern in the parser |
analysis | a file type in variables.yaml |
| The keep-or-drop rule for a variable in a stage | private/stages.bzl, applied again by private/merge_arguments.py |
both | one function in the Python and Starlark common subset |
How to parse values: <COMMAND>_ARGS, lists such as SYNTH_KEEP_MODULES |
args_grammar.bzl from #4771; keep_modules(), added because "the same string was being parsed three different ways" |
analysis | shared grammar files from ORFS |
| Which ORFS files a step needs on disk | hand-kept globs in orfs_source.bzl |
analysis | a per-step script list in the step table |
| Retired variables | RETIRED_ARGUMENTS |
analysis | deprecated entries in variables.yaml |
| Setting up a step's environment and running it | make.tpl |
execution | orfs.step |
What stays in bazel-orfs is what makes it a Bazel ruleset: rules and providers, which labels feed which action, sandboxing, caching, and features ORFS does not have.
The check has two levels. The model test above catches a changed flow before any design is built. A per-action guard catches the rest: the action tells orfs.step which model hash and outputs it was analysed with, and the step stops on a mismatch with a message that says so, in place of a missing output at the end of a long run. Values computed by an earlier action, and anything that depends on the files a glob finds, stay at execution as today; the model says which variables those can be.
ORFS from PyPI
The far end is pip install "orfs[tools]" and then orfs DESIGN_CONFIG=my_design/config.mk, with a clone optional:
orfs: the Python, the stage Tcl,variables.yamland the grammar. A pure Python wheel, BSD-3. It runsopenroadas a separate program, so it stays BSD-3.openroad: the binary as a platform wheel for the common hosts, with a source build as the fallback for the rest and for anyone applying a patch.- yosys and klayout: upstream's own packaging where it fits.
- Platforms: open, data wheels per platform or fetched on first use.
How the wheels could come from the Bazel build, and the licences
This needs a proper licence review; the reasoning is written down so the review has something to correct.
The idiom. Ship the openroad executable, not a Python extension, the way cmake, ninja and ruff are on PyPI: the binary goes in the wheel's scripts data directory and lands on PATH. With no CPython ABI involved the tag is py3-none-<platform>, one wheel per platform and not per Python version. The Python bindings and the Qt GUI stay out at first.
From Bazel.
- Build
//:openroadoptimised, stripped and as statically linked as the build allows. - Package it with rules_python's
py_wheel, the platform tag chosen byselect(). - Build natively per platform on CI runners: Linux x86_64 and aarch64, macOS arm64.
- Check the glibc floor with
auditwheel showand tag the wheelmanylinuxto match;delocateon macOS. - Publish from CI with PyPI trusted publishing.
orfspins the exactopenroadversion it was tested against.
The sdist is the fallback for other hosts and for anyone applying a patch: a small PEP 517 backend that runs bazelisk at the pinned commit, at the price of a long first install and a C++ toolchain.
Licences.
- OpenROAD's own code is BSD-3, but the executable links OpenSTA, which is GPLv3, so the binary is conveyed under GPLv3. BSD-3 code inside a GPLv3 binary is allowed.
- GPLv3 allows distributing binaries when the corresponding source is available. The wheel's metadata points at the exact tagged commit, with the Bazel files, lockfile and patches, since build scripts count as source. KLayout is GPL and publishes binary wheels on PyPI in this way.
- The wheel carries the licence texts and the notices of every statically linked dependency (PEP 639
License-ExpressionandLicense-File). Everything linked in must be GPLv3-compatible, which wants one audit against the real link line. orfsrunsopenroadas a separate program and names it only as an optional dependency, soorfsstays BSD-3 either way.
To settle: PyPI's default 100 MB per file, a version scheme (OpenROAD has no PEP 440 releases), and yosys, since ORFS synthesises with slang and an upstream yosys wheel is only enough if it can load that plugin. conda-forge is the other idiomatic home for large binaries.
Use case: ORFS and OpenROAD in a project of your own
Everyone has a flow and a build system that is right for them, for their interests and their resources: what the rest of the project is built with, what the team knows, how much machinery they want to own. ORFS from PyPI would meet each of them where they are and let them decide what level of complexity, and which solution, suits them. Three lines of Python in a notebook is a complete answer for a student, a Makefile for a small team, bazel-orfs with remote execution for a large design, and the plain make mental model, type a target and get a result, stays for everyone who likes it.
- A Bazel project with bazel-orfs: Bazel fetches and builds the tools and brings caching, remote execution and hermetic builds. A natural fit for a project that is already Bazel.
pip install orfsinto whatever the project already uses, with no clone and no second build system to adopt:- a Makefile or a CMake/Ninja build that already builds the RTL or the firmware: one rule that runs
orfs DESIGN_CONFIG=... finish, or one rule per stage withdo-steps when the build system should own the dependencies; - FuseSoC/Edalize, Meson or SCons: a backend or custom target a few lines long, since
orfsis a command with a JSON model to read; - Snakemake, Nextflow or Airflow for sweeps and regressions:
import orfsin a rule, with the workflow tool doing the scheduling; - pytest, nox/tox or a GitHub Actions job:
pip installin the job and a test that asserts onorfs.metrics(...); - a Jupyter notebook, a plain Python script, or a project's own shell driver.
- a Makefile or a CMake/Ninja build that already builds the RTL or the firmware: one rule that runs
An example of what people build on ORFS today: CoralNPU is a Bazel project that generates its RTL from Chisel and has its own flow driver, with stage selection and resume, which it runs in the openroad/orfs container. With ORFS as a package, a project like it gains options to pick from: the same driver from a pip install, next to where the RTL is built; bazel-orfs, since it is Bazel already; or exactly what it has now.
In each of these the config.mk is the same file, read by the same code, so a design can move from a notebook to a Makefile to Bazel without being rewritten.
Design space exploration
Exploration is where a library fits best. A search wants to own the loop: it picks the next point from the results so far, stops a trial early, and spreads trials over whatever machines there are. Declared dependencies and cached artifacts, the strengths of a build system, matter less here, because each trial is new and most are thrown away. With Python in charge, distributing the work is what tools like Ray already do, and AutoTuner, which is built on Ray Tune, could call orfs as a library where it runs make in a subprocess today:
import tempfile
import orfs, ray
from ray import tune
def trial(params):
cfg = orfs.config.load("gcd/config.mk", overrides=params, variant=tune.get_context().get_trial_id())
with tempfile.TemporaryDirectory() as work: # the trial's files go when the trial does
orfs.step.run_range("floorplan", "grt", cfg, work_home=work) # one OpenROAD process, on whichever machine Ray picked
return {"ws": orfs.metrics(cfg, "grt", work_home=work)["timing__setup__ws"]}
tune.Tuner(trial, param_space={"PLACE_DENSITY": tune.uniform(0.4, 0.8),
"CORE_UTILIZATION": tune.randint(30, 70)}).fit()
Disk is the other thing a search has to own. A trial leaves an .odb per step, logs and reports, and thousands of trials fill a disk quickly, so the loop prunes as it goes: a work directory per trial, deleted when the trial ends; only the metrics kept, plus the results of the few points worth a second look; and a range run in one process, which can leave the intermediate databases unwritten (WRITE_ODB_AND_SDC_EACH_STAGE=0). The caller decides this, in a few lines, because the caller knows which trials matter.
A search also has a different contract from a build. A build is all or nothing: every target is there, or the build failed. A search runs for days over machines that come and go, so it must be able to resume, and it must produce its data with points missing: a trial lost to a failed machine or a timeout is recorded as such, with its cause, and the table, the plot and the next choice of points are made from the trials that did finish. Finished trials are kept as rows as they complete, so a restarted search skips them and carries on. Search libraries such as Ray Tune have this built in, and it comes for free once the flow is something they can call.
The winning point is then a config.mk like any other, and can go to a build system for the careful, cached, reproducible run.
What is congruent with this today
This is the part I care about now. None of it needs the end state agreed, and each is ordinary good housekeeping:
| Do | Avoid |
|---|---|
| New logic in Python or Tcl with a test, called from a one-line recipe | New logic in recipes, new define macros, new sub-make call sites |
Declare every new variable in variables.yaml with type and stages |
Variables that exist only in the Makefile |
| New features as variable values with a grammar, as #4771 does | Features that depend on make evaluation order, origin or flavor |
Keep config.mk files inside the small subset |
$(shell), $(eval), targets in a config.mk |
| Fix make bugs that block users, minimally | Performance work on, or refactors of, the Makefile |
Facts build systems need go in variables.yaml (a file type, say) |
Hand-kept tables about ORFS in downstream wrappers |
Keep do-<step> as the stable seam |
A second config format |
| Stage Tcl that runs both in its own process and sourced after the previous step | More hand-written multi-step Tcl files for new ranges |
The row about a second config format revises an earlier bazel-orfs plan (docs/plans/drop-make-dependency.md there), which recommended moving platform configs into Python one at a time. Treating config.mk itself as the language reaches the same goal with no edits to configs and no second source of truth.
Cleanups that fit today
Found by searching master for what nothing uses. Each is small, independent of the others, and independent of whether the rest of this RFC happens:
- #4876: four leftover
rules-base.jsonfiles that arrived after the rules check was removed. - #4877: the stubs for the removed rules targets in
utils.mk. - #4878:
flow/platforms/asap7/config.mkwithout$(eval), the one config that used it. - #4879:
mock-aluwithout a make target in itsdefaults.mk, the one design file that had one. - #4880: nine variables that only make reads are no longer exported to every recipe.
- #4881:
ADDITIONAL_TYP_LIBS,ADDITIONAL_FAST_LIBSandADDITIONAL_SLOW_LIBSdeclared invariables.yaml.
Open questions
- Is "a file inside the grammar means the same under GNU Make" the right rule, and for how long?
- How strict should unknown-variable checking be for private platforms that define their own variables? A per-platform
variables.yamlextension? BLOCKSis the one place the step graph is not a line. Recursion, or one graph?- Should a model of the flow (steps, their inputs and outputs, which variables hold files) be something ORFS publishes, so build systems stop keeping their own copy?
- Packaging as wheels raises size and licence questions (the
openroadbinary links GPLv3 OpenSTA) that need a proper review before anyone leans on them. - Does the shim stay forever? This draft says yes; it is a few lines.
- Who owns the release process for the packages?
- Does
--processstay a run-time option only, or can a design state a preference inconfig.mk? A run-time option keeps the config describing the design and not how it is run.
Comments on the direction are welcome; no action is asked for.
- Langage dominant
- Verilog
- Étoiles
- 836
- Forks
- 566
- Merge moyen
- 2 j 15 h
- PR mergées (30 j)
- 84
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de The-OpenROAD-Project/OpenROAD-flow-scripts
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 86/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4938 ·
Les mainteneurs répondent en général sous 1 jour
-
gf180: `-split_cuts {Metal3 0.128}` in the platform PDN config makes overlapping, off-grid Via2/Via3 cutsPeut-être à nouveau libre @gadfort l’a pris il y a 33 jours, et aucune pull request n’est ouverte. Ouvertepdn
Difficulté 2/5 1-3 heures Accessibilité débutants 71/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4754 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4739 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Make SYNTH_HDL_FRONTEND=slang defaultPeut-être à nouveau libre @jeffng-or l’a pris il y a 74 jours, et aucune pull request n’est ouverte. OuverteStale
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4548 · 2 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 56/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4940 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de The-OpenROAD-Project/OpenROAD-flow-scripts
Issues similaires
-
missing Git commit for 10.5-RC2Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
avaje/avaje-metrics#142 ·
-
enhancement github_actions good first issue
Difficulté 1/5 Moins d'une heure Accessibilité débutants 94/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
bazelbuild/apple_support#707 ·
Les mainteneurs répondent en général sous 1 jour
-
Security gate is red on mainOuvertesecurity
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
nimbus-agent/Nimbus#2319 ·
Les mainteneurs répondent en général sous 1 jour
-
Build fails with `compile-css`Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
nextjournal/clerk#830 ·