-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,7 +166,7 @@ end else begin : gen_piton_offset | |
// main control logic | ||
/////////////////////////////////////////////////////// | ||
logic addr_ni; | ||
assign addr_ni = is_inside_nonidempotent_regions(ArianeCfg, areq_i.fetch_paddr); | ||
assign addr_ni = is_inside_nonidempotent_regions(ArianeCfg, {{64-$bits(areq_i.fetch_paddr){1'b0}},areq_i.fetch_paddr}); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
gullahmed1
Author
Collaborator
|
||
always_comb begin : p_fsm | ||
// default assignment | ||
state_d = state_q; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -271,7 +271,7 @@ module csr_regfile import ariane_pkg::*; #( | |
riscv::CSR_MARCHID: csr_rdata = ARIANE_MARCHID; | ||
riscv::CSR_MIMPID: csr_rdata = '0; // not implemented | ||
riscv::CSR_MHARTID: csr_rdata = hart_id_i; | ||
riscv::CSR_MCOUNTINHIBIT: csr_rdata = mcountinhibit_q; | ||
riscv::CSR_MCOUNTINHIBIT: csr_rdata = {{riscv::XLEN-$bits(mcountinhibit_q){1'b0}},mcountinhibit_q}; | ||
// Counters and Timers | ||
riscv::CSR_MCYCLE: csr_rdata = cycle_q[riscv::XLEN-1:0]; | ||
riscv::CSR_MCYCLEH: if (riscv::XLEN == 32) csr_rdata = cycle_q[63:32]; else read_access_exception = 1'b1; | ||
|
@@ -467,7 +467,7 @@ module csr_regfile import ariane_pkg::*; #( | |
riscv::CSR_PMPADDR14, | ||
riscv::CSR_PMPADDR15: begin | ||
// index is specified by the last byte in the address | ||
index = csr_addr.csr_decode.address[3:0]; | ||
index = {{28{1'b0}},csr_addr.csr_decode.address[3:0]}; | ||
This comment has been minimized.
Sorry, something went wrong.
fatimasaleem
Collaborator
|
||
// Important: we only support granularity 8 bytes (G=1) | ||
// -> last bit of pmpaddr must be set 0/1 based on the mode: | ||
// NA4, NAPOT: 1 | ||
|
@@ -692,7 +692,7 @@ module csr_regfile import ariane_pkg::*; #( | |
if (!CVA6Cfg.RVV) begin | ||
mstatus_d.vs = riscv::Off; | ||
end | ||
mstatus_d.wpri3 = 8'b0; | ||
mstatus_d.wpri3 = 9'b0; | ||
mstatus_d.wpri1 = 1'b0; | ||
mstatus_d.wpri2 = 1'b0; | ||
mstatus_d.wpri0 = 1'b0; | ||
|
@@ -884,7 +884,7 @@ module csr_regfile import ariane_pkg::*; #( | |
riscv::CSR_PMPADDR14, | ||
riscv::CSR_PMPADDR15: begin | ||
// index is specified by the last byte in the address | ||
automatic int index = csr_addr.csr_decode.address[3:0]; | ||
automatic int index = {{28{1'b0}},csr_addr.csr_decode.address[3:0]}; | ||
This comment has been minimized.
Sorry, something went wrong.
fatimasaleem
Collaborator
|
||
// check if the entry or the entry above is locked | ||
if (!pmpcfg_q[index].locked && !(pmpcfg_q[index+1].locked && pmpcfg_q[index].addr_mode == riscv::TOR)) begin | ||
pmpaddr_d[index] = csr_wdata[riscv::PLEN-3:0]; | ||
|
@@ -1219,7 +1219,7 @@ module csr_regfile import ariane_pkg::*; #( | |
// ---------------------- | ||
always_comb begin : exception_ctrl | ||
csr_exception_o = { | ||
'0, '0, 1'b0 | ||
{(2*riscv::XLEN-2){1'b0}}, '0, '0, 1'b0 | ||
This comment has been minimized.
Sorry, something went wrong.
fatimasaleem
Collaborator
|
||
}; | ||
// ---------------------------------- | ||
// Illegal Access (decode exception) | ||
|
@@ -1301,11 +1301,11 @@ module csr_regfile import ariane_pkg::*; #( | |
csr_rdata_o = csr_rdata; | ||
|
||
unique case (csr_addr.address) | ||
riscv::CSR_MIP: csr_rdata_o = csr_rdata | (irq_i[1] << riscv::IRQ_S_EXT); | ||
riscv::CSR_MIP: csr_rdata_o = csr_rdata | ({{riscv::XLEN-1{1'b0}},irq_i[1]} << riscv::IRQ_S_EXT); | ||
// in supervisor mode we also need to check whether we delegated this bit | ||
riscv::CSR_SIP: begin | ||
csr_rdata_o = csr_rdata | ||
| ((irq_i[1] & mideleg_q[riscv::IRQ_S_EXT]) << riscv::IRQ_S_EXT); | ||
| (({{riscv::XLEN-1{1'b0}},irq_i[1]} & {{riscv::XLEN-1{1'b0}},mideleg_q[riscv::IRQ_S_EXT]}) << riscv::IRQ_S_EXT); | ||
This comment has been minimized.
Sorry, something went wrong.
fatimasaleem
Collaborator
|
||
end | ||
default:; | ||
endcase | ||
|
@@ -1386,8 +1386,8 @@ module csr_regfile import ariane_pkg::*; #( | |
stval_q <= {riscv::XLEN{1'b0}}; | ||
satp_q <= {riscv::XLEN{1'b0}}; | ||
// timer and counters | ||
cycle_q <= {riscv::XLEN{1'b0}}; | ||
instret_q <= {riscv::XLEN{1'b0}}; | ||
cycle_q <= {{64-riscv::XLEN{1'b0}},{riscv::XLEN{1'b0}}}; | ||
This comment has been minimized.
Sorry, something went wrong. |
||
instret_q <= {{64-riscv::XLEN{1'b0}},{riscv::XLEN{1'b0}}}; | ||
// aux registers | ||
en_ld_st_translation_q <= 1'b0; | ||
// wait for interrupt | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -176,7 +176,7 @@ module load_unit import ariane_pkg::*; #( | |
logic not_commit_time; | ||
logic inflight_stores; | ||
logic stall_ni; | ||
assign paddr_ni = is_inside_nonidempotent_regions(ArianeCfg, {dtlb_ppn_i,12'd0}); | ||
assign paddr_ni = is_inside_nonidempotent_regions(ArianeCfg, {{52-$bits(dtlb_ppn_i){1'b0}},{dtlb_ppn_i,12'd0}}); | ||
This comment has been minimized.
Sorry, something went wrong.
fatimasaleem
Collaborator
|
||
assign not_commit_time = commit_tran_id_i != lsu_ctrl_i.trans_id; | ||
assign inflight_stores = (!dcache_wbuffer_not_ni_i || !store_buffer_empty_i); | ||
assign stall_ni = (inflight_stores || not_commit_time) && paddr_ni; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -390,7 +390,7 @@ module cva6_mmu_sv32 import ariane_pkg::*; #( | |
lsu_dtlb_ppn_o = {{riscv::PLEN-riscv::VLEN{1'b0}},lsu_vaddr_n[riscv::VLEN-1:12]}; | ||
end else begin | ||
lsu_paddr_o = lsu_vaddr_q[riscv::PLEN-1:0]; | ||
lsu_dtlb_ppn_o = lsu_vaddr_n[riscv::VLEN-1:12]; | ||
lsu_dtlb_ppn_o = {{$bits(lsu_dtlb_ppn_o)-$bits(lsu_vaddr_n[riscv::VLEN-1:12]){1'b0}},lsu_vaddr_n[riscv::VLEN-1:12]}; | ||
This comment has been minimized.
Sorry, something went wrong.
fatimasaleem
Collaborator
|
||
end | ||
lsu_valid_o = lsu_req_q; | ||
lsu_exception_o = misaligned_ex_q; | ||
|
Try to resolve this at function definition level. Not here