Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated README HowTo for PyMacros use with KLayout #75

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions cells/klayout/pymacros/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# Pymacros (Pcells)
# Klayout PCells implementation.

You could use those PCells either in 2 ways:
1. Use volare built PDK directly from: https://github.com/efabless/volare
2. Use the PDK from this primitive library for testing purposes.

## Using PCells from Volare
Please refer to Volare documentation at: https://github.com/efabless/volare/blob/main/Readme.md

## Using PCells from this repo directly.
To use the PDK from this repo directly, you need to do the following:
1. Go to following folder in the repo `cells/klayout` and then run the following command:
```bash
export KLAYOUT_HOME=`pwd`
```
2.(optional step to enable GUI menu for running DRC/LVS) You will need to run the following commands as well from inside `cells/klayout` folder:
```bash
ln -s ../../rules/klayout/drc
ln -s ../../rules/klayout/lvs
ln -s ../../rules/klayout/macros
ln -s ../../tech/klayout/gf180mcu.lyt
ln -s ../../tech/klayout/gf180mcu.lyp
```
3. Go to any location where you want to start designing, and open klayout using the following command:
```bash
klayout -e
```
4. Create a new layout for testing.
5. Press on insert instance.
6. Go to the instance menu and select "GF180MCU" library from the library list.
7. Select the search botton and it will give the list of PCells that is available in the library.
8. Select any cell and it will show the cell.
9. Go to the PCell tap and change the parameters as needed to change the layout of the PCells.


Contains klayout pcells generator.
83 changes: 61 additions & 22 deletions models/ngspice/testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,31 @@ Explains how to run GF180nm models-ngspice regression.

```text
📦testing
┣ 📜Makefile
┣ 📜README.md
┣ 📦regression
┣ 📦smoke_test
┣ 📦180MCU_SPICE_Models
┣ 📜Makefile (Makefile to setup test cases)
┣ 📜README.md (This file)
┣ 📦sc_regression/gf180mcu_fd_sc_mcu7t5v0 (Standard cells regression that simulates the standard cells using different voltage stimulus.)
┣ 📦regression (This is the regression folder that has a test case per device.)
┣ 📦smoke_test (An inverter design that simulates in all corners to make sure that all corners will work with no issue.)
┣ 📦180MCU_SPICE_Models (Foundry measurement data used for model calibration.)
```

## Prerequisites

At a minimum:

- Git 2.35+
- Python 3.6+
- ngspice-36+

### On Ubuntu, you can just
- ngspice-37+

`apt install -y build-essential python3`

- Check this [ngspice](http://ngspice.sourceforge.net/download.html) for ngspice installation.
Our test environment has the following:
- Python 3.9.12
- ngspice-37

## Regression Usage

To make a full test for GF180nm models-ngspice, you could use the following command in testing directory:
- To make a full test for GF180nm models-ngspice, you could use the following command in testing directory:

```bash
make all
```
```bash
make all
```

- You could also check allowed targets in the Makefile, using the following command:

Expand All @@ -43,9 +40,51 @@ make all

## **Regression Outputs**

- The resulting files are in `regression/<device_folder>/` with name of `<device_name><options>` that contains:
After running regression, you should find the following in the folder `run_<date>_<time>` under that folder you will find the folder structure:
```text
run_<date_time>/
├── bjt_beta
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── bjt_cj
│ ├── device_netlists (Template Netlists)
│ ├── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── bjt_iv
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── diode
│ ├── 0_measured_data
│ ├── device_netlists (Template Netlists)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
│ ├── models_regression.py (Regression script for device)
├── mimcap_c
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── moscap_c
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── mos_cv
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── mos_iv_vbs
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── mos_iv_vgs
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── resistor_r
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
└── run_log.log (Summary of all runs for all devices)
```

1. A final report file of all results.
2. measured folder that contains measured data used in regression.
3. simulated folder that contains simulated data used in regression.
4. netlists folder that contains spice files used in simulation.
It's important to check the `run_log.log` to see the error per device.
66 changes: 51 additions & 15 deletions models/xyce/testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,13 @@ At a minimum:
- Python 3.6+
- Xyce 7.5+

### On Ubuntu, you can just

`apt install -y build-essential python3`

- Check this [xyce](https://xyce.sandia.gov/documentation-tutorials/building-guide/) for Xyce installation.

## Regression Usage

To make a full test for GF180nm models-xyce, you could use the following command in testing directory:
- To make a full test for GF180nm models-xyce, you could use the following command in testing directory:

```bash
make all
```
```bash
make all
```

- You could also check allowed targets in the Makefile, using the following command:

Expand All @@ -43,9 +37,51 @@ make all

## **Regression Outputs**

- The resulting files are in `regression/<device_folder>/` with name of `<device_name><options>` that contains:
After running regression, you should find the following in the folder `run_<date>_<time>` under that folder you will find the folder structure:
```text
run_<date_time>/
├── bjt_beta
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── bjt_cj
│ ├── device_netlists (Template Netlists)
│ ├── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── bjt_iv
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── diode
│ ├── 0_measured_data
│ ├── device_netlists (Template Netlists)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
│ ├── models_regression.py (Regression script for device)
├── mimcap_c
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── moscap_c
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── mos_cv
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── mos_iv_vbs
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── mos_iv_vgs
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
├── resistor_r
│ ├── device_netlists (Template Netlists)
│ └── models_regression.py (Regression script for device)
│ ├── <dev>_... (Output folder after runing with run logs and actual netlists)
└── run_log.log (Summary of all runs for all devices)
```

1. A final report file of all results.
2. measured folder that contains measured data used in regression.
3. simulated folder that contains simulated data used in regression.
4. netlists folder that contains spice files used in simulation.
It's important to check the `run_log.log` to see the error per device.
Loading