mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-04-24 05:47:16 -04:00
Cleanup + success message added to CacheSim
This commit is contained in:
parent
a819a24b83
commit
b6ecd15eff
1 changed files with 6 additions and 8 deletions
|
@ -200,8 +200,9 @@ if __name__ == "__main__":
|
|||
|
||||
args = parser.parse_args()
|
||||
cache = Cache(args.numlines, args.numways, args.addrlen, args.taglen)
|
||||
#numtests = -1
|
||||
extfile = os.path.expanduser(args.file)
|
||||
nofails = True
|
||||
|
||||
with open(extfile, "r") as f:
|
||||
for ln in f:
|
||||
ln = ln.strip()
|
||||
|
@ -212,7 +213,6 @@ if __name__ == "__main__":
|
|||
# trying TRAIN clears instead
|
||||
cache.invalidate() # a new test is starting, so 'empty' the cache
|
||||
cache.clear_pLRU()
|
||||
#numtests +=1
|
||||
if args.verbose:
|
||||
print("New Test")
|
||||
|
||||
|
@ -233,9 +233,7 @@ if __name__ == "__main__":
|
|||
tag, setnum, offset = cache.splitaddr(addr)
|
||||
print(hex(addr), hex(tag), hex(setnum), hex(offset), lninfo[2], result)
|
||||
if not result == lninfo[2]:
|
||||
print("Result mismatch at address", lninfo[0], ". Wally:", lninfo[2],", Sim:", result) #, "in test", numtests)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
print("Result mismatch at address", lninfo[0]+ ". Wally:", lninfo[2]+", Sim:", result)
|
||||
nofails = False
|
||||
if nofails:
|
||||
print("SUCCESS! There were no mismatches between Wally and the sim.")
|
Loading…
Add table
Add a link
Reference in a new issue