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 --enable-sram-sky130
make
sudo make install
make veryclean
This will do the following:
  1. Automatically pull the Google/SkyWater SKY130 PDK libraries from github
  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/.
  6. Remove all staging files
Or, alternatively:
./configure --enable-gf180mcu-pdk --enable-osu-sc-gf180mcu
make
sudo make install
make veryclean
It is possible to build both PDKs (Sky130 and GF180MCU) in the same step, but due to the huge overhead of processing and disk space, it is not recommended.

Strong caveat: The SkyWater PDK is a very large repository, and building it can take quite a long time. You may prefer to disable unneeded libraries; see below for a recommendation of a minimum set of libraries. Alternatively, most users will want some of the optional libraries such as the SRAM macro library for sky130. The complete list is also given below.

Libraries and library data will end up in three different places. First, repositories are pulled into the sources/ directory in open_pdks. Secondly, files for the PDK are placed in a staging directory under the name of the process, e.g., sky130/sky130A/. Thirdly, files after installation are placed in a system-wide, read-only directory, by default, e.g., /usr/local/share/pdk/sky130A/. To avoid the considerable overhead of these redundant files, use "make clean" to remove the files in the staging area, and "make distclean" to remove the cloned repositories in sources/.

The process of moving files from the staging area to the install target includes a step which determines when files in two different process variants have the same contents, and replace one with a symbolic link. This means that the installed PDK can be much smaller in size than the PDK in the staging area. For this reason, and also because PDK files are not supposed to be modified and should be in a read-only location, it is preferable to use the installed PDK rather than the PDK in the staging area, although the PDK in the staging area is self-contained and can be used directly.

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. However, the primary prerequisite for Open PDKs is a set of forks of the submodules of skywater-pdk which are found at github.com:efabless.

    You do not need to clone and install this repository. If "--enable-sky130-pdk" is specified as an option to the open_pdks configure command, then all of the PDK library repositories will be automatically pulled from the location above when you run "make", and they will be placed in subdirectories of sources/ in the open_pdks top level 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, 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 cloned repositories and their contents. You may also simply delete any directory in sources/ which you want to be re-cloned on any subsequent build.

  2. Google/Global Foundries Open PDK Distribution
    Open PDKs 1.0 is distributed with installation scripts and files for use with the Google/Global Foundries gf180mcu 180nm open PDK. The files for this open PDK are publicly distributed on the site github.com:google/skywater-pdk. However, the primary prerequisite for Open PDKs is a set of libraries that are submodules of "gf180mcu-pdk" but which will be cloned individually by open_pdks.

    You do not need to clone and install this repository. If "--enable-gf180mcu-pdk" is specified as an option to the open_pdks configure command, then all of the PDK library repositories will be automatically pulled from the location above when you run "make", and they will be placed in subdirectories of sources/ in the open_pdks top level 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, 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 cloned repositories and their contents. You may also simply delete any directory in sources/ which you want to be re-cloned on any subsequent build.

  3. 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.412 is required.

Installation

