Setup

Installation

COmPOSER needs a Python environment, a valid Gurobi license for placement, and a GCC 7 or newer C++14 compiler to build machine-compatible router binaries.

Recommended Setup

Use Python 3.10 for the validated pinned environment. Python 3.8 cannot install the current dependency set, and newer Python versions have not all been validated with these pins. Install a C++ compiler before installing the Python packages: gdspy builds from source. The Linux validation used GCC; Windows needs the appropriate Microsoft C++ build tools and was not tested in this validation.

git clone <your-repo-url>
cd COmPOSER
python3.10 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade "pip<25.1"
python -m pip install -r requirements.txt
export PROJECT_HOME="$(pwd)"

Python Packages

The repo's requirements.txt covers the main package families used by the flow:

  • gdspy
  • gurobipy
  • joblib
  • matplotlib
  • networkx
  • numpy
  • pandas
  • plotly
  • scikit_learn
  • scipy
  • Shapely
  • tqdm

Install with python -m pip install -r requirements.txt. The -r option is required; without it, pip searches for a package named requirements.txt. Use a virtual environment to avoid global-package conflicts.

Gurobi

perform_placement.py imports gurobipy. Keep gurobi.lic outside the repository and set GRB_LICENSE_FILE to its exact absolute path. On Linux, Gurobi also searches ~/gurobi.lic.

export GRB_LICENSE_FILE="/absolute/path/to/gurobi.lic"

Compiler Requirement

The router uses -std=c++14. GCC 7 or newer is recommended; GCC 4.8.5 is too old.

g++ --version

Build the Routers Locally

make -C ROUTER/hanan_router clean
make -C ROUTER/hanan_router -j4
make -C ROUTER/pdn_router clean
make -C ROUTER/pdn_router -j4

Run clean and make separately because the original Makefile has no explicit all target. Rebuild on every new machine instead of using a copied binary.

Troubleshooting GCC and libstdc++

Unrecognized -std=c++14

The compiler is too old. Load an available GCC 7+ toolchain and rebuild:

module avail gcc
module load gcc/9
g++ --version
make -C ROUTER/hanan_router clean
make -C ROUTER/hanan_router -j4

GLIBCXX_3.4.21 not found

The binary was built against a newer libstdc++ than the runtime being loaded. Load the intended compiler/runtime and rebuild locally after make clean.

ldd ROUTER/hanan_router/hanan_router | grep libstdc++

On CentOS/RHEL 7, a site-provided Software Collection may be enabled with source /opt/rh/devtoolset-11/enable. On clusters, use the site-specific module name. Do not remove -std=c++14.

Mock PDK and Fixed Assets

The repo already contains a mock 65 nm PDK layer file and several fixed primitive GDS files. They are enough to exercise the public flow, but not meant to replace technology-correct production collateral.

Connected PDN Routing

After both routers are built, use the normal driver:

./composer.sh EXAMPLES/LNA_1/config.json

composer.sh automatically invokes connected-PDN routing when the selected configuration contains pdn_routing. No second configuration or manual continuation command is required. See PDN Routing for configuration, generated artifacts, and hierarchy.