Repository navigation
Explicit diffusion and gate sharing in gLayout, with a three-PDK textbook benchmark - #127
Open
DonaldLucy wants to merge 7 commits into
Open
DonaldLucy wants to merge 7 commits into
DonaldLucy wants to merge 7 commits into
Conversation
A SharingPlan fixes, for one group of same-polarity transistors, the finger order, the orientations, which neighbouring fingers share a diffusion node and how the gates are tied into poly straps. validate_plan checks a plan before any geometry is drawn (structured errors), build_mos_group draws it for any MappedPDK, and the sharing that really happened is measured again on the drawn shapes. group_candidates / named_plans enumerate plans over six discrete axes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 textbook topologies on SKY130, GF180MCU and IHP SG13G2: size derivation and schematic qualification, row and channel assembly of the sharing groups, verification (official DRC decks, LVS, extracted-size check, R+C extraction, post-layout simulation against frozen specifications, blinded visual review), the plan-selection study with a plan-level cost rule, model sessions through a restricted plan interface, every analysis behind the results, and checks that rebuild recorded layouts. Runs in the pinned IIC-OSIC-TOOLS image with a locked Python environment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
data/: 639 case folders (sizing, frozen specification, qualification, target netlists, testbench), nominal design points and the frozen mode order. results/: the count ledger, every analysis table, the geometry check of all recorded layouts, and the run records (JSON and model text; GDS files and tool logs are rebuilt from the code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README with a worked example and quick start; design, parameter space, verification, data dictionary and model protocol; RESULTS.md and PARAMETER_SPACE.md are generated from the result tables. Short pointer in the top-level README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/reproduce_clean.sh on f204d32: five layouts exported, built and verified from scratch match the recorded geometry hash, area, status and every verification stage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Please don't merge this directly to the main repo. I was trying to open a new branch for this but seems like I don't have the permission |
The 4473 small files of data/cases made up most of the change set and pushed the code past the 3000 files that the pull-request view lists. They are now data/cases.tar.xz (unpack with `tar -xJf data/cases.tar.xz`); the tests stop with that hint when the folders are missing, and the full run and the clean reproduction unpack the archive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/reproduce_clean.sh on 41ed33d (case archive unpacked in the fresh export): the five layouts match the recorded geometry hash, area, status and every verification stage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 this adds
Base gLayout builds every transistor on its own: fingers of one transistor share diffusion, but two transistors never
share a diffusion node or a gate strap. This pull request adds such sharing to gLayout as an explicit, checkable plan,
and a benchmark that measures what sharing gains and what it costs.
src/glayout/sharing/(new package):SharingPlan(finger order, orientations, diffusion joins, gate straps),validate_plan(structured rejection before any geometry is drawn),build_mos_group(draws a group for anyMappedPDK; the sharing that really happened is measured again on the drawn shapes), and a six-axis enumeration withnamed modes.
benchmarks/textbook_sharing/: 18 textbook topologies x SKY130, GF180MCU, IHP SG13G2 x 12 size points; row andchannel assembly; verification with the official DRC decks, LVS, an extracted-size check, R+C extraction and
post-layout simulation against frozen specifications; a plan-selection study with a plan-level cost rule; language-model
sessions through a restricted plan interface; every analysis and the result tables.
README.md: a four-line pointer. No existing gLayout code is changed.Where to start
The 639 case folders and the run records are packed into two archives (
data/cases.tar.xz,results/run_records.tar.xz); unpack both first (README, quick start). The code is insrc/glayout/sharing/andbenchmarks/textbook_sharing/textbook_sharing/.benchmarks/textbook_sharing/README.md: the idea in one example (a five-transistor OTA), quick start.benchmarks/textbook_sharing/docs/DESIGN.md: how a plan is checked and drawn, the enumeration, the row assembler,where area goes, the cost rule, the selection study.
src/glayout/sharing/group.py(validate_plan,build_mos_group),evidence.py,enumeration.py;benchmark
layout.py,assembly/engine.py,verify/,selection/cost.py,llm/plan_parser.py.docs/PARAMETER_SPACE.md(process x size x plan, counts),docs/VERIFICATION.md,docs/DATA.md(every file andfield),
docs/MODELS.md(model protocol and audit),docs/RESULTS.md(all results with their source tables).Main results (from
results/, details indocs/RESULTS.md)increases over all modes, 19 come from routing and row assembly and 2 from a shared cell whose top-strap pads sit past
the row ends.
held-out pairs and finds a plan within 1.3 % of the best of a 64-plan catalogue with one verification.
interface limited to base gLayout, 41 of 42 sessions end at the unshared area.
How it was checked
All in the pinned container image, on the commits of this branch:
pytest(17 tests): plan legality and construction, enumeration counts, the program parser, rebuilt areas of therunning example, data counts, and that every number quoted in the documents equals the result tables.
python -m textbook_sharing.analysis.allrecomputes all result tables and the generated documents from the runrecords; afterwards
git statusis clean, so they are byte for byte the committed ones.scripts/reproduce_clean.shon41ed33d: five layouts exported withgit archive, built and verified from scratch,match the recorded geometry hash, area, status and every verification stage
(
results/analysis/repro_clean_20261012T140050Z.json).python -m textbook_sharing.analysis.geometry_checkrebuilds all 6159 recorded layouts: 6093 have the recordedgeometry hash, including every main-grid layout and every model proposal. The other 66 are SKY130 selection
candidates evaluated before the implant-bridge rule was added; they differ only by 0.35 um^2 of N+ implant, and a
full re-verification of all 66 with this code reproduces their recorded status, area and stage results
(
results/analysis/geometry_check_diagnosis.json).objective checks (official DRC/LVS, connectivity checks), stored in each record.
Not in this pull request
python -m textbook_sharing.run_case ... --from-record),and the raw model transcripts.
Known limits
One row-based assembler (another router could move the losses); bounding-box area; one size grid and no Monte Carlo;
the class-AB stage stays diagnostic; magic DRC is advisory; base gLayout in the interface comparison is emulated by one
restricted call; selection candidates outside the reported set were not reviewed visually.
🤖 Generated with Claude Code