Skip to content

Commit

Permalink
Add action to do the locking
Browse files Browse the repository at this point in the history
  • Loading branch information
Coloquinte committed Jan 19, 2024
1 parent 720b15d commit f0ffdc9
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/lock.yml
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

0 comments on commit f0ffdc9

Please sign in to comment.