diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2015-07-20 09:15:18 -0500 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2015-07-20 09:15:18 -0500 |
commit | 0c78abb3024bae5c0844eaaf503c1f360d86bc9d (patch) | |
tree | 35ddadce5706f72199257cf028770d240af1aad4 /src/mem/ruby/slicc_interface | |
parent | d0f6aad3c6709d2ef686dbf3f0c60ac6cbfb7b5a (diff) | |
download | gem5-0c78abb3024bae5c0844eaaf503c1f360d86bc9d.tar.xz |
ruby: re-added the addressToInt slicc interface function
This helper function is very useful converting address offsets to integers
that can be used for protocol specific destination mapping.
Diffstat (limited to 'src/mem/ruby/slicc_interface')
-rw-r--r-- | src/mem/ruby/slicc_interface/RubySlicc_Util.hh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mem/ruby/slicc_interface/RubySlicc_Util.hh b/src/mem/ruby/slicc_interface/RubySlicc_Util.hh index dd9a1f2a4..6318d8e33 100644 --- a/src/mem/ruby/slicc_interface/RubySlicc_Util.hh +++ b/src/mem/ruby/slicc_interface/RubySlicc_Util.hh @@ -56,6 +56,14 @@ IDToInt(NodeID id) return nodenum; } +inline int +addressToInt(Address addr) +{ + assert(!(addr.getAddress() & 0xffffffff00000000)); + + return (int)addr.getAddress(); +} + // Appends an offset to an address inline Address setOffset(Address addr, int offset) |