generated from TinyTapeout/tt06-verilog-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
720b15d
commit f0ffdc9
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ "*" ] | ||
pull_request: | ||
branches: [ "*" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get install tcl-dev libreadline-dev libffi-dev pkg-config python3 libboost-system-dev libboost-python-dev libboost-filesystem-dev zlib1g-dev xz-utils valgrind | ||
|
||
- name: Setup ccache | ||
uses: hendrikmuhs/ccache-action@v1.2 | ||
|
||
- name: Install yosys | ||
run: | | ||
git clone https://github.com/YosysHQ/yosys; \ | ||
cd yosys; make config-gcc; \ | ||
make -j2 ENABLE_CCACHE=1 ; \ | ||
sudo make install; cd .. | ||
- name: Install the plugin | ||
run: | | ||
git clone https://github.com/Coloquinte/moosic-yosys-plugin; \ | ||
make -j2 ENABLE_WERROR=1; sudo make install; cd .. | ||
- name: Lock the design | ||
run: yosys -m moosic -p "read_verilog src/counter.v; synth; logic_locking -key-bits 6 -key 39; write_verilog src/locked_counter.v" | ||
|
||
- name: Upload the locked design | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: locked_counter.v | ||
path: src/locked_counter.v |