slicc: support for multiple cache entry types in the same state machine
Review Request #2794 - Created May 11, 2015 and submitted
| Information | |
|---|---|
| Tony Gutierrez | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10824:91803d728dc0
---------------------------
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") {
I will think more about this. This is not at all what I would want to do.
Can you give a more detailed description of the use case? In what scenario do you want separate entry types?
I think this seems reasonable. For instance, if you want to create a single state machine with both an L3 and a directory (e.g., the directory is the L3 cache tags), this would be useful. I could see many other use cases as well.
Assuming this gets through the review process, it would be good to add a note to the wiki about the changes in the SLICC syntax.
Any more comments on this patch? It sounds like the discussion as been resolved, but we only have one ship it.
I can be ok with this for now.
For future reference, I think I like what Nilay is suggesting in the email thread: There should be a way for a SLICC state machine to designate which entry type (descended from AbstractCacheEntry) is used in transition and action headers, but the designation should be done outside of the type declaration itself. This designation might require adding a keyword or adjusting the machine declaration header, which would require adjustments to existing protocols. However, I think this solution makes more sense than the way this patch handles it, because it would allow arbitrary inheritance of AbstractCacheEntry without any special flags in the type declaration.
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+7 -4) |
