Skip to main content

Analog Layout Synthesis Package

Project description

CircleCI License Documentation Status

ALIGN: Analog Layout, Intelligently Generated from Netlists

ALIGN is an open-source automatic layout generator for analog circuits jointly developed under the DARPA IDEA program by the University of Minnesota, Texas A&M University, and Intel Corporation.

The goal of ALIGN (Analog Layout, Intelligently Generated from Netlists) is to automatically translate an unannotated (or partially annotated) SPICE netlist of an analog circuit to a GDSII layout. The repository also releases a set of analog circuit designs.

The ALIGN flow includes the following steps:

  • Circuit annotation creates a multilevel hierarchical representation of the input netlist. This representation is used to implement the circuit layout in using a hierarchical manner.
  • Design rule abstraction creates a compact JSON-format representation of the design rules in a PDK. This repository provides a mock PDK based on FinFET technology (where the parameters are based on published data). These design rules are used to guide the layout and ensure DRC-correctness.
  • Primitive cell generation works with primitives, i.e., blocks at the lowest level of the design hierarchy, and generates their layouts. Primitives typically contain a small number of transistor structures (each of which may be implemented using multiple fins and/or fingers). A parameterized instance of a primitive is automatically translated to a GDSII layout in this step.
  • Placement and routing performs block assembly of the hierarchical blocks in the netlist and routes connections between these blocks, while obeying a set of analog layout constraints. At the end of this step, the translation of the input SPICE netlist to a GDSII layout is complete.

Documentation

ALIGN documentation

Inputs

  • Circuit design inputs

    A SPICE file and constraint files (optional) need to be placed in a common folder. The name of the folder, SPICE file, and top-design name should match. Some examples are provided to showcase the applications of constraints to control the layout of the design.

  • Library:(SPICE format)

    A basic set of libraries is predefined within ALIGN to create a hierarchical layout. Designers can modify this based on their design style.

  • PDK: Abstracted design rules

    PDK setup needs to be configured for any new technology node. We provide multiple open-source PDK options.

Outputs

  • Design JSON: Final layout in JSON form which can be viewed using the ALIGN Viewer.
  • Layout GDS: Final layout of the design. The output GDS can be imported into any GDSII viewer.

Getting started

Docker image

If you are an user who does not require any changes to the source code, the recommended method to use ALIGN is the docker image hosted in dockerhub as: darpaalign/align-public. Use the image darpaalign/align-public:latest for the latest version of ALIGN. You will need to first build a personalized image based to ensure the files generated by containers have the appropriate user/group ID and permissions. You can do this using using the dockerfile and build.sh script in the install/ directory. Detailed instructions to pull, build, and run the docker image are in docker/README.

Steps 0-3 below are to install ALIGN locally. Step 4 is to run ALIGN either locally or inside a docker container.

Step 0: Check prerequisites

The following dependencies must be met by your system:

  • gcc >= 6.1.0 (For C++14 support)
  • python >= 3.7 (For PEP 560 support) You may optionally install Boost & lp_solve using your distro package manager (apt, yum, etc) to save some compilation time.

Note: In case you have multiple gcc versions installed on your system, we recommend explicitly setting the compiler paths as follows:

export CC=/path/to/your/gcc
export CXX=/path/to/your/g++

Step 1: Clone the ALIGN source code to your local environment

git clone https://github.com/ALIGN-analoglayout/ALIGN-public
cd ALIGN-public

Step 2: Create a Python virtualenv and install dependencies

Note: You may choose to skip this step if you are doing a system-wide install for multiple users. Please DO NOT skip this step if you are installing for personal use and/or you are a developer.

python -m venv general
source general/bin/activate
python -m pip install pip --upgrade
source install_deps.sh

Step 3a: Install ALIGN as a USER

If you already have a working installation of Python 3.8 or above, the easiest way to install ALIGN is:

pip install -v .

Step 3b: Install ALIGN as a DEVELOPER

If you are a developer, you may wish to install ALIGN with some additional flags.

For Python/C++ developers:

python setup.py develop -v

This installs align as an editable package in your current directory. This allows you to modify python files and test them out immediately. You will still need to re-run this command to build your C++ collateral (when you are changing branches for example). More on that is below.

If you would like to build the C++ version with the debug symbols in the object files (to see the symbols in a debugger):

env BUILD_TYPE='Debug' python setup.py develop -v

