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

Sky130 Plugin #614

Merged
merged 91 commits into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
1cff5b0
sky130 plugin files
nayiri-k May 13, 2021
f8f337a
sky130 plugin files
nayiri-k May 13, 2021
d059521
adding tech json whoops
nayiri-k May 13, 2021
5b61992
preliminary untested sram compiler, also changed some skywater names …
harrisonliew May 13, 2021
0f43c56
tlef hack
nayiri-k May 20, 2021
050c5a0
Single eFabless SRAM dual-port SRAM posing as single-port
dan-fritchman May 20, 2021
f4962b5
Merge branch 'sky130' of https://github.com/ucb-bar/hammer into sky13…
dan-fritchman May 20, 2021
c7574cc
WIP PnR Debug
dan-fritchman May 21, 2021
490a72d
Update sky130.tech.json
dan-fritchman May 26, 2021
4f0cebf
Merge branch 'sky130-cy-debug' into sky130sram-merge
dan-fritchman May 26, 2021
0bb03ad
Merge Sky130 TLEF Manipulations
dan-fritchman May 27, 2021
0e9837e
Merge sky130sram
dan-fritchman May 27, 2021
29ad7cd
Add dont_use scan-flops
dan-fritchman May 27, 2021
8e27d78
Copy Sky130 Layer-Map
dan-fritchman May 28, 2021
1b20acd
removed open_pdks variable, added gds map path
nayiri-k Jun 1, 2021
9930716
removed open_pdks variable, added gds map path
nayiri-k Jun 1, 2021
c2b0213
fixed floating nets and CDL netlist device names
nayiri-k Jun 3, 2021
18e7a26
set met1 as bottom routing layer
nayiri-k Jun 3, 2021
b8704b8
adding supply pin mapping to defaults file
nayiri-k Jun 4, 2021
c2d78e4
Sky130 using 4k rather than less-mature 8k SRAM
dan-fritchman Jun 6, 2021
5f5c664
gcd passes LVS
nayiri-k Jun 7, 2021
5b81c66
Merge branch 'sky130sram' of https://github.com/ucb-bar/hammer into s…
nayiri-k Jun 7, 2021
7982d44
fixed path to gds map file
nayiri-k Jun 7, 2021
b205d3d
innovus and calibre commands
nayiri-k Jun 14, 2021
903209f
Move Sky130 to use 1-2kB OpenRAM SRAM macros. Exclude them from DRC runs
dan-fritchman Jun 16, 2021
c471edf
Bug-fix unused port widths on Sky130 SRAMs
dan-fritchman Jun 18, 2021
ea4ecbd
sky130 plugin updates from tapeout
nayiri-k Jul 26, 2021
d4e1d5e
Merge branch 'master' of https://github.com/ucb-bar/hammer into sky13…
nayiri-k Jul 26, 2021
00696f5
files to generate sky130.tech.json
nayiri-k Jul 26, 2021
376af40
last sky130 plugin tweaks
nayiri-k Jul 29, 2021
430cee9
changed underscore to dash in name
nayiri-k Jul 30, 2021
7f9b972
changed underscore to dash in name
nayiri-k Jul 30, 2021
127fc41
sky130 plugin files
nayiri-k May 13, 2021
3576ca9
sky130 plugin files
nayiri-k May 13, 2021
1e80ce2
adding tech json whoops
nayiri-k May 13, 2021
66a7644
preliminary untested sram compiler, also changed some skywater names …
harrisonliew May 13, 2021
bb5cbe9
Single eFabless SRAM dual-port SRAM posing as single-port
dan-fritchman May 20, 2021
3fc9067
tlef hack
nayiri-k May 20, 2021
16ff7d9
Update sky130.tech.json
dan-fritchman May 26, 2021
f1bb4cd
Merge Sky130 TLEF Manipulations
dan-fritchman May 27, 2021
a076c03
Add dont_use scan-flops
dan-fritchman May 27, 2021
a87d316
Copy Sky130 Layer-Map
dan-fritchman May 28, 2021
fd9c89d
removed open_pdks variable, added gds map path
nayiri-k Jun 1, 2021
bccd7c8
removed open_pdks variable, added gds map path
nayiri-k Jun 1, 2021
54705ac
fixed floating nets and CDL netlist device names
nayiri-k Jun 3, 2021
92daf4b
set met1 as bottom routing layer
nayiri-k Jun 3, 2021
9d7440d
adding supply pin mapping to defaults file
nayiri-k Jun 4, 2021
7e6d94e
gcd passes LVS
nayiri-k Jun 7, 2021
08a7e12
Sky130 using 4k rather than less-mature 8k SRAM
dan-fritchman Jun 6, 2021
325feaa
fixed path to gds map file
nayiri-k Jun 7, 2021
8202b3b
innovus and calibre commands
nayiri-k Jun 14, 2021
41ca49f
Move Sky130 to use 1-2kB OpenRAM SRAM macros. Exclude them from DRC runs
dan-fritchman Jun 16, 2021
53dc89d
Bug-fix unused port widths on Sky130 SRAMs
dan-fritchman Jun 18, 2021
a689f77
sky130 plugin updates from tapeout
nayiri-k Jul 26, 2021
f62caad
files to generate sky130.tech.json
nayiri-k Jul 26, 2021
cfbf0de
last sky130 plugin tweaks
nayiri-k Jul 29, 2021
8b56b7c
changed underscore to dash in name
nayiri-k Jul 30, 2021
2576010
changed underscore to dash in name
nayiri-k Jul 30, 2021
d8d6a04
Merge branch 'sky130sram' of https://github.com/ucb-bar/hammer into s…
nayiri-k Jul 30, 2021
b36a041
fixed unit test bug with string formatting
nayiri-k Jul 30, 2021
3308f90
minor tweaks
nayiri-k Aug 2, 2021
15108a9
adding README, fixed minor bugs
nayiri-k Aug 2, 2021
41672a5
Update README.md
nayiri-k Aug 2, 2021
1cecbf4
fixed path to gds map file, renamed tech json generation files for be…
nayiri-k Aug 2, 2021
ce797d5
fixing type issues found in hammer unit tests
nayiri-k Aug 2, 2021
11d5ff8
adding assert ht is TCLTool
nayiri-k Aug 2, 2021
9278470
fixing many PR comments
nayiri-k Aug 5, 2021
54e409b
Update README.md
nayiri-k Aug 24, 2021
8b22d34
Update README.md
nayiri-k Aug 24, 2021
0174899
Update README.md
nayiri-k Aug 25, 2021
d2c650d
hack sky130 verilog primitives
nayiri-k Sep 7, 2021
f666255
sim files to technology lib_type
nayiri-k Sep 7, 2021
fbed3cf
shortened corner names to be consistent with other PDKs, changed time…
nayiri-k Sep 20, 2021
efbb86a
shortened corner names to be consistent with other PDKs, changed time…
nayiri-k Sep 20, 2021
6911841
removing gds file field in tech json (forgot to remove when switched …
nayiri-k Sep 20, 2021
504732f
added checks for whether file exists
nayiri-k Sep 23, 2021
7b47598
making nda files optional in PDK setup
nayiri-k Sep 23, 2021
436335d
making nda files optional in PDK setup
nayiri-k Sep 23, 2021
ab16d99
Update README.md
nayiri-k Sep 24, 2021
6fc4b33
moved files to extra directory
nayiri-k Oct 10, 2021
34ba6e7
moved files to extra directory
nayiri-k Oct 10, 2021
34ff084
Merge branch 'sky130sram' of https://github.com/ucb-bar/hammer into s…
nayiri-k Oct 10, 2021
15eb31b
Merge branch 'master' of https://github.com/ucb-bar/hammer into sky13…
nayiri-k Oct 13, 2021
866c697
Merge branch 'master' of https://github.com/ucb-bar/hammer into sky13…
nayiri-k Oct 15, 2021
6f84a71
merged new master changes
nayiri-k Oct 15, 2021
60376b7
adding typical corner to mmmc
nayiri-k Oct 15, 2021
5b18c53
adding typical corner to mmmc
nayiri-k Oct 15, 2021
1d34eeb
moved helper functions to HammerTechnology
nayiri-k Oct 16, 2021
639b6e4
reference to sky130 plugin in Hammer docs
nayiri-k Oct 16, 2021
62d7d20
Merge branch 'sky130sram' of https://github.com/ucb-bar/hammer into s…
nayiri-k Oct 16, 2021
6242b40
small change
nayiri-k Oct 16, 2021
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
2 changes: 1 addition & 1 deletion doc/Technology/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Technology Setup and Use

These guides will walk you through how to set up a technology to be used in Hammer.

You may use the included `free ASAP7 PDK example <https://github.com/ucb-bar/hammer/tree/master/src/hammer-vlsi/technology/asap7>`__ as a reference when building your own technology plugin.
You may use the included `free ASAP7 PDK <https://github.com/ucb-bar/hammer/tree/master/src/hammer-vlsi/technology/asap7>`__ or the `open-source Sky130 PDK <https://github.com/ucb-bar/hammer/tree/master/src/hammer-vlsi/technology/sky130>`__ plugins as reference when building your own technology plugin.

.. toctree::
:maxdepth: 2
Expand Down
14 changes: 14 additions & 0 deletions src/hammer-tech/hammer_tech.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,20 @@ def cache_dir(self, value: str) -> None:
self._cachedir = value # type: str
# Ensure the cache_dir exists.
os.makedirs(value, mode=0o700, exist_ok=True)

# @classmethod
def expand_tech_cache_path(self, path) -> str:
""" Replace occurrences of the cache directory's basename with
the full path to the cache dir."""
cache_dir_basename = os.path.basename(self.cache_dir)
return path.replace(cache_dir_basename, self.cache_dir)

# @classmethod
def ensure_dirs_exist(self, path) -> None:
dir_name = os.path.dirname(path)
if not os.path.exists(dir_name):
self.logger.info('Creating directory: {}'.format(dir_name))
os.makedirs(dir_name)

# hammer-vlsi properties.
# TODO: deduplicate/put these into an interface to share with HammerTool?
Expand Down
155 changes: 155 additions & 0 deletions src/hammer-vlsi/technology/sky130/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
Sky130 Technology Library
=========================
HAMMER now supports the Skywater 130nm Technology process. The [SkyWater Open Source PDK](https://skywater-pdk.readthedocs.io/) is a collaboration between Google and SkyWater Technology Foundry to provide a fully open source Process Design Kit (PDK) and related resources, which can be used to create manufacturable designs at SkyWater’s facility.
The Skywater 130nm PDK files are located in a repo called [skywater-pdk](https://github.com/google/skywater-pdk/) A tool called [Open-PDKs (open_pdks)](https://github.com/RTimothyEdwards/open_pdks/) was developed to generate all the files typically found in a PDK.
Open-PDKs uses the contents in `skywater-pdk`, and outputs files to a directory called `sky130A`.

[OpenLANE](https://github.com/efabless/openlane/) is an open-source RTL to GDSII VLSI flow that supports Sky130.


Before setting up the Sky130 PDK, we recommend familiarizing yourself with the process's documentation [summarized below](#Resources).

PDK Structure
-------------

OpenLANE expects a certain file structure for the Sky130 PDK.
We recommend adhering to this file structure for Hammer as well.
All the files reside in a root folder (named something like `skywater` or `sky130`).
The environment variable `$PDK_ROOT` should be set to this folder's path:

export PDK_ROOT=<path-to-skywater-directory>

`$PDK_ROOT` contains the following:

* `skywater-pdk`

* Original PDK source files

* `open_pdks`

* install of Open-PDKs tool

* `share/pdk/sky130A`

* output files from Open-PDKs compilation process

NDA Files
---------
Using commercial VLSI tools with this process requires files that are currently under NDA.
If you have access to these, you will be able to use the Hammer VLSI flow out-of-the-box with the Sky130 process.
Some of these NDA files, such as the Calibre DRC/LVS decks, rely on the environment variable `$PDK_HOME` containing the path to the version of the NDA files you are using.
You may set it in the Hammer plugin, or as follows:

export PDK_HOME=<path-to-skywater-src-nda>/s8/<version#>

Prerequisites for PDK Setup
---------------------------

* [Magic](http://opencircuitdesign.com/magic/)

* required for `open_pdks` file generation
* tricky to install, closely follow the directions on the `Install` page of the website

* as the directions indicate, you will likely need to manually specify the location of the Tcl/Tk package installation using `--with-tcl` and `--with-tk`

If using conda, these installs alone caused the Magic install to work:

conda install -c intel tcl
conda install -c anaconda tk
conda install -c anaconda libglu

OpenRAM SRAMs
-------------
TODO: add overview here

git clone https://github.com/efabless/sky130_sram_macros.git


PDK Setup
---------
In `$PDK_ROOT`, clone the skywater-pdk repo and generate the liberty files for each library:

git clone https://github.com/google/skywater-pdk.git
cd skywater-pdk
# Expect a large download! ~7GB at time of writing.
git submodule init libraries/*/latest
git submodule update
# Regenerate liberty files
make timing

Again in `$PDK_ROOT`, clone the open_pdks repo and run the install process to generate the `sky130A` directory:

git clone https://github.com/RTimothyEdwards/open_pdks.git
cd open_pdks
./configure \
--enable-sky130-pdk=$PDK_ROOT/skywater-pdk/libraries \
--prefix=$PDK_ROOT \
--enable-sram-sky130=$PDK_ROOT/sky130_sram_macros # if using SRAMs
make
make install

This generates all the Sky130 PDK files and installs them to `$PDK_ROOT/share/pdk/sky130A`

Known DRC Issues
----------------
The HAMMER flow generates DRC-clean digital logic when run with the Calibre DRC deck and SRAMs excluded.

TODO: summarize issues with SRAMs and open-source Magic DRC checks.

## Resources
The good thing about this process being open-source is that most questions about the process are answerable through a google search.
The tradeoff is that the documentation is a bit of a mess, and is currently scattered over a few pages and Github repos.
We try to summarize these below.

Git repos:

* [SkyWater Open Source PDK](https://github.com/google/skywater-pdk/)

* Git repo of the main Skywater 130nm files

* [Open-PDKs](https://github.com/RTimothyEdwards/open_pdks/)

* Git repo of Open-PDKs tool that compiles the Sky130 PDK

* [Git repos on foss-eda-tools](https://foss-eda-tools.googlesource.com/)

* Additional useful repos, such as Berkeley Analog Generator (BAG) setup

Documentation:

* [SkyWater SKY130 PDK's documentation](https://skywater-pdk.readthedocs.io)

* Main documentation site for the PDK

* [Join the SkyWater PDK Slack Channel](https://join.skywater.tools/)

* By far the best way to have questions about the process answered, with 80+ channels for different topics

* [Skywater130 Standard Cell and Primitives Overview](http://diychip.org/sky130/)

* Additional useful documentation for the PDK

* [FOSSi Foundation YouTube Channel](https://www.youtube.com/c/FOSSiFoundation/)

* Contains informational videos on the Sky130 process, OpenLANE flow, and Efabless Shuttle program

SRAMs:

* [OpenRAM](https://github.com/VLSIDA/OpenRAM/)

* Open-source static random access memory (SRAM) compiler

* [OpenRAM pre-compiled macros](https://github.com/efabless/sky130_sram_macros/)

* Precompiled sizes are 1kbytes, 2kbytes and 4kbytes

OpenLANE flow:

* [OpenLANE](https://github.com/efabless/openlane/)

* Open-source RTL to GDSII flow

* [Magic](http://opencircuitdesign.com/magic/)

* Open-source VLSI layout tool that handles DRC checks in OpenLANE

Loading