Commit graph

64 commits

Author SHA1 Message Date
André Sintzoff
534aef7776
Update cv32a6_v0.1.0 branch to latest master commit (#1045) 2023-02-06 15:34:10 +01:00
Guillaume Chauvon
ec61b89df6
Flist.cv32a60x: add example coprocessor to Flist (#986) 2022-11-02 10:24:33 +01:00
Nils Wistoff
17743bc712
cache_subsystem: Parametrise AXI interface (#982)
Parametrise the AXI interface of CVA6. With this PR, both cache subsystems support variable AXI address widths. The write-through cache furthermore supports variable AXI data widths. Moreover, this PR includes a modular AXI testbench for the WT cache to test the introduced changes. The following configurations of the WT cache have been verified:

XLEN   Cacheline Width   AXI data width   AXI address width
64                  128                     64                       64
64                  128                   128                       52
64                  512                   128                       64
32                  512                   256                       48
32                    64                     32                       48
2022-10-26 11:20:19 +02:00
Tianrui Wei
4c01614f83
Bump CVA6 for OpenPiton, fix mmu issues (#968)
This PR does the following
    1. Bump the filelist for OpenPiton for new directory layout
    2. Remove AXI Interface for OpenPiton in the top level
    3. Fix several issues in MMU discovered during address translation last year, the changes in core/mmu_sv39/mmu.sv are a joint effort between Jbalkind minho-pulp zarubaf niwis acostillado tianrui-wei
    4. disable bitmanip by default
    5. separate an ariane config package for openpiton synthesis. Some of  the previous changes makes ariane too big for openpiton, so we need to revert these changes
    6. Don't increase number of writeback ports (NR_WB_PORTS) when cvxif is  not enabled
2022-10-14 07:38:42 +02:00
JeanRochCoulon
df920cda7e
Remove verilator_work files (#975) 2022-10-13 08:02:01 +02:00
JeanRochCoulon
d9567d7eca
Add "cause" field in RVFI (#974) 2022-10-13 08:01:16 +02:00
JeanRochCoulon
b9cfd53520
Fix Flist.cv32a60x to load the right config package (#964) 2022-09-26 14:52:52 +02:00
Zbigniew Chamski
6d263a6023
compressed_decoder.sv: Fix FP word L/S decompression as per ISA spec v2.2. (#957)
* compressed_decoder.sv: Fix of word L/S as per ISA spec v2.2.
* core/compressed_decoder.sv: Use word L/S patterns in FLW/FSW/FLWSP/FSWSP
  expansions on RV32C.
2022-09-22 19:49:19 +02:00
JeanRochCoulon
52fdcc9429
Fix the AXI_USER_WIDTH value and add some begin/end in frontend.sv (#961) 2022-09-22 17:33:15 +02:00
JeanRochCoulon
9109ff07f6
Cvvdev/dev/rvfi (#959)
* Add load and store information to RVFI
* Add rs1 and rs2 information to RVFI
* Condition rvfi mem and rs1/rs2 information generation by RVFI_MEM
This add-on is requested by ISACOV and test termination.
2022-09-21 13:00:59 +02:00
Nils Wistoff
dc7b3ccb9d
perf_counters: Explicit typecast for comparison (#943)
Comparing a logic vector to an enum causes some tools (e.g. Questasim)
to throw a mismatch error. Fix this by explicitly typecasting.
2022-09-05 15:51:39 +02:00
Guillaume Chauvon
1e2ec41cc0
Update to synthesis and simulation gate flow (#947) 2022-09-01 10:18:13 +02:00
André Sintzoff
e36a3bffbf
perf_counters.sv: unimplemented mhpmcounters shall be read-only 0 (#940)
see The RISC-V Instruction Set Manual Volume II: Privileged Architecture
Version 20211203

3.1.1 Hardware Performance Monitor
All counters should be implemented, but a legal implementation is to make
both the counter and its corresponding event selector be read-only 0.

Signed-off-by: André Sintzoff <andre.sintzoff@thalesgroup.com>
2022-08-16 09:28:48 +02:00
Guillaume Chauvon
eb9881efbb
cvxif_fu.sv: add register to hold illegal instruction information (#939)
It avoids that result from cvxif and illegal instruction use wb bus at the same time
2022-08-16 09:27:32 +02:00
Guillaume Chauvon
80050aa21e
decoder: add missing default case for BITMANIP (#938) 2022-08-16 09:25:11 +02:00
Muhammad Ijaz
57592030b4
Removing redundant RTL from multiplier file (#937) 2022-08-01 11:29:49 +02:00
Guillaume Chauvon
b6c1d04b6f
decoder.sv: fix sfence.vma when rs1 != 0 (#933)
unlike other instructions with minor opcode == PRIV,
SFENCE.VMA do not check for rs1 != 0.
Only check for rd !=0 to raise illegal instruction

Signed-off-by: Guillaume Chauvon <guillaume.chauvon@thalesgroup.com>
2022-07-20 17:03:06 +02:00
Moritz Schneider
011edf49bd
Fix exception type on PMP check during PTW (#908)
Fixes #906

According to the spec:
> If accessing pte violates a PMA or PMP check, raise an access-fault
> exception corresponding to the original access type.

Found by @Phantom1003 and @ProjectDimlight

Signed-off-by: Moritz Schneider <moritz.schneider@inf.ethz.ch>
2022-07-08 10:21:57 +02:00
Yan
01c89b7606
fix sfence.vma decoder (#921) 2022-07-08 10:10:37 +02:00
Yan
4ab5ef93b7
fix dret decoder (#922) 2022-07-08 10:10:01 +02:00
Yan
0b4ff9e405
fix fence(.i) decoder (#923) 2022-07-08 10:03:16 +02:00
M-Ijaz-10x
c23eed5415
Adding Support for Zba, Zbb, Zbc and Zbs extensions to CVA6 (#878) 2022-07-06 19:12:40 +02:00
Guillaume Chauvon
b2dc4752e1
Enable CVXIF for target cv32a60X and add renaming for cvxif when using 3 operands (#925)
* re_name.sv: add condition related to CVXIF to rename 3rd operand
* cv32a60x_pkg.sv: set CVXIFEn to 1
2022-06-30 11:56:35 +02:00
JeanRochCoulon
a9c7b4f1e1
Cvvdev/dev/formating4 (#920)
Several format cleanings:
- split load_store_unit.sv to create lsu_bypass.sv
- add several "begin" and "end"
2022-06-28 22:15:55 +02:00
Yannick Casamatta
5d93a5c551
csr_regfile, instret signal bad lenght when 32bits (#918) 2022-06-28 09:56:37 +02:00
JeanRochCoulon
38c58e50e8
Add cv32a60x platform configuration (#907) 2022-06-10 14:15:21 +02:00
Steffen Persvold
75807530f2
Add support for "high" counter CSRs in 32-bit mode (#847)
* Add support for "high" counter CSRs in 32-bit mode

In 32bit mode MCYCLEH, MINSTRETH, CYCLEH, TIMEH and INSTRETH are
used to return the most significant 32-bit value of the counters
which are now always 64-bit wide.

Signed-off-by: Steffen Persvold <spersvold@gmail.com>

* Enable writing of MCYCLEH and MINSTRETH CSRs

Signed-off-by: Steffen Persvold <spersvold@gmail.com>
2022-05-12 10:46:40 +02:00
Guillaume Chauvon
266f1386a1
cva6.sv: change RVFI exception signal (#873)
Signed-off-by: Guillaume Chauvon <guillaume.chauvon@thalesgroup.com>
2022-05-12 08:46:37 +02:00
Guillaume Chauvon
b40bb3264b
wt_dcache_wbuffer.sv: remove init for user (#870) 2022-04-29 14:21:47 +02:00
JeanRochCoulon
35f430d8c6
Replace SyncDpRam by tc_ram (#861)
Signed-off-by: Jean-Roch Coulon  <jean-roch.coulon@thalesgroup.com>
2022-04-28 20:13:55 +02:00
Gchauvon
34f63b4487
ariane_pkg.sv: Fix LOG2_INSTR_PER_FETCH when RVC is disable (#860) 2022-04-21 10:47:48 +02:00
JeanRochCoulon
56f8c9f5fe
Add user field between memory and caches (#857)
* wt_dcche_wbuffer.sv: fix assert

Signed-off-by: Jean-Roch Coulon <jean-roch.coulon@thalesgroup.com>

* Many files: Add user between memories and cva6

Signed-off-by: Jean-Roch Coulon <jean-roch.coulon@thalesgroup.com>

* Update std_nbdcache.sv

Make wb cache work

* Update setup.sh

Co-authored-by: Guillaume Chauvon <guillaume.chauvon@thalesgroup.com>
2022-04-20 12:47:07 +02:00
sébastien jacq
0b61544da8
Dev dcache 32bits (#849)
Reduce dcache data output width from 64 to 32 bits in cv32a6 configuration

Signed-off-by: sjthales <sebastien.jacq@thalesgroup.com>
2022-04-11 14:54:09 +02:00
sébastien jacq
c26bda3f7b
Make C extension optional (#833)
Signed-off-by: sjthales <sebastien.jacq@thalesgroup.com>
2022-03-25 16:01:17 +01:00
Luca Colagrande
8d893fb647
🐛 wb_dcache: Fix unaligned SC return data bug (#838)
When a store-conditional fails due to a missing reservation,
by specification it must return a non-zero value.
Previously a value of 64'b1 was returned by the axi_adapter.
However, when an atop's address is non-64bit-aligned, the return data
has to be realigned. This realignment causes the lower half-word
being lost, and the return datum taking a value of '0.

This commit fixes the bug by returning {64{1'b1}} from the axi_adapter.
2022-03-15 07:33:23 +01:00
Luca Colagrande
75250868eb
wb_dcache: Forward atomic transactions to AXI (#777)
* wb_dcache: Forward "atomic transactions" to AXI

* Correct bugs

* Forward LR/SC atomics

* Fix CI

* miss_handler: Route AMO port through arbiter

* axi_adapter: Correct LOAD AMOs handling

Accept read data only after (or together) handshake on B channel

* Restore old ID

* Correct atop encodings

* Correct AMOs AXI ID

* Correct wb_dcache testbench

Previously not comparing AMOs at all! Due to amo_exp_resp being 'x

* Realign and sign extend 32b request rdata

* Use axi_pkg definitions for ATOPs encoding

* Remove whitespace

* wb_dcache: Style corrections

Co-authored-by: Florian Zaruba <florianzaruba@gmail.com>

Co-authored-by: Florian Zaruba <florianzaruba@gmail.com>
2022-03-09 16:33:37 +01:00
Moritz Schneider
34870aeea0
Fix reserved CSR write (#823)
* Fix illegal write to PMPCFG

Reported by Flavien Solt (@flaviens)

Signed-off-by: Moritz Schneider <moritz.schneider@inf.ethz.ch>

* Cleanup CSR code for PMP

Signed-off-by: Moritz Schneider <moritz.schneider@inf.ethz.ch>
2022-02-11 11:15:02 +01:00
Nils Wistoff
8dd06b5f9e ariane_pkg: Prevent overflow during range_check
Signed-off-by: Nils Wistoff <nwistoff@iis.ee.ethz.ch>
2022-02-11 10:50:36 +01:00
Florian Zaruba
944f915f96
csr: Fix wrong activation in vectored mode (#792)
Signed-off-by: Florian Zaruba <florian@openhwgroup.org>
2022-01-28 15:39:18 +01:00
Yannick Casamatta
bea9d5d1e6
Flist.cv64a6_imafdc_sv39_gate and update LIB_VERILOG path (#804) 2022-01-27 11:43:03 +01:00
Gianmarco Ottavi
5c0dc1971f
Fixed issue counter in order to leverage the full scoreboad length (#802)
Co-authored-by: Gianmarco Ottavi <gianmarco@openhwgroup.org>
2022-01-24 19:48:17 +01:00
Florian Zaruba
fc2967cc63
Fix erroneous division (fixes #421) (#796)
Signed-off-by: Florian Zaruba <florian@openhwgroup.org>
2022-01-22 08:48:57 +01:00
Gchauvon
966b6b3eb7
Update flists to match commit#791 (#795)
Signed-off-by: Guillaume Chauvon <guillaume.chauvon@thalesgroup.com>
2022-01-19 09:50:59 +01:00
Michael Rogenmoser
4bdfa69d20
axi and common_cells upgrade (#791)
* Change questa version reference format

* bump common_cells to v1.23

* Bump axi to v0.31.0, replace axi_node with axi_xbar

* Bump register_interface for axi compatibility

* add prot signals to axi_lite for compatibility
2022-01-15 11:08:14 +01:00
André Sintzoff
7b916d7ee3
decoder.sv: Remove unnecessary assignment (#788)
Signed-off-by: André Sintzoff <andre.sintzoff@thalesgroup.com>
2022-01-14 15:00:17 +01:00
Nils Wistoff
e748564dd8
wb: Check cacheable region length (#784)
Signed-off-by: Nils Wistoff <nwistoff@iis.ee.ethz.ch>
2022-01-08 08:29:30 +01:00
Gchauvon
360c34af69
cvxif: Flist modifications for core-v-verif and synthesis (#781)
Signed-off-by: Guillaume Chauvon <guillaume.chauvon@thalesgroup.com>
2021-12-29 14:58:54 +01:00
Gchauvon
e197b445fc
Add cv-x-interface (#780)
* Add top hierarchy modification and rs3 for general purpose register file
* CVA6 core modifications to enable CoreV-eXtension-Interface feature
* Addition of an example coprocessor to use with CoreV-eXtension-Interface functionnalities on CVA6
* CoreV-eXtension-Interface available for FPGA
* Add work directories to gitignore
* Flist: fix cvxif files
* CVXIF: Modification and bugfix for cvxif feature
* CVXIF: simplify destination register feature
* Make 3rd read port on regfile configurable
* example_copro: use fifo_v3 instead of stream_fifo
* Makefile: compilation copro using defines
* ariane_pkg,riscv_pkg: add parameter to en/disable cvxif
* cva6.sv, ariane.sv: add hierarchy between ariane and cva6
* Clean Up code and typo
* CVXIF: moved combinatorial part to cvxif_fu module in ex_stage
* instr_decoder: rename instr predecoder and package
* Clean Up code and typo
* cvxif modification to follow style guideline
* issue_read_operands.sv: fix always_ff block for cvxif functionnal uni
2021-12-22 12:31:56 +01:00
JeanRochCoulon
7046737969
Flist.cv64a6_imafdc_sv39_gate: Flist dedicated to gate simulation (#778)
Signed-off-by: Jean-Roch Coulon <jean-roch.coulon@thalesgroup.com>
2021-12-16 10:48:40 +01:00
JeanRochCoulon
b242c3f80b
pd: Add Synopsys DC synthesis target (#775)
* riscv_pkg.sv, cva6_imac_sv_config_pkg.sv: define FPU_EN as platform parameter

Signed-off-by: Jean-Roch Coulon <jean-roch.coulon@thalesgroup.com>

* scripts to make ASIC synthesis

Signed-off-by: Jean-Roch Coulon <jean-roch.coulon@thalesgroup.com>

* README.md: update synthesis and gate simulation descrption

Signed-off-by: Jean-Roch Coulon <jean-roch.coulon@thalesgroup.com>

* Update README.md

Co-authored-by: Florian Zaruba <zarubaf@iis.ee.ethz.ch>

* Update pd/synth/Makefile

Co-authored-by: Florian Zaruba <zarubaf@iis.ee.ethz.ch>

* Update pd/synth/cva6_read.tcl

Co-authored-by: Florian Zaruba <zarubaf@iis.ee.ethz.ch>

* Update pd/synth/cva6_read.tcl

Co-authored-by: Florian Zaruba <zarubaf@iis.ee.ethz.ch>

* Update pd/synth/cva6_synth.tcl

Co-authored-by: Florian Zaruba <zarubaf@iis.ee.ethz.ch>

* Update pd/synth/scripts/dc_setup.tcl

Co-authored-by: Florian Zaruba <zarubaf@iis.ee.ethz.ch>

* Update pd/synth/scripts/dc_setup_filenames.tcl

Co-authored-by: Florian Zaruba <zarubaf@iis.ee.ethz.ch>

* Update pd/synth/scripts/gateAnalysis.py

Co-authored-by: Florian Zaruba <zarubaf@iis.ee.ethz.ch>

* rename CVA6ConfigFpuen into CVA6ConfigFpuEn

Signed-off-by: Jean-Roch Coulon <jean-roch.coulon@thalesgroup.com>

* Revert "Update pd/synth/cva6_read.tcl"

This reverts commit 5e4433081d.

* cva6_read.tcl: read synthesis result

Signed-off-by: Jean-Roch Coulon <jean-roch.coulon@thalesgroup.com>

* define CACHE RAM INPUT_DELAY and OUTPUT_DELAY

Signed-off-by: Jean-Roch Coulon <jean-roch.coulon@thalesgroup.com>

* renale gateAnalysis.py

Signed-off-by: Jean-Roch Coulon <jean-roch.coulon@thalesgroup.com>

* fix input and output delays

Signed-off-by: Jean-Roch Coulon <jean-roch.coulon@thalesgroup.com>

* gate_analysis.py reformatted thanks to Black

Signed-off-by: Jean-Roch Coulon <jean-roch.coulon@thalesgroup.com>

* fix INPUT and OUTPUT DELAY setup

Signed-off-by: Jean-Roch Coulon <jean-roch.coulon@thalesgroup.com>

Co-authored-by: Florian Zaruba <zarubaf@iis.ee.ethz.ch>
2021-12-13 19:17:43 +01:00