Porting a pdk

This readme describes how to port a pdk to openlane.

Folder structure

This is the expected folder structure for a pdk:

  • <pdk_name>
    • libs.tech
      • openlane
        • config.tcl
        • common_pdn.tcl
        • common_tracks.info
        • <variant_name>
          • config.tcl
    • libs.ref
      • lef
      • techLEF
      • lib

Configuration files

  • config.tcl Pdk configuration file contains common information for all the variants
  • <variant_name>/config.tcl Variant configuration file which contains information specific to that variant It can overwrite pdk configuration file.
  • common_pdn.tcl Pdn configuration file. Refer to pdn configuration section.
  • common_tracks.info Conatins information about the metal layers offesets and pitches. Refer to tracks configuration file section

Pdk Variables

This section defines the neccessary variables for pdk configuration file

VariableDescription
DEF_UNITS_PER_MICRONDefines the unit distance microns. Used during floorplanning for proper def file generation.
PLACE_SITEDefines the main site used by the cells. Used during floorplanning to generate the rows.
PLACE_SITE_WIDTHDefines the main site width.Used during floorplanning to generate the rows.
PLACE_SITE_HEIGHTDefines the main site height.Used during floorplanning to generate the rows.
VDD_PINDefines the power pin of the cells.
GND_PINDefines the ground pin of the cells.
TRACKS_INFO_FILEPoints to the path of the tracks file. Used by the floorplanner to generate tracks
TECH_LEFPoints to the path of the techlef.
CELLS_LEFA list of paths to the cells lef views. Recommended to use wild card to catch all the files as follows: [glob "$::env(PDK_ROOT)/$::env(PDK)/libs.ref/lef/$::env(PDK_VARIANT)/*.lef"]
MAGIC_TECH_FILEPoints to the magic tech file which mainly has drc rules.
MAGIC_MAGICRCPoints to the magicrc file that is sourced while running magic in the flow.
GPIO_PADS_LEFA list of the pads lef views. Recommended to use wild card to catch all the files as follows:[glob "$::env(PDK_ROOT)/$::env(PDK)/libs.ref/lef/s8iom0s8/routing_abstract/*.lef"]
NETGEN_SETUP_FILEPoints to the setup file for netgen(lvs), that can exclude certain cells etc..
FP_TAPCELL_DISTThe distance between tapcell columns. Used in floorplanning in tapcell insertion.

Pdk variant variables

This section defines the neccessary variables for pdk variant configuration file

VariableDescription
LIB_SYNTHPoints to the lib file used during synthesis.
LIB_MAXPoints to the lib file for max delay calculation during STA.
LIB_MINPoints to the lib file for min delay calculation during STA.
LIB_TYPICALPoints to the lib file for typical delay calculation during STA.
FP_WELLTAP_CELLDefines the tapcell to be used in tapcell insertion
FP_ENDCAP_CELLDefines the decapcell. Inserted during floorplanning at the sides of the design.
SYNTH_DRIVING_CELLDefines the cell to drive the input ports. Used in synthesis
SYNTH_DRIVING_CELL_PINDefines the driving cell output pin. Used in synthesis
SYNTH_CAP_LOADDefines the capacitive load on the output ports in femtofarads. Used in synthesis
SYNTH_MIN_BUF_PORTDefines the buffer, followed by its input port and output port to be used by ins_buf statmement by yosys. It insert buffer cells into the design for directly connected wires. Example: scs8hd_buf_2 A X
SYNTH_TIEHI_PORTDefines the tie high cell followed by the port that implements the tie high functionality. Usined in synthesis. Example: scs8hd_conb_1 HI
SYNTH_TIELO_PORTDefines the tie low cell followed by the port that implements the tie high functionality. Usined in synthesis. Example: scs8hd_conb_1 LO
CELL_CLK_PORTDefines the name of clk port of the flip flops and other cells. Used in CTS.
PL_LIBPoints to the lib view used in time driven placment.
FILL_CELLDefines the fill cell. Used in fill insertion. Can use a wild card to define a class of cells. Example scs8hd_fill_*
DECAP_CELLDefines the decap cell used for fill insertion. Can use a wild card to define a class of cells. Example scs8hd_fill_*
CELL_PADDefines the number of sites to pad the cells lef views with.
CELL_PAD_EXECLUDEDefines the cells to execlude from pading.
CTS_ROOT_BUFFERDefines the cell inserted at the root of the clock tree. Used in CTS.
ROOT_CLK_BUFFERDefines the cell inserted at the root of the clock tree. Used in CTS
CLK_BUFFERDefines the clock buffer cell. Used in CTS.
CLK_BUFFER_INPUTDefines the clock buffer cell input port. Used in CTS.
CLK_BUFFER_OUTPUTDefines the clock buffer cell output port. Used in CTS.

Tracks info file

The tracks files defines the metal layers pitches and offests. This information should be extracted from the pdk's tech lef. The following is the format of the files

<layer name> X|Y <offset> <pitch>

pdn configuration file

todo

Additional self notes

  • Not all pdks include tapcells, should add a flag or check for tapcell definition to run tapcell insertion step
  • Core margin should be pdk specific at least, as it is related to the routing grid
  • io layers should be pdk specific, they are related to the metal stack of a pdk