mem-ruby: support for template types in structs
authorTiago Mück <tiago.muck@arm.com>
Wed, 29 Apr 2020 23:04:21 +0000 (18:04 -0500)
committerTiago Mück <tiago.muck@arm.com>
Mon, 12 Oct 2020 14:09:55 +0000 (14:09 +0000)
commitafdbe98b177eacba5a13d6cc701de241747d1014
treedb7c7a294cd87f24f0da566759d4c4c815ad7177
parent5a9fe54d581ef1a617c433f7bf06989efaa385f1
mem-ruby: support for template types in structs

Templated types can now be used within structures defined in SLICC.
Usage is similar to the TBETable: the templated type must have all
possible methods in it's SLICC definition. Eg.:

structure(Map, desc="Template map definition") {
    MachineID lookup(Addr);
    MachineID lookup(int);
}

structure(SomeType, desc="Some other struct definition") {
    MachineID addrMap, template="<Addr,MachineID>";
    MachineID intMap, template="<int,MachineID>";
}

Change-Id: I02a621cea5e4a89302762334651c6534c6574e9d
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31264
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Reviewed-by: Bradford Beckmann <bradford.beckmann@gmail.com>
Maintainer: Bradford Beckmann <bradford.beckmann@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/slicc/symbols/Type.py