Skip to content

feat(rtl): formalize core_mem_rd_data stability contract on global_me… #30

feat(rtl): formalize core_mem_rd_data stability contract on global_me…

feat(rtl): formalize core_mem_rd_data stability contract on global_me… #30

Workflow file for this run

# SPDX-License-Identifier: CC-BY-SA-4.0
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
verilator-cocotb:
name: Verilator + cocotb tests
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Verilator build deps
run: |
sudo apt-get update
sudo apt-get install -y \
git make autoconf flex bison \
libfl2 libfl-dev zlib1g zlib1g-dev \
help2man perl ccache
- name: Cache Verilator install
id: verilator-cache
uses: actions/cache@v4
with:
path: ~/.local/verilator
key: verilator-v5.040-${{ runner.os }}-x64
- name: Build Verilator 5.040 from source (only on cache miss)
if: steps.verilator-cache.outputs.cache-hit != 'true'
run: |
git clone --branch v5.040 --depth 1 \
https://github.com/verilator/verilator.git /tmp/verilator
cd /tmp/verilator
autoconf
./configure --prefix=$HOME/.local/verilator
make -j$(nproc)
make install
- name: Add Verilator to PATH and verify
run: |
echo "$HOME/.local/verilator/bin" >> $GITHUB_PATH
$HOME/.local/verilator/bin/verilator --version
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install cocotb
run: |
python -m pip install --upgrade pip
pip install cocotb cocotb-bus pytest
cocotb-config --version
- name: Run axi4_mem_model tests
run: |
cd verif/axi4_mem_model
make
- name: Run axi4_master_simple tests
run: |
cd verif/axi4_master_simple
make
- name: Run core_axi4_adapter tests
run: |
cd verif/core_axi4_adapter
make
- name: Summarize
if: always()
shell: bash {0} # no -e — grep returns 1 on no-match, that is OK here
run: |
{
echo "## Test summary"
for d in verif/axi4_mem_model verif/axi4_master_simple verif/core_axi4_adapter; do
if [ -f "$d/results.xml" ]; then
passed=$(grep -oE 'tests="[0-9]+"' "$d/results.xml" | head -1 | grep -oE '[0-9]+' || echo "?")
failed=$(grep -oE 'failures="[0-9]+"' "$d/results.xml" | head -1 | grep -oE '[0-9]+' || echo "?")
echo "- \`$d\`: $passed tests, $failed failures"
else
echo "- \`$d\`: no results.xml (test build failed?)"
fi
done
} >> $GITHUB_STEP_SUMMARY