Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Minimal SKY130 example with self-checking LVS, DRC, and PEX

License

NotificationsYou must be signed in to change notification settings

sgherbst/sky130-hello-world

Repository files navigation

Actions StatusLicense:Apache-2.0Join the chat at https://gitter.im/sgherbst/sky130-hello-world

This repo contains a minimal example of LVS, DRC, PEX, and SPICE simulation in SKY130. It has a self-checking regression that runs on a GitHub Actions Linux host, so the intent is that one should be able to follow along with the steps in.github/workflows/regression.yml,install.sh, andregress.sh to fully reproduce the functionality shown here.

The example is based around the minimum-size inverter from the SKY130 PDK. DRC is run on the GDS for that inverter, and then it is extracted for LVS and PEX. On the LVS front, the extracted SPICE netlist is compared to the netlist given in the PDK usingnetgen. On the PEX front,ngspice is used to run a transient simulation of the inverter with parasitic capacitances included. The regression tests also include some tests to make sure that DRC and LVS errors can in fact be detected, using the intentionally broken fileinv1_bad.gds.

The full details for this example can always be found by examining the source code here, but the main functions are also summarized below.

Installing dependencies

Certain dependencies need to be installed before moving on to the SKY130-specific tools.

sudo apt-get install m4 tcsh csh libx11-dev tcl-dev tk-dev libcairo2-dev libncurses-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev ngspice

Installing tools

This script walks through the installation ofmagic,netgen,skywater-pdk, andopen_pdks.

# create directory to hold open-source PDKSmkdir PDKS# install magicgit clone https://github.com/RTimothyEdwards/magic.gitcd magicgit checkout magic-8.3./configuremakesudo make installcd ..# install netgengit clone https://github.com/RTimothyEdwards/netgen.gitcd netgengit checkout netgen-1.5./configuremakesudo make installcd ..# install skywater-pdkgit clone https://github.com/google/skywater-pdkcd skywater-pdkgit submodule init libraries/sky130_fd_pr/latestgit submodule updatecd ..# install open_pdksgit clone https://github.com/RTimothyEdwards/open_pdks.gitcd open_pdks./configure --with-sky130-source=`realpath ../skywater-pdk` --with-sky130-local-path=`realpath ../PDKS`makemake installcd ..

In addition, thePDKPATH environment variable should be set to the absoute path ofPDKS/sky130A, e.g.

export PDKPATH=`realpath PDKS/sky130A`

For simulations in ngspice, the regression uses theSKYWATER environment variable, set to the absolute path of the skywater repositoryskywater-pdk, e.g.

export SKYWATER=`realpath skywater-pdk`

Running magic scripts

magic can run TCL scripts (DRC, extraction, etc.) in a non-interactive fashion using the following command:

magic -noconsole -dnull script.tcl

Make sure that your scripts havequit at the end, to avoid ending up at an interactive prompt!

Running DRC

The followingmagic TCL script reads in a GDS and counts up the number of DRC violations. For some reason, the final line says that there are zero DRC errors, even if previous lines show errors. Run this script using themagic command from the previous section.

gds read path_to_gds_fileload name_of_top_celldrc catchupdrc countquit

Running LVS

The followingmagic TCL script reads in a GDS and extracts it to an LVS-ready netlist.

gds read path_to_gds_fileload name_of_top_cellextract allext2spice lvsext2spice subcircuits offext2spice -o lvs_output_filequit

Running PEX

The followingmagic TCL script reads in a GDS and extracts it to an netlist for SPICE simulation.

gds read path_to_gds_fileload name_of_top_cellextract allselect top cellport makeallext2spice lvsext2spice cthresh 0.01ext2spice rthresh 0.01ext2spice subcircuit onext2spice ngspiceext2spice pex_output_filequit

Running LVS

LVS can be run to compare the design netlist with the extracted netlist usingnetgen:

netgen -batch lvs"design_netlist design_top_cell""ext_netlist ext_top_cell"$PDKPATH/libs.tech/netgen/sky130A_setup.tcl

Running SPICE simulations

SPICE simulations can be run without special options (e.g.,ngspice myfile.spice), but the following line should be placed near the top of the input file.

.lib "skywater-pdk/libraries/sky130_fd_pr/latest/models/sky130.lib.spice" tt

You'll probably need to make that an absolute path unlessskywater-pdk happens to be in your current direction. Also, remember that for ngspice, the very first line of the input file must be a comment!

Acknowledgements

About

Minimal SKY130 example with self-checking LVS, DRC, and PEX

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp