stp is a Semi-Tensor Product (STP) engine for Electronic Design Automation (EDA).
The default implementation uses a compressed-vector representation for logic simulation.
Optional backends serve distinct purposes:
- Eigen: reference backend for validating the compressed-vector implementation.
- CUDA: accelerated backend for larger workloads.
The default build does not require Eigen or CUDA.
git clone https://github.com/nbulsi/stp.git
cd stp
cmake -S . -B build
cmake --build build -j
./build/bin/stpEnable Eigen only when building or validating the Eigen-based reference backend:
cmake -S . -B build/eigen -DSTP_ENABLE_EIGEN=ON
cmake --build build/eigen -jIf CMake cannot locate Eigen3, install it and provide its installation prefix:
cmake -S . -B build/eigen -DSTP_ENABLE_EIGEN=ON \
-DCMAKE_PREFIX_PATH=/path/to/eigen-install-prefixEnable CUDA only when the host has an NVIDIA GPU, a compatible NVIDIA driver, and a CUDA Toolkit
whose nvcc compiler is available on PATH. Verify the toolchain with nvcc --version.
cmake -S . -B build/cuda -DSTP_ENABLE_CUDA=ON
cmake --build build/cuda -jThe Eigen and CUDA options are independent and can be enabled together when needed.
Start the interactive shell:
./build/bin/stpSimulate a LUT BENCH circuit. The default report prints each output truth table in hexadecimal and the simulation runtime:
sim -l yourcase.benchPrint the detailed input/output truth table as well:
sim -l --verbose yourcase.bench