Skip to content

Latest commit

 

History

History
93 lines (70 loc) · 2.76 KB

DEVELOPMENT.md

File metadata and controls

93 lines (70 loc) · 2.76 KB

KPEX Extractor

Prerequisites

  • cmake
    • NOTE: cmake/CPM.cmake will handle C++ dependencies
  • protobuf
  • python3 with pip packages:
    • poetry (will manage additional dependencies)

Optional prerequisites

  • allure (only needed for test reports)

Ubuntu / Debian installation

Install Python3.12 + VENV

sudo apt install python3.12-venv
python3 -m venv ~/myvenv
# also add to .bashrc / .zprofile:
source ~/myvenv/bin/activate
sudo apt install cmake libprotobuf-dev protobuf-compiler 
sudo apt install libcurl4-openssl-dev   # required for klayout pip module
pip3 install poetry
poetry update

Building

Calling ./build.sh release will:

  • create Python and C++ Protobuffer APIs for the given schema (present in protos)
  • compile the gen_tech_pb C++ tool

Generating KPEX Tech Info JSON files

Calling ./gen_tech_pb will create the JSON tech info files:

  • build/sky130A_tech.pb.json
  • build/ihp_sg13g2_tech.pb.json

Running KPEX

To quickly run a PEX example with KPEX/2.5D and KPEX/FasterCap engines:

./kpex.sh --tech build/sky130A_tech.pb.json \
  --out_dir output_sky130A \
  --2.5D yes \
  --fastercap yes \
  --gds testdata/sky130A/test_patterns/sideoverlap_complex_li1_m1.gds.gz

Debugging Hints for PyCharm

Enable rich logging

In your debugging configuration, set:

  • Modify Options > Emulate terminal in output console
  • Add environmental variable COLUMNS=120

Credits

Thanks to

  • Protocol Buffers for (de)serialization of data and shared data structures
  • CMake, for building on multiple platforms
  • CPM.cmake for making CMake dependency management easier