🐛 Fixes in new LSU interface

This commit is contained in:
Florian Zaruba 2017-06-20 16:56:12 +02:00
parent 81c18a9871
commit 848a06ef77
5 changed files with 17 additions and 10 deletions

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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,

View file

@ -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