cva6/.github/workflows/ci.yml
Cesar Fuguet db568f3e1d
Some checks are pending
bender-up-to-date / bender-up-to-date (push) Waiting to run
ci / build-riscv-tests (push) Waiting to run
ci / execute-riscv64-tests (push) Blocked by required conditions
ci / execute-riscv32-tests (push) Blocked by required conditions
Fully support the Write-Back mode of the HPDcache in the CVA6 (#2691)
This PR modifies some components in the CVA6 to fully support the WB mode of the HPDcache.

When on WB mode, there may be coherency issues between the Instruction Cache and the Data Cache. This may happen when the software writes on instruction segments (e.g. to relocate a code in memory).

This PR contains the following modifications:

The CVA6 controller module rises the flush signal to the caches when executing a fence or fence.i instruction.
The HPDcache cache subsystem translates this fence signal to a FLUSH request to the cache (when the HPDcache is in WB mode).
Add new parameters in the CVA6 configuration packages:
DcacheFlushOnInvalidate: It changes the behavior of the CVA6 controller. When this parameter is set, the controller rises the Flush signal on fence instructions.
DcacheInvalidateOnFlush: It changes the behavior of the HPDcache request adapter. When issuing a flush, it also asks the HPDcache to invalidate the cachelines.
Add additional values to the DcacheType enum: HPDCACHE_WT, HPDCACHE_WB, HPDCACHE_WT_WB
In addition, it also fixes some issues with the rvfi_mem_paddr signal from the store_buffer.
2025-01-10 17:57:32 +01:00

194 lines
5.8 KiB
YAML

# Copyright 2021 OpenHW Group
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
# Run functional regression checks
name: ci
on: [push, pull_request]
jobs:
build-riscv-tests:
name: build-riscv-tests
runs-on: ubuntu-latest
env:
NUM_JOBS: 8
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Get specific submodule hash
id: core-v-submodule-hash
run: |
cd verif/core-v-verif
echo "hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Cache toolchain
id: cache-toolchain
uses: actions/cache@v3
env:
cache-name: cache-toolchain
with:
path: tools/riscv-toolchain/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('ci/install-toolchain.sh') }}
- name: Cache verilator
id: cache-verilator
uses: actions/cache@v3
env:
cache-name: cache-verilator
with:
path: tools/verilator/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('verif/regress/install-verilator.sh') }}
- name: Cache Spike
id: cache-spike
uses: actions/cache@v3
env:
cache-name: cache-spike
with:
path: tools/spike/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('verif/regress/install-spike.sh')}}-${{ steps.core-v-submodule-hash.outputs.hash }}
- name: Prepare
run: |
ci/setup.sh
execute-riscv64-tests:
name: execute-riscv64-tests
runs-on: ubuntu-latest
env:
SPIKE_TANDEM: 1
strategy:
matrix:
testcase: [ cv64a6_imafdc_tests ]
config: [ cv64a6_imafdc_sv39_hpdcache, cv64a6_imafdc_sv39_hpdcache_wb, cv64a6_imafdc_sv39_wb, cv64a6_imafdc_sv39 ]
simulator: [ veri-testharness ]
include:
- testcase: dv-riscv-arch-test
config: cv64a6_imafdc_sv39_hpdcache
simulator: veri-testharness
- testcase: dv-riscv-arch-test
config: cv64a6_imafdc_sv39_hpdcache_wb
simulator: veri-testharness
needs:
build-riscv-tests
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Get specific submodule hash
id: core-v-submodule-hash
run: |
cd verif/core-v-verif
echo "hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Cache toolchain
id: cache-toolchain
uses: actions/cache@v3
env:
cache-name: cache-toolchain
with:
path: tools/riscv-toolchain/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('ci/install-toolchain.sh') }}
- name: Cache verilator
id: cache-verilator
uses: actions/cache@v3
env:
cache-name: cache-verilator
with:
path: tools/verilator/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('verif/regress/install-verilator.sh') }}
- name: Cache Spike
id: cache-spike
uses: actions/cache@v3
env:
cache-name: cache-spike
with:
path: tools/spike/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('verif/regress/install-spike.sh')}}-${{ steps.core-v-submodule-hash.outputs.hash }}
- name: Run Tests
run: |
set -x
export RISCV=$(pwd)/tools/riscv-toolchain/
source ci/install-prereq.sh
source verif/sim/setup-env.sh
DV_SIMULATORS=${{matrix.simulator}},spike DV_TARGET=${{matrix.config}} bash verif/regress/${{matrix.testcase}}.sh
- name: Upload Lint Report to Github
uses: actions/upload-artifact@v4
with:
name: ${{matrix.simulator}}.${{matrix.testcase}}.${{matrix.config}}
path: 'verif/sim/out*'
retention-days: 10
execute-riscv32-tests:
name: execute-riscv32-tests
runs-on: ubuntu-latest
env:
SPIKE_TANDEM: 1
strategy:
matrix:
testcase: [ dv-riscv-arch-test, cv32a6_tests ]
config: [ cv32a65x ]
simulator: [ veri-testharness ]
needs:
build-riscv-tests
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Get specific submodule hash
id: core-v-submodule-hash
run: |
cd verif/core-v-verif
echo "hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Cache toolchain
id: cache-toolchain
uses: actions/cache@v3
env:
cache-name: cache-toolchain
with:
path: tools/riscv-toolchain/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('ci/install-toolchain.sh') }}
- name: Cache verilator
id: cache-verilator
uses: actions/cache@v3
env:
cache-name: cache-verilator
with:
path: tools/verilator/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('verif/regress/install-verilator.sh') }}
- name: Cache Spike
id: cache-spike
uses: actions/cache@v3
env:
cache-name: cache-spike
with:
path: tools/spike/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('verif/regress/install-spike.sh')}}-${{ steps.core-v-submodule-hash.outputs.hash }}
- name: Run Tests
run: |
set -x
export RISCV=$(pwd)/tools/riscv-toolchain/
source ci/install-prereq.sh
source verif/sim/setup-env.sh
DV_SIMULATORS=${{matrix.simulator}},spike DV_TARGET=${{matrix.config}} bash verif/regress/${{matrix.testcase}}.sh
- name: Upload Lint Report to Github
uses: actions/upload-artifact@v4
with:
name: ${{matrix.simulator}}.${{matrix.testcase}}.${{matrix.config}}
path: 'verif/sim/out*'
retention-days: 10