mirror of
https://github.com/openhwgroup/cva5.git
synced 2025-04-20 12:07:53 -04:00
writeback tweak
This commit is contained in:
parent
c0727257f4
commit
f75f981f36
3 changed files with 11 additions and 8 deletions
|
@ -94,15 +94,13 @@ module register_file(
|
|||
in_use_by[rf_decode.future_rd_addr] <= new_id_store;
|
||||
end
|
||||
|
||||
|
||||
|
||||
assign rs1_usage = in_use_by[rf_decode.rs1_addr];
|
||||
assign rs2_usage = in_use_by[rf_decode.rs2_addr];
|
||||
assign wb_usage = in_use_by[rf_wb.rd_addr];
|
||||
|
||||
assign in_use_match = (wb_usage.id == rf_wb.id);
|
||||
|
||||
assign rf_wb.rs1_id = rs1_usage.id;
|
||||
assign rf_wb.rs1_id = rs1_usage.id;
|
||||
assign rf_wb.rs2_id = rs2_usage.id;
|
||||
assign rf_wb.rs1_unit_id = rs1_usage.unit_id;
|
||||
assign rf_wb.rs2_unit_id = rs2_usage.unit_id;
|
||||
|
|
|
@ -162,11 +162,11 @@ package taiga_config;
|
|||
////////////////////////////////////////////////////
|
||||
//FIFO/Buffer Depths
|
||||
//All parameters restricted to powers of two
|
||||
parameter MAX_INFLIGHT_COUNT = 8;
|
||||
parameter MAX_INFLIGHT_COUNT = 4;
|
||||
parameter FETCH_BUFFER_DEPTH = 4;
|
||||
|
||||
parameter LS_INPUT_BUFFER_DEPTH = 8;
|
||||
parameter DIV_INPUT_BUFFER_DEPTH = 8;
|
||||
parameter LS_INPUT_BUFFER_DEPTH = 4;
|
||||
parameter DIV_INPUT_BUFFER_DEPTH = 4;
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
//Trace Options
|
||||
|
|
|
@ -107,14 +107,19 @@ module write_back(
|
|||
|
||||
//One-hot ID retired last cycle
|
||||
logic [MAX_INFLIGHT_COUNT-1:0] id_retired_last_cycle;
|
||||
logic [MAX_INFLIGHT_COUNT-1:0] id_retired_last_cycle_r;
|
||||
always_comb begin
|
||||
id_retired_last_cycle = 0;
|
||||
id_retired_last_cycle[retired_id_r] = retired_r;
|
||||
id_retired_last_cycle[retired_id] = retired;
|
||||
end
|
||||
|
||||
always_ff @ (posedge clk) begin
|
||||
id_retired_last_cycle_r <= id_retired_last_cycle;
|
||||
end
|
||||
|
||||
//Or together all unit done signals for the same ID.
|
||||
always_comb begin
|
||||
id_done = (id_done_r & ~id_retired_last_cycle); //Still pending instructions
|
||||
id_done = (id_done_r & ~id_retired_last_cycle_r); //Still pending instructions
|
||||
for (int i=0; i < MAX_INFLIGHT_COUNT; i++) begin
|
||||
for (int j=0; j< NUM_WB_UNITS; j++) begin
|
||||
id_done[i] |= unit_done_next_cycle[j] && (unit_instruction_id[j] == i[$clog2(MAX_INFLIGHT_COUNT)-1:0]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue