From: Dmitry Selyutin Date: Wed, 10 May 2023 11:54:23 +0000 (-0700) Subject: cyclemodel/inorder: hide set inheritance X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=59a76fff0db83af1b28c5a92a5b02cb5ec0e682a;p=openpower-isa.git cyclemodel/inorder: hide set inheritance --- 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: