From 59a76fff0db83af1b28c5a92a5b02cb5ec0e682a Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Wed, 10 May 2023 04:54:23 -0700 Subject: [PATCH] cyclemodel/inorder: hide set inheritance --- src/openpower/cyclemodel/inorder.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/openpower/cyclemodel/inorder.py b/src/openpower/cyclemodel/inorder.py index a4682b35..99512458 100644 --- a/src/openpower/cyclemodel/inorder.py +++ b/src/openpower/cyclemodel/inorder.py @@ -16,20 +16,23 @@ """ -class RegisterWrite(set): +class RegisterWrite: """ RegisterWrite: contains the set of Read-after-Write Hazards. Anything in this set must be a STALL at Decode phase because the answer has still not popped out the end of a pipeline """ + def __init__(self): + self.storage = set() + def expect_write(self, regs): - return self.update(regs) + return self.storage.update(regs) def write_expected(self, regs): - return (len(self.intersection(regs)) != 0) + return (len(self.storage.intersection(regs)) != 0) def retire_write(self, regs): - return self.difference_update(regs) + return self.storage.difference_update(regs) class Execute: -- 2.30.2