Open PDKs Version 1.0

Installing Open_PDKs version 1.0 for Google/SkyWater

For the Impatient

Most people will want to do the default compile and install. From open_pdks version 1.0.122, the "make" process will automatically pull third-party sources from remote repositories and install them, so compiling only requires specifying which packages to install. The typical user will want do to the following*:

./configure --enable-sky130-pdk
make
sudo make install
This will do the following:
  1. Automatically pull the Google/SkyWater SKY130 PDK from github and compile the timing files.
  2. Automatically pull the 3rd-party alphanumeric layout library
  3. Automatically pull the 3rd-party library for the xschem schematic entry and schematic capture tool.
  4. Build and install all libraries to /usr/local/share/pdk/sky130A/.
  5. Build and install common scripts to /usr/local/share/pdk/bin/.
*Strong caveat, though: The SkyWater PDK is a very large repository, and building it can take quite a long time. You may prefer to download and install the PDK repository separately, so that you can limit the number of library submodules and thereby reduce the overhead significantly. In that case, use --enable-sky130-pdk=path
The remainder of this page contains the detailed instructions for configuring and installing open_pdks. If the simple steps above worked for you, then you're done with the install!

Prerequisites

  1. Google/Skywater Open PDK Distribution
    Open PDKs 1.0 is distributed with installation scripts and files for use with the Google/SkyWater sky130 130nm open PDK. The files for this open PDK are publicly distributed on the site github.com:google/skywater-pdk. The primary prerequisite for Open PDKs is this repository.

    You do not need to clone and install this repository manually. If "--enable-sky130-pdk" is specified as an option to the open_pdks configure command without any following value, then the PDK will be automatically pulled from the repository above when you run "make", and it will be placed in the subdirectory sources/sky130-pdk in the open_pdks source directory. This will be a shallow clone (depth of one) of the most recent version of the PDK sources. If you need a deep clone, or if you want to install a specific commit version of the PDK, or if you want to limit the installation to a smaller set of libraries than the default to save disk space, then follow the instructions below for a manual installation (but note that there is also a method to clone a specific commit version using a JSON file generated by open_pdks; see the "-reference" option description on the reference web page).

    Doing "make distclean" will remove the directory and its contents. If you already have the SkyWater PDK repository or want it in another place, then use "configure --enable-sky130-pdk=path_to_pdk_repo"

    PDK Manual Installation

    Clone the repository and follow the instructions for the essential preparation of the PDK, since it requires a build to generate some of the larger files that are too big for the git repository.

    This repository may go in any convenient location.

    Per the README file (open_pdks/sky130/README), the instructions for obtaining the Google/SkyWater open PDK repository files is as follows:

    1. git clone https://github.com/google/skywater-pdk
    2. cd skywater-pdk
    3. git submodule init libraries/sky130_fd_io/latest
    4. git submodule init libraries/sky130_fd_pr/latest
    5. git submodule init libraries/sky130_fd_sc_hd/latest
    6. git submodule init libraries/sky130_fd_sc_hvl/latest
    7. git submodule init libraries/sky130_fd_sc_hdll/latest
    8. git submodule init libraries/sky130_fd_sc_hs/latest
    9. git submodule init libraries/sky130_fd_sc_ms/latest
    10. git submodule init libraries/sky130_fd_sc_ls/latest
    11. git submodule init libraries/sky130_fd_sc_lp/latest
    12. git submodule update
    13. make timing
    The purpose of doing the "git submodule init" on individual submodules is to avoid pulling the files for any but the latest version of each digital standard cell library. The open_pdks installation process will use only the latest libraries, so any older library versions are just wasting disk space and compute cycles.

    Note: It is not required to initialize all the submodules, and doing so greatly increases the disk space overhead and the amount of time to compile the PDK. At a minimum, initialize the first four submodules (io, pr, sc_hd, and sc_hvl). These comprise the I/O pad cells, the primitive devices, the high-density digital standard cells, and the high-voltage digital standard cells.

    Note: The sky130_fd_io library (partial) was added on Nov. 10, 2020; this is enough to simulate the caravel harness chip. Additional I/O cell views are added through custom open_pdks additions to the PDK.
  2. EDA Tools
    For installing files to use with the Magic layout tool, Magic must be installed. Obtain Magic from github.com:RTimothyEdwards/magic and follow the compile and install instructions. Note that pre-packaged versions of magic are likely to be out of date, as at least verson 8.3.25 is required.

Installation

After the skywater-pdk files are installed, cd to the top level directory in open_pdks.

There are two methods for installation: Local and Distribution. Use Local installation if you are installing on a single host computer. Use Distribution installation if you are installing into a respository (such as git) that will be distributed to multiple hosts.

  1. Set paths and definitions:
    As of version 1.0.21, open_pdks has an autoconf setup. From the open_pdks top-level directory, run:
    ./configure --enable-sky130-pdk=source_path [--with-sky130-link-targets=source|none] [--with-ef-style] [--enable-default_off_option] [--disable-default_on_option]
    where:

    source_path
    is the location of the Google/SkyWater repository cloned from github, down to the "libraries" subdirectory.


    The configuration options can always be queried using:
    ./configure --help
    The configuration options are as follows:

    --prefix=path
    By default, the prefix is the standard /usr/local and will cause the PDKs to be installed in the path /usr/local/share/pdk/. A packaged install may use --prefix=/usr, which also matches some legacy instructions for building open_pdks. For distributed installs, the prefix should refer to the location such as a git repo where the installed PDK will be staged. When creating a distributed installation, define DESTDIR to be the path to the location of the installation on the host where tools are run (see below).

    --with-reference=path
    Whenever open_pdks is installed, each PDK has a corresponding JSON file in the top level install location with the name of the PDK; e.g., /usr/share/pdk/sky130A/.config/nodeinfo.json . This JSON file contains the commit hashes and/or version number of every tool and repository used to build the PDK. The JSON file can be copied into any project to save the state of the PDK used for the project, and by using the --with-reference= option, open_pdks can regenerate the PDK environment in the same state. If --with-reference is not used, then all repositories pulled will be the most recent version available.

    --with-ef-style
    Specify this option for an efabless-style file structure. Please note that "ef-style" is indended only for use on the efabless.com platform; it should not be used outside of that context. The main difference when using "ef-style" is that the file directory hierarchy is swapped with respect to the IP library and the file format; so ef-style uses, e.g., "gds/sky130_fd_sc_hd/" while the standard style uses "sky130_fd_sc_hd/gds/". Otherwise, there are only minor differences in these two styles, namely for version tracking of the Magic setup files, and the location of the technology LEF file.

    --enable-sky130-pdk[=path]
    Modify this value to point to the location of the Google/SkyWater repository cloned from github, down to the "libraries" subdirectory. This option is mandatory for installing the Google/SkyWater SKY130 PDK. If the path is omitted, then the repository will be cloned, installed, and configured automatically.

    --with-sky130-link-targets= source|none
    "none" or "source". "none" copies files from the source directories to the target. "source" makes symbolic links to the source directories. Use "source" only if doing a local install, and the source foundry data will not be deleted. Default value if not specified:: none

    --with-sky130-variants= all|A|B
    This configuration option restricts the generation and installation of PDKs to a specific variant. If only one of the variants will be used for design, then time to generate and install can be cut in half by ignoring the unused PDK variant. Default value if not specified:: all

    --enable-alpha-sky130[=path]
    If not disabled, the 3rd-party alphanumeric layout library will be installed as part of the sky130A PDK. If path is omitted, or the configuration option is not specified, then the library will be pulled automatically from the repository and installed. The repository sources will remain in the sources/ directory unless removed with "make distclean". To disable the package, use --disable-alpha-sky130.
    --enable-xschem-sky130[=path]
    If not disabled, the 3rd-party Sky130 setup for xschem will be installed as part of the sky130A PDK. If path is omitted, or the configuration option is not specified, then the library will be pulled automatically from the repository and installed. The repository sources will remain in the sources/ directory unless removed with "make distclean". To disable the package, use --disable-xschem-sky130.
    --enable-sram-sky130[=path]
    If enabled, the 3rd-party SRAM macro library https://github.com/efabless/sky130_sram_macros will be installed. This library contains pre-compiled and verified memory blocks created with OpenRAM with commonly used configurations like 32-bit wide data in blocks of 1kB, 2kB, and 4kB. This is disabled by default because preparing the PDK entries can take a long time.
    --enable-osu-sky130[=path]
    If enabled, the 3rd-party open-source OSU digital standard cell library will be installed.
    --enable-osu-t12-sky130[=path]
    If enabled, the 3rd-party open-source OSU 12-track height digital standard cell library will be installed.
    --enable-osu-t15-sky130[=path]
    If enabled, the 3rd-party open-source OSU 15-track height digital standard cell library will be installed.
    --enable-osu-t18-sky130[=path]
    If enabled, the 3rd-party open-source OSU 18-track height digital standard cell library will be installed.
    --enable-gf180mcu-pdk[=path]
    Modify this value to point to the location of the Google/Global Foundries repository cloned from github, down to the "libraries" subdirectory. This option is mandatory for installing the Google/Global Foundries GF180MCU PDK. If the path is omitted, then the repository will be cloned, installed, and configured automatically.

    --with-gf180mcu-link-targets= source|none
    "none" or "source". "none" copies files from the source directories to the target. "source" makes symbolic links to the source directories. Use "source" only if doing a local install, and the source foundry data will not be deleted. Default value if not specified:: none

    --with-gf180mcu-variants= all|A|B|C
    This configuration option restricts the generation and installation of PDKs to a specific variant. If only one of the variants will be used for design, then time to generate and install can be cut in half by ignoring the unused PDK variant. Default value if not specified:: all

    Additional libraries may be available which are not listed above; please use ./configure --help to view all available options.

    Example:

    ./configure --enable-sky130-pdk=~/gits/skywater-pdk \
    --prefix=~/cad --enable-sram-sky130
    The above configuration line assumes that the skywater-pdk repository has been cloned into a subdirectory "gits" of the user's home directory, and that files will be installed such that the PDK will be located at ~/cad/share/pdks/sky130A/. All the "enabled by default" 3rd-party libraries will be installed, and in addition the SRAM macro library will be installed.
  2. Generate files in staging location:
    Run:
    make
    This will pre-process the setup files to create the PDK-specific files for the sky130A PDK, and process all vendor files, and place everything in a local staging area.
  3. Migrate files to installation location:
    For a local install, do:
    [sudo] make install
    This copies all files from the staging area into the destination /usr/local/share/pdk by default, or as specified by the "--prefix" option value in "configure" (followed by /share/pdk). All pointers to absolute paths in the files are changed to match the local path.

    For a distributed install, do:
    [sudo] make DESTDIR=local_path install
    This copies all files from the staging area into the destination /usr/local/share/pdk by default, or as specified by the "--prefix" option value in "configure" (followed by /share/pdk). All pointers to absolute paths in the files are changed to match the local path as specified by the "DESTDIR" variable value. The assumption is that the distributed path is a repository (such as a git repo) that is cloned to multiple hosts, and the destination on the hosts where it is distributed is the local path.

    Note: If you get the error message "ModuleNotFoundError: No module named 'distutils.dir_util'", this seems to be an issue with specific versions of Ubuntu Linux, and the solution is to run sudo apt install python3-distutils. The install script uses a flag to copy_tree that was introduced in Python version 3.8, so the Python version could also potentially be an issue.
  4. Clean up:
    To clean up the open_pdks source directory, do:
    make clean
    or
    make veryclean
    or
    make distclean
    The first one removes the staging area. The second removes the staging area and all log files. The third removes the staging area, all log files, and any automatically downloaded repositories.
  5. Other important make targets:
    [sudo] make uninstall
    This will remove the installed PDK. Since everything in the PDK is self-contained at a single directory location at ${prefix}/share/, "make uninstall" is equivalent to deleting the directory tree from this point.

    make reference
    This will create a new JSON file in the open_pdks source containing the commit hashes and/or version number of all tools and PDK repositories. This is primarily for use by the package maintainer to assert a "golden reference" set of commit states that produces a known-good PDK.

    make update
    This will update all local git repositories that have been cloned into the sources/ subdirectory of open_pdks. It is important to note that after fetching repositories on the first run of "make", subsequent runs of "make" will not update the repository contents automatically. Either force an update with make update or remove the sources with make distclean and let the repositories be cloned again from the latest versions.

email:

Last updated: January 15, 2023 at 11:26am