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

improve docs #31

Merged
merged 5 commits into from
Jul 8, 2022
Merged
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
47 changes: 47 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Sphinx docs to gh-pages

on:
push:
branches:
- master
workflow_dispatch:

jobs:
sphinx_docs_to_gh-pages:
runs-on: ubuntu-latest
name: Sphinx docs to gh-pages
steps:
- name: Cancel Workflow Action
uses: styfle/cancel-workflow-action@0.10.0
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.9
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
activate-environment: anaconda-client-env
- name: Add conda to system path
run: |
echo $CONDA/bin >> $GITHUB_PATH
- name: Installing the library
shell: bash -l {0}
run: |
mkdir -p $HOME/.tidy3d
echo ${{ secrets.TIDY3D_AUTH }} > $HOME/.tidy3d/auth.json
pip install -e .[full]
sudo wget https://github.com/jgm/pandoc/releases/download/1.16.0.2/pandoc-1.16.0.2-1-amd64.deb
sudo dpkg -i pandoc-1.16.0.2-1-amd64.deb
#sudo apt install pandoc
make gdslib plugins
pip install -r requirements_sipann.txt
pip install -r requirements_dev.txt
- name: Running the Sphinx to gh-pages Action
uses: uibcdf/action-sphinx-docs-to-gh-pages@v1.0-beta.2
env:
TIDY3D_USER: ${{ secrets.TIDY3D_EMAIL }}
TIDY3D_PASS: ${{ secrets.TIDY3D_PASSWORD }}
with:
branch: master
dir_docs: docs
sphinxopts: ""
6 changes: 0 additions & 6 deletions docs/api.md

This file was deleted.

3 changes: 2 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ sky130
:maxdepth: 2

README
tech
components
api
notebooks
10 changes: 10 additions & 0 deletions docs/notebooks.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Sky130
===================================


.. toctree::
:maxdepth: 2
:titlesonly:
:caption: Contents:

notebooks/intro.ipynb
155 changes: 155 additions & 0 deletions docs/notebooks/intro.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "00f7c03e-4b7f-473c-9646-429b0fbb45a8",
"metadata": {},
"source": [
"# Skywater 130 gdsfactory pdk\n",
"\n",
"## Layout driven flow\n",
"\n",
"You can import the PDK and layout any of the standard cells"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7f74141e-59ef-486b-8c9f-73320cda09b6",
"metadata": {},
"outputs": [],
"source": [
"import gdsfactory as gf\n",
"import sky130.components as sc\n",
"import sky130.tech as st"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6012d1ce-848d-46bc-b74a-e2e8009fca19",
"metadata": {},
"outputs": [],
"source": [
"c = sc.sky130_fd_sc_hd__a2111o_1()\n",
"c"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "bbf1be1f-5ebd-47a9-9f97-16dd67b7e33c",
"metadata": {},
"outputs": [],
"source": [
"scene = c.to_3d()\n",
"scene.show()"
]
},
{
"cell_type": "markdown",
"id": "659e7ff0-bc30-4334-89e0-a4fec78c450d",
"metadata": {},
"source": [
"TODO: add Parametric cells natively into gdsfactory `sky130` pdk."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6aea07c8-617d-4bb2-9cbc-313277865e2c",
"metadata": {},
"outputs": [],
"source": [
"c = gf.Component()\n",
"g1 = c << sc.sky130_fd_sc_hd__a2111o_1()\n",
"g2 = c << sc.sky130_fd_sc_hd__a311oi_4()\n",
"g2.move((15, 10))\n",
"c"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "413e5206-f454-4932-ba9e-03d3c9484abf",
"metadata": {},
"outputs": [],
"source": [
"c = gf.Component()\n",
"g1 = c << sc.sky130_fd_sc_hd__a2111o_1()\n",
"g2 = c << sc.sky130_fd_sc_hd__a311oi_4()\n",
"g2.move((15, 10))\n",
"route = gf.routing.get_route_electrical(g1.ports['VPWR'], g2.ports['VPWR'], cross_section=st.xs_metal1)\n",
"c.add(route.references)\n",
"c"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1a041f26-d444-4db7-916c-53cd0258daf2",
"metadata": {},
"outputs": [],
"source": [
"scene = c.to_3d()\n",
"scene.show()"
]
},
{
"cell_type": "markdown",
"id": "75ab4021-1c91-4e78-893d-54aeed6cb533",
"metadata": {},
"source": [
"## Netlist driven flow\n",
"\n",
"For netlist driven flow you can define circuits for place and route. You have two options:\n",
"\n",
"1. in python\n",
"2. in YAML"
]
},
{
"cell_type": "markdown",
"id": "e50bbe48-87ed-4e77-9893-4973b03961cc",
"metadata": {},
"source": [
"## Spice simulations\n",
"\n",
"You can use `PySpice` for running simulations.\n",
"\n",
"gdsfactory can extract the netlist and simulate the circuit.\n",
"\n",
"TODO: add some relevant examples."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c7d18c8a-d22a-4cec-90da-d8ac854f681b",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
6 changes: 6 additions & 0 deletions docs/tech.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Tech


[Process description](https://skywater-pdk.readthedocs.io/en/main/rules/assumptions.html#process-stack-diagram)

![](https://skywater-pdk.readthedocs.io/en/main/_images/metal_stack.svg)
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
gdsfactory==5.10.15
gdsfactory==5.12.13
PySpice
4 changes: 3 additions & 1 deletion sky130/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from sky130 import components
from sky130.config import PATH, module_path
from sky130.layers import LAYER
from sky130.layers import LAYER, LAYER_COLORS, LAYER_STACK
from sky130.tech import cross_sections

__version__ = "0.0.12"
Expand All @@ -18,6 +18,8 @@
cells=cells,
cross_sections=cross_sections,
layers=LAYER.dict(),
layer_stack=LAYER_STACK,
layer_colors=LAYER_COLORS,
sparameters_path=PATH.sparameters,
)
PDK.register_cells_yaml(dirpath=pathlib.Path(__file__).parent.absolute())
Expand Down
Loading