diff --git a/README.md b/README.md index 37dad431..161b2efe 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,10 @@ For detailed documentation, please visit our [documentation site](https://glayou - Guard ring generation - And more... +### Diffusion and Gate Sharing +- Explicit sharing plans for groups of transistors (`glayout.sharing`): which fingers share a diffusion node and which gates share a poly strap, checked before any geometry is drawn +- A three-PDK benchmark of 18 textbook circuits with official DRC, LVS, extraction and post-layout simulation: [benchmarks/textbook_sharing](benchmarks/textbook_sharing/README.md) + ### Natural Language Processing/Large Language Model Framework - Convert natural language descriptions to layouts - Support for standard components diff --git a/benchmarks/textbook_sharing/.gitignore b/benchmarks/textbook_sharing/.gitignore new file mode 100644 index 00000000..62512687 --- /dev/null +++ b/benchmarks/textbook_sharing/.gitignore @@ -0,0 +1,4 @@ +# unpacked case folders (data/cases.tar.xz), unpacked run records or new runs, and the local Python environment +data/cases/ +runs/ +.env/ diff --git a/benchmarks/textbook_sharing/README.md b/benchmarks/textbook_sharing/README.md new file mode 100644 index 00000000..a02d1198 --- /dev/null +++ b/benchmarks/textbook_sharing/README.md @@ -0,0 +1,121 @@ +# Explicit diffusion and gate sharing in gLayout: a three-PDK textbook benchmark + +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. Analog layouts share both all the time: a differential pair and its tail +share one node, the transistors of a current mirror share their source and their gate. This work adds such sharing to +gLayout as an explicit, checkable **sharing plan** (`src/glayout/sharing/`) and measures what it gains and what it +costs on 18 textbook circuits in SKY130, GF180MCU and IHP SG13G2, with the official DRC decks, LVS, R+C extraction +and post-layout simulation against frozen specifications. + +## In one example + +The five-transistor OTA in SKY130 (C08, nominal size) has two sharing groups: M1-M3 (NMOS) and M4, M5 (PMOS). Its +unshared layout is 256.0 um^2. Sharing the tail node net23 across M1-M3 narrows the NMOS row, which sets the width. +Sharing VDD in the PMOS group narrows a row that does not set the width, so the area stays the same. One gate strap +for M4 and M5 lowers the PMOS row. Turning that strap toward the middle routing channel, which carries its net anyway, +removes the top channel: 196.1 um^2, 23.4 % smaller, with the gain (31.9 dB) and unity-gain frequency (32.2 MHz) +unchanged. The fixed mode "share both +kinds wherever possible" gives 246.0 um^2. So *where* a plan shares matters as much as *how much*: the side a strap +faces decides whether a routing channel is needed. Step by step, with the plans and the measured numbers: +[docs/RESULTS.md](docs/RESULTS.md#running-example). + +## What this pull request adds + +| path | content | +|---|---| +| `src/glayout/sharing/` | the gLayout extension: `SharingPlan`, `validate_plan`, `build_mos_group`, geometry evidence, plan enumeration ([API guide](../../src/glayout/sharing/README.md)) | +| `benchmarks/textbook_sharing/textbook_sharing/` | the benchmark: circuits, cases, row assembly, verification, plan-selection study, model sessions, analyses | +| `benchmarks/textbook_sharing/data/` | frozen inputs: 639 case folders (packed in `cases.tar.xz`), nominal design points, the frozen mode order | +| `benchmarks/textbook_sharing/results/` | the tables behind every number, and the run records (`run_records.tar.xz`) | +| `benchmarks/textbook_sharing/docs/` | design, parameter space, verification, data dictionary, model protocol, results | +| `benchmarks/textbook_sharing/tests/`, `scripts/` | tests; environment, container wrapper, full run, clean reproduction | + +Existing gLayout code is not changed; the top-level README gets a short pointer to this folder. + +## Documentation + +| document | read it for | +|---|---| +| [docs/DESIGN.md](docs/DESIGN.md) | how a plan is checked and drawn, the enumeration and named modes, the row assembler, where area goes, the cost rule, the selection study | +| [docs/PARAMETER_SPACE.md](docs/PARAMETER_SPACE.md) | the three levels (process, size, plan), per-topology plan counts and outcomes, the count ledger, the task sets | +| [docs/VERIFICATION.md](docs/VERIFICATION.md) | every check a layout passes, specification freezing, testbenches, changes made during the study, the visual review | +| [docs/DATA.md](docs/DATA.md) | every file and field, plan labels, what is not in the repository and how to regenerate it | +| [docs/MODELS.md](docs/MODELS.md) | the language-model protocol, isolation audit, the two references, what the interface comparison measures | +| [docs/RESULTS.md](docs/RESULTS.md) | all results, each with its source table (generated) | + +## Quick start + +Requirements: Linux x86-64 with Docker. The EDA tools and the three PDKs come from one pinned image +(`hpretl/iic-osic-tools@sha256:7ef29be7...`, about 5 GB; full digest in `scripts/run_in_container.sh`). The Python +environment (Python 3.11.17 and the packages of `requirements-lock.txt`) takes about 1 GB. All commands run from +`benchmarks/textbook_sharing/`. + +```bash +scripts/setup_env.sh # Python environment in .env/ (micromamba, pinned versions) +tar -xJf data/cases.tar.xz # the case folders, into data/cases/ +tar -xJf results/run_records.tar.xz # the run records, into runs/ +scripts/run_in_container.sh "python -m pytest -q tests" +``` + +Recompute every table and the generated documents from the run records, then compare with the committed ones: + +```bash +scripts/run_in_container.sh "python -m textbook_sharing.analysis.all" +git status --short results docs # expected: no change +``` + +Rebuild and verify one recorded layout from scratch (geometry, DRC, LVS, extraction, post-layout simulation), here +the best OTA plan of the example: + +```bash +scripts/run_in_container.sh "python -m textbook_sharing.run_case data/cases/C08/sky130/sW1_sL1 runs/check/best \ + --from-record runs/selection/C08_sky130_sW1_sL1/c15f7f08c7b4/result.json" +``` + +Rebuild the geometry of every recorded layout and compare it with the records (about 40 minutes with 20 processes: +most layouts take under a second, but some large telescopic-OTA plans take minutes to assemble): + +```bash +scripts/run_in_container.sh "python -m textbook_sharing.analysis.geometry_check --jobs 16 --out runs/geometry_check.json" +``` + +Reproduce a few cases in a fresh export of the committed tree (`git archive HEAD`), with nothing copied from the +records: `scripts/reproduce_clean.sh`. The whole benchmark, in the order of the protocol: `JOBS=16 scripts/run_all.sh` +(days of CPU time; the model sessions are separate, see [docs/MODELS.md](docs/MODELS.md)). + +## Using the sharing plan directly + +```python +from glayout.pdk.sky130_mapped import sky130_mapped_pdk as pdk +from glayout.sharing import DeviceSpec, SharingPlan, FingerRef, GateGroup, build_mos_group + +m4 = DeviceSpec("M4", "pfet", d="net22", g="net22", s="VDD", b="VDD", width_total=2.0, length=0.3, nf=4) +m5 = DeviceSpec("M5", "pfet", d="VOUT1", g="net22", s="VDD", b="VDD", width_total=2.0, length=0.3, nf=4) +plan = SharingPlan(finger_order=[FingerRef("M4", k) for k in range(4)] + [FingerRef("M5", k) for k in range(4)], + orientations=["SD", "DS"] * 4, diffusion_joins=[True] * 7, + gate_groups=[GateGroup(tuple(range(8)), "top", "right")]) +res = build_mos_group(pdk, [m4, m5], plan=plan, name="pmos_mirror") # res.component is a gLayout component +``` + +More in the [API guide](../../src/glayout/sharing/README.md). + +## Main findings + +Numbers and sources: [docs/RESULTS.md](docs/RESULTS.md). + +* 648 requests (18 topologies x 3 PDKs x 12 sizes) give 547 formal entries in 17 topologies; 13 topologies admit + sharing across transistors. +* Sharing both diffusion and gates makes 279 of 321 verified layouts smaller (mean -5.5 %, up to -18.4 %). Of the 21 + area increases over all modes, 19 come from routing and row assembly (extra tracks, or width to keep the metal-2 + stubs of two rows apart) and 2 from a shared cell whose top-strap pads sit past the row ends. +* A plan-level cost rule, frozen on two development sizes, predicts the sign of the area change for 91 % of the pairs + at the ten held-out sizes and finds a plan within 1.3 % of the best of a 64-plan catalogue with one verification. +* Language models given the interface reach layouts beyond that catalogue in 16 of 28 tasks; with an interface + limited to base gLayout, 41 of 42 sessions end at the unshared area. + +## 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; the catalogue samples an enumeration that misses plans the models found; selection candidates outside +the reported set were not reviewed visually. diff --git a/benchmarks/textbook_sharing/data/cases.tar.xz b/benchmarks/textbook_sharing/data/cases.tar.xz new file mode 100644 index 00000000..eb86e4c7 Binary files /dev/null and b/benchmarks/textbook_sharing/data/cases.tar.xz differ diff --git a/benchmarks/textbook_sharing/data/frozen/fixed_order.json b/benchmarks/textbook_sharing/data/frozen/fixed_order.json new file mode 100644 index 00000000..b68a1eaf --- /dev/null +++ b/benchmarks/textbook_sharing/data/frozen/fixed_order.json @@ -0,0 +1,36 @@ +{ + "order": [ + "combined", + "gate_only", + "diffusion_only", + "independent" + ], + "per_mode": { + "diffusion_only": { + "applicable": 75, + "passed": 74, + "pass_rate": 0.9866666666666667, + "n_paired": 74, + "mean_rel_area": -0.024349224362344435 + }, + "gate_only": { + "applicable": 57, + "passed": 56, + "pass_rate": 0.9824561403508771, + "n_paired": 56, + "mean_rel_area": -0.04540359657543676 + }, + "combined": { + "applicable": 57, + "passed": 55, + "pass_rate": 0.9649122807017544, + "n_paired": 55, + "mean_rel_area": -0.05471477540677514 + } + }, + "sizes": [ + "sW1_sL1", + "sW1_sL1.5" + ], + "rule": "For each sharing mode m, over the development cases where both m and independent passed every automatic stage, take the mean of (A_m / A_independent - 1); order the modes by that mean ascending (ties: higher pass rate first); 'independent' is always last. Declared before the development results were read; computed from the development sizes only and frozen before any held-out size was measured." +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C01/gf180.json b/benchmarks/textbook_sharing/data/nominal/C01/gf180.json new file mode 100644 index 00000000..6d5155a1 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C01/gf180.json @@ -0,0 +1,34 @@ +{ + "circuit_id": "C01", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 2.0, + "l": 1.12, + "nf": 4 + }, + "M2": { + "w": 2.0, + "l": 1.12, + "nf": 4 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "IB1": { + "i": 2e-05, + "from": "VDD" + }, + "IREF": 2e-05 + }, + "load": { + "vout_nom": 1.65, + "tol": 0.05 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C01/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C01/ihp130.json new file mode 100644 index 00000000..946c1579 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C01/ihp130.json @@ -0,0 +1,34 @@ +{ + "circuit_id": "C01", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 2.0, + "l": 1.04, + "nf": 4 + }, + "M2": { + "w": 2.0, + "l": 1.04, + "nf": 4 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "IB1": { + "i": 2e-05, + "from": "VDD" + }, + "IREF": 2e-05 + }, + "load": { + "vout_nom": 0.6, + "tol": 0.05 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C01/sky130.json b/benchmarks/textbook_sharing/data/nominal/C01/sky130.json new file mode 100644 index 00000000..6451f62f --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C01/sky130.json @@ -0,0 +1,34 @@ +{ + "circuit_id": "C01", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.6, + "nf": 4 + }, + "M2": { + "w": 2.0, + "l": 0.6, + "nf": 4 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "IB1": { + "i": 2e-05, + "from": "VDD" + }, + "IREF": 2e-05 + }, + "load": { + "vout_nom": 0.9, + "tol": 0.05 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C02/gf180.json b/benchmarks/textbook_sharing/data/nominal/C02/gf180.json new file mode 100644 index 00000000..100a9be7 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C02/gf180.json @@ -0,0 +1,44 @@ +{ + "circuit_id": "C02", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.56, + "nf": 4 + }, + "M2": { + "w": 2.0, + "l": 0.56, + "nf": 4 + }, + "M3": { + "w": 2.0, + "l": 0.56, + "nf": 4 + }, + "M4": { + "w": 2.0, + "l": 0.56, + "nf": 4 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "IIN1": { + "i": 2e-05, + "from": "VDD" + }, + "IREF": 2e-05 + }, + "load": { + "vout_nom": 2.145, + "tol": 0.03 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C02/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C02/ihp130.json new file mode 100644 index 00000000..f30f1baa --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C02/ihp130.json @@ -0,0 +1,44 @@ +{ + "circuit_id": "C02", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.52, + "nf": 4 + }, + "M2": { + "w": 2.0, + "l": 0.52, + "nf": 4 + }, + "M3": { + "w": 2.0, + "l": 0.52, + "nf": 4 + }, + "M4": { + "w": 2.0, + "l": 0.52, + "nf": 4 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "IIN1": { + "i": 2e-05, + "from": "VDD" + }, + "IREF": 2e-05 + }, + "load": { + "vout_nom": 0.78, + "tol": 0.03 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C02/sky130.json b/benchmarks/textbook_sharing/data/nominal/C02/sky130.json new file mode 100644 index 00000000..42ad4efc --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C02/sky130.json @@ -0,0 +1,44 @@ +{ + "circuit_id": "C02", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.3, + "nf": 4 + }, + "M2": { + "w": 2.0, + "l": 0.3, + "nf": 4 + }, + "M3": { + "w": 2.0, + "l": 0.3, + "nf": 4 + }, + "M4": { + "w": 2.0, + "l": 0.3, + "nf": 4 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "IIN1": { + "i": 2e-05, + "from": "VDD" + }, + "IREF": 2e-05 + }, + "load": { + "vout_nom": 1.1700000000000002, + "tol": 0.03 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C03/gf180.json b/benchmarks/textbook_sharing/data/nominal/C03/gf180.json new file mode 100644 index 00000000..7f40fa41 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C03/gf180.json @@ -0,0 +1,39 @@ +{ + "circuit_id": "C03", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 4.0, + "l": 2.24, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 2.24, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 2.24, + "nf": 8 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "IIN1": { + "i": 2e-05, + "from": "VDD" + }, + "IREF": 2e-05 + }, + "load": { + "vout_nom": 2.145, + "tol": 0.1 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C03/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C03/ihp130.json new file mode 100644 index 00000000..1b1db194 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C03/ihp130.json @@ -0,0 +1,39 @@ +{ + "circuit_id": "C03", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 4.0, + "l": 2.08, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 2.08, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 2.08, + "nf": 8 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "IIN1": { + "i": 2e-05, + "from": "VDD" + }, + "IREF": 2e-05 + }, + "load": { + "vout_nom": 0.78, + "tol": 0.1 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C03/sky130.json b/benchmarks/textbook_sharing/data/nominal/C03/sky130.json new file mode 100644 index 00000000..1f14bac0 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C03/sky130.json @@ -0,0 +1,39 @@ +{ + "circuit_id": "C03", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 4.0, + "l": 1.2, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 1.2, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 1.2, + "nf": 8 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "IIN1": { + "i": 2e-05, + "from": "VDD" + }, + "IREF": 2e-05 + }, + "load": { + "vout_nom": 1.1700000000000002, + "tol": 0.1 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C04/gf180.json b/benchmarks/textbook_sharing/data/nominal/C04/gf180.json new file mode 100644 index 00000000..d71ba661 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C04/gf180.json @@ -0,0 +1,32 @@ +{ + "circuit_id": "C04", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M2": { + "w": 2.0, + "l": 0.56, + "nf": 4 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M1", + "current": 2e-05 + } + }, + "load": { + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C04/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C04/ihp130.json new file mode 100644 index 00000000..8f90390c --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C04/ihp130.json @@ -0,0 +1,32 @@ +{ + "circuit_id": "C04", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "M2": { + "w": 2.0, + "l": 0.26, + "nf": 4 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M1", + "current": 2e-05 + } + }, + "load": { + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C04/sky130.json b/benchmarks/textbook_sharing/data/nominal/C04/sky130.json new file mode 100644 index 00000000..44068d8f --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C04/sky130.json @@ -0,0 +1,32 @@ +{ + "circuit_id": "C04", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M2": { + "w": 2.0, + "l": 0.3, + "nf": 4 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M1", + "current": 2e-05 + } + }, + "load": { + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C05/gf180.json b/benchmarks/textbook_sharing/data/nominal/C05/gf180.json new file mode 100644 index 00000000..3a70f543 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C05/gf180.json @@ -0,0 +1,34 @@ +{ + "circuit_id": "C05", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.56, + "nf": 4 + }, + "M2": { + "w": 4.0, + "l": 0.56, + "nf": 8 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M1", + "current": 2e-05 + } + }, + "load": { + "vin_nom": 2.145, + "RL": 20000.0, + "CL": 1e-12 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C05/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C05/ihp130.json new file mode 100644 index 00000000..af3a5830 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C05/ihp130.json @@ -0,0 +1,34 @@ +{ + "circuit_id": "C05", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.26, + "nf": 4 + }, + "M2": { + "w": 4.0, + "l": 0.26, + "nf": 8 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M1", + "current": 2e-05 + } + }, + "load": { + "vin_nom": 0.78, + "RL": 20000.0, + "CL": 1e-12 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C05/sky130.json b/benchmarks/textbook_sharing/data/nominal/C05/sky130.json new file mode 100644 index 00000000..07807ab3 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C05/sky130.json @@ -0,0 +1,34 @@ +{ + "circuit_id": "C05", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.3, + "nf": 4 + }, + "M2": { + "w": 4.0, + "l": 0.3, + "nf": 8 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M1", + "current": 2e-05 + } + }, + "load": { + "vin_nom": 1.1700000000000002, + "RL": 20000.0, + "CL": 1e-12 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C06/gf180.json b/benchmarks/textbook_sharing/data/nominal/C06/gf180.json new file mode 100644 index 00000000..8f9b2215 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C06/gf180.json @@ -0,0 +1,52 @@ +{ + "circuit_id": "C06", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M3": { + "w": 2.0, + "l": 0.56, + "nf": 4 + }, + "M4": { + "w": 2.0, + "l": 0.56, + "nf": 4 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M4", + "current": 2e-05, + "kind": "cascode" + }, + "VB2": { + "replica": "M1", + "current": 2e-05, + "kind": "cascode" + }, + "VB3": { + "replica": "M2", + "current": 2e-05 + } + }, + "load": { + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C06/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C06/ihp130.json new file mode 100644 index 00000000..cacedb1f --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C06/ihp130.json @@ -0,0 +1,52 @@ +{ + "circuit_id": "C06", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "M3": { + "w": 2.0, + "l": 0.26, + "nf": 4 + }, + "M4": { + "w": 2.0, + "l": 0.26, + "nf": 4 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M4", + "current": 2e-05, + "kind": "cascode" + }, + "VB2": { + "replica": "M1", + "current": 2e-05, + "kind": "cascode" + }, + "VB3": { + "replica": "M2", + "current": 2e-05 + } + }, + "load": { + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C06/sky130.json b/benchmarks/textbook_sharing/data/nominal/C06/sky130.json new file mode 100644 index 00000000..83959d0f --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C06/sky130.json @@ -0,0 +1,52 @@ +{ + "circuit_id": "C06", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M3": { + "w": 2.0, + "l": 0.3, + "nf": 4 + }, + "M4": { + "w": 2.0, + "l": 0.3, + "nf": 4 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M4", + "current": 2e-05, + "kind": "cascode" + }, + "VB2": { + "replica": "M1", + "current": 2e-05, + "kind": "cascode" + }, + "VB3": { + "replica": "M2", + "current": 2e-05 + } + }, + "load": { + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C07/gf180.json b/benchmarks/textbook_sharing/data/nominal/C07/gf180.json new file mode 100644 index 00000000..79338835 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C07/gf180.json @@ -0,0 +1,48 @@ +{ + "circuit_id": "C07", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M4": { + "w": 4.0, + "l": 0.56, + "nf": 8 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M3", + "current": 2e-05 + }, + "IB1": { + "i": 4e-05, + "from": "VSS" + } + }, + "load": { + "vcm": 1.5, + "CL": 1e-13, + "vocm": 1.65 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C07/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C07/ihp130.json new file mode 100644 index 00000000..36f37030 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C07/ihp130.json @@ -0,0 +1,48 @@ +{ + "circuit_id": "C07", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "M4": { + "w": 4.0, + "l": 0.26, + "nf": 8 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M3", + "current": 2e-05 + }, + "IB1": { + "i": 4e-05, + "from": "VSS" + } + }, + "load": { + "vcm": 0.6, + "CL": 1e-13, + "vocm": 0.6 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C07/sky130.json b/benchmarks/textbook_sharing/data/nominal/C07/sky130.json new file mode 100644 index 00000000..199a4701 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C07/sky130.json @@ -0,0 +1,48 @@ +{ + "circuit_id": "C07", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M4": { + "w": 4.0, + "l": 0.3, + "nf": 8 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M3", + "current": 2e-05 + }, + "IB1": { + "i": 4e-05, + "from": "VSS" + } + }, + "load": { + "vcm": 0.9, + "CL": 1e-13, + "vocm": 0.9 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C08/gf180.json b/benchmarks/textbook_sharing/data/nominal/C08/gf180.json new file mode 100644 index 00000000..e2d4e022 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C08/gf180.json @@ -0,0 +1,49 @@ +{ + "circuit_id": "C08", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M4": { + "w": 2.0, + "l": 0.56, + "nf": 4 + }, + "M5": { + "w": 2.0, + "l": 0.56, + "nf": 4 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M3", + "current": 4e-05 + } + }, + "load": { + "vcm": 1.5, + "CL": 1e-12, + "inv_input": "VIN2" + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C08/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C08/ihp130.json new file mode 100644 index 00000000..3289a678 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C08/ihp130.json @@ -0,0 +1,49 @@ +{ + "circuit_id": "C08", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.39, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.39, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.39, + "nf": 8 + }, + "M4": { + "w": 2.0, + "l": 0.39, + "nf": 4 + }, + "M5": { + "w": 2.0, + "l": 0.39, + "nf": 4 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M3", + "current": 4e-05 + } + }, + "load": { + "vcm": 0.6, + "CL": 1e-12, + "inv_input": "VIN2" + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C08/sky130.json b/benchmarks/textbook_sharing/data/nominal/C08/sky130.json new file mode 100644 index 00000000..fc6b3356 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C08/sky130.json @@ -0,0 +1,49 @@ +{ + "circuit_id": "C08", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M4": { + "w": 2.0, + "l": 0.3, + "nf": 4 + }, + "M5": { + "w": 2.0, + "l": 0.3, + "nf": 4 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M3", + "current": 4e-05 + } + }, + "load": { + "vcm": 0.9, + "CL": 1e-12, + "inv_input": "VIN2" + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C09/gf180.json b/benchmarks/textbook_sharing/data/nominal/C09/gf180.json new file mode 100644 index 00000000..59b0934d --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C09/gf180.json @@ -0,0 +1,76 @@ +{ + "circuit_id": "C09", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M4": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M5": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M6": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M7": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M8": { + "w": 4.0, + "l": 0.56, + "nf": 8 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M3", + "current": 2e-05, + "kind": "cascode" + }, + "IB1": { + "i": 4e-05, + "from": "VSS" + } + }, + "load": { + "vcm": { + "expr": "v(VB1) - gs(M3) + gs(M1) - 0.1", + "currents": { + "M3": 2e-05, + "M1": 2e-05 + } + }, + "CL": 1e-12, + "inv_input": "VIN2", + "vout_target": 1.4849999999999999 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C09/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C09/ihp130.json new file mode 100644 index 00000000..e4f206e3 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C09/ihp130.json @@ -0,0 +1,76 @@ +{ + "circuit_id": "C09", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 8.0, + "l": 0.26, + "nf": 16 + }, + "M2": { + "w": 8.0, + "l": 0.26, + "nf": 16 + }, + "M3": { + "w": 8.0, + "l": 0.26, + "nf": 16 + }, + "M4": { + "w": 8.0, + "l": 0.26, + "nf": 16 + }, + "M5": { + "w": 16.0, + "l": 0.26, + "nf": 32 + }, + "M6": { + "w": 16.0, + "l": 0.26, + "nf": 32 + }, + "M7": { + "w": 16.0, + "l": 0.26, + "nf": 32 + }, + "M8": { + "w": 16.0, + "l": 0.26, + "nf": 32 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M3", + "current": 1e-05, + "kind": "cascode" + }, + "IB1": { + "i": 2e-05, + "from": "VSS" + } + }, + "load": { + "vcm": { + "expr": "v(VB1) - gs(M3) + gs(M1) - 0.1", + "currents": { + "M3": 1e-05, + "M1": 1e-05 + } + }, + "CL": 1e-12, + "inv_input": "VIN2", + "vout_target": 0.54 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C09/sky130.json b/benchmarks/textbook_sharing/data/nominal/C09/sky130.json new file mode 100644 index 00000000..7b4d3df2 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C09/sky130.json @@ -0,0 +1,76 @@ +{ + "circuit_id": "C09", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 8.0, + "l": 0.3, + "nf": 16 + }, + "M2": { + "w": 8.0, + "l": 0.3, + "nf": 16 + }, + "M3": { + "w": 8.0, + "l": 0.3, + "nf": 16 + }, + "M4": { + "w": 8.0, + "l": 0.3, + "nf": 16 + }, + "M5": { + "w": 16.0, + "l": 0.3, + "nf": 32 + }, + "M6": { + "w": 16.0, + "l": 0.3, + "nf": 32 + }, + "M7": { + "w": 16.0, + "l": 0.3, + "nf": 32 + }, + "M8": { + "w": 16.0, + "l": 0.3, + "nf": 32 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M3", + "current": 1e-05, + "kind": "cascode" + }, + "IB1": { + "i": 2e-05, + "from": "VSS" + } + }, + "load": { + "vcm": { + "expr": "v(VB1) - gs(M3) + gs(M1) - 0.1", + "currents": { + "M3": 1e-05, + "M1": 1e-05 + } + }, + "CL": 1e-12, + "inv_input": "VIN2", + "vout_target": 0.81 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C10/gf180.json b/benchmarks/textbook_sharing/data/nominal/C10/gf180.json new file mode 100644 index 00000000..44af3438 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C10/gf180.json @@ -0,0 +1,93 @@ +{ + "circuit_id": "C10", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M4": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M5": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M6": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M7": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M8": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M9": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M10": { + "w": 4.0, + "l": 0.56, + "nf": 8 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M5", + "current": 2e-05, + "kind": "cascode3" + }, + "VB2": { + "replica": "M7", + "current": 2e-05, + "kind": "cascode3" + }, + "VB3": { + "replica": "M9", + "current": 2e-05 + }, + "VB4": { + "replica": "M3", + "current": 4e-05 + }, + "IB1": { + "i": 4e-05, + "from": "VDD" + } + }, + "load": { + "vcm": 1.5, + "CL": 5e-13, + "cmfb_gain": 20.0, + "vocm": 1.65 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C10/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C10/ihp130.json new file mode 100644 index 00000000..542a0108 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C10/ihp130.json @@ -0,0 +1,93 @@ +{ + "circuit_id": "C10", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.52, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.52, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.52, + "nf": 8 + }, + "M4": { + "w": 4.0, + "l": 0.52, + "nf": 8 + }, + "M5": { + "w": 4.0, + "l": 0.52, + "nf": 8 + }, + "M6": { + "w": 4.0, + "l": 0.52, + "nf": 8 + }, + "M7": { + "w": 4.0, + "l": 0.52, + "nf": 8 + }, + "M8": { + "w": 4.0, + "l": 0.52, + "nf": 8 + }, + "M9": { + "w": 4.0, + "l": 0.52, + "nf": 8 + }, + "M10": { + "w": 4.0, + "l": 0.52, + "nf": 8 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M5", + "current": 2e-05, + "kind": "cascode3" + }, + "VB2": { + "replica": "M7", + "current": 2e-05, + "kind": "cascode3" + }, + "VB3": { + "replica": "M9", + "current": 2e-05 + }, + "VB4": { + "replica": "M3", + "current": 4e-05 + }, + "IB1": { + "i": 4e-05, + "from": "VDD" + } + }, + "load": { + "vcm": 0.6, + "CL": 5e-13, + "cmfb_gain": 20.0, + "vocm": 0.6 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C10/sky130.json b/benchmarks/textbook_sharing/data/nominal/C10/sky130.json new file mode 100644 index 00000000..3a3ba6f1 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C10/sky130.json @@ -0,0 +1,93 @@ +{ + "circuit_id": "C10", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.6, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.6, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.6, + "nf": 8 + }, + "M4": { + "w": 4.0, + "l": 0.6, + "nf": 8 + }, + "M5": { + "w": 4.0, + "l": 0.6, + "nf": 8 + }, + "M6": { + "w": 4.0, + "l": 0.6, + "nf": 8 + }, + "M7": { + "w": 4.0, + "l": 0.6, + "nf": 8 + }, + "M8": { + "w": 4.0, + "l": 0.6, + "nf": 8 + }, + "M9": { + "w": 4.0, + "l": 0.6, + "nf": 8 + }, + "M10": { + "w": 4.0, + "l": 0.6, + "nf": 8 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M5", + "current": 2e-05, + "kind": "cascode3" + }, + "VB2": { + "replica": "M7", + "current": 2e-05, + "kind": "cascode3" + }, + "VB3": { + "replica": "M9", + "current": 2e-05 + }, + "VB4": { + "replica": "M3", + "current": 4e-05 + }, + "IB1": { + "i": 4e-05, + "from": "VDD" + } + }, + "load": { + "vcm": 0.9, + "CL": 5e-13, + "cmfb_gain": 20.0, + "vocm": 0.9 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C11/gf180.json b/benchmarks/textbook_sharing/data/nominal/C11/gf180.json new file mode 100644 index 00000000..289a68a2 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C11/gf180.json @@ -0,0 +1,77 @@ +{ + "circuit_id": "C11", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.56, + "nf": 4 + }, + "M2": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M4": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M5": { + "w": 2.0, + "l": 0.56, + "nf": 4 + }, + "M6": { + "w": 2.0, + "l": 0.56, + "nf": 4 + }, + "M7": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M8": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "R1": { + "r": 3000.0, + "body": "VSS", + "w": 1.0, + "l": 7.795 + }, + "C1": { + "c": 1e-12, + "w": 22.365, + "l": 22.365, + "model": "cap_mim_2f0fF" + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "IB1": { + "i": 2e-05, + "from": "VSS" + } + }, + "load": { + "vcm": 1.32, + "CL": 1e-12, + "inv_input": "VIN1", + "vout_target": 1.65 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C11/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C11/ihp130.json new file mode 100644 index 00000000..5d1c2d64 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C11/ihp130.json @@ -0,0 +1,77 @@ +{ + "circuit_id": "C11", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.26, + "nf": 4 + }, + "M2": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "M4": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "M5": { + "w": 2.0, + "l": 0.26, + "nf": 4 + }, + "M6": { + "w": 2.0, + "l": 0.26, + "nf": 4 + }, + "M7": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "M8": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "R1": { + "r": 3000.0, + "body": "VSS", + "w": 1.0, + "l": 11.38 + }, + "C1": { + "c": 1e-12, + "w": 25.82, + "l": 25.82, + "model": "cap_cmim" + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "IB1": { + "i": 2e-05, + "from": "VSS" + } + }, + "load": { + "vcm": 0.48, + "CL": 1e-12, + "inv_input": "VIN1", + "vout_target": 0.6 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C11/sky130.json b/benchmarks/textbook_sharing/data/nominal/C11/sky130.json new file mode 100644 index 00000000..972e79fa --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C11/sky130.json @@ -0,0 +1,77 @@ +{ + "circuit_id": "C11", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.3, + "nf": 4 + }, + "M2": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M4": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M5": { + "w": 2.0, + "l": 0.3, + "nf": 4 + }, + "M6": { + "w": 2.0, + "l": 0.3, + "nf": 4 + }, + "M7": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M8": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "R1": { + "r": 3000.0, + "body": "VSS", + "w": 0.35, + "l": 2.155 + }, + "C1": { + "c": 1e-12, + "w": 22.365, + "l": 22.365, + "model": "sky130_fd_pr__cap_mim_m3_1" + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "IB1": { + "i": 2e-05, + "from": "VSS" + } + }, + "load": { + "vcm": 0.7200000000000001, + "CL": 1e-12, + "inv_input": "VIN1", + "vout_target": 0.9 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C12/gf180.json b/benchmarks/textbook_sharing/data/nominal/C12/gf180.json new file mode 100644 index 00000000..e854f149 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C12/gf180.json @@ -0,0 +1,27 @@ +{ + "circuit_id": "C12", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.56, + "nf": 4 + }, + "M2": { + "w": 4.0, + "l": 0.56, + "nf": 8 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": {}, + "load": { + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C12/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C12/ihp130.json new file mode 100644 index 00000000..b56957fe --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C12/ihp130.json @@ -0,0 +1,27 @@ +{ + "circuit_id": "C12", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.26, + "nf": 4 + }, + "M2": { + "w": 4.0, + "l": 0.26, + "nf": 8 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": {}, + "load": { + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C12/sky130.json b/benchmarks/textbook_sharing/data/nominal/C12/sky130.json new file mode 100644 index 00000000..d615edb3 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C12/sky130.json @@ -0,0 +1,27 @@ +{ + "circuit_id": "C12", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.3, + "nf": 4 + }, + "M2": { + "w": 4.0, + "l": 0.3, + "nf": 8 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": {}, + "load": { + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C13/gf180.json b/benchmarks/textbook_sharing/data/nominal/C13/gf180.json new file mode 100644 index 00000000..1e68ad00 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C13/gf180.json @@ -0,0 +1,53 @@ +{ + "circuit_id": "C13", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 0.5, + "l": 0.56, + "nf": 1 + }, + "M2": { + "w": 2.0, + "l": 0.56, + "nf": 4 + }, + "M3": { + "w": 2.0, + "l": 0.56, + "nf": 4 + }, + "M4": { + "w": 2.0, + "l": 0.56, + "nf": 4 + }, + "M5": { + "w": 2.0, + "l": 0.56, + "nf": 4 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "IB1": { + "i": 2e-05, + "from": "VDD" + }, + "IIN1": { + "i": 2e-05, + "from": "VDD" + }, + "IREF": 2e-05 + }, + "load": { + "vout_nom": 1.65, + "tol": 0.03 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C13/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C13/ihp130.json new file mode 100644 index 00000000..3a972577 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C13/ihp130.json @@ -0,0 +1,53 @@ +{ + "circuit_id": "C13", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 0.5, + "l": 0.52, + "nf": 1 + }, + "M2": { + "w": 2.0, + "l": 0.52, + "nf": 4 + }, + "M3": { + "w": 2.0, + "l": 0.52, + "nf": 4 + }, + "M4": { + "w": 2.0, + "l": 0.52, + "nf": 4 + }, + "M5": { + "w": 2.0, + "l": 0.52, + "nf": 4 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "IB1": { + "i": 2e-05, + "from": "VDD" + }, + "IIN1": { + "i": 2e-05, + "from": "VDD" + }, + "IREF": 2e-05 + }, + "load": { + "vout_nom": 0.6, + "tol": 0.03 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C13/sky130.json b/benchmarks/textbook_sharing/data/nominal/C13/sky130.json new file mode 100644 index 00000000..cab9c1ca --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C13/sky130.json @@ -0,0 +1,53 @@ +{ + "circuit_id": "C13", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 0.5, + "l": 0.3, + "nf": 1 + }, + "M2": { + "w": 2.0, + "l": 0.3, + "nf": 4 + }, + "M3": { + "w": 2.0, + "l": 0.3, + "nf": 4 + }, + "M4": { + "w": 2.0, + "l": 0.3, + "nf": 4 + }, + "M5": { + "w": 2.0, + "l": 0.3, + "nf": 4 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "IB1": { + "i": 2e-05, + "from": "VDD" + }, + "IIN1": { + "i": 2e-05, + "from": "VDD" + }, + "IREF": 2e-05 + }, + "load": { + "vout_nom": 0.9, + "tol": 0.03 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C14/gf180.json b/benchmarks/textbook_sharing/data/nominal/C14/gf180.json new file mode 100644 index 00000000..05b70870 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C14/gf180.json @@ -0,0 +1,48 @@ +{ + "circuit_id": "C14", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 2.0, + "l": 1.12, + "nf": 4 + }, + "M2": { + "w": 2.0, + "l": 1.12, + "nf": 4 + }, + "M3": { + "w": 1.0, + "l": 1.12, + "nf": 2 + }, + "M4": { + "w": 2.0, + "l": 1.12, + "nf": 4 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "IIN1": { + "i": 2e-05, + "from": "VDD" + }, + "IREF1": { + "i": 5e-06, + "from": "VDD" + }, + "IREF": 2e-05 + }, + "load": { + "vout_nom": 2.145, + "tol": 0.03 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C14/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C14/ihp130.json new file mode 100644 index 00000000..4ac1a17b --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C14/ihp130.json @@ -0,0 +1,48 @@ +{ + "circuit_id": "C14", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 2.0, + "l": 1.04, + "nf": 4 + }, + "M2": { + "w": 2.0, + "l": 1.04, + "nf": 4 + }, + "M3": { + "w": 1.0, + "l": 1.04, + "nf": 2 + }, + "M4": { + "w": 2.0, + "l": 1.04, + "nf": 4 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "IIN1": { + "i": 2e-05, + "from": "VDD" + }, + "IREF1": { + "i": 5e-06, + "from": "VDD" + }, + "IREF": 2e-05 + }, + "load": { + "vout_nom": 0.78, + "tol": 0.03 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C14/sky130.json b/benchmarks/textbook_sharing/data/nominal/C14/sky130.json new file mode 100644 index 00000000..a7817d1b --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C14/sky130.json @@ -0,0 +1,48 @@ +{ + "circuit_id": "C14", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.6, + "nf": 4 + }, + "M2": { + "w": 2.0, + "l": 0.6, + "nf": 4 + }, + "M3": { + "w": 1.0, + "l": 0.6, + "nf": 2 + }, + "M4": { + "w": 2.0, + "l": 0.6, + "nf": 4 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "IIN1": { + "i": 2e-05, + "from": "VDD" + }, + "IREF1": { + "i": 5e-06, + "from": "VDD" + }, + "IREF": 2e-05 + }, + "load": { + "vout_nom": 1.1700000000000002, + "tol": 0.03 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C15/gf180.json b/benchmarks/textbook_sharing/data/nominal/C15/gf180.json new file mode 100644 index 00000000..654023ba --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C15/gf180.json @@ -0,0 +1,28 @@ +{ + "circuit_id": "C15", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.56, + "nf": 4 + }, + "R1": { + "r": 40000.0, + "body": "VSS", + "w": 1.0, + "l": 60.0 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": {}, + "load": { + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C15/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C15/ihp130.json new file mode 100644 index 00000000..941a22f7 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C15/ihp130.json @@ -0,0 +1,28 @@ +{ + "circuit_id": "C15", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.26, + "nf": 4 + }, + "R1": { + "r": 12000.0, + "body": "VSS", + "w": 1.0, + "l": 46.385 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": {}, + "load": { + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C15/sky130.json b/benchmarks/textbook_sharing/data/nominal/C15/sky130.json new file mode 100644 index 00000000..a589da11 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C15/sky130.json @@ -0,0 +1,28 @@ +{ + "circuit_id": "C15", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.3, + "nf": 4 + }, + "R1": { + "r": 20000.0, + "body": "VSS", + "w": 0.35, + "l": 17.55 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": {}, + "load": { + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C16/gf180.json b/benchmarks/textbook_sharing/data/nominal/C16/gf180.json new file mode 100644 index 00000000..5fcdcb7a --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C16/gf180.json @@ -0,0 +1,45 @@ +{ + "circuit_id": "C16", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "R1": { + "r": 40000.0, + "body": "VSS", + "w": 1.0, + "l": 60.0 + }, + "R2": { + "r": 40000.0, + "body": "VSS", + "w": 1.0, + "l": 60.0 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "IB1": { + "i": 4e-05, + "from": "VSS" + } + }, + "load": { + "vcm": 1.5, + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C16/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C16/ihp130.json new file mode 100644 index 00000000..cae18621 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C16/ihp130.json @@ -0,0 +1,45 @@ +{ + "circuit_id": "C16", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "R1": { + "r": 12000.0, + "body": "VSS", + "w": 1.0, + "l": 46.385 + }, + "R2": { + "r": 12000.0, + "body": "VSS", + "w": 1.0, + "l": 46.385 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "IB1": { + "i": 4e-05, + "from": "VSS" + } + }, + "load": { + "vcm": 0.6, + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C16/sky130.json b/benchmarks/textbook_sharing/data/nominal/C16/sky130.json new file mode 100644 index 00000000..ebf46e76 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C16/sky130.json @@ -0,0 +1,45 @@ +{ + "circuit_id": "C16", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "R1": { + "r": 20000.0, + "body": "VSS", + "w": 0.35, + "l": 17.55 + }, + "R2": { + "r": 20000.0, + "body": "VSS", + "w": 0.35, + "l": 17.55 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "IB1": { + "i": 4e-05, + "from": "VSS" + } + }, + "load": { + "vcm": 0.9, + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C17/gf180.json b/benchmarks/textbook_sharing/data/nominal/C17/gf180.json new file mode 100644 index 00000000..12a4b296 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C17/gf180.json @@ -0,0 +1,62 @@ +{ + "circuit_id": "C17", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "R1": { + "r": 40000.0, + "body": "VSS", + "w": 1.0, + "l": 60.0 + }, + "R2": { + "r": 40000.0, + "body": "VSS", + "w": 1.0, + "l": 60.0 + }, + "R3": { + "r": 2000.0, + "body": "VSS", + "w": 1.0, + "l": 5.085 + }, + "R4": { + "r": 2000.0, + "body": "VSS", + "w": 1.0, + "l": 5.085 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M3", + "current": 4e-05 + } + }, + "load": { + "vcm": 1.5, + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C17/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C17/ihp130.json new file mode 100644 index 00000000..0bd11d88 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C17/ihp130.json @@ -0,0 +1,62 @@ +{ + "circuit_id": "C17", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "R1": { + "r": 15000.0, + "body": "VSS", + "w": 1.0, + "l": 58.055 + }, + "R2": { + "r": 15000.0, + "body": "VSS", + "w": 1.0, + "l": 58.055 + }, + "R3": { + "r": 1000.0, + "body": "VSS", + "w": 1.0, + "l": 3.6 + }, + "R4": { + "r": 1000.0, + "body": "VSS", + "w": 1.0, + "l": 3.6 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M3", + "current": 4e-05 + } + }, + "load": { + "vcm": 0.6, + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C17/sky130.json b/benchmarks/textbook_sharing/data/nominal/C17/sky130.json new file mode 100644 index 00000000..a46fb5f8 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C17/sky130.json @@ -0,0 +1,62 @@ +{ + "circuit_id": "C17", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M2": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M3": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "R1": { + "r": 20000.0, + "body": "VSS", + "w": 0.35, + "l": 17.55 + }, + "R2": { + "r": 20000.0, + "body": "VSS", + "w": 0.35, + "l": 17.55 + }, + "R3": { + "r": 2000.0, + "body": "VSS", + "w": 0.35, + "l": 1.25 + }, + "R4": { + "r": 2000.0, + "body": "VSS", + "w": 0.35, + "l": 1.25 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M3", + "current": 4e-05 + } + }, + "load": { + "vcm": 0.9, + "CL": 1e-13 + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C18/gf180.json b/benchmarks/textbook_sharing/data/nominal/C18/gf180.json new file mode 100644 index 00000000..ad18d419 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C18/gf180.json @@ -0,0 +1,58 @@ +{ + "circuit_id": "C18", + "pdk": "gf180", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.56, + "nf": 4 + }, + "M2": { + "w": 4.0, + "l": 0.56, + "nf": 8 + }, + "M3": { + "w": 8.0, + "l": 0.56, + "nf": 16 + }, + "M4": { + "w": 16.0, + "l": 0.56, + "nf": 32 + }, + "M5": { + "w": 16.0, + "l": 0.56, + "nf": 32 + }, + "M6": { + "w": 32.0, + "l": 0.56, + "nf": 64 + } + }, + "supply": { + "VDD": 3.3, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M2", + "current": 2e-05 + } + }, + "load": { + "RL": 20000.0, + "CL": 5e-12, + "vamp": 0.02, + "vout_target": 1.65, + "vin_center": 0.9899999999999999, + "servo_slope": 200.0, + "options": ".option method=gear reltol=1e-3" + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C18/ihp130.json b/benchmarks/textbook_sharing/data/nominal/C18/ihp130.json new file mode 100644 index 00000000..214e3c65 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C18/ihp130.json @@ -0,0 +1,58 @@ +{ + "circuit_id": "C18", + "pdk": "ihp130", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.26, + "nf": 4 + }, + "M2": { + "w": 4.0, + "l": 0.26, + "nf": 8 + }, + "M3": { + "w": 8.0, + "l": 0.26, + "nf": 16 + }, + "M4": { + "w": 16.0, + "l": 0.26, + "nf": 32 + }, + "M5": { + "w": 16.0, + "l": 0.26, + "nf": 32 + }, + "M6": { + "w": 32.0, + "l": 0.26, + "nf": 64 + } + }, + "supply": { + "VDD": 1.2, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M2", + "current": 2e-05 + } + }, + "load": { + "RL": 20000.0, + "CL": 5e-12, + "vamp": 0.02, + "vout_target": 0.6, + "vin_center": 0.36, + "servo_slope": 200.0, + "options": ".option method=gear reltol=1e-3" + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/nominal/C18/sky130.json b/benchmarks/textbook_sharing/data/nominal/C18/sky130.json new file mode 100644 index 00000000..1f529530 --- /dev/null +++ b/benchmarks/textbook_sharing/data/nominal/C18/sky130.json @@ -0,0 +1,58 @@ +{ + "circuit_id": "C18", + "pdk": "sky130", + "sizing": { + "M1": { + "w": 2.0, + "l": 0.3, + "nf": 4 + }, + "M2": { + "w": 4.0, + "l": 0.3, + "nf": 8 + }, + "M3": { + "w": 8.0, + "l": 0.3, + "nf": 16 + }, + "M4": { + "w": 16.0, + "l": 0.3, + "nf": 32 + }, + "M5": { + "w": 16.0, + "l": 0.3, + "nf": 32 + }, + "M6": { + "w": 32.0, + "l": 0.3, + "nf": 64 + } + }, + "supply": { + "VDD": 1.8, + "VSS": 0.0 + }, + "bias": { + "VB1": { + "replica": "M2", + "current": 2e-05 + } + }, + "load": { + "RL": 20000.0, + "CL": 5e-12, + "vamp": 0.02, + "vout_target": 0.9, + "vin_center": 0.54, + "servo_slope": 200.0, + "options": ".option method=gear reltol=1e-3" + }, + "notes": [ + "first-pass sizing v1" + ] +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/data/res_calibration.json b/benchmarks/textbook_sharing/data/res_calibration.json new file mode 100644 index 00000000..7f404805 --- /dev/null +++ b/benchmarks/textbook_sharing/data/res_calibration.json @@ -0,0 +1,50 @@ +{ + "sky130": { + "w": 0.35, + "points": [ + [ + 5.0, + 6144.664 + ], + [ + 20.0, + 22708.8 + ] + ], + "a_ohm_per_um": 1104.2757333333332, + "b_ohm": 623.2853333333342, + "rsh_nominal_table": 319.8 + }, + "gf180": { + "w": 1.0, + "points": [ + [ + 5.0, + 1969.782 + ], + [ + 20.0, + 7500.941 + ] + ], + "a_ohm_per_um": 368.7439333333333, + "b_ohm": 126.06233333333353, + "rsh_nominal_table": 315.0 + }, + "ihp130": { + "w": 1.0, + "points": [ + [ + 5.0, + 1360.14 + ], + [ + 20.0, + 5216.774 + ] + ], + "a_ohm_per_um": 257.1089333333333, + "b_ohm": 74.59533333333343, + "rsh_nominal_table": 260.0 + } +} \ No newline at end of file diff --git a/benchmarks/textbook_sharing/docs/DATA.md b/benchmarks/textbook_sharing/docs/DATA.md new file mode 100644 index 00000000..c66a3f3f --- /dev/null +++ b/benchmarks/textbook_sharing/docs/DATA.md @@ -0,0 +1,129 @@ +# Data + +## Where things are + +``` +benchmarks/textbook_sharing/ + data/ inputs (in git) + cases.tar.xz the case folders, packed (unpack with tar -xJf data/cases.tar.xz) + cases//// after unpacking: one folder per request that passed the size derivation (639) + nominal//.json nominal design point (sW = sL = 1) of every topology and PDK (54) + frozen/fixed_order.json the fixed mode order, frozen from the development sizes + res_calibration.json calibration of the resistor length formula (calibrate_res.py) + results/ outputs behind every reported number (in git) + case_build.json one record per request (648) + count_ledger.json, .md mutually exclusive counts (analysis/ledger.py) + analysis/*.json analysis tables (below) + redesign_search/ bounded redesign search of the class-AB stage (redesign_search.py) + run_records.tar.xz run records: JSON and model text (17 353 files) + runs/ not in git: the unpacked run records, or new runs (TSB_RUNS) + docs/ this documentation; PARAMETER_SPACE.md and RESULTS.md are generated +``` + +The case folders and the run records are packed into two archives because they hold thousands of small files; +unpack both before running anything. After `build_cases` has rewritten the case folders, pack them again with +`tar --sort=name --mtime="2026-10-12 00:00Z" --owner=0 --group=0 --numeric-owner -cJf data/cases.tar.xz data/cases`. + +`TSB_RUNS` and `TSB_RESULTS` move the run and result folders (`textbook_sharing/paths.py`). Records store paths +relative to these roots (`runs/...`, `data/...`), never machine paths. + +## A case folder + +`data/cases/C08/sky130/sW1_sL1/`: + +| file | content | +|---|---| +| `case.json` | topology, PDK, size point (sW, sL), sizing per device (`w`, `l` in um, `nf`), supply, bias (replica generators: device and current), load, category, notes, and `derivation`: how each device was scaled from the nominal point (`w0`, `l0`, `nf0`, unit widths, ratios) | +| `specs.json` | the frozen specification (`min` / `max` / `abs_max` per metric) and `_frozen_from`: schematic values, floors and rule | +| `qualification.json` | schematic simulation result, measures, qualification decision with reasons, `signature` (identity of the derived netlist) and `testbench_rule` | +| `target.spice` | the DUT subcircuit for simulation | +| `target_lvs.spice` | the DUT subcircuit for LVS | +| `testbench.spice` | the testbench written by `testbench.py` | +| `manifest.json` | sha256 of every file above | + +`testbench_rule` is the hash of `testbench.py`. `build_cases.py` qualifies a case again when the rule changes, so an +edit of `testbench.py` (even a comment) means re-running `build_cases` and the post-layout simulations (`resim.py`). + +`results/case_build.json` holds one record per request, including the 9 parameter-illegal ones that have no folder: +`stage` is `parameter_illegal`, `schematic_not_qualified` or `qualified`. + +## Run records (`runs/`, from `results/run_records.tar.xz`) + +``` +grid/////result.json main grid: qualified case x named mode +grid/...//verify/review/review_record.json its visual-review record +selection//catalogue.json per-group candidate tables and the sampled catalogue +selection//estimates.json cost-rule estimate of every catalogue entry +selection///result.json every catalogue candidate, fully verified +models///r/ model sessions (docs/MODELS.md) +model_tasks/, model_examples/ what the models were given, and the example runs +review/batch_/manifest.json, outputs.json review batches and the reviewer's raw verdicts +``` + +### `result.json` (one layout) + +| field | content | +|---|---| +| `case_id`, `case_dir`, `mode`, `label` | which case and which named mode or candidate | +| `applied_plans` | per sharing group: `devices`, `plan` (the canonical `SharingPlan` with `plan_id` and `mode_label`), `plan_source` (`named`, `named_fallback_independent`, `explicit`) | +| `evidence` | per group, measured on the drawn rectangles: active islands, cross-device shared diffusion nodes (net, terminals), shared gate conductors | +| `assembly_stats` | `width`, `height`, `area_um2` of the bounding box; `row_dims` (per row: kind, width, height, tap extent, cells); `channel_heights`; `channel_strategy` (`shared` or `split`) and the area of both trials; `row_x_shift`; trunk, riser and via counts | +| `geometry_hash` | hash of the merged shapes on every layer, independent of the cell name (identical layouts share it) | +| `verify` | status of every verification stage (`drc`, `drc_magic`, `lvs`, `constraints`, `pex`, `physical`) | +| `postsim` | post-layout simulation: `status`, `measures`, per-specification results (`spec`) | +| `postsim_history` | earlier simulations of the same extracted netlist, kept when a testbench fix re-ran the simulation | +| `matching` | declared matching checks: ratio (pass/fail), orientation balance and centroid offset (reported) | +| `area_um2` | bounding-box area measured on the GDS | +| `primary_status`, `fail_reasons` | first failing stage and every failing stage | +| `timing_s` | wall time per stage | +| `review_id` | link to the visual-review record | + +### Plan labels (`mode_label`) + +* `independent`: every transistor on its own (fingers of one transistor share diffusion, one strap per transistor); +* `axes:,,,,,`: a plan from the six-axis + enumeration; a named mode adds its name in front (`combined:axes:...`); +* `llm:SharingPlan`, `llm:axis_plan`, `llm:fet_row`: a plan written by a model in one of the interface forms. + +### `review_record.json` + +`review_id`; `gds_sha256`, `target_sha256`, `pdk`; `static_checks` (the automatic geometry checks); `visual`: reviewer +type and id, at least three observations with coordinates, issue locations, `verdict` (`pass`, `suspicious`, +`fail`, or `review_pending`), the reviewed image hash and batch, and `reused_from` when the verdict was given to an +identical layout; `visual_resolution` (outcome, note, evidence, by) for flagged verdicts settled by objective checks; +`composite`: the reviewed images and their hashes. + +## Result tables (`results/analysis/`) + +| file | made by | content | +|---|---|---| +| `benchmark_table.json` | `analysis.benchmark_table` | per topology: devices, groups, plan counts, request outcomes, applicable modes, study membership | +| `cost_decomposition.json` | `analysis.cost_decomposition` | every main-grid pair (mode vs unshared): W, H, area terms, classes; summaries by mode, topology, PDK; `increase_mechanisms` | +| `cost_validation_dev.json`, `_dev_no_channel.json`, `_heldout.json` | `analysis.cost_validation` | cost-rule predictions vs measured area per pair, sign accuracy, error types | +| `selection_summary.json` | `analysis.selection` | per task and method: best area after n verifications, gap, time; balanced means and bootstrap intervals | +| `timing_controlled.json` | `selection.timing` | geometry build times measured one candidate at a time | +| `llm_summary.json` | `analysis.models` | per model session: proposals, legality, statuses, best area after k proposals, usage | +| `llm_interface.json` | `analysis.interface` | sharing vs base interface on the 14 tasks; capability bound | +| `scope_audit.json` | `analysis.scope` | task sets; same-task comparison against both references; interface comparison | +| `agent_session_audit.json` | `llm.agent_sessions audit` (machine paths removed) | tool-call audit of the agent sessions, launch texts, token usage | +| `running_example.json` | `analysis.example` | the five OTA layouts of the running example | +| `arrangement_bandwidth_C16.json` | `analysis.arrangement_bandwidth` | bandwidth by finger arrangement in the resistor-loaded pair | +| `pvt.json` | `analysis.pvt` | corner simulations of reference, combined and best layouts | +| `pex_sensitivity_C10_gf180.json` | `analysis.pex_sensitivity` | R+C vs C-only extraction of the fully differential OTA before its testbench fix | +| `resim_after_testbench_fix.json` | `resim` | status changes when the post-layout simulations were repeated with the final testbenches | +| `review_coverage.json` | `analysis.review_coverage` | effective visual verdicts of every reported set | +| `review_gate_pad_check.json`, `review_connectivity_check.json` | `review.check_gate_pads`, `review.check_connectivity` | the objective checks cited as evidence when flagged visual verdicts were resolved | +| `testbench_equivalence.json` | one-off check when this package was assembled | the decks in `data/cases`, written by this repository's `testbench.py`, equal the decks of the recorded runs apart from comment lines | +| `repro_clean_