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

🚧 Automatic compilation of raw efabless PDKs into a gdsfactory-compatible PDK #92

Merged
merged 12 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,4 @@ cython_debug/
*.DS_Store
.DS_Store
*Thumbs.db
.idea/
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "sky130/src/sky130_fd_pr"]
path = sky130/src/sky130_fd_pr
url = https://github.com/efabless/skywater-pdk-libs-sky130_fd_pr.git
[submodule "sky130/src/sky130_fd_sc_hd"]
path = sky130/src/sky130_fd_sc_hd
url = https://github.com/efabless/skywater-pdk-libs-sky130_fd_sc_hd.git
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sky130
14 changes: 0 additions & 14 deletions docs/notebooks/Makefile

This file was deleted.

282 changes: 282 additions & 0 deletions docs/notebooks/intro.ipynb
joamatab marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "e4abbd64",
"metadata": {},
"source": [
"# Layout\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": "5a160bbd",
"metadata": {},
"outputs": [],
"source": [
"import gdsfactory as gf\n",
"from gdsfactory.config import rich_output\n",
"gf.config.rich_output()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5b4ea2e4",
"metadata": {},
"outputs": [],
"source": [
"import sky130\n",
"import sky130.components as sc\n",
"import sky130.tech as st"
]
},
{
"cell_type": "markdown",
"id": "2c622905",
"metadata": {},
"source": [
"If you want to see what are the cells available:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a9b61cd7",
"metadata": {},
"outputs": [],
"source": [
"# sky130.cells"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "19872424",
"metadata": {},
"outputs": [],
"source": [
"# sky130.cross_sections"
]
},
{
"cell_type": "markdown",
"id": "8ba69f30",
"metadata": {},
"source": [
"Let's explore the available layers:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ab318aea",
"metadata": {},
"outputs": [],
"source": [
"# help(gf.pdk)\n",
"# help(gf.get_active_pdk().get_layer_stack)\n",
"# gf.pdk.get_layer_stack()"
]
},
{
"cell_type": "markdown",
"id": "6414d6cb",
"metadata": {},
"source": [
"You can also verify this is the active PDK on `gdsfactory`:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b7512a8b",
"metadata": {},
"outputs": [],
"source": [
"gf.pdk.get_active_pdk().name"
]
},
{
"cell_type": "markdown",
"id": "5747fd38",
"metadata": {},
"source": [
"Now, let's explore available symbols for the components:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6a0f3119",
"metadata": {},
"outputs": [],
"source": [
"# dir(sky130)\n",
"sky130"
]
},
{
"cell_type": "markdown",
"id": "f769dbb1",
"metadata": {},
"source": [
"Let's try exploring an example basic `nfet`:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3e4a603c",
"metadata": {},
"outputs": [],
"source": [
"c = sc.sky130_fd_pr__rf_nfet_01v8_aM02W1p65L0p15()\n",
"c"
]
},
{
"cell_type": "markdown",
"id": "b03fd5c3",
"metadata": {},
"source": [
"Explore it's ports:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "bbb8ef08",
"metadata": {},
"outputs": [],
"source": [
"c.ports"
]
},
{
"cell_type": "markdown",
"id": "af7e5375",
"metadata": {},
"source": [
"We can also explore the digital cells:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8946842c",
"metadata": {},
"outputs": [],
"source": [
"c = sc.sky130_fd_sc_hd__a2111o_1()\n",
"c"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d5d6f687",
"metadata": {},
"outputs": [],
"source": [
"scene = c.to_3d()\n",
"scene.show()"
]
},
{
"cell_type": "markdown",
"id": "19a86bd4",
"metadata": {},
"source": [
"TODO: add Parametric cells natively into gdsfactory `sky130` pdk."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5a72f996",
"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": "90789eb4",
"metadata": {},
"outputs": [],
"source": [
"c = gf.Component(\"demo_connect\")\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(\n",
" g1.ports[\"VPWR\"], g2.ports[\"VPWR\"], cross_section=st.xs_metal1\n",
")\n",
"c.add(route.references)\n",
"c"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "da60090f",
"metadata": {},
"outputs": [],
"source": [
"scene = c.to_3d()\n",
"scene.show()"
]
},
{
"cell_type": "markdown",
"id": "018d097d",
"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": "e60fcf66",
"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."
]
}
],
"metadata": {
"jupytext": {
"custom_cell_magics": "kql"
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
78 changes: 0 additions & 78 deletions docs/notebooks/intro.py

This file was deleted.

Empty file added scratch.py
Empty file.
Empty file.
Loading
Loading