feat(packaging): add chipflow pin swap and chipflow pin show#168
Merged
feat(packaging): add chipflow pin swap and chipflow pin show#168
chipflow pin swap and chipflow pin show#168Conversation
Provide a primitive for editing pin allocations after `pin lock`: - `pin swap <a> <b>` exchanges two integer pin assignments in pins.lock. Bringup pins (everything under `_core`) are package-defined and refused. Non-integer pin packages (GA/BareDie) are reported clearly as not yet supported. - `pin show [-f text|svg] [-o FILE]` renders the current allocation. Text view works for any package type. SVG view draws a perimeter layout for Quad/Block, with empty slots rendered as `—`. Together these cover ad-hoc pin rearrangement without touching the JSON by hand.
|
|
The S edge used text-anchor="end" + rotate(90) so the START of each label landed inside the block (the rest dangling below). Switched to text-anchor="start" + rotate(90), matching the N edge's text-anchor="start" + rotate(-90), so glyphs always extend OUTWARD from the block on both edges. Also size canvas padding from the longest label so neither rotated labels nor the title get clipped at the canvas edge.
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.
Summary
chipflow pin swap <a> <b>exchanges two integer pin assignments inpins.lock; refuses bringup pins (under_core) and non-integer-pin packages (GA/BareDie) with clear errors.chipflow pin show [-f text|svg] [-o FILE]renders the current allocation. Text view works for any package type; SVG view draws a perimeter layout for Quad/Block, with empty slots shown as—.Test plan
pdm run pytest tests/test_pin_swap_show.py— 12 new tests pass (swap happy path, multi-bit-port swap, bringup refusal, unallocated pin refusal, persistence, non-int-pin refusal; text table contents/order; SVG basic shape, em-dash for empty slots, refusal for unsupported package types).tests/test_pin_lock.py,tests/test_block_package.py,tests/test_package_pins.pystill pass.ruff checkclean;pyrightclean onchipflow/packaging.Notes
QuadPackageDefandBlockPackageDef(perimeter geometry). Other types fall through totextcleanly.