Skip to content

Commit 9357ff7

Browse files
authored
chore: update to librelane 2.4.2 + general gardening (#200)
- switch to librelane, use version 2.4.2 - retool dffram steps and flow as librelane plugin - add option to configure using dffs or latches from the commandline - update documentation - switch to SPDX license headers - remove CLA
1 parent 1a772a5 commit 9357ff7

File tree

38 files changed

+517
-668
lines changed

38 files changed

+517
-668
lines changed

.github/workflows/main.yml

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ name: CI
88
jobs:
99
lint_models:
1010
name: Lint All Models
11-
runs-on: ubuntu-22.04
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v5
1515
- name: Get IcarusVerilog
1616
run: |
1717
sudo apt-get install -y iverilog
@@ -24,15 +24,15 @@ jobs:
2424
done
2525
lint_python:
2626
name: Lint Python Code
27-
runs-on: ubuntu-22.04
27+
runs-on: ubuntu-24.04
2828
steps:
2929
- name: Check out Git repository
3030
uses: actions/checkout@v2
3131
- name: Lint
3232
run: make lint
3333
verify_models:
3434
name: Verify (${{ matrix.count }}x${{ matrix.width }}_${{ matrix.variant }})
35-
runs-on: ubuntu-22.04
35+
runs-on: ubuntu-24.04
3636
needs: [lint_models]
3737
strategy:
3838
matrix:
@@ -53,7 +53,7 @@ jobs:
5353
- { count: "2048", width: "32", variant: "1RW1R" }
5454
steps:
5555
- name: Checkout code
56-
uses: actions/checkout@v3
56+
uses: actions/checkout@v5
5757
- name: Get IcarusVerilog
5858
run: |
5959
sudo apt-get install -y iverilog
@@ -68,7 +68,7 @@ jobs:
6868
/bin/bash -c "! make | grep -c FATAL"
6969
harden:
7070
name: Harden (${{ matrix.count }}x${{ matrix.width }}_${{ matrix.variant }})
71-
runs-on: ubuntu-22.04
71+
runs-on: ubuntu-24.04
7272
needs: [lint_models, lint_python]
7373
strategy:
7474
fail-fast: false
@@ -90,28 +90,28 @@ jobs:
9090
#- { count: "256", width: "32", variant: "1RW1R" } # Timeout
9191
steps:
9292
- name: Checkout code
93-
uses: actions/checkout@v3
94-
- name: Setup Nix
95-
uses: cachix/install-nix-action@v22
96-
with:
97-
nix_path: nixpkgs=channel:nixos-23.05
98-
- name: Setup Cachix
99-
uses: cachix/cachix-action@v12
100-
with:
101-
name: openlane
93+
uses: actions/checkout@v5
94+
- name: Install Lix
95+
run: |
96+
curl --proto '=https' --tlsv1.2 -sSf -L https://install.lix.systems/lix | sh -s -- install --no-confirm --extra-conf "
97+
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
98+
experimental-features = nix-command flakes
99+
"
100+
echo "extra-substituters = https://nix-cache.fossi-foundation.org" | sudo tee -a /etc/nix/nix.conf
101+
echo "extra-trusted-public-keys = nix-cache.fossi-foundation.org:3+K59iFwXqKsL7BNu6Guy0v+uTlwsxYQxjspXzqLYQs=" | sudo tee -a /etc/nix/nix.conf
102102
- name: Run
103103
run: |
104104
building_blocks=ram
105105
if [ "${{ matrix.variant }}" == "2R1W" ]; then
106106
building_blocks=rf
107107
fi
108108
109-
nix-shell --pure --run "\
109+
nix develop --command bash -c "\
110110
./dffram.py ${{ matrix.count }}x${{ matrix.width }}\
111-
-p sky130A\
112-
-s sky130_fd_sc_hd\
113-
-v ${{ matrix.variant }}\
114-
-b $building_blocks\
111+
-p sky130A\
112+
-s sky130_fd_sc_hd\
113+
-v ${{ matrix.variant }}\
114+
-b $building_blocks\
115115
"
116116
117117
echo "PRODUCTS_PATH=$(echo products/*)" >> $GITHUB_ENV
@@ -122,17 +122,17 @@ jobs:
122122
# name: BUILD_${{ matrix.count }}x${{ matrix.width }}_${{ matrix.variant }}
123123
# path: ./build
124124
- name: Upload Final Views
125-
uses: actions/upload-artifact@v3
125+
uses: actions/upload-artifact@v4
126126
with:
127127
name: ${{ matrix.count }}x${{ matrix.width }}_${{ matrix.variant }}
128128
path: ${{ env.PRODUCTS_PATH }}
129129
publish:
130130
name: Publish Release
131131
if: always()
132132
needs: [harden, verify_models]
133-
runs-on: ubuntu-22.04
133+
runs-on: ubuntu-24.04
134134
steps:
135-
- uses: actions/checkout@v3
135+
- uses: actions/checkout@v5
136136
with:
137137
fetch-depth: 0
138138
- name: Export Repo URL
@@ -147,8 +147,12 @@ jobs:
147147
if [ "${{ github.event_name }}" != "pull_request" ] && [ "${{ env.BRANCH_NAME }}" = "main" ]; then
148148
python3 ./.github/scripts/generate_tag.py
149149
fi
150-
- name: Download All Artifacts
151-
uses: actions/download-artifact@v3
150+
- name: Merge Artifacts
151+
uses: actions/upload-artifact/merge@v4
152+
with:
153+
delete-merged: true
154+
- name: Download Artifacts
155+
uses: actions/download-artifact@v4
152156
with:
153157
path: ./artifacts
154158
- name: Create Release

Contributing.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Ensure that your local git clone also has an `upstream` remote. You can add it v
1515
```sh
1616
git remote get-url upstream
1717
> fatal: No such remote 'upstream'
18-
git remote add upstream https://github.com/Cloud-V/DFFRAM`
18+
git remote add upstream https://github.com/AUCOHL/DFFRAM`
1919
```
2020

2121
You can start a rebase by typing:
@@ -39,17 +39,7 @@ git push -fu origin main
3939
Then, create your pull request. If all went well, the CI should pass.
4040
4141
## Note to maintainers
42+
4243
If the number of commits is low, rebase and merge, but if it is high (5 commits or more), squash and merge.
4344
4445
Squash and merge makes for a cleaner commit history, but will require pretty much everyone to rebase any work they've had off the main branch with a great degree more difficulty.
45-
46-
# Legal
47-
By submitting a pull request, you (the Contributor) hereby grant The American University in Cairo a world-wide, royalty-free, non-exclusive license under intellectual property rights (other than patent or trademark) licensable by such Contributor to:
48-
49-
* use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work;
50-
51-
* under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version.
52-
53-
Copyright notice: above text adapted from the Mozilla Public License, version 2.0.
54-
55-
You are entitled and encouraged to add your name and email to the AUTHORS document at the root of the repository under 'Other Contributors', as well as include your name in any modified or created file.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ venv/manifest.txt: ./requirements_dev.txt
1616
PYTHONPATH= ./venv/bin/python3 -m pip install --upgrade pip
1717
PYTHONPATH= ./venv/bin/python3 -m pip install --upgrade wheel
1818
PYTHONPATH= ./venv/bin/python3 -m pip install --upgrade\
19-
-r ./requirements_dev.txt
19+
-r ./requirements_dev.txt -r ./requirements.txt
2020
PYTHONPATH= ./venv/bin/python3 -m pip freeze > $@
2121
touch venv/manifest.txt
2222

@@ -30,4 +30,4 @@ clean:
3030
rm -rf build/
3131
rm -rf logs/
3232
rm -rf dist/
33-
rm -rf *.egg-info
33+
rm -rf *.egg-info

Readme.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
<h1 align="center"> DFFRAM Compiler</h1>
2-
<p align="center">
3-
<a href="https://colab.research.google.com/github/Cloud-V/DFFRAM/blob/main/dffram.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open in Google Colab"/></a>
4-
</p>
52
<p align="center">
63
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License: Apache 2.0"/></a>
7-
<img src="https://github.com/Cloud-V/DFFRAM/actions/workflows/main.yml/badge.svg?branch=main" alt="CI Status" />
8-
<a href="https://invite.skywater.tools"><img src="https://img.shields.io/badge/Community-Skywater%20PDK%20Slack-ff69b4?logo=slack" alt="Invite to the Skywater PDK Slack"/></a>
4+
<img src="https://github.com/AUCOHL/DFFRAM/actions/workflows/main.yml/badge.svg?branch=main" alt="CI Status" />
5+
<a href="https://fossi-chat.org"><img src="https://img.shields.io/badge/Community-FOSSi%20Chat-1bb378?logo=element" alt="Invite to FOSSi Chat"/></a>
96
<a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code Style: Black"/></a>
107
</p>
118

@@ -15,17 +12,14 @@ Standard Cell Library based Memory Compiler using DFF/Latch cells.
1512

1613
See [this document](./docs/Usage.md).
1714

18-
You can try the
19-
[Google Colaboratory](https://colab.research.google.com/github/Cloud-V/DFFRAM/blob/main/dffram.ipynb),
20-
but it is a bit out-of-date at this point.
21-
2215
## Platform Support Status
2316

24-
| Configured Platform | Working | Silicon-proven\* |
17+
| Configured Platform | Signoff-clean | Silicon-proven\* |
2518
| - | - | - |
26-
| `sky130A` | Yes | Yes |
27-
| `sky130B` | Yes | No |
28-
| `gf180mcuD` | No\* (Hold violations in the Netlist) | No |
19+
| `sky130A` (Latches) | Yes | Yes |
20+
| `sky130A` (DFF) | Yes | No |
21+
| `sky130B` (Latches/DFF) | Yes | No |
22+
| `gf180mcuD` (Latches/DFF) | No\* (Hold violations in the Netlist) | No |
2923

3024
> \* Silicon proven does not imply that you should use it without whole-system,
3125
> timing-annotated simulation to make sure that it works for your circuit.
@@ -76,7 +70,11 @@ blocks are as follows:
7670
7771
Currently, the can compiler generate the layout of the following configurations:
7872

79-
> 1RW1R variants are temporarily disabled due to a bug.
73+
> We currently do not recommend the use of 1RW1R. See this discussion for more
74+
> info:
75+
>
76+
> https://github.com/AUCOHL/DFFRAM/issues/198
77+
8078

8179
* RAM
8280
* 32 words with byte write enable (1RW and 1RW1R).
@@ -116,8 +114,8 @@ using different means.
116114
<th rowspan="2">Size<sup>1</sup></th>
117115
<th colspan="2">OpenRAM<sup>2</sup></th>
118116
<th colspan="2">DFFRAM Compiler</th>
119-
<th colspan="2">DFFRAM/OpenLane</th>
120-
<th colspan="2">RTL/OpenLane</th>
117+
<th colspan="2">DFFRAM Netlist + OpenROAD Placer</th>
118+
<th colspan="2">Memory RTL with OpenLane</th>
121119
</tr>
122120
<tr style="border-top:4px solid darkblue;">
123121
<td> Dim WxH (μm) </td> <td> Bit Density (bits/mm<sup>2</sup>) </td>

0 commit comments

Comments
 (0)