Skip to content

Commit

Permalink
Merge branch 'master' into dev/msip-msie
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanRochCoulon authored Jan 16, 2025
2 parents 618fc61 + 5518a41 commit 1251870
Show file tree
Hide file tree
Showing 16 changed files with 79 additions and 40 deletions.
1 change: 1 addition & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ smoke-gen:
SPIKE_TANDEM: 1
script:
- bash verif/regress/smoke-gen_tests.sh
- cp verif/sim/seedlist.yaml artifacts/logs/
- !reference [.simu_after_script]

smoke-bench:
Expand Down
4 changes: 2 additions & 2 deletions core/cva6_mmu/cva6_mmu.sv
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ module cva6_mmu

// PMP

input riscv::pmpcfg_t [CVA6Cfg.NrPMPEntries-1:0] pmpcfg_i,
input logic [CVA6Cfg.NrPMPEntries-1:0][CVA6Cfg.PLEN-3:0] pmpaddr_i
input riscv::pmpcfg_t [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0] pmpcfg_i,
input logic [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0][CVA6Cfg.PLEN-3:0] pmpaddr_i
);

// memory management, pte for cva6
Expand Down
4 changes: 2 additions & 2 deletions core/cva6_mmu/cva6_ptw.sv
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ module cva6_ptw
output logic shared_tlb_miss_o,

// PMP
input riscv::pmpcfg_t [CVA6Cfg.NrPMPEntries-1:0] pmpcfg_i,
input logic [CVA6Cfg.NrPMPEntries-1:0][CVA6Cfg.PLEN-3:0] pmpaddr_i,
input riscv::pmpcfg_t [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0] pmpcfg_i,
input logic [(CVA6Cfg.NrPMPEntries > 0 ? CVA6Cfg.NrPMPEntries-1 : 0):0][CVA6Cfg.PLEN-3:0] pmpaddr_i,
output logic [CVA6Cfg.PLEN-1:0] bad_paddr_o,
output logic [CVA6Cfg.GPLEN-1:0] bad_gpaddr_o
);
Expand Down
64 changes: 32 additions & 32 deletions core/id_stage.sv
Original file line number Diff line number Diff line change
Expand Up @@ -161,45 +161,45 @@ module id_stage #(
.x_compressed_req_t(x_compressed_req_t),
.x_compressed_resp_t(x_compressed_resp_t)
) i_cvxif_compressed_if_driver_i (
.clk_i (clk_i),
.rst_ni (rst_ni),
.hart_id_i (hart_id_i),
.is_compressed_i (is_compressed_cvxif),
.is_illegal_i (is_illegal_cvxif),
.instruction_i (instruction_cvxif),
.instruction_valid_i (fetch_entry_valid_i),
.is_compressed_o (is_compressed_cmp),
.is_illegal_o (is_illegal_cmp),
.instruction_o (instruction),
.stall_i (stall_macro_deco),
.stall_o (stall_instr_fetch),
.compressed_ready_i(compressed_ready_i),
.compressed_resp_i (compressed_resp_i),
.compressed_valid_o(compressed_valid_o),
.compressed_req_o (compressed_req_o)
.clk_i (clk_i),
.rst_ni (rst_ni),
.hart_id_i (hart_id_i),
.is_compressed_i (is_compressed_cvxif),
.is_illegal_i (is_illegal_cvxif),
.instruction_i (instruction_cvxif),
.instruction_valid_i(fetch_entry_valid_i),
.is_compressed_o (is_compressed_cmp),
.is_illegal_o (is_illegal_cmp),
.instruction_o (instruction),
.stall_i (stall_macro_deco),
.stall_o (stall_instr_fetch),
.compressed_ready_i (compressed_ready_i),
.compressed_resp_i (compressed_resp_i),
.compressed_valid_o (compressed_valid_o),
.compressed_req_o (compressed_req_o)
);
end else begin
cvxif_compressed_if_driver #(
.CVA6Cfg(CVA6Cfg),
.x_compressed_req_t(x_compressed_req_t),
.x_compressed_resp_t(x_compressed_resp_t)
) i_cvxif_compressed_if_driver_i (
.clk_i (clk_i),
.rst_ni (rst_ni),
.hart_id_i (hart_id_i),
.is_compressed_i (is_compressed),
.is_illegal_i (is_illegal),
.instruction_valid_i (fetch_entry_valid_i),
.instruction_i (compressed_instr),
.is_compressed_o (is_compressed_cmp),
.is_illegal_o (is_illegal_cmp),
.instruction_o (instruction),
.stall_i (1'b0),
.stall_o (stall_instr_fetch),
.compressed_ready_i(compressed_ready_i),
.compressed_resp_i (compressed_resp_i),
.compressed_valid_o(compressed_valid_o),
.compressed_req_o (compressed_req_o)
.clk_i (clk_i),
.rst_ni (rst_ni),
.hart_id_i (hart_id_i),
.is_compressed_i (is_compressed),
.is_illegal_i (is_illegal),
.instruction_valid_i(fetch_entry_valid_i),
.instruction_i (compressed_instr),
.is_compressed_o (is_compressed_cmp),
.is_illegal_o (is_illegal_cmp),
.instruction_o (instruction),
.stall_i (1'b0),
.stall_o (stall_instr_fetch),
.compressed_ready_i (compressed_ready_i),
.compressed_resp_i (compressed_resp_i),
.compressed_valid_o (compressed_valid_o),
.compressed_req_o (compressed_req_o)
);
assign is_last_macro_instr_o = '0;
assign is_double_rd_macro_instr_o = '0;
Expand Down
5 changes: 5 additions & 0 deletions core/include/cv32a6_embedded_config_pkg_deprecated.sv
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ package cva6_config_pkg;
localparam CVA6ConfigDcacheSetAssoc = 8;
localparam CVA6ConfigDcacheLineWidth = 128;

localparam CVA6ConfigDcacheFlushOnFence = 1'b0;
localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0;

localparam CVA6ConfigDcacheIdWidth = 1;
localparam CVA6ConfigMemTidWidth = 2;

Expand Down Expand Up @@ -140,6 +143,8 @@ package cva6_config_pkg;
DcacheByteSize: unsigned'(CVA6ConfigDcacheByteSize),
DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc),
DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth),
DcacheFlushOnFence: bit'(CVA6ConfigDcacheFlushOnFence),
DcacheInvalidateOnFlush: bit'(CVA6ConfigDcacheInvalidateOnFlush),
DataUserEn: unsigned'(CVA6ConfigDataUserEn),
WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth),
FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth),
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv32a6_ima_sv32_fpga_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ package cva6_config_pkg;
DcacheByteSize: unsigned'(CVA6ConfigDcacheByteSize),
DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc),
DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth),
DcacheFlushOnFence: bit'(0),
DcacheInvalidateOnFlush: bit'(0),
DataUserEn: unsigned'(CVA6ConfigDataUserEn),
WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth),
FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth),
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv32a6_imac_sv0_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ package cva6_config_pkg;
DcacheByteSize: unsigned'(CVA6ConfigDcacheByteSize),
DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc),
DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth),
DcacheFlushOnFence: bit'(0),
DcacheInvalidateOnFlush: bit'(0),
DataUserEn: unsigned'(CVA6ConfigDataUserEn),
WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth),
FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth),
Expand Down
4 changes: 3 additions & 1 deletion core/include/cv32a6_imafc_sv32_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,12 @@ package cva6_config_pkg;
IcacheByteSize: unsigned'(CVA6ConfigIcacheByteSize),
IcacheSetAssoc: unsigned'(CVA6ConfigIcacheSetAssoc),
IcacheLineWidth: unsigned'(CVA6ConfigIcacheLineWidth),
DCacheType: CVA6ConfigDcacheType,
DcacheByteSize: unsigned'(CVA6ConfigDcacheByteSize),
DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc),
DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth),
DCacheType: CVA6ConfigDcacheType,
DcacheFlushOnFence: bit'(0),
DcacheInvalidateOnFlush: bit'(0),
DataUserEn: unsigned'(CVA6ConfigDataUserEn),
WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth),
FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth),
Expand Down
5 changes: 5 additions & 0 deletions core/include/cv64a6_imadfcv_sv39_polara_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ package cva6_config_pkg;
localparam CVA6ConfigDcacheSetAssoc = 8;
localparam CVA6ConfigDcacheLineWidth = 128;

localparam CVA6ConfigDcacheFlushOnFence = 1'b0;
localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0;

localparam CVA6ConfigDcacheIdWidth = 1;
localparam CVA6ConfigMemTidWidth = 2;

Expand Down Expand Up @@ -141,6 +144,8 @@ package cva6_config_pkg;
DcacheByteSize: unsigned'(CVA6ConfigDcacheByteSize),
DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc),
DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth),
DcacheFlushOnFence: bit'(CVA6ConfigDcacheFlushOnFence),
DcacheInvalidateOnFlush: bit'(CVA6ConfigDcacheInvalidateOnFlush),
DataUserEn: unsigned'(CVA6ConfigDataUserEn),
WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth),
FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth),
Expand Down
5 changes: 5 additions & 0 deletions core/include/cv64a6_imafdc_sv39_openpiton_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ package cva6_config_pkg;
localparam CVA6ConfigDcacheSetAssoc = 8;
localparam CVA6ConfigDcacheLineWidth = 128;

localparam CVA6ConfigDcacheFlushOnFence = 1'b0;
localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0;

localparam CVA6ConfigDcacheIdWidth = 1;
localparam CVA6ConfigMemTidWidth = 2;

Expand Down Expand Up @@ -141,6 +144,8 @@ package cva6_config_pkg;
DcacheByteSize: unsigned'(CVA6ConfigDcacheByteSize),
DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc),
DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth),
DcacheFlushOnFence: unsigned'(CVA6ConfigDcacheFlushOnFence),
DcacheInvalidateOnFlush: unsigned'(CVA6ConfigDcacheInvalidateOnFlush),
DataUserEn: unsigned'(CVA6ConfigDataUserEn),
WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth),
FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth),
Expand Down
5 changes: 5 additions & 0 deletions core/include/cv64a6_imafdch_sv39_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ package cva6_config_pkg;
localparam CVA6ConfigDcacheSetAssoc = 8;
localparam CVA6ConfigDcacheLineWidth = 128;

localparam CVA6ConfigDcacheFlushOnFence = 1'b0;
localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0;

localparam CVA6ConfigDcacheIdWidth = 1;
localparam CVA6ConfigMemTidWidth = 2;

Expand Down Expand Up @@ -141,6 +144,8 @@ package cva6_config_pkg;
DcacheByteSize: unsigned'(CVA6ConfigDcacheByteSize),
DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc),
DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth),
DcacheFlushOnFence: unsigned'(CVA6ConfigDcacheFlushOnFence),
DcacheInvalidateOnFlush: unsigned'(CVA6ConfigDcacheInvalidateOnFlush),
DataUserEn: unsigned'(CVA6ConfigDataUserEn),
WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth),
FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth),
Expand Down
5 changes: 5 additions & 0 deletions core/include/cv64a6_imafdch_sv39_wb_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ package cva6_config_pkg;
localparam CVA6ConfigDcacheSetAssoc = 8;
localparam CVA6ConfigDcacheLineWidth = 128;

localparam CVA6ConfigDcacheFlushOnFence = 1'b1;
localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0;

localparam CVA6ConfigDcacheIdWidth = 1;
localparam CVA6ConfigMemTidWidth = 2;

Expand Down Expand Up @@ -141,6 +144,8 @@ package cva6_config_pkg;
DcacheByteSize: unsigned'(CVA6ConfigDcacheByteSize),
DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc),
DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth),
DcacheFlushOnFence: unsigned'(CVA6ConfigDcacheFlushOnFence),
DcacheInvalidateOnFlush: unsigned'(CVA6ConfigDcacheInvalidateOnFlush),
DataUserEn: unsigned'(CVA6ConfigDataUserEn),
WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth),
FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth),
Expand Down
5 changes: 5 additions & 0 deletions core/include/cv64a6_imafdcv_sv39_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ package cva6_config_pkg;
localparam CVA6ConfigDcacheSetAssoc = 4;
localparam CVA6ConfigDcacheLineWidth = 128;

localparam CVA6ConfigDcacheFlushOnFence = 1'b0;
localparam CVA6ConfigDcacheInvalidateOnFlush = 1'b0;

localparam CVA6ConfigDcacheIdWidth = 1;
localparam CVA6ConfigMemTidWidth = 2;

Expand Down Expand Up @@ -140,6 +143,8 @@ package cva6_config_pkg;
DcacheByteSize: unsigned'(CVA6ConfigDcacheByteSize),
DcacheSetAssoc: unsigned'(CVA6ConfigDcacheSetAssoc),
DcacheLineWidth: unsigned'(CVA6ConfigDcacheLineWidth),
DcacheFlushOnFence: unsigned'(CVA6ConfigDcacheFlushOnFence),
DcacheInvalidateOnFlush: unsigned'(CVA6ConfigDcacheInvalidateOnFlush),
DataUserEn: unsigned'(CVA6ConfigDataUserEn),
WtDcacheWbufDepth: int'(CVA6ConfigWtDcacheWbufDepth),
FetchUserWidth: unsigned'(CVA6ConfigFetchUserWidth),
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv64a6_mmu_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ package cva6_config_pkg;
DcacheByteSize: unsigned'(32768),
DcacheSetAssoc: unsigned'(8),
DcacheLineWidth: unsigned'(128),
DcacheFlushOnFence: bit'(0),
DcacheInvalidateOnFlush: bit'(0),
DataUserEn: unsigned'(0),
WtDcacheWbufDepth: int'(2),
FetchUserWidth: unsigned'(64),
Expand Down
4 changes: 2 additions & 2 deletions core/pmp/src/pmp_entry.sv
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ module pmp_entry #(
assert (size >= 2);
if (conf_addr_mode_i == riscv::NAPOT) begin
assert (size > 2);
if (size < CVA6Cfg.PLEN-2) assert (conf_addr_i[size-3] == 0);
for (int i = 0; i < CVA6Cfg.PLEN-2; i++) begin
if (size < CVA6Cfg.PLEN - 2) assert (conf_addr_i[size-3] == 0);
for (int i = 0; i < CVA6Cfg.PLEN - 2; i++) begin
if (size > 3 && i <= size - 4) begin
assert (conf_addr_i[i] == 1); // check that all the rest are ones
end
Expand Down
2 changes: 1 addition & 1 deletion verif/core-v-verif
Submodule core-v-verif updated 1 files
+32 −0 MergeTest.md

0 comments on commit 1251870

Please sign in to comment.