Commit graph

7280 commits

Author SHA1 Message Date
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
Nils Wistoff
b28545ef78
id_stage/pmp_entry: Fix formatting (#2705)
Run verible verilog format to fix upstream formatting.
2025-01-15 10:29:18 +01:00
Jérôme Quévremont
a12d511432
[Skip CI] Extending RESOURCES.md document (#2629)
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
Adding more references from PULP and Zero Day Labs.
Fixing a few typos.
Unified the layout.
2025-01-10 21:59:42 +01:00
Cesar Fuguet
db568f3e1d
Fully support the Write-Back mode of the HPDcache in the CVA6 (#2691)
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
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
Nils Wistoff
71f96d4329
wt_axi_adapter: Remove redundant, parameterization-breaking zero extensions (#2697)
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
zero-extended the paddrs to match the axi_addr width and thus fix lint warnings. However, this breaks elaboration if AxiAddrWidth <= PLEN. To fix lint warnings without breaking parametrisation, use explicit casts to pad/truncate as required.
2025-01-10 08:27:10 +01:00
Nils Wistoff
ee58bfab94
wt_dcache_buffer: Avoid out-of-range user signal access (#2698)
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
If the data user signal is disabled and the user bus width is reduced,
the slice operator into the user field will cause elaboration errors.
Since the faulty else block is anyways without effect, just remove it.
2025-01-09 14:42:41 +01:00
André Sintzoff
1c6b89df5b
doc: RVZicntr extension can be not supported (#2699)
counters.adoc: condition around Zicntr text
2025-01-09 14:38:49 +01:00
JeanRochCoulon
837b204753
Make PMP disableable (#2692)
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
2025-01-09 12:14:18 +01:00
Matteo Perotti
5a484fce42
cache_subsystem: 🐛 Fix AXI read len (#2696)
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
AxiRdBlenDcache -> AxiRdBlenIcache
2025-01-08 23:06:53 +01:00
Jalali
6268d28939
Code coverage : Add option to support coverage condition with arithmetic operations (#2694)
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
Fix issue#1902
2025-01-08 18:55:08 +01:00
Nils Wistoff
e55f25d23c
csr_regfile: Fix irq/ex delegation in RVH (#2689)
In RVH, interrupts are currently delegated if hxdeleg is set but mxdeleg
is not, violating the spec ("A trap/irq *that has been delegated to
HS-mode (using mxdeleg)* is further delegated to VS-mode if the
corresponding hxdeleg bit is set"). Fix and simplify the corresponding logic.
2025-01-08 13:40:30 +01:00
AngelaGonzalezMarino
bca4e1544f
update readme with information how to generate bitstream for agilex 7 (#2690)
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
2025-01-08 12:01:33 +01:00
JeanRochCoulon
31008fc4b9
remove ifndef VERILATOR (#2686) 2025-01-08 09:08:44 +01:00
AngelaGonzalezMarino
eab88770ec
Altera flow support (#2649)
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
Integration of bitstream generation for Altera APU in general flow.
* Automatic generation of IPs and sources required for Altera FPGA
* Adaptation of bootrom code (UART used in Altera is different and needs a different driver)
* Generation of project for Quartus Pro adding required sources and constraints - Quartus Pro licence required by users
* Configuration file for openocd connection with vJTAG tap
2025-01-07 23:45:49 +01:00
JeanRochCoulon
2155d0e9c4
Fix #2665 #2400 #2657 (#2685)
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
* Fix #2400: define new PmpNapotEn parameter to disable NAPOT

* Fix #2665 by removing NA4 related RTL lines

* Fix Spyglass

* Fix gate count
2025-01-07 08:45:28 +01:00
dependabot[bot]
86a80f0eaa
Bump verif/core-v-verif from 6c1e999 to 464bf7a (#2683)
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
2025-01-03 11:14:15 +01:00
Jalali
446defb900
CVXIF VSEQ: RD equal x10 for CUS_ADD_RS3_RTYPE (#2682)
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
Fix cvxif vseq
2025-01-02 14:51:24 +01:00
Guillaume Chauvon
4b9cbf9223
Various fixes for CVXIF following verification. (#2678)
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
* [CVXIF] Various fixes for bugs report with CVXIF's UVM agent

* Update options and simulators to support CVXIF's UVM agent

---------

Co-authored-by: ajalali <ayoub.jalali@external.thalesgroup.com>
Co-authored-by: André Sintzoff <61976467+ASintzoff@users.noreply.github.com>
2024-12-20 13:28:49 +01:00
Jalali
b4a037d33b
Interrupt cov : sample when rvfi.intr is asserted (#2675)
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
2024-12-19 16:20:45 +01:00
JeanRochCoulon
73bae85e0c
[HOT FIX] Update expected_synth.yml (#2676)
Fix unexpected gate count increase due to Zbkb crypto extension
2024-12-19 14:00:37 +01:00
Jalali
d4b337851c
RVFI : For synchronous trap, check mcause MSB also (#2674) 2024-12-19 12:10:56 +01:00
Munail Waqar
f7dd49efa5
Adding support for Scalar Crypto Extension (Bitmanip instructions for Cryptography, Zbkb) (#2653)
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
Introduction
This PR adds support for Zbkb extension in the CVA6 core. It also adds the documentation for this extension. These changes have been tested with self-written single instruction tests and with the riscv-arch-tests. This PR will be followed by other PRs that will add complete support for the Zkn - NIST Algorithm Suite extension.

Implementation
Zbkb Extension:
Added support for the Zbkb instruction set. It essentially expands the Zbb extension with additional instructions useful in cryptography. These instructions are pack, packh, packw, brev8, unzip and zip.

Modifications
1. A new bit ZKN was added. The complete Zkn extension will be added under this bit for ease of use. This configuration will also require the RVB (bitmanip) bit to be set.
2. Updated the ALU and decoder to recognize and handle Zbkb instructions.

Documentation and Reference
The official RISC-V Cryptography Extensions Volume I was followed to ensure alignment with ratification. The relevant documentation for the Zbkb instruction was also added.

Verification
Assembly Tests:
The instructions were tested and verified with the K module of both 32 bit and 64 bit versions of the riscv-arch-tests to ensure proper functionality. These tests check for ISA compliance, edge cases and use assertions to ensure expected behavior. The tests include:
pack-01.S
packh-01.S
packw-01.S
brev8-01.S
unzip-01.S
zip-01.S
2024-12-18 22:35:41 +01:00
Côme
b5caf14c50
ci: use different variables for runner tags (#2673)
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
This allows a more grained management of CI resources.
2024-12-18 07:40:38 +01:00
Côme
a4cec295a8
csr only uses one commit port (#2671)
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
Only the first commit port is used by CSR.
2024-12-17 23:37:02 +01:00
Côme
c5bde40636
apply verible (#2670)
There were formatting issues in core/
2024-12-17 23:29:24 +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
Côme
fd213fc19e
cut dangerous path from flush to issue (#2666)
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
serdiv is the only FLU which has a combinational path from flush_i
to the result bus
2024-12-12 19:10:26 +01:00
Jalali
66ae110a51
CVXIF Verif : Connect CVXIF new agent (#2663)
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
2024-12-11 18:29:02 +01:00
Zbigniew Chamski
ed89c717f7
[CV32A65X] Update PMPADDRn spec to make bit 0 ROCST 0. Update config files. (#2651)
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
Update CV32A65X-annotated privileged ISA specification to reflect the fact that with PMP granularity 8 and only supported PMP address matching modes being OFF and TOR, bit 0 of the pmpaddr0..pmpaddr7 registers can be safely made read-only zero. Update riscv-config specifications and its generated files accordingly.
2024-12-09 13:22:38 +01:00
Valentin Thomazic
5ff6b2d32e
check spike version in cva6.py (#2654)
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
Spike version check seems to have been commented by mistake, this pr fixes it
2024-12-05 15:29:24 +01:00
AngelaGonzalezMarino
f7eb9c1e7b
Altera apu agilex7 (#2647)
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
This PR is adding the APU design adapted to Altera Agilex7 FPGA.

It does not include integration in the Makefile nor automatic generation of Altera IPs, that will be the last PR of the Altera support.
2024-12-04 15:54:41 +01:00
Cra2yPierr0t
de0ebf0409
add cv64a6_imafdch_sv39 config to cva6.py (#2646)
Make cv64a6_imafdch_sv39 available from cva6.py
2024-12-04 10:27:37 +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
André Sintzoff
b5b316ad12
doc: fix build (cva6_frontend.adoc) (#2644)
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
use defined adoc variable
2024-12-03 07:43:05 +01:00
AngelaGonzalezMarino
9877af5eb6
fix size of vectors when AxiNumWords=1 (#2639)
in wt_axi_adapter, axi_rd_blen and axi_wr_blen are defined like this:

logic [$clog2(AxiNumWords)-1:0] axi_rd_blen, axi_wr_blen;

However, if AxiNumWords=1, this gives a synthesis error. This happens if the cache line is set to 64 bits (same as AXI width).

It can be fixed by changing to:
logic [AxiNumWords > 1 ? $clog2(AxiNumWords) : AxiNumWords-1:0] axi_rd_blen, axi_wr_blen;
2024-12-03 07:14:29 +01:00
AngelaGonzalezMarino
ba8ac715d8
use dcache_assoc_width (#2640)
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
cva6/core/cache_subsystem/wt_dcache_missunit.sv

Line 202 in b718824
 .OutWidth ($clog2(CVA6Cfg.DCACHE_SET_ASSOC)) 

Better to use the width parameter which already contemplates the case of 0 to avoid issues if associativity is set to 1
cva6/core/include/build_config_pkg.sv

Line 134 in b718824
 cfg.DCACHE_SET_ASSOC_WIDTH = CVA6Cfg.DcacheSetAssoc > 1 ? $clog2(CVA6Cfg.DcacheSetAssoc) : CVA6Cfg.DcacheSetAssoc;
2024-12-02 17:40:38 +01:00
dependabot[bot]
84e3a39dde
Bump verif/core-v-verif from b7f57c1 to 9601c80 (#2642)
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
Bumps [verif/core-v-verif](https://github.com/openhwgroup/core-v-verif) from `b7f57c1` to `9601c80`.
- [Release notes](https://github.com/openhwgroup/core-v-verif/releases)
- [Commits](b7f57c145c...9601c80f4c)

---
updated-dependencies:
- dependency-name: verif/core-v-verif
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: André Sintzoff <61976467+ASintzoff@users.noreply.github.com>
2024-11-29 18:03:14 +01:00
Valentin Thomazic
aa62eec15c
Provide the correct environment for doc build (#2643)
* Add riscv-isa-sim submodule

* Add cmake, bison, flex, pango, gdk-pixbuf-2.0, libgdk-pixbuf2.0-0, gdk-pixbuf-2.0, libgtk2.0-dev

* Update .readthedocs.yaml
2024-11-29 17:25:10 +01:00
Valentin Thomazic
820a8c6e01
Fix documentation build (#2641)
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
* Fix rtd yaml
* add rtd badge to readme
2024-11-29 14:37:50 +01:00
AngelaGonzalezMarino
b718824e1e
Altera opt 3 (#2613)
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 third optimization for Altera FPGA is to move the register file to LUTRAM. Same as before, the reason why the optimization previously done for Xilinx is not working, is that in that case asynchronous RAM primitives are used, and Altera does not support asynchronous RAM. Therefore, this optimization consists in using synchronous RAM for the register file.

The main changes to the existing code are:

Changes in ariane_regfile_fpga.sv file: The idea is the same as before, since synchronous RAM takes one clock cycle to read, we need to store the data when it is written, in case it is read right after. For this there is an auxiliary register that stores the last written data. On the read side, we need to identify if the data to be read is available in the RAM or if it is still in the auxiliary register (read after write). To compensate for the synchronous RAM delay the address is advanced one clock cycle. In this case there is a multiplexer in the output to select the block from where data is read, here we need to keep the read address for one clock cycle to select the right block when data is available.

Changes in issue_read_operands.sv file: adjust address to read from register file (when synchronous RAM is used reads take one cycle, so we advance the address). Since this address is an input, we need a new input port that brings the address in advance “issue_instr_i_prev”.

Changes in issue_stage.sv file: To connect the new input port that brings the address in advance “decoded_instr_i_prev”.

Changes in id_stage.sv file: To output the instruction to be issued before registering it (one clock cycle in advance). A new output port is needed for this “issue_entry_o_prev”

Changes in cva6.sv file: To connect the new output of the id_stage to the issue_stage to bring the address in advance to the register file (issue_entry_id_issue_prev)
2024-11-28 14:26:29 +01:00
Valentin Thomazic
dd649f28ad
Show config for smoke-bench job (#2637)
Show the config on the smoke gen dashboard report
2024-11-28 12:03:46 +01:00
Valentin Thomazic
160c322f53
improve dashboard-provided log (#2636)
* Due to the increased count of warnings, provide tail of log instead of head on the dashboard
* Add tandem yaml report file on the jobs reports
* Reduce UVM Verbosity on smoke gen tests
2024-11-28 11:46:47 +01:00
Guillaume Chauvon
7c326f5407
Fix gate simulation: Update hpdcache_sram black box (#2632)
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
Update hpdcache_sram black box which changed with bump of hpdcache repository
2024-11-27 14:45:15 +01:00
Valentin Thomazic
6ee7a7d0c2
CI fixes (#2634)
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
* Increase timeout for compliance testlist
* Switch to verilator for riscv-tests-v for faster sim
* fix reports for non tandem jobs
2024-11-27 08:00:41 +01:00
Jalali
5b1c194cb7
UVM_ENV : Clean up CVA6 UVM env (#2633)
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
This MR do some cleaning on the uvm env :

* fixing typo
* remove unused code
* printing in the right place
2024-11-26 15:30:48 +01:00
AEzzejjari
2157aaa926
Accelerate the performance of the AXI agent (#2631)
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
Accelerate the performance of the AXI agent by disabling all the randomization and sending responses with zero delay
2024-11-25 18:02:30 +01:00
André Sintzoff
f800707738
docs: update URL in CSR access DV plan (fix #2625) (#2627)
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
CSR are no more described in CV32A6_Control_Status_Registers.html
2024-11-22 15:12:57 +01:00
Jalali
7eb33df0ac
Interrupt agent : Modify README also clean interrupt_pkg (#2571)
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
2024-11-21 23:59:42 +01:00
AngelaGonzalezMarino
c389382c89
Altera opt 2 (#2602)
The second optimization for Altera FPGA is to move the BHT to LUTRAM. Same as before, the reason why the optimization previously done for Xilinx is not working, is that in that case asynchronous RAM primitives are used, and Altera does not support asynchronous RAM. Therefore, this optimization consists in using synchronous RAM for the BHT.

The main changes to the existing code are:

New RAM module to infer synchronous RAM in altera with 2 independent read ports and one write port (SyncThreePortRam.sv)

Changes in the frontend.sv file: modify input to vpc_i port of BHT, by advancing the address to read, in order to compensate for the delay of synchronous RAM.

Changes in the bht.sv file: This case is more complex because of the logic operations that need to be performed inside the BHT. First, the pc pointed by bht_update_i is read from the memory, modified according to the saturation counter and valid bit, and finally written again in the memory. The prediction output is given based on the vpc_i. With asynchronous memory, the new data written via update_i is available one clock cycle after writing it. So, if vpc_i tries to read the address that was previously written by update_i, everything is fine. However, in the case of synchronous memory there are three clock cycles of latency (one for reading the pc content (read port 1), another one for writing it, and another one for reading in the other port (read port 0)). For this reason, there is the need to adapt the design to these new latency constraints:

First, there is the need for a delay on the address write of the synchronous RAM, to wait for the previous pc read and store the right modified data.

Once this is solved, similarly to the FIFO case, there is the need for an auxiliary buffer that will store the data written in the FIFO, allowing to have it available 2 clock cycles after the update_i was valid. This is because after having the correct data, the RAM takes 2 clock cycles until data can be available in the output (one clock cycle for writing and one for reading).

Finally, there is a multiplexer in the output that permits to deliver the correct prediction providing the data from the update logic (1 cycle of delay), the auxiliary register (2 cycles of delay), or the RAM (3 or more cycles of delay), depending on the delay since the update_i was valid (i.e. written to the memory).
2024-11-21 23:36:18 +01:00
Zbigniew Chamski
8a84f788d6
Increase Spike PMP granularity to 8. Update yaml spec files accordingly. (#2624)
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
Update riscv-config spec files and Spike Yaml file for CV32A65X.

Bump CVV to change Spike default PMP granularity to 8 and to include corresponding Spike Yaml parameter.
2024-11-21 12:19:24 +01:00