From 18cdbd944a03f8ce49d6a3473f4888fb5936fadb Mon Sep 17 00:00:00 2001 From: Arusekk Date: Mon, 6 Nov 2023 07:21:13 +0100 Subject: [PATCH] Do not count ignored insns as retired --- coreblocks/stages/retirement.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/coreblocks/stages/retirement.py b/coreblocks/stages/retirement.py index a15415ce1..cab22814c 100644 --- a/coreblocks/stages/retirement.py +++ b/coreblocks/stages/retirement.py @@ -70,6 +70,7 @@ def elaborate(self, platform): rp_freed = Signal(self.gen_params.phys_regs_bits) with m.If(side_fx): m.d.comb += rp_freed.eq(rat_out.old_rp_dst) + self.instret_csr.increment(m) with m.Else(): m.d.comb += rp_freed.eq(rob_entry.rob_data.rp_dst) # free the phys_reg with computed value and restore old reg into FRAT as well @@ -82,6 +83,4 @@ def elaborate(self, platform): with m.If(rp_freed): # don't put rp0 to free list - reserved to no-return instructions self.free_rf_put(m, rp_freed) - self.instret_csr.increment(m) - return m