name: CI

on:
  push:
  pull_request:
  workflow_dispatch:

jobs:
  rtl-lint:
    timeout-minutes: 30
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Verilator
        run: |
          sudo apt-get update
          sudo apt-get install -y verilator

      - name: Lint RTL
        run: |
          verilator --lint-only -Wall \
            --top-module ldpc_decoder_top \
            -Wno-UNUSEDSIGNAL -Wno-UNDRIVEN -Wno-WIDTHEXPAND -Wno-WIDTHTRUNC \
            -Wno-UNUSEDPARAM -Wno-CASEINCOMPLETE -Wno-BLKSEQ \
            verilog/rtl/ldpc_decoder_top.sv \
            verilog/rtl/ldpc_decoder_core.sv \
            verilog/rtl/wishbone_interface.sv
