From 8c3c50d93c7afba66650f19864b3b27a090fb131 Mon Sep 17 00:00:00 2001 From: Michael Rogenmoser Date: Wed, 25 Feb 2026 15:00:28 +0100 Subject: [PATCH 1/2] Update github actions, add verilator lint --- .github/workflows/doc.yml | 4 ++-- .github/workflows/lint.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 2996e519b..cc80f40ad 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -17,14 +17,14 @@ jobs: runs-on: ubuntu-latest # will fail) steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: persist-credentials: false - name: Install Bender uses: pulp-platform/pulp-actions/bender-install@v2 with: - version: 0.27.2 + version: 0.30.0 - name: Install Morty run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..d02f84cbe --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,33 @@ +name: Lint + +on: + push: + branches-ignore: + - gh-pages + - v** + pull_request: + branches-ignore: + - gh-pages + - v** + +jobs: + verilator-lint: + name: Verilator lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Install Bender + uses: pulp-platform/pulp-actions/bender-install@v2 + with: + version: 0.30.0 + + - name: Install verilator + uses: veryl-lang/setup-verilator@v1 + + - name: Bender checkout + run: bender checkout + + - name: Run Verilator lint + run: scripts/run_verilator.sh From edcc90b79ea646ec350096921bb8c2a7e2ff53ae Mon Sep 17 00:00:00 2001 From: Michael Rogenmoser Date: Wed, 25 Feb 2026 15:04:21 +0100 Subject: [PATCH 2/2] Add yosys-slang elaboration flow --- .github/workflows/elab.yml | 32 ++++++++++++++++++++++++++++++++ .gitignore | 1 - Bender.lock | 22 ++++++++++++++++++++++ Bender.yml | 2 +- scripts/run_yosys_slang.sh | 23 +++++++++++++++++++++++ src/axi_burst_splitter_gran.sv | 5 ++++- src/axi_burst_unwrap.sv | 5 ++++- src/axi_dw_downsizer.sv | 5 ++++- 8 files changed, 90 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/elab.yml create mode 100644 Bender.lock create mode 100755 scripts/run_yosys_slang.sh diff --git a/.github/workflows/elab.yml b/.github/workflows/elab.yml new file mode 100644 index 000000000..3a21495ac --- /dev/null +++ b/.github/workflows/elab.yml @@ -0,0 +1,32 @@ +name: Elaboration + +on: + push: + branches-ignore: + - gh-pages + - v** + pull_request: + branches-ignore: + - gh-pages + - v** + +jobs: + yosys-slang: + name: yosys-slang elaboration + runs-on: ubuntu-latest + container: + image: hpretl/iic-osic-tools:latest + options: --user root + defaults: + run: + shell: bash -leo pipefail {0} + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Bender checkout + run: bender checkout + + - name: Run yosys-slang + run: scripts/run_yosys_slang.sh diff --git a/.gitignore b/.gitignore index 10c4aecdd..dee437736 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ !.ci/ /.git/ /build -/Bender.lock /Bender.local *.log *.wlf diff --git a/Bender.lock b/Bender.lock new file mode 100644 index 000000000..da9205fe2 --- /dev/null +++ b/Bender.lock @@ -0,0 +1,22 @@ +packages: + common_cells: + revision: 9ca8a7655f741e7dd5736669a20a301325194c28 + version: 1.39.0 + source: + Git: https://github.com/pulp-platform/common_cells.git + dependencies: + - common_verification + - tech_cells_generic + common_verification: + revision: fb1885f48ea46164a10568aeff51884389f67ae3 + version: 0.2.5 + source: + Git: https://github.com/pulp-platform/common_verification.git + dependencies: [] + tech_cells_generic: + revision: 7968dd6e6180df2c644636bc6d2908a49f2190cf + version: 0.2.13 + source: + Git: https://github.com/pulp-platform/tech_cells_generic.git + dependencies: + - common_verification diff --git a/Bender.yml b/Bender.yml index efaa6b09b..211f2d947 100644 --- a/Bender.yml +++ b/Bender.yml @@ -19,7 +19,7 @@ package: - "Florian Zaruba " dependencies: - common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.37.0 } + common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.39.0 } common_verification: { git: "https://github.com/pulp-platform/common_verification.git", version: 0.2.5 } tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.2 } diff --git a/scripts/run_yosys_slang.sh b/scripts/run_yosys_slang.sh new file mode 100755 index 000000000..7876812c0 --- /dev/null +++ b/scripts/run_yosys_slang.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# Copyright (c) 2026 ETH Zurich, University of Bologna +# +# Copyright and related rights are licensed under the Solderpad Hardware +# License, Version 0.51 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law +# or agreed to in writing, software, hardware and materials distributed under +# this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# +# Authors: +# - Michael Rogenmoser + +set -e +ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) + +[ ! -z "$YOSYS" ] || YOSYS="yosys" + +bender script flist-plus -t synthesis -t synth_test > ./slang.flist + +$YOSYS -m slang -p "read_slang -Werror -f slang.flist --allow-use-before-declare --ignore-unknown-modules --keep-hierarchy --top axi_synth_bench; hierarchy" diff --git a/src/axi_burst_splitter_gran.sv b/src/axi_burst_splitter_gran.sv index 4a634ef8e..54b3a57a1 100644 --- a/src/axi_burst_splitter_gran.sv +++ b/src/axi_burst_splitter_gran.sv @@ -698,7 +698,10 @@ module axi_burst_splitter_gran_counters #( .oup_req_i ( cnt_req_i ), .oup_data_o ( cnt_r_idx ), .oup_data_valid_o ( idq_oup_valid ), - .oup_gnt_o ( idq_oup_gnt ) + .oup_gnt_o ( idq_oup_gnt ), + + .full_o (), + .empty_o () ); assign idq_inp_req = alloc_req & alloc_gnt; assign alloc_gnt = idq_inp_gnt & |(cnt_free); diff --git a/src/axi_burst_unwrap.sv b/src/axi_burst_unwrap.sv index 59850e2a7..1ffb4bc70 100644 --- a/src/axi_burst_unwrap.sv +++ b/src/axi_burst_unwrap.sv @@ -616,7 +616,10 @@ module axi_burst_counters #( .oup_req_i ( cnt_req_i ), .oup_data_o ( cnt_r_idx ), .oup_data_valid_o ( idq_oup_valid ), - .oup_gnt_o ( idq_oup_gnt ) + .oup_gnt_o ( idq_oup_gnt ), + + .full_o (), + .empty_o () ); assign idq_inp_req = alloc_req_i & alloc_gnt_o; assign alloc_gnt_o = idq_inp_gnt & |(cnt_free); diff --git a/src/axi_dw_downsizer.sv b/src/axi_dw_downsizer.sv index 8ec51b837..a76e64d77 100644 --- a/src/axi_dw_downsizer.sv +++ b/src/axi_dw_downsizer.sv @@ -330,7 +330,10 @@ module axi_dw_downsizer #( .exists_mask_i ('0 ), .exists_req_i ('0 ), .exists_o (/* Unused */ ), - .exists_gnt_o (/* Unused */ ) + .exists_gnt_o (/* Unused */ ), + + .full_o (), + .empty_o () ); for (genvar t = 0; unsigned'(t) < AxiMaxReads; t++) begin: gen_read_downsizer