Skip to content

feat(sky130)!: preserve geometry-based MOS parameters in SKY130 - #736

Merged
rohanku merged 3 commits into
mainfrom
sky130-preserve-mos-params
Nov 17, 2026
Merged

rohanku merged 3 commits into
mainfrom
sky130-preserve-mos-params

Conversation

@rohanku

@rohanku rohanku commented Sep 25, 2026

Copy link
Copy Markdown
Contributor
  • fix(sky130): preserve MOS parameters that Substrate does not model
  • fix(spectre): escape signal names in save and ic statements

rohanku and others added 3 commits September 10, 2026 11:45
`convert_spice_mos` built a `MosParams` from `w`, `l` and `nf * m * mult`
and dropped every other parameter, so importing a SPICE netlist through
the `Sky130` schema silently lost information:

* Junction areas and perimeters (`ad`, `as`, `pd`, `ps`) were discarded.
  The SKY130 models default these to zero, so a round trip removed all
  source/drain junction capacitance. For the foundry SRAM bitcell this
  cut the capacitance a 64-row column presents to a bit line from
  7.30 fF to 2.83 fF, making read timing optimistic by 60%.
* Stress parameters (`sa`, `sb`, `sd`) and resistances (`nrd`, `nrs`)
  were discarded.
* `m` and `mult` were folded into `nf`. The models treat all three
  differently -- `nf` is a finger count that divides the supplied width,
  `m` is an instance multiplier, and `mult` only appears in the
  mismatch-slope expressions -- so collapsing them changes the device.

`Primitive::Mos` now carries an `extra` map of the parameters Substrate
does not model, populated on import and merged back in on export. `nf`
is taken from the `nf` parameter alone. Where a schema derives a key
that can also appear in `extra` -- `mult` for SRC NDA, `m` and `mult`
for CDS -- the two are multiplied, since both are device multipliers.

MOSFETs that Substrate generates itself carry an empty `extra` and are
unaffected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`save` and `ic` wrote the name of a `SimSignal::Raw` verbatim. Spectre
only accepts `[`, `]` and `#` in an identifier when they are escaped, so
saving a bus bit or a node imported from layout -- `din[0]`, or
`...Xdff_6.a_1800_291#` -- made Spectre reject the netlist during
circuit read-in rather than run.

`Spectre::escape_path` escapes those characters while preserving what
gives a path its meaning: `.` between hierarchy elements, `:` before a
terminal, and the `*`/`?` wildcards that `save` accepts. It is applied
through a new `SimSignal::to_netlist_string`, so only the two netlisting
call sites change; result lookup still uses the unescaped name, which is
what Spectre reports back.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rohanku rohanku changed the title feat(sky130): preserve geometry-based MOS parameter in SKY130 feat(sky130): preserve geometry-based MOS parameters in SKY130 Nov 17, 2026
@rohanku rohanku changed the title feat(sky130): preserve geometry-based MOS parameters in SKY130 feat(sky130)!: preserve geometry-based MOS parameters in SKY130 Nov 17, 2026
@rohanku
rohanku merged commit 0ffdd4b into main Nov 17, 2026
4 checks passed
@rohanku
rohanku deleted the sky130-preserve-mos-params branch November 17, 2026 22:03
@rohanku rohanku mentioned this pull request Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant