[Bug Report] Out of bound array access #884
Labels
Component:RTL
For issues in the RTL (e.g. for files in the rtl directory)
Status:New
Newly created issue, nobody has looked at it yet.
Type:Bug
For bugs in the RTL, Documentation, Verification environment or Tool and Build system
Hi,
CVA6 RTL is returning unknown value ("xxxxxxxx") when reading the value of MHPMCOUNTER30. This is happening because the csr reg data (
csr_rdata) is being read fromperf_counter_darray in the perf_counters.sv module with an array index outside its range. The range ofperf_counter_dis [riscv::CSR_MIF_EMPTY : riscv::CSR_ML1_ICACHE_MISS] (line:46 from perf_counter.sv file), but in line: 282 of csv_regfile.sv we are using the array to access array index riscv::CSR_MHPM_COUNTER_30, which is greater than the range of [riscv::CSR_MIF_EMPTY : riscv::CSR_ML1_ICACHE_MISS].Please find attached the triggering input mem file, spike_trace_log, and cva6_trace_log. We can see from the line:83 of cva6 trace log that the read data is

xxxxxxxxoutofrange.zip
The text was updated successfully, but these errors were encountered: