changeset bde347fc89ae in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=bde347fc89ae
description:
        slicc: support for multiple cache entry types in the same state machine

        To have multiple Entry types (e.g., a cache Entry type and
        a directory Entry type), just declare one of them as a secondary
        type by using the pair 'main="false"', e.g.:

          structure(DirEntry, desc="...", interface="AbstractCacheEntry",
                    main="false") {

        ...and the primary type would be declared:

          structure(Entry, desc="...", interface="AbstractCacheEntry") {

diffstat:

 src/mem/slicc/symbols/StateMachine.py |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (21 lines):

diff -r b36204de88c0 -r bde347fc89ae src/mem/slicc/symbols/StateMachine.py
--- a/src/mem/slicc/symbols/StateMachine.py     Mon Jul 20 09:15:18 2015 -0500
+++ b/src/mem/slicc/symbols/StateMachine.py     Mon Jul 20 09:15:18 2015 -0500
@@ -144,10 +144,13 @@
             self.TBEType = type
 
         elif "interface" in type and "AbstractCacheEntry" == type["interface"]:
-            if self.EntryType != None:
-                self.error("Multiple AbstractCacheEntry types in a " \
-                           "single machine.");
-            self.EntryType = type
+            if "main" in type and "false" == type["main"].lower():
+                pass # this isn't the EntryType
+            else:
+                if self.EntryType != None:
+                    self.error("Multiple AbstractCacheEntry types in a " \
+                               "single machine.");
+                self.EntryType = type
 
     # Needs to be called before accessing the table
     def buildTable(self):
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to