Trial#

This section provides an introductory guide for begineers to get started with using laygo2.

Colab tutorial#

For individuals seeking to exercise the capabilities of laygo2 without local installation, Colab, a cloud-based Jupyter environment, can be utilized. The example tutorial can be accessed at this link.

Installation#

There are two available options for installing the laygo2 package.

1. Cloning from Github repository#

Users can obtain the latest version of laygo2 by cloning the Github repository by running the following command:

>>> git clone https://github.com/niftylab/laygo2.git

It is highly recommended that the following command is used periodically to maintain the code to the latest version.

>>> git pull origin master

After that, update the PHTHONPATH environment variable to point out the laygo2 package path for importing.

# (csh/tcsh example) add the following command to your .cshrc
setenv PYTHONPATH ${PYTHONPATH}:[LAYGO2_INSTALLATION_PATH]/laygo2

2. Pip installation#

Another option for installation is through the use of pip, the package manager for Python. This method allows for a covenient and quick installation process. Run the following command to pip-install the laygo2 package:

>>> pip install laygo2

Technology setup#

The following files in the laygo2_tech directory need to be prepared for the usage of laygo2 with a new technology:

laygo2_tech_templayes.py  # contains the definitions for templates.
laygo2_tech_grids.py      # contains the definitions for grids.
laygo2_tech.yaml          # contains technology parameters.

A minimum technology setup, designed for for quick_start.py can be found here. A more comprehensive tech setup example, designed for gpdk045, can be found here.

Simple gate generation#

Running the following command will generate a NAND gate layout.

# 1. Clone the laygo2 repository to your local machine.
# 2. Navigate to the laygo2 directory.
>>> cd laygo2 
# 3. Run the quick start script by typing the following command:
>>> python -m quick_start.py
# 4. Alternatively, you can run ipython and type the following command:
>>> run 'quick_start.py'

The resulting layout of the NAND gate is shown in the figure below:

laygo2 nand gate

Trial in SKY130 technology#

Follow the tutorial available at the this link. that covers the use of laygo2 for generating a D flip-flop layout in the SKY130 technology.

The generated layout of a D flip-flop is shown in the figure below:

sky130 dff2x

For those who prefer a Colab version, please check this link.

sky130 dff2x colab