Commit graph

18 commits

Author SHA1 Message Date
AngelaGonzalezMarino
f7fae486ff
Fix https://github.com/openhwgroup/cva6/issues/2912 (#2916)
Some checks failed
bender-up-to-date / bender-up-to-date (push) Has been cancelled
ci / build-riscv-tests (push) Has been cancelled
ci / execute-riscv64-tests (push) Has been cancelled
ci / execute-riscv32-tests (push) Has been cancelled
Fix the wrong connection of ASID in MMU. Should solve #2912
2025-04-11 17:21:29 +02:00
Nils Wistoff
d971232cd7
mmu: Use latched value to determine if misaligned exception occurred (#2802)
Some checks failed
bender-up-to-date / bender-up-to-date (push) Has been cancelled
ci / build-riscv-tests (push) Has been cancelled
ci / execute-riscv64-tests (push) Has been cancelled
ci / execute-riscv32-tests (push) Has been cancelled
Adds to #2798. Sorry for noticing this only now. Together with #2798, this reverts a bug that was introduced in #2528.

Signed-off-by: Nils Wistoff <nwistoff@iis.ee.ethz.ch>
2025-02-28 23:50:35 +01:00
Nils Wistoff
14ef741bae
mmu: Latch misaligned exception to fix misattribution (#2798)
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
The load and store units sample the MMU exception one cycle after
`dtlb_hit` is asserted. However, misaligned exceptions are currently fed
through the MMU, potentially attributing a misaligned exception to the
*preceding* instruction. Fix this by latching the misaligned exception.

Signed-off-by: Nils Wistoff <nwistoff@iis.ee.ethz.ch>
Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
2025-02-27 23:08:22 +01:00
Matteo Perotti
1bc415391a
[RVV] CVA6 re-parametrization and MMU interface (#2652)
Follow-up to the discussion on extending Linux support to the Ara vector processor.

* Main changes:
Add:
Add external MMU interface to share the MMU with the external accelerator.
Add avoid_neg() function used to clip negative numbers to zero. Useful for parametric array sizes and vector multipliers.

Modifications:
2 commit ports by default in cv64a6_imafdcv_config_pkg.
Change exception_t from localparam to param in cva6.sv.
Add parameters accelerator_req_t, accelerator_resp_t, acc_mmu_req_t, and acc_mmu_resp_t to cva6.sv.
Replace the fall-through register with a spill register in acc_dispatcher to decouple timing with the accelerator.
Decrease cache sizes in cv64a6_imafdcv_sv39_config_pkg.
Modify Bender.yml package name from ariane to cva6.
Add harmless code to prevent synthesizer tool from crashing when compiling csr_regfile.

* Collateral changes:
Fixes:
Guard some X-IF code lines with correct parameter in cva6.sv.
Parametrize the tracer interface with NrCommitPorts.
Add missing local dependencies to Bender.yml.

---------

Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
2025-02-11 07:22:31 +01:00
Nils Wistoff
cb5c623e50
mmu: Fix pmpcfg, pmpaddr width (#2707)
Some checks failed
bender-up-to-date / bender-up-to-date (push) Has been cancelled
ci / build-riscv-tests (push) Has been cancelled
ci / execute-riscv64-tests (push) Has been cancelled
ci / execute-riscv32-tests (push) Has been cancelled
PR #2692 changed the bus width for `pmpcfg` and `pmpaddr` in most
modules. Do the same in `cva6_mmu` and `cva6_ptw` to fix port width
mismatches.
2025-01-15 11:17:37 +01:00
Fatima Saleem
f4355fa49b
bug fix: canonical check on virtual address for data accesses (#2667)
Some checks failed
bender-up-to-date / bender-up-to-date (push) Has been cancelled
ci / build-riscv-tests (push) Has been cancelled
ci / execute-riscv64-tests (push) Has been cancelled
ci / execute-riscv32-tests (push) Has been cancelled
As mentioned in the spec, we need to perform a canonical check on the virtual address for instruction fetch, load, and store. If the check fails, it will cause the page-fault exception.

This PR fixes the above two:
- Changes INSTR_ACCESS_FAULT to INSTR_PAGE_FAULT
- Adding virtual address check on data accesses as well
2024-12-16 11:07:24 +01:00
OlivierBetschi
23355d29f0
Pmp/extracted pmp master (#2528)
Extraction of the PMP outside of the MMU.
2024-12-04 10:06:36 +01:00
Côme
4619a67fc6
expand glob port maps (#2585)
Some checks failed
bender-up-to-date / bender-up-to-date (push) Has been cancelled
ci / build-riscv-tests (push) Has been cancelled
ci / execute-riscv64-tests (push) Has been cancelled
ci / execute-riscv32-tests (push) Has been cancelled
Expands all glob port maps in the core/ directory of this repository except the core/cache_subsystem/ directory, despite the glob port maps in core/cache_subsystem/miss_handler.sv and core/cache_subsystem/std_nbdcache.sv.

Also reorders port maps to keep the same order as port declarations.
2024-11-07 16:51:46 +01:00
JeanRochCoulon
51653c6377
Revert "[PMP] Extracted PMP (#2476)" (#2524)
This reverts commit 969c1518f2.
2024-10-04 07:39:35 +02:00
CoralieAllioux
969c1518f2
[PMP] Extracted PMP (#2476)
* Remove misaligned_ex computation: get it from outside

* Remove data and instr pmps, get match_execution from outside

* Get data and instr allow from outside

* Simplify fetch_instruction exception when instr not allow by pmp

* Simplify exception when data not allow by pmp, getting it from outside

* Apply verible format

* First public version of extracted pmp

* Integrate PMP fully outside MMU

* fix translation_valid and dtlb_ppn when no mmu

* Add pmp_data_if in needed file lists

* Fix exception tval when translation is enabled

* integrate no_locked assertions for pmp: now in blocking assignments to avoid raise condition in simulation

* Fix mixed assignment for no_locked_if

* Remove assertion no_locked from pmp: need clk and reset

* Apply verible format

---------

Co-authored-by: Olivier Betschi <olivier.betschi@fr.bosch.com>
2024-10-03 08:21:56 +00:00
Moritz Schneider
fd489a16fb
Fix off by one error in PMP length (#2394) 2024-07-25 12:08:53 +02:00
Moritz Schneider
246961b3c3
Increase max num PMPs to 64 (#2279) 2024-07-04 14:09:37 +02:00
AngelaGonzalezMarino
3e907d625f
fix tval in mmu (#2124) 2024-05-31 15:26:33 +02:00
AngelaGonzalezMarino
f8b07f09ab
Invalid pte reserved (#2123) 2024-05-23 11:50:09 +02:00
AngelaGonzalezMarino
9142fdd03a
integrate unified mmu with H extension (#1958) 2024-05-16 00:24:50 +02:00
JeanRochCoulon
b3ae6e9362
Revert MMU (#1890)
* Revert "fix vcs simulation errors regarding hypervisor extension code (#1889)"

This reverts commit 5ff5f164fb.

* Revert "Mmu user manual (#1881)"

This reverts commit 6a5863e71a.

* Revert "Mmu unify pr (#1876)"

This reverts commit 9fb5db2555.
2024-03-05 16:44:40 +01:00
AngelaGonzalezMarino
5ff5f164fb
fix vcs simulation errors regarding hypervisor extension code (#1889) 2024-03-05 14:36:08 +01:00
AngelaGonzalezMarino
9fb5db2555
Mmu unify pr (#1876) 2024-02-29 22:03:56 +01:00