mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-19 11:54:46 -04:00
Merge branch 'openhwgroup:master' into master
This commit is contained in:
commit
596470cc74
3 changed files with 28 additions and 17 deletions
|
@ -29,11 +29,11 @@ module instr_tracer #(
|
|||
input logic rstn,
|
||||
input logic flush_unissued,
|
||||
input logic flush_all,
|
||||
input logic [31:0] instruction,
|
||||
input logic fetch_valid,
|
||||
input logic fetch_ack,
|
||||
input logic issue_ack, // issue acknowledged
|
||||
input scoreboard_entry_t issue_sbe, // issue scoreboard entry
|
||||
input logic [31:0] instruction [CVA6Cfg.NrIssuePorts-1:0],
|
||||
input logic [CVA6Cfg.NrIssuePorts-1:0] fetch_valid,
|
||||
input logic [CVA6Cfg.NrIssuePorts-1:0] fetch_ack,
|
||||
input logic [CVA6Cfg.NrIssuePorts-1:0] issue_ack, // issue acknowledged
|
||||
input scoreboard_entry_t [CVA6Cfg.NrIssuePorts-1:0] issue_sbe, // issue scoreboard entry
|
||||
input logic [CVA6Cfg.NrCommitPorts-1:0][4:0] waddr, // WB stage
|
||||
input logic [CVA6Cfg.NrCommitPorts-1:0][63:0] wdata,
|
||||
input logic [CVA6Cfg.NrCommitPorts-1:0] we_gpr,
|
||||
|
@ -106,20 +106,24 @@ module instr_tracer #(
|
|||
// Instruction Decode
|
||||
// -------------------
|
||||
// we are decoding an instruction
|
||||
if (fetch_valid && fetch_ack) begin
|
||||
decode_instruction = instruction;
|
||||
decode_queue.push_back(decode_instruction);
|
||||
for (int unsigned i = 0; i < CVA6Cfg.NrIssuePorts; ++i) begin
|
||||
if (fetch_valid[i] && fetch_ack[i]) begin
|
||||
decode_instruction = instruction[i];
|
||||
decode_queue.push_back(decode_instruction);
|
||||
end
|
||||
end
|
||||
// -------------------
|
||||
// Instruction Issue
|
||||
// -------------------
|
||||
// we got a new issue ack, so put the element from the decode queue to
|
||||
// the issue queue
|
||||
if (issue_ack && !flush_unissued) begin
|
||||
issue_instruction = decode_queue.pop_front();
|
||||
issue_queue.push_back(issue_instruction);
|
||||
// also save the scoreboard entry to a separate issue queue
|
||||
issue_sbe_queue.push_back(scoreboard_entry_t'(issue_sbe));
|
||||
for (int unsigned i = 0; i < CVA6Cfg.NrIssuePorts; ++i) begin
|
||||
if (issue_ack[i] && !flush_unissued) begin
|
||||
issue_instruction = decode_queue.pop_front();
|
||||
issue_queue.push_back(issue_instruction);
|
||||
// also save the scoreboard entry to a separate issue queue
|
||||
issue_sbe_queue.push_back(scoreboard_entry_t'(issue_sbe[i]));
|
||||
end
|
||||
end
|
||||
|
||||
// --------------------
|
||||
|
|
13
core/cva6.sv
13
core/cva6.sv
|
@ -1662,6 +1662,13 @@ module cva6
|
|||
`endif // PITON_ARIANE
|
||||
|
||||
`ifndef VERILATOR
|
||||
|
||||
logic [31:0] fetch_instructions[CVA6Cfg.NrIssuePorts-1:0];
|
||||
|
||||
for (genvar i = 0; i < CVA6Cfg.NrIssuePorts; ++i) begin
|
||||
assign fetch_instructions[i] = fetch_entry_if_id[i].instruction;
|
||||
end
|
||||
|
||||
instr_tracer #(
|
||||
.CVA6Cfg(CVA6Cfg),
|
||||
.bp_resolve_t(bp_resolve_t),
|
||||
|
@ -1675,9 +1682,9 @@ module cva6
|
|||
.rstn(rst_ni),
|
||||
.flush_unissued(flush_unissued_instr_ctrl_id),
|
||||
.flush_all(flush_ctrl_ex),
|
||||
.instruction(id_stage_i.fetch_entry_i[0].instruction),
|
||||
.fetch_valid(id_stage_i.fetch_entry_valid_i[0]),
|
||||
.fetch_ack(id_stage_i.fetch_entry_ready_o[0]),
|
||||
.instruction(fetch_instructions),
|
||||
.fetch_valid(id_stage_i.fetch_entry_valid_i),
|
||||
.fetch_ack(id_stage_i.fetch_entry_ready_o),
|
||||
.issue_ack(issue_stage_i.i_scoreboard.issue_ack_i),
|
||||
.issue_sbe(issue_stage_i.i_scoreboard.issue_instr_o),
|
||||
.waddr(waddr_commit_id),
|
||||
|
|
|
@ -223,7 +223,7 @@ module cva6_mmu
|
|||
.v_i (ld_st_v_i),
|
||||
.update_i (update_dtlb),
|
||||
.lu_access_i (dtlb_lu_access),
|
||||
.lu_asid_i (itlb_lu_asid),
|
||||
.lu_asid_i (dtlb_lu_asid),
|
||||
.lu_vmid_i (vmid_i),
|
||||
.lu_vaddr_i (lsu_vaddr_i),
|
||||
.lu_gpaddr_o (dtlb_gpaddr),
|
||||
|
|
Loading…
Add table
Reference in a new issue