mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-23 05:37:16 -04:00
🐛 Fixes in new LSU interface
This commit is contained in:
parent
81c18a9871
commit
848a06ef77
5 changed files with 17 additions and 10 deletions
|
@ -497,6 +497,7 @@ module ariane
|
|||
assign tracer_if.commit_instr = commit_instr_id_commit;
|
||||
assign tracer_if.commit_ack = commit_ack;
|
||||
// address translation
|
||||
// assign tracer_if.vaddress_valid = ex_stage_i.lsu_i.mmu_i.lsu_valid_o
|
||||
assign tracer_if.translation_valid = ex_stage_i.lsu_i.mmu_i.lsu_valid_o;
|
||||
assign tracer_if.vaddr = ex_stage_i.lsu_i.mmu_i.lsu_vaddr_i;
|
||||
assign tracer_if.paddr = ex_stage_i.lsu_i.mmu_i.lsu_paddr_o;
|
||||
|
|
|
@ -146,7 +146,7 @@ module load_unit (
|
|||
|
||||
// we make a new request as soon as the page offset does not match anymore
|
||||
if (!page_offset_matches_i) begin
|
||||
NS = IDLE;
|
||||
NS = WAIT_GNT;
|
||||
end
|
||||
end
|
||||
|
||||
|
|
16
src/lsu.sv
16
src/lsu.sv
|
@ -488,14 +488,6 @@ module lsu #(
|
|||
always_comb begin : input_select
|
||||
// if we are stalling use the values we saved
|
||||
if (lsu_ready_o) begin
|
||||
valid = valid_q;
|
||||
vaddr = vaddr_q;
|
||||
data = data_q;
|
||||
fu = fu_q;
|
||||
operator = operator_q;
|
||||
trans_id = trans_id_q;
|
||||
be = be_q;
|
||||
end else begin // otherwise bypass them
|
||||
valid = lsu_valid_i;
|
||||
vaddr = vaddr_i;
|
||||
data = operand_b_i;
|
||||
|
@ -503,6 +495,14 @@ module lsu #(
|
|||
operator = operator_i;
|
||||
trans_id = trans_id_i;
|
||||
be = be_i;
|
||||
end else begin // otherwise bypass them
|
||||
valid = valid_q;
|
||||
vaddr = vaddr_q;
|
||||
data = data_q;
|
||||
fu = fu_q;
|
||||
operator = operator_q;
|
||||
trans_id = trans_id_q;
|
||||
be = be_q;
|
||||
end
|
||||
end
|
||||
// 1st register stage
|
||||
|
|
|
@ -48,10 +48,12 @@ module mmu #(
|
|||
input logic [63:0] lsu_vaddr_i, // virtual address in
|
||||
input logic lsu_is_store_i, // the translation is requested by a store
|
||||
// if we need to walk the page table we can't grant in the same cycle
|
||||
// Cycle 0
|
||||
output logic lsu_dtlb_hit_o, // sent in the same cycle as the request if translation hits in the DTLB
|
||||
// Cycle 1
|
||||
output logic lsu_valid_o, // translation is valid
|
||||
output logic [63:0] lsu_paddr_o, // translated address
|
||||
output exception lsu_exception_o, // address translation threw an exception
|
||||
output logic lsu_dtlb_hit_o, // send in the same cycle as the request if translation hits in the DTLB
|
||||
// General control signals
|
||||
input priv_lvl_t priv_lvl_i,
|
||||
input priv_lvl_t ld_st_priv_lvl_i,
|
||||
|
|
|
@ -238,6 +238,10 @@ module store_unit (
|
|||
if ((vaddr_i[11:3] == st_buffer_paddr[11:3]) && st_buffer_valid) begin
|
||||
page_offset_matches_o = 1'b1;
|
||||
end
|
||||
|
||||
if ((vaddr_i[11:3] == paddr_i[11:3]) && (CS == VALID_STORE)) begin
|
||||
page_offset_matches_o = 1'b1;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue