2.2. Hammer Tech JSON

The tech.json for a given technology sets up some general information about the install of the PDK, sets up DRC rule decks, sets up pointers to PDK files, and supplies technology stackup information. For the full schema of the tech JSON, please see the Full Schema section below, which is derived from the TechJSON Pydantic BaseModel in hammer/tech/__init__.py.

2.2.1. Technology Install

The user may supply the PDK to Hammer as an already extracted directory and/or as a tarball that Hammer can automatically extract. Setting technology.TECH_NAME. install_dir and/or tarball_dir (key is setup in the defaults.yml) will fill in as the path prefix for paths supplied to PDK files in the rest of the tech.json. Below is an example of the installs and tarballs from the ASAP7 plugin.

"name": "ASAP7 Library",
"grid_unit": "0.001",
"installs": [
  {
    "id": "$PDK",
    "path": "technology.asap7.pdk_install_dir"
  },
  {
    "id": "$STDCELLS",
    "path": "technology.asap7.stdcell_install_dir"
  }
],
"tarballs": [
  {
    "root": {
      "id": "ASAP7_PDK_CalibreDeck.tar",
      "path": "technology.asap7.tarball_dir"
    },
    "homepage": "http://asap.asu.edu/asap/",
    "optional": true
  }
],

The id field is used within the file listings further down in the file to prefix path, as shown in detail below. If the file listing begins with cache, then this denotes files that exist in the tech cache, which are generally placed there by the tech plugin’s post-installation script (see ASAP7’s post_install_script method). Finally, the encrypted Calibre decks are provided in a tarball and denoted as optional.

2.2.2. DRC/LVS Deck Setup

As many DRC & LVS decks for as many tools can be specified in the drc decks and lvs decks keys. Additional DRC/LVS commands can be appended to the generated run files by specifying raw text in the additional_drc_text and additional_lvs_text keys. Below is an example of an LVS deck from the ASAP7 plugin.

"lvs_decks": [
  {
    "tool_name": "calibre",
    "deck_name": "all_lvs",
    "path": "ASAP7_PDK_CalibreDeck.tar/calibredecks_r1p7/calibre/ruledirs/lvs/lvsRules_calibre_asap7.rul"
  }
],
"additional_lvs_text": "LVS SPICE EXCLUDE CELL \*SRAM*RW*\"\nLVS BOX \"SRAM*RW*\"\nLVS FILTER \*SRAM*RW*\" OPEN",

The file pointers, in this case, use the tarball prefix because Hammer will be extracting the rule deck directly from the ASAP7 tarball. The additional text is needed to tell Calibre that the dummy SRAM cells need to be filtered from the source netlist and boxed and filtered from the layout.

2.2.3. Library Setup

The libraries key also must be setup in the JSON plugin. This will tell Hammer where to find all of the relevant files for standard cells and other blocks for the VLSI flow. Below is an example of the start of the library setup and one entry from the ASAP7 plugin.

"libraries": [
  {
    "lef_file": "$STDCELLS/techlef_misc/asap7_tech_4x_201209.lef",
    "provides": [
      {
        "lib_type": "technology"
      }
    ]
  },
  {
    "nldm_liberty_file": "$STDCELLS/LIB/NLDM/asap7sc7p5t_SIMPLE_RVT_TT_nldm_201020.lib.gz",
    "verilog_sim": "$STDCELLS/Verilog/asap7sc7p5t_SIMPLE_RVT_TT_201020.v",
    "lef_file": "$STDCELLS/LEF/scaled/asap7sc7p5t_27_R_4x_201211.lef",
    "spice_file": "$STDCELLS/CDL/LVS/asap7sc7p5t_27_R.cdl",
    "gds_file": "$STDCELLS/GDS/asap7sc7p5t_27_R_201211.gds",
    "qrc_techfile": "$STDCELLS/qrc/qrcTechFile_typ03_scaled4xV06",
    "spice_model_file": {
      "path": "$PDK/models/hspice/7nm_TT.pm"
    },
    "corner": {
      "nmos": "typical",
      "pmos": "typical",
      "temperature": "25 C"
    },
    "supplies": {
      "VDD": "0.70 V",
      "GND": "0 V"
    },
    "provides": [
      {
        "lib_type": "stdcell",
        "vt": "RVT"
      }
    ]
  },

The file pointers, in this case, use the $PDK and $STDCELLS prefix as defined in the installs. The corner key tells Hammer what process and temperature corner that these files correspond to. The supplies key tells Hammer what the nominal supply for these cells are. The provides key has several sub-keys that tell Hammer what kind of library this is (examples include stdcell, fiducials, io pad cells, bump, and level shifters) and the threshold voltage flavor of the cells, if applicable. Adding the tech LEF for the technology with the lib_type set as technology is necessary for place and route.

2.2.3.1. Library Filters

Library filters are defined in the LibraryFilter class in hammer/tech/__init__.py. These allow you to filter the entire set of libraries based on specific conditions, such as a file type or corner. Additional functions can be used to extract paths, strings, sort, and post-process the filtered libraries.

For a list of pre-built library filters, refer to the properties in the LibraryFilterHolder class in the same file, accessed as hammer.tech.filters.<filter_method>

2.2.4. Stackup

The stackups sets up the important metal layer information for Hammer to use. Below is an example of one metal layer in the metals list from the ASAP7 example tech plugin.

{"name": "M3", "index": 3, "direction": "vertical", "min_width": 0.072, "pitch": 0.144, "offset": 0.0, "power_strap_widths_and_spacings": [{"width_at_least": 0.0, "min_spacing": 0.072}], "power_strap_width_table": [0.072, 0.36, 0.648, 0.936, 1.224, 1.512]}

All this information is typically taken from the tech LEF and can be automatically filled in with a script. The metal layer name and layer number is specified. direction specifies the preferred routing direction for the layer. min_width and pitch specify the minimum width wire and the track pitch, respectively. power_strap_widths_and_spacings is a list of pairs that specify design rules relating to the widths of wires and minimum required spacing between them. This information is used by Hammer when drawing power straps to make sure it is conforming to some basic design rules.

2.2.5. Sites

The sites field specifies the unit standard cell size of the technology for Hammer.

"sites": [
  {"name": "asap7sc7p5t", "x": 0.216, "y": 1.08}
]

This is an example from the ASAP7 tech plugin in which the name parameter specifies the core site name used in the tech LEF, and the x and y parameters specify the width and height of the unit standard cell size, respectively.

2.2.6. Special Cells

The special_cells field specifies a set of cells in the technology that have special functions. The example below shows a subset of the ASAP7 tech plugin for 2 types of cells: tapcell and stdfiller.

"special_cells": [
  {"cell_type": "tapcell", "name": ["TAPCELL_ASAP7_75t_L"]},
  {"cell_type": "stdfiller", "name": ["FILLER_ASAP7_75t_R", "FILLER_ASAP7_75t_L", "FILLER_ASAP7_75t_SL", "FILLER_ASAP7_75t_SRAM", "FILLERxp5_ASAP7_75t_R", "FILLERxp5_ASAP7_75t_L", "FILLERxp5_ASAP7_75t_SL", "FILLERxp5_ASAP7_75t_SRAM"]},

See the SpecialCell subsection in the Full Schema for a list of special cell types. Depending on the tech/tool, some of these cell types can only have 1 cell in the name list.

There is an optional size list. For each element in its corresponding name list, a size (type: str) can be given. An example of how this is used is for decap cells, where each listed cell has a typical capacitance, which a place and route tool can then use to place decaps to hit a target total decapacitance value. After characterizing the ASAP7 decaps using Voltus, the nominal capacitance is filled into the size list:

{"cell_type": "decap", "name": ["DECAPx1_ASAP7_75t_R", "DECAPx1_ASAP7_75t_L", "DECAPx1_ASAP7_75t_SL", "DECAPx1_ASAP7_75t_SRAM", "DECAPx2_ASAP7_75t_R", "DECAPx2_ASAP7_75t_L", "DECAPx2_ASAP7_75t_SL", "DECAPx2_ASAP7_75t_SRAM", "DECAPx2b_ASAP7_75t_R", "DECAPx2b_ASAP7_75t_L", "DECAPx2b_ASAP7_75t_SL", "DECAPx2b_ASAP7_75t_SRAM", "DECAPx4_ASAP7_75t_R", "DECAPx4_ASAP7_75t_L", "DECAPx4_ASAP7_75t_SL", "DECAPx4_ASAP7_75t_SRAM", "DECAPx6_ASAP7_75t_R", "DECAPx6_ASAP7_75t_L", "DECAPx6_ASAP7_75t_SL", "DECAPx6_ASAP7_75t_SRAM", "DECAPx10_ASAP7_75t_R", "DECAPx10_ASAP7_75t_L", "DECAPx10_ASAP7_75t_SL", "DECAPx10_ASAP7_75t_SRAM"], "size": ["0.39637 fF", "0.402151 fF", "0.406615 fF", "0.377040 fF","0.792751 fF", "0.804301 fF", "0.813231 fF", "0.74080 fF", "0.792761 fF", "0.804309 fF", "0.813238 fF","0.75409 fF", "1.5855 fF", "1.6086 fF", "1.62646 fF", "1.50861 fF", "2.37825 fF", "2.4129 fF", "2.43969 fF", "2.26224 fF", "3.96376 fF", "4.02151 fF", "4.06615 fF", "3.7704 fF"]},

2.2.7. Don’t Use, Physical-Only Cells

The dont_use_list is used to denote cells that should be excluded due to things like bad timing models or layout. The physical_only_cells_list is used to denote cells that contain only physical geometry, which means that they should be excluded from netlisting for simulation and LVS. Examples from the ASAP7 plugin are below:

"dont_use_list": [
    "ICGx*DC*",
    "AND4x1*",
    "SDFLx2*",
    "AO21x1*",
    "XOR2x2*",
    "OAI31xp33*",
    "OAI221xp5*",
    "SDFLx3*",
    "SDFLx1*",
    "AOI211xp5*",
    "OAI322xp33*",
    "OR2x6*",
    "A2O1A1O1Ixp25*",
    "XNOR2x1*",
    "OAI32xp33*",
    "FAx1*",
    "OAI21x1*",
    "OAI31xp67*",
    "OAI33xp33*",
    "AO21x2*",
    "AOI32xp33*"
],
"physical_only_cells_list": [
  "TAPCELL_ASAP7_75t_R", "TAPCELL_ASAP7_75t_L", "TAPCELL_ASAP7_75t_SL", "TAPCELL_ASAP7_75t_SRAM",
  "TAPCELL_WITH_FILLER_ASAP7_75t_R", "TAPCELL_WITH_FILLER_ASAP7_75t_L", "TAPCELL_WITH_FILLER_ASAP7_75t_SL", "TAPCELL_WITH_FILLER_ASAP7_75t_SRAM",
  "FILLER_ASAP7_75t_R", "FILLER_ASAP7_75t_L", "FILLER_ASAP7_75t_SL", "FILLER_ASAP7_75t_SRAM",
  "FILLERxp5_ASAP7_75t_R", "FILLERxp5_ASAP7_75t_L", "FILLERxp5_ASAP7_75t_SL", "FILLERxp5_ASAP7_75t_SRAM"
],

2.2.8. Full Schema

Note that in the the schema tables presented below, items with #/definitions/<class_name> are defined in other schema tables. This is done for documentation clarity, but in your JSON file, those items would be hierarchically nested.

2.2.8.1. TechJSON

type

object

properties

  • name

Name

type

string

  • grid_unit

Grid Unit

default

null

anyOf

type

string

type

null

  • shrink_factor

Shrink Factor

default

null

anyOf

type

string

type

null

  • installs

Installs

default

null

anyOf

type

array

items

#/$defs/PathPrefix

type

null

  • libraries

Libraries

default

null

anyOf

type

array

items

#/$defs/Library

type

null

  • gds_map_file

Gds Map File

default

null

anyOf

type

string

type

null

  • physical_only_cells_list

Physical Only Cells List

default

null

anyOf

type

array

items

type

string

type

null

  • dont_use_list

Dont Use List

default

null

anyOf

type

array

items

type

string

type

null

  • drc_decks

Drc Decks

default

null

anyOf

type

array

items

#/$defs/DRCDeck

type

null

  • lvs_decks

Lvs Decks

default

null

anyOf

type

array

items

#/$defs/LVSDeck

type

null

  • tarballs

Tarballs

default

null

anyOf

type

array

items

#/$defs/Tarball

type

null

  • sites

Sites

default

null

anyOf

type

array

items

#/$defs/Site

type

null

  • stackups

Stackups

default

null

anyOf

type

array

items

#/$defs/Stackup

type

null

  • special_cells

Special Cells

default

null

anyOf

type

array

items

#/$defs/SpecialCell

type

null

  • extra_prefixes

Extra Prefixes

default

null

anyOf

type

array

items

#/$defs/PathPrefix

type

null

  • additional_lvs_text

Additional Lvs Text

default

null

anyOf

type

string

type

null

  • additional_drc_text

Additional Drc Text

default

null

anyOf

type

string

type

null

2.2.8.1.1. CellType

type

string

enum

tiehicell, tielocell, tiehilocell, endcap, iofiller, stdfiller, decap, tapcell, driver, ctsbuffer, ctsinverter, ctsgate, ctslogic

2.2.8.1.2. Corner

type

object

properties

  • nmos

Nmos

type

string

  • pmos

Pmos

type

string

  • temperature

Temperature

type

string

2.2.8.1.3. DRCDeck

type

object

properties

  • tool_name

Tool Name

type

string

  • deck_name

Deck Name

type

string

  • path

Path

type

string

2.2.8.1.4. LVSDeck

type

object

properties

  • tool_name

Tool Name

type

string

  • deck_name

Deck Name

type

string

  • path

Path

type

string

2.2.8.1.5. Library

type

object

properties

  • name

Name

default

null

anyOf

type

string

type

null

  • ccs_liberty_file

Ccs Liberty File

default

null

anyOf

type

string

type

null

  • ccs_library_file

Ccs Library File

default

null

anyOf

type

string

type

null

  • ecsm_liberty_file

Ecsm Liberty File

default

null

anyOf

type

string

type

null

  • ecsm_library_file

Ecsm Library File

default

null

anyOf

type

string

type

null

  • corner

default

null

anyOf

#/$defs/Corner

type

null

  • itf_files

default

null

anyOf

#/$defs/MinMaxCap

type

null

  • lef_file

Lef File

default

null

anyOf

type

string

type

null

  • klayout_techfile

Klayout Techfile

default

null

anyOf

type

string

type

null

  • spice_file

Spice File

default

null

anyOf

type

string

type

null

  • gds_file

Gds File

default

null

anyOf

type

string

type

null

  • milkyway_lib_in_dir

Milkyway Lib In Dir

default

null

anyOf

type

string

type

null

  • milkyway_techfile

Milkyway Techfile

default

null

anyOf

type

string

type

null

  • nldm_liberty_file

Nldm Liberty File

default

null

anyOf

type

string

type

null

  • nldm_library_file

Nldm Library File

default

null

anyOf

type

string

type

null

  • openaccess_techfile

Openaccess Techfile

default

null

anyOf

type

string

type

null

  • provides

Provides

default

null

anyOf

type

array

items

#/$defs/Provide

type

null

  • qrc_techfile

Qrc Techfile

default

null

anyOf

type

string

type

null

  • supplies

default

null

anyOf

#/$defs/Supplies

type

null

  • tluplus_files

default

null

anyOf

#/$defs/MinMaxCap

type

null

  • tluplus_map_file

Tluplus Map File

default

null

anyOf

type

string

type

null

  • verilog_sim

Verilog Sim

default

null

anyOf

type

string

type

null

  • verilog_synth

Verilog Synth

default

null

anyOf

type

string

type

null

  • spice_model_file

default

null

anyOf

#/$defs/SpiceModelFile

type

null

  • power_grid_library

Power Grid Library

default

null

anyOf

type

string

type

null

  • extra_prefixes

Extra Prefixes

default

null

anyOf

type

array

items

#/$defs/PathPrefix

type

null

  • def_file

Def File

default

null

anyOf

type

string

type

null

2.2.8.1.6. Metal

A metal layer and some basic info about it.

name: Metal layer name (e.g. M1, M2). index: The order in the stackup (lower is closer to the substrate). direction: The preferred routing direction of this metal layer, or

RoutingDirection.Redistribution for non-routing top-level redistribution metals like Aluminium.

min_width: The minimum wire width for this layer. max_width: The maximum wire width for this layer. pitch: The minimum cross-mask pitch for this layer (NOT same-mask pitch

for multiple-patterned layers). Width of routing grid for a given layer. To route denser wires on chip, multiple masks are required. During fabrication, the masks are applied separately with some spatial offsets to achieve denser line patterning. For more information on multiple-patterning, check https://en.wikipedia.org/wiki/Multiple_patterning

offset: The routing track offset from the origin for the first track in this layer.

(0 = first track is on an axis).

power_strap_widths_and_spacings: A list of WidthSpacingTuples that specify the minimum

spacing rules for an infinitely long wire of variying width.

power_strap_width_table: A list of allowed metal widths in the technology.

Widths smaller than the last number must be quantized to a value in the table.

grid_unit: The fixed-point decimal value of a minimum grid unit (e.g. 1nm = 0.001).

For most technologies, this comes from the technology plugin and is the same for all layers.

type

object

properties

  • name

Name

type

string

  • index

Index

type

integer

  • direction

#/$defs/RoutingDirection

  • min_width

Min Width

anyOf

type

number

type

string

  • max_width

Max Width

default

null

anyOf

type

number

type

string

type

null

  • pitch

Pitch

anyOf

type

number

type

string

  • offset

Offset

anyOf

type

number

type

string

  • power_strap_widths_and_spacings

Power Strap Widths And Spacings

type

array

items

#/$defs/WidthSpacingTuple

  • power_strap_width_table

Power Strap Width Table

type

array

default

items

anyOf

type

number

type

string

  • grid_unit

Grid Unit

anyOf

type

number

type

string

2.2.8.1.7. MinMaxCap

type

object

properties

  • max_cap

Max Cap

type

string

  • min_cap

Min Cap

type

string

2.2.8.1.8. PathPrefix

A path prefix which defines an identifier and its corresponding path.

Example: A PathPrefix(id = “Alib”, path = “/scratch/projectA/mylib”) maps the identifier

‘Alib’ to the path ‘/scratch/projectA/mylib’

type

object

properties

  • id

Id

type

string

  • path

Path

type

string

2.2.8.1.9. Provide

type

object

properties

  • lib_type

Lib Type

type

string

  • vt

Vt

default

null

anyOf

type

string

type

null

2.2.8.1.10. RoutingDirection

Represents a preferred routing direction for a metal layer. Note that this represents a preferred direction, not a DRC rule.

type

string

enum

vertical, horizontal, redistribution

2.2.8.1.11. Site

A standard cell site, which is the minimum unit of x and y dimensions a standard cell can have.

name: The name of this site (often something like “core”) as defined in the tech and standard cell LEFs x: The x dimension y: The y dimension

type

object

properties

  • name

Name

type

string

  • x

X

anyOf

type

number

type

string

  • y

Y

anyOf

type

number

type

string

2.2.8.1.12. SpecialCell

type

object

properties

  • cell_type

#/$defs/CellType

  • name

Name

type

array

items

type

string

  • size

Size

default

null

anyOf

type

array

items

type

string

type

null

  • input_ports

Input Ports

default

null

anyOf

type

array

items

type

string

type

null

  • output_ports

Output Ports

default

null

anyOf

type

array

items

type

string

type

null

2.2.8.1.13. SpiceModelFile

type

object

properties

  • path

Path

type

string

  • lib_corner

Lib Corner

default

null

anyOf

type

string

type

null

2.2.8.1.14. Stackup

A stackup is a list of metals with a meaningful keyword name (for now).

TODO: add vias, etc when we need them

type

object

properties

  • grid_unit

Grid Unit

anyOf

type

number

type

string

  • name

Name

type

string

  • metals

Metals

type

array

items

#/$defs/Metal

2.2.8.1.15. Supplies

type

object

properties

  • GND

Gnd

type

string

  • VDD

Vdd

type

string

2.2.8.1.16. Tarball

type

object

properties

  • root

#/$defs/PathPrefix

  • homepage

Homepage

type

string

  • optional

Optional

type

boolean

default

False

2.2.8.1.17. WidthSpacingTuple

A tuple of wire width limit and spacing for generating a piecewise linear rule for spacing based on wire width.

width_at_least: Any wires larger than this must obey the minSpacing rule. min_spacing: The minimum spacing for this bin.

If a wire is wider than multiple entries, the worst-case (larger) minSpacing wins.

type

object

properties

  • width_at_least

Width At Least

anyOf

type

number

type

string

  • min_spacing

Min Spacing

anyOf

type

number

type

string