The second command doesn't just install ALIGN in-place, it also caches generated object files etc. under an _skbuild subdirectory. Re-running python setup.py install -v commands will reuse this cache to perform an incremental build. We add the -v or --verbose flag to be able to see build flags in the terminal.

If you want the build type to be Release (-O3), you can issue the following three lines:

env BUILD_TYPE='Release' BUILD_TESTING='ON' python setup.py develop -v

or

env BUILD_TYPE='RelWithDebInfo' BUILD_TESTING='ON' python setup.py develop -v

Use the Release mode if you are mostly developing in Python and don't need the C++ debugging symbols. Use the RelWithDebInfo if you need both debug symbols and optimized code.

To debug runtime issues, run:

python -m cProfile -o stats $ALIGN_HOME/bin/schematic2layout.py $ALIGN_HOME/examples/sc_dc_dc_converter

Then in a python shell:

import pstats
from pstats import SortKey
p = pstats.Stats('stats')
p.sort_stats(SortKey.TIME).print_stats(20)

To run tests similar to the check-in and merge-to-master CI runs run:

cd $ALIGN_HOME
# Checkin
pytest -vv
CI_LEVEL='checkin' pytest -n 4 -s -vv --runnightly --placer_sa_iterations 100 -- tests/integration/
# Merge to master
CI_LEVEL='merge' pytest -n 8 -s -vv --runnightly --maxerrors=20 --placer_sa_iterations 100 -- tests/integration/ tests/pdks

Step 4: Run ALIGN

You may run the align tool using a simple command line tool named schematic2layout.py For most common cases, you will simply run:

schematic2layout.py <NETLIST_DIR> -p <PDK_DIR> -c

For instance, to build the layout for telescopic_ota:

mkdir work && cd work
schematic2layout.py ../examples/telescopic_ota -p ../pdks/FinFET14nm_Mock_PDK/

For a full list of options supported by the tool, please use the following command:

schematic2layout.py -h

If you get an error libOsiCbc.so: cannot open shared object file, please add ${ALIGN_HOME}/_skbuild/<OSname_Arch_PythonVer>/cmake-install/lib to your LD_LIBRARY_PATH. ${ALIGN_HOME} is the path where ALIGN is installed. For e.g.:

export LD_LIBRARY_PATH=${LD_LIBRAR_PATH}:${ALIGN_HOME}/_skbuild/linux-x86_64-3.8/cmake-install/lib

Design database:

Viewer :

The final output GDS can be viewed using by importing in virtuoso or any GDS viewer

  • KLayout: GDS viewer (WSL users would need to install xming for displays to work)
  • Viewer: Layout viewer to view output JSON file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

align_analoglayout-0.9.8.tar.gz (20.1 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

align_analoglayout-0.9.8-cp313-cp313-manylinux_2_28_x86_64.whl (23.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

align_analoglayout-0.9.8-cp313-cp313-macosx_14_0_arm64.whl (7.6 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

align_analoglayout-0.9.8-cp312-cp312-manylinux_2_28_x86_64.whl (23.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

align_analoglayout-0.9.8-cp312-cp312-macosx_14_0_arm64.whl (7.6 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

align_analoglayout-0.9.8-cp311-cp311-manylinux_2_28_x86_64.whl (20.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

align_analoglayout-0.9.8-cp311-cp311-macosx_14_0_arm64.whl (7.6 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

align_analoglayout-0.9.8-cp310-cp310-manylinux_2_28_x86_64.whl (20.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

align_analoglayout-0.9.8-cp310-cp310-macosx_14_0_arm64.whl (7.6 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

File details

Details for the file align_analoglayout-0.9.8.tar.gz.

File metadata

  • Download URL: align_analoglayout-0.9.8.tar.gz
  • Upload date:
  • Size: 20.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for align_analoglayout-0.9.8.tar.gz
Algorithm Hash digest
SHA256 ffb092ff0579f80345c7731e1acd501428362b47b8060218a3e7971c383b019a
MD5 67f2d009a8207c8aff8b8ee01d876be1
BLAKE2b-256 ac8092f073307aa068495d748e9f050ad0c2383c7636320fa08f0e50eb969427

See more details on using hashes here.

Provenance

The following attestation bundles were made for align_analoglayout-0.9.8.tar.gz:

Publisher: publish-wheels.yml on ALIGN-analoglayout/ALIGN-public

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file align_analoglayout-0.9.8-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for align_analoglayout-0.9.8-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 70cea4064de8980f91ca5efa627ca9d40d461a9ab996c9b9ef655de30c7a563d
MD5 911e000ada7a3a328f927912b0eaa482
BLAKE2b-256 bc09fa8c118d5f2b7c44ecf6ba61b50e5c83cbc06f8281cbb1f35928c85dd791

See more details on using hashes here.

Provenance

The following attestation bundles were made for align_analoglayout-0.9.8-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: publish-wheels.yml on ALIGN-analoglayout/ALIGN-public

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file align_analoglayout-0.9.8-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for align_analoglayout-0.9.8-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 9714be1035fd7d05b942158d5cd2f99a5b137c263f22dab4afe3dd63d37a3bda
MD5 e6dd440c550575fa1abcda6f08ad2de1
BLAKE2b-256 b51857f128abf7fd982774ae71966df6d4a5f9fb6c3ae68a5eb923fb817d1fd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for align_analoglayout-0.9.8-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: publish-wheels.yml on ALIGN-analoglayout/ALIGN-public

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file align_analoglayout-0.9.8-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for align_analoglayout-0.9.8-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a349d3394c3347e6eeeb4aa147f9d876050751daea9a9b8c3432f0d518e7e21e
MD5 baa9cc9887f00aab8b239dea9b93caf0
BLAKE2b-256 ed5b6005cf41bdcc9523efea37f4d8e35ddd704a4fb0de385501f445c3d4083b

See more details on using hashes here.

Provenance

The following attestation bundles were made for align_analoglayout-0.9.8-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: publish-wheels.yml on ALIGN-analoglayout/ALIGN-public

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file align_analoglayout-0.9.8-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for align_analoglayout-0.9.8-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 b93ee4a0d0a140eba6285d4230d89fc523517dad239fc527f3ba8b95d66a2f29
MD5 28c69c1d098b992f54d6c7ed99e3e9da
BLAKE2b-256 5e5c593b787575d7c1959d65e359b2e01549ef2f00e967bc679631d6cd6cd889

See more details on using hashes here.

Provenance

The following attestation bundles were made for align_analoglayout-0.9.8-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: publish-wheels.yml on ALIGN-analoglayout/ALIGN-public

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file align_analoglayout-0.9.8-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for align_analoglayout-0.9.8-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cf519706a1cc20228aca85bcc79cae84a85d8ba06289acecaa5f0eb2814f98b3
MD5 17db62713e604161caf60eef9b1f1790
BLAKE2b-256 f136a5c2c1f7134949d8f2394b73b5c2ddf600f393530e98bda115055029115a

See more details on using hashes here.

Provenance

The following attestation bundles were made for align_analoglayout-0.9.8-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: publish-wheels.yml on ALIGN-analoglayout/ALIGN-public

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file align_analoglayout-0.9.8-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for align_analoglayout-0.9.8-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 22cdfa12aef3f4d57a639257d896d0e4f415b8d4e8c459db209ce8bfadd9ced9
MD5 bb87e43b1b0d4da4cffc774048904e5f
BLAKE2b-256 4fce84efb9845c21e66e389b6e3dd11e6d7e4d695675c1624c70605bf6f45ac6

See more details on using hashes here.

Provenance

The following attestation bundles were made for align_analoglayout-0.9.8-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: publish-wheels.yml on ALIGN-analoglayout/ALIGN-public

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file align_analoglayout-0.9.8-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for align_analoglayout-0.9.8-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d3ae86bf73f6cd5d4a16b32d9035c190d0dbaa08aae2743fd691be97df242398
MD5 9adb74b852ed49d9d7a4b516a87d0b88
BLAKE2b-256 360d98ec1058dbaf3e3e3d2635cf9c309261cbbbf7e2e3489e76b09fe8ff9634

See more details on using hashes here.

Provenance

The following attestation bundles were made for align_analoglayout-0.9.8-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: publish-wheels.yml on ALIGN-analoglayout/ALIGN-public

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file align_analoglayout-0.9.8-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for align_analoglayout-0.9.8-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 6767315c4bbb0889b2551712fdffb95ccf29907111b6b07d303c5336434a345c
MD5 e18144c18c11474833d8091c6a8821bb
BLAKE2b-256 4e2b3cd8e229ed76d8ba9f847477b095d7ff5086a059102f500a045c83a7b669

See more details on using hashes here.

Provenance

The following attestation bundles were made for align_analoglayout-0.9.8-cp310-cp310-macosx_14_0_arm64.whl:

Publisher: publish-wheels.yml on ALIGN-analoglayout/ALIGN-public

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page