From 5e2f6be247018699d71d32887010830ba45b8349 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Tue, 27 Sep 2022 19:52:26 -0600 Subject: Switch from operand forwarding to next insn stalls (improves Fmax) --- rtl/core/regs/file.sv | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'rtl/core/regs/file.sv') diff --git a/rtl/core/regs/file.sv b/rtl/core/regs/file.sv index b2dd634..22f7ccf 100644 --- a/rtl/core/regs/file.sv +++ b/rtl/core/regs/file.sv @@ -13,19 +13,12 @@ module core_reg_file // Ver comentario en uarch.sv word file[30]; - word q, wr_value_hold; - logic overwrite_hold; - - assign rd_value = overwrite_hold ? wr_value_hold : q; always @(negedge clk) begin - if(wr_enable) begin + if(wr_enable) file[wr_index] <= wr_value; - wr_value_hold <= wr_value; - end - q <= file[rd_index]; - overwrite_hold <= wr_enable & (rd_index == wr_index); + rd_value <= file[rd_index]; end endmodule -- cgit v1.2.3