Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
donn committed Aug 25, 2024
2 parents a8a6e84 + 110d685 commit 66524bd
Show file tree
Hide file tree
Showing 25 changed files with 162 additions and 141 deletions.
22 changes: 0 additions & 22 deletions .github/actions/build_nix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ inputs:
description: "The nix platform string to build for"
required: true
default: "x86_64-linux"
local_cache_key:
description: Key to use for the cache
required: false
default: ""
run_tests:
description: Whether to run unit tests and the smoke test
required: false
Expand All @@ -32,28 +28,17 @@ inputs:
runs:
using: "composite"
steps:
- id: cache
name: Cache Derivation
uses: actions/cache@v3
with:
key: ${{ inputs.local_cache_key }}-${{ inputs.nix_system }}
path: /tmp/${{ inputs.local_cache_key }}
- id: Build
name: Build
shell: ${{ inputs.shell }}
run: |
substituters='https://${{ inputs.cachix_cache }}.cachix.org https://cache.nixos.org'
if [ '${{ inputs.local_cache_key }}' = '' ]; then
substituters="file:///tmp/${{ inputs.local_cache_key }} $substituters"
fi
echo "#################################################################"
outPath=$(nix build\
--print-out-paths\
--no-link\
--accept-flake-config\
--option system ${{ inputs.nix_system }}\
--extra-platforms ${{ inputs.nix_system }}\
--option substituters "$substituters"\
.#devShells.${{ inputs.nix_system }}.default)
echo "out-path=$outPath" >> $GITHUB_OUTPUT
sudo du -hs /nix/store/* | sort -h | tail -n 20
Expand All @@ -78,13 +63,6 @@ runs:
--accept-flake-config\
.#devShells.${{ inputs.nix_system }}.dev --command\
pytest --step-rx '.' --pdk-root="${{ inputs.pdk_root }}" -n auto
- name: Push to local cache
shell: ${{ inputs.shell }}
if: inputs.local_cache_key != '' && steps.cache.outputs.cache-hit != 'true'
run: |
nix copy\
--to 'file:///tmp/${{ inputs.local_cache_key }}?compression=zstd&parallel-compression=true'\
${{ steps.build.outputs.out-path }}
- name: Install + Push to Cachix
shell: ${{ inputs.shell }}
if: ${{ inputs.cachix_token != '' }}
Expand Down
52 changes: 23 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,17 @@ jobs:
- name: Set up GITHUB_TOKEN
run: |
echo "GITHUB_TOKEN=${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
- name: Install Nix
run: |
sh <(curl -L https://nixos.org/nix/install) --yes --daemon --nix-extra-conf-file /dev/stdin <<EXTRA_NIX_CONF
extra-experimental-features = nix-command flakes
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
EXTRA_NIX_CONF
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
echo "PATH=$PATH" >> $GITHUB_ENV
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
access-tokens = github.com=${{ env.GITHUB_TOKEN }}
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build with Nix
uses: ./.github/actions/build_nix
with:
nix_system: x86_64-linux
local_cache_key: derivation-${{ github.run_id }}
cachix_cache: ${{ vars.CACHIX_CACHE || 'openlane' }}
cachix_token: "${{ secrets.CACHIX_TOKEN }}"
run_tests: "true"
Expand All @@ -149,12 +145,17 @@ jobs:
- name: Set up GITHUB_TOKEN
run: |
echo "GITHUB_TOKEN=${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
- uses: DeterminateSystems/nix-installer-action@main # Using the DS Nix installer because it also sets up binfmt
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
access-tokens = github.com=${{ env.GITHUB_TOKEN }}
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build with Nix
uses: ./.github/actions/build_nix
with:
nix_system: aarch64-linux
local_cache_key: derivation-${{ github.run_id }}
cachix_cache: ${{ vars.CACHIX_CACHE || 'openlane' }}
cachix_token: "${{ secrets.CACHIX_TOKEN }}"
run_tests: "true"
Expand All @@ -178,17 +179,13 @@ jobs:
- name: Set up GITHUB_TOKEN
run: |
echo "GITHUB_TOKEN=${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
- name: Install Nix
run: |
sh <(curl -L https://nixos.org/nix/install) --yes --nix-extra-conf-file /dev/stdin <<EXTRA_NIX_CONF
extra-experimental-features = nix-command flakes
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
access-tokens = github.com=${{ env.GITHUB_TOKEN }}
EXTRA_NIX_CONF
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
echo "PATH=$PATH" >> $GITHUB_ENV
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
access-tokens = github.com=${{ env.GITHUB_TOKEN }}
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
- uses: DeterminateSystems/magic-nix-cache-action@main
# For some reason, GHA Macs are far more aggressively rate-limited with
# Volare than Linux
- name: Cache sky130 PDK
Expand All @@ -201,7 +198,6 @@ jobs:
uses: ./.github/actions/build_nix
with:
nix_system: ${{ matrix.system.nix }}
local_cache_key: derivation-${{ github.run_id }}
cachix_cache: ${{ vars.CACHIX_CACHE || 'openlane' }}
cachix_token: "${{ secrets.CACHIX_TOKEN }}"
shell: "zsh {0}"
Expand Down Expand Up @@ -236,11 +232,11 @@ jobs:
fi
echo "NIX_SYSTEM=$nix_system" >> $GITHUB_ENV
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build with Nix
uses: ./.github/actions/build_nix
with:
nix_system: ${{ env.NIX_SYSTEM }}
local_cache_key: derivation-${{ github.run_id }}
cachix_cache: ${{ vars.CACHIX_CACHE || 'openlane' }}

- name: Build Docker Image
Expand Down Expand Up @@ -304,14 +300,12 @@ jobs:
run: |
git status || true
tree .git || true
- uses: DeterminateSystems/nix-installer-action@main

- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build with Nix
uses: ./.github/actions/build_nix
with:
nix_system: x86_64-linux
local_cache_key: derivation-${{ github.run_id }}
cachix_cache: ${{ vars.CACHIX_CACHE || 'openlane' }}

- name: Check Nix
Expand Down
10 changes: 10 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
## Documentation
-->

# 2.1.2

## Steps

* `OpenROAD.*`

* Fixed an issue where the validation for `PDN_MACRO_CONNECTIONS` would
partially match net names, unlike OpenROAD itself
* Internal string escaping consistency

# 2.1.1

## Steps
Expand Down
74 changes: 53 additions & 21 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,52 @@ started. You can discuss OpenLane 2 in the
channel of the
[Efabless Open Source Silicon Slack](https://invite.skywater.tools).

```python
from openlane.flows import Flow

Classic = Flow.factory.get("Classic")

flow = Classic(
{
"PDK": "sky130A",
"DESIGN_NAME": "spm",
"VERILOG_FILES": ["./src/spm.v"],
"CLOCK_PORT": "clk",
"CLOCK_PERIOD": 10,
},
design_dir=".",
)

flow.start()
```mermaid
timeline
title The OpenLane Infrastructure
RTL to Netlist
: Linting / Verilator
: Power Distribution Network Hierarchy / Yosys
: Synthesis / Yosys
: Synthesis / Design Compiler (with proprietary plugin)
: Multi-corner Netlist STA / OpenSTA
Floorplanning
: Floorplan Initialization / OpenROAD
: Manual Macro Placement / OpenDB
: Tap/Endcap Insertion / OpenROAD
: PDN Generation / OpenROAD
Placement
: Pin Placement (from config file) / OpenROAD, OpenDB
: Pin Placement (Random/Matching/Annealing) / OpenROAD
: Pin Placement (from template DEF) / OpenDB
: Global Placement / OpenROAD
: Resizer Design Repair (Post-GPL) / OpenROAD
: Detailed Placement / OpenROAD
Clock Tree Synthesis
: Clock-Tree Synthesis / OpenROAD
: Resizer Timing Repair (Post-CTS) / OpenROAD
Routing
: Global Routing / OpenROAD
: Resizer Design Repair (Post-GRT) / OpenROAD
: Diode Insertion on Ports / OpenDB
: Heuristic Diode Insertion / OpenDB
: Antenna Repair / OpenROAD
: Resizer Timing Repair (Post-GRT) / OpenROAD
: Detailed Routing / OpenROAD
: Row Filling / OpenROAD
Signoff (Timing)
: Parasitics Extraction / OpenROAD
: Multi-corner Static Timing Analysis / OpenSTA
: SI-Enabled Multi-corner Static Timing Analysis / PrimeTime (with proprietary plugin)
Signoff (Physical)
: GDSII Stream-Out / Magic
: GDSII Stream-Out / KLayout
: Magic vs. KLayout Stream XOR / KLayout
: Design Rule Checks / Magic
: Design Rule Checks / KLayout
: Spice Extraction / Magic
: Layout vs. Schematic / Netgen
: Equivalence Check (Alpha) / Yosys EQY
```

## Try it out
Expand Down Expand Up @@ -83,15 +112,18 @@ in the docs for more info.
Do note you'll need to add `--dockerized` right after `openlane` in most CLI
invocations.

### Python-only Installation (Advanced)
### Python-only Installation (Advanced, Not Recommended)

You'll need to bring your own compiled utilities, but otherwise, simply install
OpenLane as follows:
**You'll need to bring your own compiled utilities**, but otherwise, simply
install OpenLane as follows:

```sh
python3 -m pip install --upgrade openlane
```

Python-only installations are presently unsupported and entirely at your own
risk.

## Usage

In the root folder of the repository, you may invoke:
Expand Down Expand Up @@ -127,7 +159,7 @@ If you use OpenLane in your research, please cite the following paper.
doi={}}
```

## License
## License and Information

[The Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ If you're looking to build a virtual machine, we recommend [Ubuntu 22.04](https:

## Installing Nix

```{warning}
Do **not** install Nix using `apt`. The version of Nix offered by `apt` is more
often than not severely out-of-date and may cause issues.
```

You will need `curl` to install Nix.

To install curl on Ubuntu, simply type in the following in your terminal:
Expand All @@ -25,11 +30,10 @@ $ sudo apt-get install -y curl
After that, simply run this command:

```console
$ sh <(curl -L https://nixos.org/nix/install) --yes --daemon --nix-extra-conf-file /dev/stdin <<EXTRA_NIX_CONF
extra-experimental-features = nix-command flakes
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
EXTRA_NIX_CONF
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm --extra-conf "
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
"
```

Enter your password if prompted. This should take around 5 minutes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
Simply run this (entire) command in `Terminal.app`:

```console
$ sh <(curl -L https://nixos.org/nix/install) --yes --nix-extra-conf-file /dev/stdin <<EXTRA_NIX_CONF
extra-experimental-features = nix-command flakes
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
EXTRA_NIX_CONF
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm --extra-conf "
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
"
```

Enter your password if prompted. This should take around 5 minutes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ Windows 10 is up-to-date.

## Installing Nix

```{warning}
Do **not** install Nix using `apt`. The version of Nix offered by `apt` is more
often than not severely out-of-date and may cause issues.
```

To install Nix, you first need to install `curl`:

```console
Expand All @@ -54,11 +59,10 @@ $ sudo apt-get install -y curl
Then install Nix by running the following command:

```console
$ sh <(curl -L https://nixos.org/nix/install) --yes --daemon --nix-extra-conf-file /dev/stdin <<EXTRA_NIX_CONF
extra-experimental-features = nix-command flakes
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
EXTRA_NIX_CONF
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm --extra-conf "
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
"
```

Enter your password if prompted. This should take around 5 minutes.
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion openlane/scripts/magic/extract_spice.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if { [info exists ::env(MAGIC_EXT_ABSTRACT_CELLS)] } {
}
}
if { $matched == 0 } {
puts "\[WARNING] Failed to match the experssion '$expression' with cells in the design"
puts "\[WARNING\] Failed to match the experssion '$expression' with cells in the design"
}
}
foreach cell $matching_cells {
Expand Down
2 changes: 1 addition & 1 deletion openlane/scripts/magic/gds/extras_mag.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if { [info exist ::env(EXTRA_GDS_FILES)] } {
# maglefs reserve the original names
file rename $::env(STEP_DIR)/$design_name.mag $::env(STEP_DIR)/$design_name.full.mag

puts "\[INFO] Saved mag view from $gds_file under $::env(STEP_DIR)"
puts "\[INFO\] Saved mag view from $gds_file under $::env(STEP_DIR)"
}
}

Expand Down
Loading

0 comments on commit 66524bd

Please sign in to comment.