From: Andrey Miroshnikov Date: Tue, 22 Aug 2023 09:10:24 +0000 (+0000) Subject: inorder.py: Reverse pipeline processing order. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c0d7d1e7a24e1ecf4b838aca8b03ab706794ad1;p=openpower-isa.git inorder.py: Reverse pipeline processing order. --- diff --git a/src/openpower/cyclemodel/inorder.py b/src/openpower/cyclemodel/inorder.py index da5cbbe0..701f98d3 100644 --- a/src/openpower/cyclemodel/inorder.py +++ b/src/openpower/cyclemodel/inorder.py @@ -293,13 +293,15 @@ class CPU: possible.add(r.pop()) return possible + # Inverting the stage order ensures that instructions already in the + # pipeline get processed first. def process_instructions(self, insn_trace): #print("Start of CPU cycle, clk=%d" % self.curr_clk) stall = self.stall - stall = self.fetch.process_instructions(stall, insn_trace) - stall = self.decode.process_instructions(stall) - stall = self.issue.process_instructions(stall) stall = self.exe.process_instructions(stall) + stall = self.issue.process_instructions(stall) + stall = self.decode.process_instructions(stall) + stall = self.fetch.process_instructions(stall, insn_trace) self.stall = stall self.print_cur_state() if not stall: