ruby: slicc: remove unused ids DNUCA*
authorNilay Vaish <nilay@cs.wisc.edu>
Fri, 23 May 2014 11:07:02 +0000 (06:07 -0500)
committerNilay Vaish <nilay@cs.wisc.edu>
Fri, 23 May 2014 11:07:02 +0000 (06:07 -0500)
src/mem/slicc/symbols/StateMachine.py
src/mem/slicc/symbols/Transition.py
src/mem/slicc/symbols/Type.py

index d908f00c6b50542386f4246fc5008262a004a833..578d3ae0b27524eefa13223d8fd43c8a4931eac2 100644 (file)
@@ -1253,8 +1253,7 @@ ${ident}_Controller::doTransitionWorker(${ident}_Event event,
             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)
index 4a7a72a6c4db9326f2b92837fecd23b284193523..901d4a0e8714d86b03f3e7702fe37de7979b6cb1 100644 (file)
@@ -42,13 +42,10 @@ class Transition(Symbol):
 
         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]" % \
index 29b68f2c520416acf1ac0cb528dd45bd67eccca8..dc5448430e6a6ba0fdd806a5f3e92e4874bbdea5 100644 (file)
@@ -72,18 +72,12 @@ class Type(Symbol):
                 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"
 
@@ -96,9 +90,6 @@ class Type(Symbol):
         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)