Commit graph

7358 commits

Author SHA1 Message Date
Farhan Ali Shah
542fe39adc
Adding support for ZCMT Extension for Code-Size Reduction in CVA6 (#2659)
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 implements the ZCMT extension in the CVA6 core, targeting the 32-bit embedded-class platforms. ZCMT is a code-size reduction feature that utilizes compressed table jump instructions (cm.jt and cm.jalt) to reduce code size for embedded systems
**Note:** Due to implementation complexity, ZCMT extension is primarily targeted at embedded class CPUs. Additionally, it is not compatible with architecture class profiles.(Ref. [Unprivilege spec 27.20](https://drive.google.com/file/d/1uviu1nH-tScFfgrovvFCrj7Omv8tFtkp/view))

## Key additions

- Added zcmt_decoder module for compressed table jump instructions: cm.jt (jump table) and cm.jalt (jump-and-link table)

- Implemented the Jump Vector Table (JVT) CSR to store the base address of the jump table in csr_reg module

- Implemented a return address stack, enabling cm.jalt to behave equivalently to jal ra (jump-and-link with return address), by pushing the return address onto the stack in zcmt_decoder module

## Implementation in CVA6
The implementation of the ZCMT extension involves the following major modifications:

### compressed decoder 
The compressed decoder scans and identifies the cm.jt and cm.jalt instructions, and generates signals indicating that the instruction is both compressed and a ZCMT instruction.

### zcmt_decoder
A new zcmt_decoder module was introduced to decode the cm.jt and cm.jalt instructions, fetch the base address of the JVT table from JVT CSR, extract the index and construct jump instructions to ensure efficient integration of the ZCMT extension in embedded platforms. Table.1 shows the IO port connection of zcmt_decoder module. High-level block diagram of zcmt implementation in CVA6 is shown in Figure 1.

_Table. 1 IO port connection with zcmt_decoder module_
Signals | IO | Description | Connection | Type
-- | -- | -- | -- | --
clk_i | in | Subsystem Clock | SUBSYSTEM | logic
rst_ni | in | Asynchronous reset active low | SUBSYSTEM | logic
instr_i | in | Instruction in | compressed_decoder | logic [31:0]
pc_i | in | Current PC | PC from FRONTEND | logic [CVA6Cfg.VLEN-1:0]
is_zcmt_instr_i | in | Is instruction a zcmt instruction | compressed_decoder | logic
illegal_instr_i | in | Is instruction a illegal instruction | compressed_decoder | logic
is_compressed_i | in | Is instruction a compressed instruction | compressed_decoder | logic
jvt_i | in | JVT struct from CSR | CSR | jvt_t
req_port_i | in | Handshake between CACHE and FRONTEND (fetch) | Cache | dcache_req_o_t
instr_o | out | Instruction out | cvxif_compressed_if_driver | logic [31:0]
illegal_instr_o | out | Is the instruction is illegal | cvxif_compressed_if_driver | logic
is_compressed_o | out | Is the instruction is compressed | cvxif_compressed_if_driver | logic
fetch_stall_o | out | Stall siganl | cvxif_compressed_if_driver | logic
req_port_o | out | Handshake between CACHE and FRONTEND (fetch) | Cache | dcache_req_i_t

### branch unit condition
A condition is implemented in the branch unit to ensure that ZCMT instructions always cause a misprediction, forcing the program to jump to the calculated address of the newly constructed jump instruction.

### JVT CSR
A new JVT csr is implemented in csr_reg which holds the base address of the JVT table. The base address is fetched from the JVT CSR, and combined with the index value to calculate the effective address.

### No MMU
Embedded platform does not utilize the MMU, so zcmt_decoder is connected with cache through port 0 of the Dcache module for implicit read access from the memory.

![zcmt_block drawio](https://github.com/user-attachments/assets/ac7bba75-4f56-42f4-9f5e-0c18f00d4dae)
_Figure. 1 High level block diagram of ZCMT extension implementation_

## Known Limitations
The implementation targets 32-bit instructions for embedded-class platforms without an MMU. Since the core does not utilize an MMU, it is leveraged to connect the zcmt_decoder to the cache via port 0.

## Testing and Verification

- Developed directed test cases to validate cm.jt and cm.jalt instruction functionality
- Verified correct initialization and updates of JVT CSR

### Test Plan 
A test plan is developed to test the functionality of ZCMT extension along with JVT CSR. Directed Assembly test executed to check the functionality. 

_Table. 2 Test plan_
S.no | Features | Description | Pass/Fail Criteria | Test Type | Test status
-- | -- | -- | -- | ---- | --
1 | cm.jt | Simple assembly test to validate the working of cm.jt instruction in  CV32A60x. | Check against Spike's ref. model | Directed | Pass
2 | cm.jalt | Simple assembly test to validate the working of cm.jalt instruction in both CV32A60x. | Check against Spike's ref. model | Directed | Pass
3 | cm.jalt with return address stack | Simple assembly test to validate the working of cm.jalt instruction with return address stack in both CV32A60x. It works as jump and link ( j ra, imm) | Check against Spike's ref. model | Directed | Pass
4 | JVT CSR | Read and write base address of Jump table to JVT CSR | Check against Spike's ref. model | Directed | Pass


**Note**: Please find the test under CVA6_REPO_DIR/verif/tests/custom/zcmt"
2025-01-27 13:23:26 +01:00
Riccardo Tedeschi
fb4a8d4472
Fix missing parametrization in performance counters (#2740)
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-26 21:51:25 +01:00
André Sintzoff
3ebb510374
dvplan_csr-access.md: remove file in VerifPlans/csr_access (#2739)
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 the file is also located in VerifPlans/source

Signed-off-by: André Sintzoff <andre.sintzoff@thalesgroup.com>
2025-01-24 13:56:24 +01:00
Pascal Cotret
9d039197d1
update smoke tests file names (#2736)
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
Related to issue #2715

Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
2025-01-23 17:54:21 +01:00
Riccardo Tedeschi
024b8eada8
config_pkg: fix HPDCache related parameter (#2731)
The AXI AW channel in the HPDcache is shared by three components:

Write Buffer
Flush Controller
Uncached Controller
The ID for each transaction is generated based on its source as follows:

Write Buffer: {1'b0, write_buffer_entry_index}
Flush Controller: {1'b1, flush_controller_index}
Uncached Controller: '1
To distinguish between flush transactions and uncached transactions, the flush transaction ID must include at least one 0.

Currently, the AXI ID is limited to 4 bits, while the flush controller supports 8 entries. As a result, when a transaction is sent from the 8th entry of the flush controller, all bits of the ID are set to 1. This causes the HPDcache to misroute the response to the uncached controller instead of the flush controller.

The parameter CVA6ConfigWtDcacheWbufDepth is used in the WB cache to set the number of flush entries. To avoid modifying the ID width, the number of flush entries must be less than 8. Non-power-of-two values are supported.

Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
2025-01-23 17:53:07 +01:00
André Sintzoff
cbb08e8d19
docs: clarify WLRL CSR fields on CVA6 (fix #1053) (#2733)
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
as priv-csrs.adoc was not yet tailored for CVA6, the file is copied
and tailored

Signed-off-by: André Sintzoff <andre.sintzoff@thalesgroup.com>
2025-01-23 16:48:13 +01:00
Guillaume Chauvon
3ce44b1b4e
Spyglass clean up: multiple change to remove Spyglass warnings (#2727)
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
Multiple changes to clean up code and remove Spyglass warnings.

Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
2025-01-23 08:32:31 +01:00
Guillaume Chauvon
664c515b22
Fix decoding of CLRI, BINVI, BSETI, BEXTI and RORI where bit 25 is reserved in RV32 (#2728)
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 decoding of some bitmanip instruction where decoding differs between rv32 and rv64.
Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
2025-01-22 23:45:09 +01:00
Jalali
c19a3c1ace
Spike : mtvec doesn't support vectored mode for cv32a65x (#2729)
This is a spike fix for cv32a65x config.
Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
2025-01-22 23:42:47 +01:00
André Sintzoff
45aa060b5c
docs: regenerate dvplan_csr-access.md (#2625) (#2714)
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
Previous fix was not correct (PR 2627)
Signed-off-by: André Sintzoff <andre.sintzoff@thalesgroup.com>
Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
2025-01-22 10:51:14 +01:00
dependabot[bot]
14998fc161
Bump verif/core-v-verif from 19b5a3f to 60e5724 (#2724)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
2025-01-22 09:11:11 +01:00
André Sintzoff
f80c507aea
docs/requirements.txt: add missing packages for RTD (#2726)
this should fix build of design documents

Signed-off-by: André Sintzoff <andre.sintzoff@thalesgroup.com>
2025-01-22 09:07:01 +01:00
Mike Thompson
b9886a27a2
Clean up table (#2725) 2025-01-22 08:29:35 +01:00
André Sintzoff
02092dbcf0
riscv-isa-manual: ignore mm-formal.adoc (#2723)
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
as this appendix requires Java and as it is not relevant for CV32A65X

Signed-off-by: André Sintzoff <andre.sintzoff@thalesgroup.com>
Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
2025-01-21 17:42:39 +01:00
Guillaume Chauvon
24c6a891b8
Docs: define values for CVXIF in 60x and 65x configuration (#2721)
Set values for X_NUM_RS in embedded configurations to 2.

Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
2025-01-21 17:06:26 +01:00
André Sintzoff
fb899feec1
fix 023e67e9 (define PATH variable and make in one command) (#2722)
to avoid PATH export, define it in the same command with make

Signed-off-by: André Sintzoff <andre.sintzoff@thalesgroup.com>
2025-01-21 17:04:24 +01:00
André Sintzoff
b6b259914a
fix 8e5872c03 (add missing smctr.adoc file) (#2720)
Signed-off-by: André Sintzoff <andre.sintzoff@thalesgroup.com>
2025-01-21 16:25:18 +01:00
André Sintzoff
023e67e9be
.readthedocs.yaml: add node modules to PATH environment variable (#2719)
Signed-off-by: André Sintzoff <andre.sintzoff@thalesgroup.com>
2025-01-21 16:00:13 +01:00
Guillaume Chauvon
98604b5920
csr_regfile: SEIP is read only 0 (fix #2056) (#2716)
Fix #2056

---------

Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
2025-01-21 14:53:37 +01:00
André Sintzoff
7bdfa5f63e
.readthedocs.yaml: clone submodule recursively (#2718)
as riscv-isa-manual has a submodule, clone it

Signed-off-by: André Sintzoff <andre.sintzoff@thalesgroup.com>
2025-01-21 14:34:40 +01:00
André Sintzoff
8e5872c03b
update riscv-isa-manual to riscv-isa-release-4f277ff-2025-01-17 (#2717)
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
Since last riscv-isa-manual update (CVA6 commit 67a6ae966):
	- minor documentation changes
	- new unsupported Zsmctr extension
	- add missing asciidoctor-lists gem in dependencies/Gemfile

Gemfile update is needed for ReadTheDocs

Signed-off-by: André Sintzoff <andre.sintzoff@thalesgroup.com>
Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
2025-01-21 09:56:51 +01:00
Guillaume Chauvon
3d2ff00b1c
Modify MSUB, NMADD, NMSUB behaviour to differs from other instructions. (#2712)
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
MSUB = rs1 - rs2 - rs3
NMADD = ~(rs1 + rs2 + rs3)
NMSUB = ~(rs1 - rs2 - rs3)
2025-01-17 14:12:08 +01:00
OlivierBetschi
e840a61e80
Rewrite assert to avoid multi assertion (#2713)
This should fix github CI failing with verilator due to the assert combination
2025-01-17 12:39:05 +01:00
Côme
7af0f2e4d1
ariane_pkg: remove unused localparam ISSUE_WIDTH (#2710)
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 localparam is not needed anymore.
2025-01-16 23:12:33 +01:00
Guillaume Chauvon
41c22069a0
Add parameter to disable software interrupt. Fix issue #2500 (#2711)
Fix issue #2500
Add parameter to disable software interrupt.
MIP.MSIP and MIE.MSIE are now read only when this parameter is disabled.
2025-01-16 23:09:57 +01:00
dependabot[bot]
5518a41c08
Bump verif/core-v-verif from 464bf7a to 19b5a3f (#2703)
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-15 19:57:00 +01:00
Guillaume Chauvon
21b247dca7
CI: copy seeds in artifacts for generated tests (#2708)
Save seeds in artifacts for generated tests. It will help to reproduce the test in case of failure.
2025-01-15 17:48:01 +01:00
Nils Wistoff
86c53c5334
config_pkg: Update configurations with new flush parameter (#2704)
#2691 extended the cva6_user_cfg_t struct by two new parameters to control the cache's flush behaviour. Add these new parameters to all configs to fix compilation errors due to incomplete struct literals.
2025-01-15 17:47:07 +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
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