run_script() launches the DRC/LVS scripts with
nix develop --command <script>
from a working directory of OPTS.openram_temp. nix develop resolves its
flake from the working directory, and the temp directory has no
flake.nix, so the command fails before the script ever runs:
path '/tmp/openram_<user>_<pid>_temp' does not contain a 'flake.nix', searching up
error: could not find a flake.nix file
Nothing is written to the report file, so verification then dies on the
missing output rather than on the nix error itself, which makes this
confusing to diagnose:
ERROR: file magic.py: Unable to load LVS results from
/tmp/openram_<user>_<pid>_temp/<name>.lvs.report
FileNotFoundError: [Errno 2] No such file or directory
Name the flake explicitly so it is resolved from the repository while
the script still runs in the temp directory, which the scripts depend on
for their relative copies.
Verified on a sky130 build with use_nix = True: before the change no
report is produced and the run asserts, after it both DRC and LVS run
through the devShell and write their reports.
The sky130 magic techfile splits nfet extraction on device width:
device msubcircuit sky130_fd_pr__nfet_01v8 nfet,scnfet ... w>=0.42
device msubcircuit sky130_fd_pr__special_nfet_01v8 scnfet ... w<0.42
ptx always emitted spice["nmos"], so every gate built from a
minimum-width device (drc["minwidth_tx"] = 0.36) was netlisted as
sky130_fd_pr__nfet_01v8 while magic extracted it as
sky130_fd_pr__special_nfet_01v8. netgen then reported a device class
mismatch in each such cell:
Circuit 1: sky130_fd_pr__special_nfet_01v8 (1) | Circuit 2: (no matching element)
Circuit 1: (no matching element) | Circuit 2: sky130_fd_pr__nfet_01v8 (1)
The signed-off macros shipped in sky130A/libs.ref/sky130_sram_macros use
special_nfet_01v8 at this geometry, so this restores the naming those
were built with.
ptx now asks the technology for a narrow-device model, keyed by width.
Technologies that declare no such model are unaffected, and there is no
equivalent split for pfets so only the nmos is declared.
After this change pinv and pinv_dec report "Netlists match uniquely"
where they previously mismatched. Verified with ngspice that
special_nfet_01v8 resolves through sky130.lib.spice, so characterization
is unaffected.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FcKSuKSchDEd7MqT8AffpN
The few Python 2 statements are replaced with their modern
counterparts. These are one of the following:
- print() function calls (instead of statements),
- Exception and Error raising,
- passing/receiving tuples as function/lambda arguments,
- the L suffix for numeral constants.
* compiler/gdsMill/pyx/box.py,
compiler/gdsMill/pyx/connector.py,
compiler/gdsMill/pyx/deformer.py,
compiler/gdsMill/pyx/dvifile.py,
compiler/gdsMill/pyx/epsfile.py,
compiler/gdsMill/pyx/font/afm.py,
compiler/gdsMill/pyx/font/t1font.py,
compiler/gdsMill/pyx/graph/axis/texter.py,
compiler/gdsMill/pyx/graph/axis/tick.py,
compiler/gdsMill/sram_examples/cell6tDemo.py,
compiler/gdsMill/sram_examples/newcell.py: Modernize syntax.