Final code cleanup.

This commit is contained in:
Rose Thompson 2024-11-12 17:52:16 -06:00
parent b8cafb5198
commit 5346680758

View File

@ -94,7 +94,7 @@ class Cache:
line.dirty = 0 line.dirty = 0
line.valid = 0 line.valid = 0
def cboclean(self, addr, invalidate): def cbo(self, addr, invalidate):
tag, setnum, _ = self.splitaddr(addr) tag, setnum, _ = self.splitaddr(addr)
for waynum in range(self.numways): for waynum in range(self.numways):
line = self.ways[waynum][setnum] line = self.ways[waynum][setnum]
@ -263,7 +263,7 @@ def main():
elif lninfo[1] == 'V' or lninfo[1] == 'L' or lninfo[1] == 'C': elif lninfo[1] == 'V' or lninfo[1] == 'L' or lninfo[1] == 'C':
addr = int(lninfo[0], 16) addr = int(lninfo[0], 16)
IsCBOClean = lninfo[1] != 'C' IsCBOClean = lninfo[1] != 'C'
cache.cboclean(addr, IsCBOClean) cache.cbo(addr, IsCBOClean)
if args.verbose: if args.verbose:
print(lninfo[1]); print(lninfo[1]);
else: else: