case_sorter = []
res = trans.resources
for key,val in res.iteritems():
- if key.type.ident != "DNUCAStopTable":
- val = '''
+ val = '''
if (!%s.areNSlotsAvailable(%s))
return TransitionResult_ResourceStall;
''' % (key.code, val)
for action in self.actions:
for var,value in action.resources.iteritems():
- if var.type.ident != "DNUCAStopTable":
- num = int(value)
- if var in self.resources:
- num += int(value)
- self.resources[var] = str(num)
- else:
- self.resources[var] = value
+ num = int(value)
+ if var in self.resources:
+ num += int(value)
+ self.resources[var] = str(num)
def __repr__(self):
return "[Transition: (%r, %r) -> %r, %r]" % \
self["networkmessage"] = "yes"
# FIXME - all of the following id comparisons are fragile hacks
- if self.ident in ("CacheMemory", "NewCacheMemory",
- "TLCCacheMemory", "DNUCACacheMemory",
- "DNUCABankCacheMemory", "L2BankCacheMemory",
- "CompressedCacheMemory", "PrefetchCacheMemory"):
+ if self.ident in ("CacheMemory"):
self["cache"] = "yes"
- if self.ident in ("TBETable", "DNUCATBETable", "DNUCAStopTable"):
+ if self.ident in ("TBETable"):
self["tbe"] = "yes"
- if self.ident == "NewTBETable":
- self["newtbe"] = "yes"
-
if self.ident == "TimerTable":
self["timer"] = "yes"
if self.ident == "Prefetcher":
self["prefetcher"] = "yes"
- if self.ident == "DNUCA_Movement":
- self["mover"] = "yes"
-
self.isMachineType = (ident == "MachineType")
self.isStateDecl = ("state_decl" in self)