You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/Examples/openroad-sky130.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,21 @@
2
2
3
3
The following directions will get a simple ``pass`` design from RTL to GDS using the [OpenROAD tools](https://theopenroadproject.org) and the [Skywater 130nm PDK](https://github.com/google/skywater-pdk). These directions are meant to provide the minimal set of steps to do so, please reference the next section, [Hammer End-to-End Integration Tests](https://hammer-vlsi.readthedocs.io/en/stable/Examples/e2e.html), for more detailed descriptions of all files and commands.
4
4
5
-
## Instructions
5
+
## Prerequisites Setup
6
6
7
-
First, follow the [Hammer Developer Setup](https://hammer-vlsi.readthedocs.io/en/stable/Hammer-Basics/Hammer-Setup.html#developer-setup) to clone Hammer and install/activate the poetry virtual environment.
7
+
First, follow the [Hammer Power User Setup](https://hammer-vlsi.readthedocs.io/en/stable/Hammer-Basics/Hammer-Setup.html#power-user-setup) to clone Hammer and install/activate the virtual environment.
8
8
9
-
Next, run the setup script to install the OpenROAD tools using Conda, and Skywater 130nm PDK using the [Open-PDKs tool](https://github.com/RTimothyEdwards/open_pdks).
10
-
This step will take a long time due to the amount and size of the required installs.
11
-
You should supply a ``PREFIX`` path to a directory that will serve as the root of all PDK files and supporting tools (total size of all files is ~42GB),
9
+
Next, run the setup script to install the OpenROAD tools and Skywater 130nm PDK using Conda.
10
+
You should supply a ``PREFIX`` path to a directory that will serve as the root of all PDK files and supporting tools (total size of all files is ~4GB),
12
11
otherwise the script will default to installing to your home directory (``~/``).
13
12
14
13
```shell
15
14
cd hammer/e2e
16
15
./scripts/setup-sky130-openroad.sh [PREFIX]
17
16
```
18
17
18
+
## Running Hammer
19
+
19
20
You should now have a file ``configs-env/my-env.yml`` containing all required tool and technology paths for this tutorial.
20
21
To point to your custom environment setup, set the Make variable ``env=my``.
21
22
Additionally, we set the ``design``, ``pdk``, and ``tools`` Make variables to the appropriate RTL design, PDK, and tools flow, respecively.
Copy file name to clipboardExpand all lines: doc/Hammer-Basics/Hammer-Setup.md
+28-30Lines changed: 28 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,43 +2,50 @@
2
2
3
3
Hammer depends on Python 3.9+.
4
4
5
-
The default technology, ASAP7, has some extra requirements. See its [README](https://github.com/ucb-bar/hammer/blob/master/hammer/technology/asap7/README.md) for instructions.
5
+
The Hammer setup is different based on its usecase, which are summarized as follows:
6
6
7
-
## User Setup
7
+
*[User Setup](#user-setup): Use Hammer with no modifications.
8
+
*[Power User Setup](#power-user-setup): Modify Hammer and see these changes immediately reflected when calling Hammer [recommended].
9
+
*[Developer Setup](#developer-setup): Developing major Hammer features, adding dependencies, running Hammer unit tests, etc.
8
10
9
-
You can install Hammer from PyPI:
11
+
Note that some tools and technologies have extra setup requirements:
# verify that you can run the `hammer-vlsi` script from the command line
27
+
hammer-vlsi -h
25
28
```
26
29
27
-
After installation, verify that you can run the `hammer-vlsi` script from the command line.
30
+
## Power User Setup
31
+
Install Hammer as a source dependency to some target virtual environment, such as conda.
28
32
29
33
```shell
30
-
hammer-vlsi -h
31
-
```
34
+
# clone Hammer somewhere on your disk
35
+
git clone https://github.com/ucb-bar/hammer.git
32
36
33
-
Note: certain tools and technologies will have additional system requirements. For example, LVS with Netgen requires Tcl/Tk 8.6, which is not installed for CentOS7/RHEL7 and below. Refer to each respective tool and technology's documentation for those requirements.
37
+
# activate your target virtual environment, e.g. Chipyard
38
+
# commands vary for this based on your package/environment manager:
39
+
# conda activate <env name>
40
+
# source <path>/.venv/bin/activate
34
41
35
-
### Installing Hammer as a Source Dependency
42
+
# install hammer package in editable mode to your environment
43
+
cd hammer
44
+
pip install -e .# run this after activating your target environment
36
45
37
-
In some cases, it is useful to install Hammer as a source dependency.
38
-
For instance, when developing tool or PDK plugins alongside a new feature or API changes in main Hammer, installing hammer as a source dependency will allow you to make changes in main hammer and see them reflected immediately when running code for your tool/PDK plugin.
46
+
```
39
47
40
-
(poetry_project)=
41
-
#### From Another Poetry Project
48
+
### Installing from Another Poetry Project
42
49
43
50
Hammer tool (e.g. `hammer-cadence-plugins`) and PDK plugin repositories are poetry projects (with a `pyproject.toml` in their root).
44
51
To depend on Hammer as a source dependency, first clone Hammer somewhere on your disk.
@@ -54,15 +61,6 @@ Run `poetry update` and `poetry install`.
54
61
Do not commit the changes to `pyproject.toml` or `poetry.lock` without first removing the source dependency.
55
62
You only need to specify `extras` if you need the `asap7` optional dependency (gdstk).
56
63
57
-
#### From a Generic Python Project
58
-
59
-
Other repos, such as Chipyard, are not poetry projects, but still depend on Hammer.
60
-
To use Hammer as a source dependency:
61
-
62
-
1. Remove the PyPI hammer-vlsi dependency from the project (e.g. by editing a conda env.yml file and rerunning dependency resolution)
63
-
1. Clone Hammer somewhere on your disk
64
-
1. Activate the virtualenv of the project (e.g. Chipyard)
65
-
1. Run `pip install -e .` from the root of Hammer *within the project's virtualenv*
Copy file name to clipboardExpand all lines: e2e/README.md
+25-8Lines changed: 25 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,10 @@
1
1
# Hammer End-to-End Integration Tests
2
2
3
-
This folder contains an end-to-end (RTL -> GDS) smoketest flow using Hammer, using the Cadence toolchain, and the ASAP7 or Skywater 130 PDKs.
3
+
The `hammer/e2e`folder contains an end-to-end (RTL -> GDS) smoketest flow using Hammer, either the Cadence or OpenROAD toolchain, and the ASAP7 or Skywater 130 PDKs.
4
4
5
5
## Setup
6
6
7
-
The integration tests use Hammer as a source dependency, so create the e2e poetry environment.
8
-
9
-
```shell
10
-
poetry install
11
-
poetry shell
12
-
```
7
+
First, follow the [Hammer Power User Setup](https://hammer-vlsi.readthedocs.io/en/stable/Hammer-Basics/Hammer-Setup.html#power-user-setup) to clone Hammer and install/activate the virtual environment.
13
8
14
9
## Overview
15
10
@@ -19,7 +14,7 @@ poetry shell
19
14
The following variables in the Makefile select the target flow to run:
20
15
21
16
-`design` - RTL name
22
-
- {`pass`, `gcd`}
17
+
- {`pass`, `gcd`, `sram_wrapper_sky130`}
23
18
-`pdk` - PDK name
24
19
- {`sky130`, `asap7`}
25
20
-`tools` - CAD tool flow
@@ -86,6 +81,9 @@ make lvs
86
81
87
82
These actions are summarized in more detail:
88
83
84
+
- SRAM generation
85
+
-`make srams`
86
+
- Generated SRAM configs in `OBJ_DIR/sram_generator-output.json` (empty unless `vlsi.inputs.sram_parameters` is specified)
89
87
- RTL simulation
90
88
-`make sim-rtl`
91
89
- Generated waveform in `OBJ_DIR/sim-rtl-rundir/output.fsdb`
@@ -151,3 +149,22 @@ Clone the [asap7 repo](https://github.com/The-OpenROAD-Project/asap7) somewhere
151
149
152
150
Refer to the [Hammer Sky130 plugin README](https://hammer-vlsi.readthedocs.io/en/stable/Technology/Sky130.html)
153
151
to install the Sky130 PDK, then reference the path in your `ENV_YML` config (only the `technology.sky130.sky130A` key is required).
152
+
153
+
## Pipecleaning
154
+
155
+
We have provided several reference designs of increasing complexity to aid with pipecleaning your Hammer VLSI flow setup. These are summarized as follows, in order of complexity:
156
+
157
+
-`pass`: single register
158
+
-`gcd`: computes greatest common denominator, good for testing more complex logic
159
+
-`sram_wrapper_sky130`: example wrapper for an SRAM instance in Sky130, useful for ensuring correct SRAM integration into flow
160
+
- wraps any Sky130 SRAM instance available in `hammer/hammer/technology/sky130/sram-cache.json`
161
+
- SRAM instance specified via defines in `configs-design/sram_wrapper_sky130/common.yml`
162
+
- all SRAM configurations are loaded via these config fragments in `configs-design/sram_wrapper_sky130/sky130.yml`:
0 commit comments