/bagnet_ngspice

Primary LanguageShellBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

BagNet release for NGSPICE

This repo contains the demo code for demonstraing the algorithm of BagNet in ngspice environment. BagNet results have been demonstrated in ICCAD 2019 and DAC 2019.

BagNet demo on BAG (Berkeley Analag Generator) with post layout simulations is comming soon.

setup

Clone the repo and update the submodules.

git clone
cd repo
git submodule update --init --recursive

NGSpice installation

NGspice 2.7 needs to be installed separately, via this installation link. Page 607 of the pdf manual on the website has instructions on how to install. Note that you might need to remove some of the flags to get it to install correctly for your machine.

Code structure

This repo contains two submodule:

  • (bb_envs): Contains example implementations of black-box environments used for optimization. For more info go to the link and read the documentation.
  • (deep_ckt): Contains the submodules for black-box env framework and the algorithms used for circuit optimization. Look into the submodule for more details.

running prepared experiements

command.sh contains the commands that reproduce the results of ICCAD paper for the two stage opamp optimization problem. You can comment/un-comment the sections that you deem necessary.

./commands.sh

running custom experiments

For custom experiments, a yaml file containing algorithm specifications should be passed to top level script located at ./deep_ckt/efficient_ga/run_scripts/main.py. For example:

./run.sh ./deep_ckt/efficient_ga/run_scripts/main.py specs/examples/cs_amp.yaml