build: Self-bootstrap the uv environment for make idma_hw_all#128
Merged
Conversation
DanielKellerM
commented
Jun 16, 2026
Generating the RTL needs Mako/peakrdl. Previously the caller had to set up the venv (uv sync + activate, or uv run make). Detect when those deps are not importable and provision a local .venv via uv sync --locked, prepending it to PATH. An activated venv or 'uv run make' (CI) is detected and left untouched, so behavior there is unchanged. Lets a consumer (e.g. a cluster) just call 'make -C $(bender path idma) idma_hw_all'. Requires uv on PATH.
65573d0 to
a490fbe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
make idma_hw_all(and the other generators) now provision their own Python environment. If Mako/peakrdl are not importable, a local.venvis created viauv sync --lockedand prepended to PATH. An already-activated venv oruv run make …(as in CI) is detected and left untouched, so existing flows are unchanged.Why
Downstream SoCs that pull iDMA via Bender (e.g. pulp_cluster) had to replicate the env setup —
uv sync+source .venv/bin/activate— before callingmake -C $(bender path idma) idma_hw_all. With this, the low-level handling lives in the IP and a consumer just calls:Notes
uvon PATH when cold; otherwise it errors with the install hint (no silentcurl | sh). uv is already a documented prerequisite..venv;uv run make idma_hw_allunchanged.Docs follow-up: simplify the quickstart build snippet (#119) to the bare
make idma_hw_allonce this lands.