### Install SkyWater PDK and Libraries Source: https://context7.com/google/skywater-pdk/llms.txt Commands to clone the repository, download standard cell submodules, and generate timing files. ```bash # Clone the SkyWater PDK repository git clone https://github.com/google/skywater-pdk.git cd skywater-pdk # Download all standard cell libraries (large download ~7GB) SUBMODULE_VERSION=latest make submodules -j3 || make submodules -j1 # Regenerate liberty timing files for all corners make timing ``` -------------------------------- ### 1.8V PMOS FET Device Instantiation Source: https://context7.com/google/skywater-pdk/llms.txt SPICE model parameters and instantiation examples for the 1.8V PMOS transistor, including a NAND gate example. ```spice * Available PMOS variants: * sky130_fd_pr__pfet_01v8 - Standard threshold * sky130_fd_pr__pfet_01v8_lvt - Low threshold voltage * sky130_fd_pr__pfet_01v8_hvt - High threshold voltage * Operating Voltages: * V_DS = 0 to -1.95V * V_GS = 0 to -1.95V * V_BS = -0.1 to +1.95V * Example: CMOS NAND gate .subckt nand2 a b y vdd vss * Pull-up network (PMOS in parallel) Mp1 y a vdd vdd sky130_fd_pr__pfet_01v8 W=0.84 L=0.15 Mp2 y b vdd vdd sky130_fd_pr__pfet_01v8 W=0.84 L=0.15 * Pull-down network (NMOS in series) Mn1 y a n1 vss sky130_fd_pr__nfet_01v8 W=0.42 L=0.15 Mn2 n1 b vss vss sky130_fd_pr__nfet_01v8 W=0.42 L=0.15 .ends nand2 ``` -------------------------------- ### 1.8V NMOS FET Device Instantiation Source: https://context7.com/google/skywater-pdk/llms.txt SPICE model parameters and instantiation examples for the 1.8V NMOS transistor. ```spice * SPICE Model: sky130_fd_pr__nfet_01v8 * Operating Voltages: * V_DS = 0 to 1.95V * V_GS = 0 to 1.95V * V_BS = +0.3 to -1.95V * Basic NMOS instantiation M1 drain gate source body sky130_fd_pr__nfet_01v8 W=0.42 L=0.15 * Example: Simple inverter .subckt inv in out vdd vss M1 out in vss vss sky130_fd_pr__nfet_01v8 W=0.42 L=0.15 M2 out in vdd vdd sky130_fd_pr__pfet_01v8 W=0.84 L=0.15 .ends inv ``` -------------------------------- ### Initialize PDK and Generate Liberty Files Source: https://github.com/google/skywater-pdk/blob/main/README.src.rst Commands to download standard cell libraries and regenerate timing files. Note that the submodule download is approximately 7GB. ```bash # Expect a large download! ~7GB at time of writing. SUBMODULE_VERSION=latest make submodules -j3 || make submodules -j1 # Regenerate liberty files make timing ``` -------------------------------- ### Check Versioning Format Source: https://context7.com/google/skywater-pdk/llms.txt Understand the semantic versioning scheme used for the PDK. ```text Version format: vX.Y.Z-AAA-gHHHHH v - Literal 'v' prefix X - Milestone Release (0=alpha, 1=beta, 2=production) Y - Major Release Number Z - Minor Release Number AAA - Git commit count since tag HHHHH - Git commit short hash Examples: v0.0.1 - Alpha, initial release v0.20.1 - Alpha, major release 20, patch 1 v1.0.0-15-gabc123 - Beta, 15 commits after v1.0.0 v2.0.0 - Production ready Get version in repository: git describe --tags ``` -------------------------------- ### Generate Liberty Files via CLI Source: https://context7.com/google/skywater-pdk/llms.txt Use the command-line interface to generate timing files and list available corners. ```bash # List available corners for a library python -m skywater_pdk.liberty libraries/sky130_fd_sc_hd/latest # Generate timing files for all corners python -m skywater_pdk.liberty libraries/sky130_fd_sc_hd/latest all # Generate with ccsnoise data python -m skywater_pdk.liberty libraries/sky130_fd_sc_hd/latest all --ccsnoise # Generate power leakage files (sky130_fd_sc_ms only) python -m skywater_pdk.liberty libraries/sky130_fd_sc_ms/latest all --leakage # Generate for specific corner with custom output directory python -m skywater_pdk.liberty libraries/sky130_fd_sc_hd/latest tt_025C_1v80 \ -o ./timing_output # Enable debug output python -m skywater_pdk.liberty libraries/sky130_fd_sc_hd/latest tt_025C_1v80 --debug ``` -------------------------------- ### Download and Update PDK Submodules Source: https://github.com/google/skywater-pdk/blob/main/README.rst Use these commands to download or update to the latest version of all standard cell libraries and regenerate liberty files. Expect a large download size. ```bash # Expect a large download! ~7GB at time of writing. SUBMODULE_VERSION=latest make submodules -j3 || make submodules -j1 ``` ```bash # Regenerate liberty files make timing ``` -------------------------------- ### Standard Cell Libraries Overview Source: https://context7.com/google/skywater-pdk/llms.txt Table of available foundry-provided standard cell libraries and their characteristics. ```text Library | VDD | Description | Cell Height | Gate Density ------------------|------|--------------------------------|-------------|------------- sky130_fd_sc_hd | 1.8V | High Density | 2.72um | 160k gates/mm² sky130_fd_sc_hdll | 1.8V | High Density, Low Leakage | 2.72um | 120k gates/mm² sky130_fd_sc_hs | 1.8V | High Speed | 3.33um | Compatible sky130_fd_sc_ms | 1.8V | Medium Speed | 3.33um | Compatible sky130_fd_sc_ls | 1.8V | Low Speed | 3.33um | Compatible sky130_fd_sc_lp | 1.8V | Low Power (~750 cells) | 3.33um | Compatible sky130_fd_sc_hvl | 5.0V | High Voltage | 4.07um | 100k gates/mm² Drop-in compatible: sky130_fd_sc_hs, sky130_fd_sc_ms, sky130_fd_sc_ls ``` -------------------------------- ### Generate Liberty Files via Python API Source: https://context7.com/google/skywater-pdk/llms.txt Collect library data and generate Liberty timing files for specific corners. ```python from skywater_pdk.liberty import collect, generate, TimingType # Collect available corners and cells from a library libdir = "libraries/sky130_fd_sc_hd/latest" lib, corners, all_cells = collect(libdir) print(f"Library: {lib}") # sky130_fd_sc_hd print(f"Corners: {list(corners.keys())[:5]}") # ['ff_100C_1v65', ...] print(f"Cells: {len(all_cells)}") # Number of cells # Generate liberty file for a specific corner corner = "tt_025C_1v80" corner_types, corner_cells = corners[corner] # TimingType options: # TimingType.basic - Standard timing # TimingType.ccsnoise - With CCS noise data # TimingType.leakage - Power leakage data generate( library_dir=libdir, lib=lib, corner=corner, ocorner_type=TimingType.basic, icorner_type=TimingType.basic, cells=corner_cells, output_directory="./output" ) ``` -------------------------------- ### Library Naming Convention Source: https://context7.com/google/skywater-pdk/llms.txt Visual breakdown of the library naming scheme used in the PDK. ```text sky130_fd_sc_hd │ │ │ └── Library Name: hd (high density) │ │ └───── Library Type: sc (standard cells) │ └──────── Source: fd (SkyWater Foundry) └─────────────── Process: sky130 ``` -------------------------------- ### PDK Copyright Notice Source: https://github.com/google/skywater-pdk/blob/main/README.src.rst Standard copyright and license header for PDK files. ```text Copyright 2020 SkyWater PDK Authors Licensed under the Apache License, Version 2.0 (the "License"); ``` -------------------------------- ### Path and Filename Parsing Source: https://context7.com/google/skywater-pdk/llms.txt Utilities for parsing cell paths and timing filenames to extract library and cell metadata. ```APIDOC ## parse_pathname ### Description Parses a full file path to extract cell and library information. ### Parameters - **path** (string) - Required - The full path to the cell file. ### Response - **cell** (object) - The parsed cell object. - **filename** (string) - The extracted filename. ## parse_filename ### Description Parses a timing filename to extract cell name, extra metadata, and file extension. ### Parameters - **filename** (string) - Required - The timing filename to parse. ### Response - **cell** (object) - The cell object containing the name. - **extra** (string) - Extra metadata string. - **ext** (string) - The file extension. ``` -------------------------------- ### Corner Parsing API Source: https://context7.com/google/skywater-pdk/llms.txt Extracts process corner information, including voltage, temperature, and flags, from filename strings. ```APIDOC ## parse_filename (Corners) ### Description Extracts corner information from a filename string. ### Parameters - **filename** (string) - Required - The filename containing corner information. ### Response - **corner** (object) - The Corner object containing corner types, voltages, temperatures, and flags. - **random** (any) - Additional parsed data. ``` -------------------------------- ### Extract Corner Information Source: https://context7.com/google/skywater-pdk/llms.txt Parse process corner details, temperature, and flags from timing filenames. ```python from skywater_pdk.corners import parse_filename, CornerType, CornerFlag # Parse corner information from filename corner, random = parse_filename('tt_1p80V_3p30V_3p30V_25C') print(corner) # Corner(corner=(CornerType.t, CornerType.t), volts=(1.8, 3.3, 3.3), # temps=(25,), flags=None) # Parse with ccsnoise flag corner, _ = parse_filename('sky130_fd_sc_ms__tt_1p80V_25C_ccsnoise.wrap.json') print(corner.flags) # (CornerFlag.ccsnoise,) # Parse worst-case corners (wp=ff, ws=ss, wo=fs, wz=sf) corner, _ = parse_filename('sky130_fd_sc_ms__wp_1p65V_n40C.wrap.json') print(corner.corner) # (CornerType.f, CornerType.f) - fast-fast # CornerType values: # t = Typical # f = Fast # s = Slow # Parse negative temperature corner, _ = parse_filename('sky130_fd_sc_hd__ss_1p76V_n40C.cell.json') print(corner.temps) # (-40,) ``` -------------------------------- ### Liberty File Generation Source: https://context7.com/google/skywater-pdk/llms.txt Collects library data and generates Liberty timing files for specific corners. ```APIDOC ## collect ### Description Collects available corners and cells from a library directory. ### Parameters - **libdir** (string) - Required - Path to the library directory. ## generate ### Description Generates a Liberty timing file for a specific corner. ### Parameters - **library_dir** (string) - Required - Path to the library. - **lib** (string) - Required - Library name. - **corner** (string) - Required - Corner identifier. - **ocorner_type** (TimingType) - Required - Output timing type. - **icorner_type** (TimingType) - Required - Input timing type. - **cells** (list) - Required - List of cells to include. - **output_directory** (string) - Required - Directory to save generated files. ``` -------------------------------- ### Parse PDK Pathnames and Filenames Source: https://context7.com/google/skywater-pdk/llms.txt Extract cell and library information from file paths or timing filenames. ```python # Parse a cell from full path cell, filename = parse_pathname( 'libraries/sky130_fd_sc_hd/v0.0.1/cells/a2111o/README.rst' ) print(cell) # Cell(name='a2111o', library=Library(..., version=LibraryVersion(0,0,1,...))) # Parse a timing filename cell, extra, ext = parse_filename( 'sky130_fd_sc_hd__a2111o_4__ss_1p76V_n40C.cell.json' ) print(cell.name) # 'a2111o_4' print(extra) # 'ss_1p76V_n40C' print(ext) # 'cell.json' ```