After the prerequisite of Magic has been installed, cd to the top level directory in open_pdks.

  1. Set paths and definitions:
    From version 1.0.21, open_pdks has an autoconf setup. From the open_pdks top-level directory, run:
    ./configure --enable-pdk_name-pdk [--enable-default_off_option] [--disable-default_on_option] [additional_options]
    where:

    pdk_name
    is the name of the PDK to build and install; currently this can be one of two choices, either sky130 or gf180mcu.
    default_off_option
    is the name of an option that is normally not enabled (see list below).
    default_on_option
    is the name of an option that is normally enabled (see list below).


    The configuration options can always be queried using:
    ./configure --help
    The main 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. Installing into a location without the "share/pdk" component requires setting environment variable SHARED_PDKS_PATH prior to running make.

    --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.

    The main options for the SkyWater sky130 PDK are:

    --enable-sky130-pdk
    This option is mandatory for installing the Google/SkyWater SKY130 PDK.

    --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

    Other libraries for the SkyWater sky130 PDK which are not enabled by default are:

    --enable-sram-sky130[=path]
    If enabled, the 3rd-party SRAM macro library 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-sram-space-sky130[=path]
    If enabled, the SRAM build space macro library sky130 fd_bd_sram will be installed. This library contains the base cells for single- and dual-port SRAM cores.
    --enable-osu-t12-sky130[=path]
    If enabled, the 3rd-party open-source OSU 12-track height digital standard cell library sky130_osu_sc_t12 will be installed.
    --enable-osu-t15-sky130[=path]
    If enabled, the 3rd-party open-source OSU 15-track height digital standard cell library sky130_osu_sc_t15 will be installed.
    --enable-osu-t18-sky130[=path]
    If enabled, the 3rd-party open-source OSU 18-track height digital standard cell library sky130_osu_sc_t18 will be installed.
    The packages enabled by default for sky130 which may be disabled from the configuration command line are as follows:

    --disable-primitive-sky130
    The base primitive device library sky130_fd_pr will not be installed.
    --disable-io-sky130
    The base I/O cell library sky130_fd_io will not be installed.
    --disable-sc-hs-sky130
    The base high-speed digital standard cell library sky130_fd_sc_hs will not be installed.
    --disable-sc-ms-sky130
    The base medium-speed digital standard cell library sky130_fd_sc_ms will not be installed.
    --disable-sc-ls-sky130
    The base low-speed digital standard cell library sky130_fd_sc_ls will not be installed.
    --disable-sc-lp-sky130
    The base low-power digital standard cell library sky130_fd_sc_lp will not be installed.
    --disable-sc-hd-sky130
    The base high-density digital standard cell library sky130_fd_sc_hd will not be installed.
    --disable-sc-hdll-sky130
    The base high-density, low-leakage digital standard cell library sky130_fd_sc_hdll will not be installed.
    --disable-sc-hvl-sky130
    The base high-voltage digital standard cell library sky130_fd_sc_hvl will not be installed.
    --disable-alpha-sky130
    The 3rd-party repository alphanumeric layout library will not be installed.
    --disable-xschem-sky130
    The 3rd-party repository with setup and libraries for xschem xschem_sky130 will not be installed.
    --disable-klayout-sky130
    The 3rd-party repository with DRC and LVS decks and tech files for klayout sky130_klayout_pdk will not be installed.
    --disable-precheck-sky130
    The 3rd-party repository with additional files mpw_precheck will not be installed.
    The main options for the Global Foundries gf180mcu PDK are:

    --enable-gf180mcu-pdk
    This option is mandatory for installing the Google/Global Foundries GF180MCU PDK.

    --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

    Other libraries for the Global Foundries gr180mcu PDK which are not enabled by default are:

    --enable-osu-sc-gf180mcu[=path]
    If enabled, the 3rd-party open-source OSU digital standard cell library globalfoundries-pdk-libs-gf180mcu_osu_sc will be installed.
    The packages enabled by default for gf180mcu which may be disabled from the configuration command line are as follows:

    --disable-primitive-gf180mcu
    The base primitive device library globalfoundries-pdk-libs-gf180mcu_fd_pr will not be installed.
    --disable-verification-gf180mcu
    The base physical verification library globalfoundries-pdk-libs-gf180mcu_fd_pv will not be installed.
    --disable-io-gf180mcu
    The base I/O library globalfoundries-pdk-libs-gf180mcu_fd_io will not be installed.
    --disable-sc-7t5v0-gf180mcu
    The base 7-track digital standard cell library globalfoundries-pdk-libs-gf180mcu_fd_sc_mcu7t5v0 will not be installed.
    --disable-sc-9t5v0-gf180mcu
    The base 9-track digital standard cell library globalfoundries-pdk-libs-gf180mcu_fd_sc_mcu9t5v0 will not be installed.
    --disable-sram-gf180mcu
    The base SRAM macro library globalfoundries-pdk-libs-gf180mcu_ip_sram will not be installed.
    Additional libraries may be available which are not listed above; please use ./configure --help to view all available options.

    Example:

    ./configure --enable-sky130-pdk \
    --prefix=~/cad --disable-fd-sc-ms-sky130 --enable-sram-sky130
    The above configuration line assumes that the skywater-pdk library repositories will be cloned into the subdirectory "sources" of open_pdks, 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 except for the medium-speed standard cell library; 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 specified PDK (sky130 or gf180mcu), 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: August 8, 2023 at 4:41pm