feat(aig): make the vendored-PDK root configurable via JACQUARD_VENDOR_DIR#94
Open
robtaylor wants to merge 1 commit into
Open
feat(aig): make the vendored-PDK root configurable via JACQUARD_VENDOR_DIR#94robtaylor wants to merge 1 commit into
robtaylor wants to merge 1 commit into
Conversation
The gf180mcu/sky130 cell-library decomposition in `from_netlistdb_*` hardcoded the PDK functional-model path to `vendor/...` relative to the process CWD. A consumer that runs jacquard from a different working directory (e.g. embedding it as a submodule and invoking from the parent repo root) had no way to point at the vendored PDKs except to symlink `vendor/` into its CWD. Resolve the vendor root via a small helper that honours a new `JACQUARD_VENDOR_DIR` env var and defaults to `vendor` — so existing in-repo behaviour is unchanged, and downstream callers can set the env var instead of symlinking. Matches the existing `JACQUARD_*` runtime-knob convention. Updates the gf180 "PDK models required" panic hint to mention the env var, and unit-tests the (env-independent) resolution logic. Co-developed-by: Claude Code v2.1.159 (claude-opus-4-8)
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.
Problem
The gf180mcu / sky130 cell-library decomposition in
AIG::from_netlistdb_*(src/aig.rs) hardcodes the PDK functional-model path tovendor/..., resolved relative to the process CWD:This works when you run
jacquardfrom the repo root (where thevendor/submodule lives). But a consumer that embeds jacquard as a submodule and invokessim/cosimfrom the parent repo's working directory has no way to point at the vendored PDKs — the only workaround today is to symlinkvendor/into the parent CWD.Fix
Resolve the vendor root through a small helper that honours a new
JACQUARD_VENDOR_DIRenvironment variable and defaults tovendor:vendor/...).JACQUARD_*runtime-knob convention (JACQUARD_SRAM_DUMP, etc.).JACQUARD_VENDOR_DIR=path/to/jacquard/vendorinstead of symlinking.Tests
The env-independent resolution logic is split into a pure
pdk_vendor_root_from(Option<OsString>)and unit-tested (default + override).cargo test --lib pdk_vendor_rootis green.A CLI flag could later layer on top of the same helper if preferred; this PR keeps the change minimal and matches the established env-var pattern.