* Initial plan * Add cocotb test infrastructure and testbenches for APB3, APB4, and AXI4-Lite Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com> * Add integration tests, examples, and documentation for cocotb testbenches Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com> * Address code review feedback: use relative imports and update installation docs Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com> * Add implementation summary document Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com> * Merge cocotb dependencies into test group Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com> * Add optional cocotb simulation workflow with Icarus Verilog Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com>
60 lines
1.4 KiB
YAML
60 lines
1.4 KiB
YAML
name: Cocotb Simulation Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
workflow_dispatch:
|
|
schedule:
|
|
# Run weekly on Monday at 00:00 UTC
|
|
- cron: '0 0 * * 1'
|
|
|
|
jobs:
|
|
cocotb-sim:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
strategy:
|
|
matrix:
|
|
python-version: ['3.10', '3.12']
|
|
simulator: ['icarus']
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up uv
|
|
uses: astral-sh/setup-uv@v3
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install HDL Simulator
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y iverilog
|
|
iverilog -V
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv sync --group test
|
|
|
|
- name: Run cocotb integration tests
|
|
run: |
|
|
uv run pytest tests/cocotb/testbenches/test_integration.py -v
|
|
|
|
- name: Run cocotb simulation tests (APB4)
|
|
run: |
|
|
uv run pytest tests/cocotb/testbenches/test_apb4_runner.py -v -s
|
|
continue-on-error: true
|
|
env:
|
|
SIM: ${{ matrix.simulator }}
|
|
|
|
- name: Upload test logs
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: cocotb-logs-py${{ matrix.python-version }}-${{ matrix.simulator }}
|
|
path: |
|
|
**/*.vcd
|
|
**/sim_build/**/*.log
|
|
retention-days: 7
|
|
if-no-files-found: ignore
|