diff options
-rw-r--r-- | src/mem/protocol/RubySlicc_Util.sm | 1 | ||||
-rw-r--r-- | src/mem/ruby/slicc_interface/RubySlicc_Util.hh | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mem/protocol/RubySlicc_Util.sm b/src/mem/protocol/RubySlicc_Util.sm index 0d0e63d85..ad06c4e41 100644 --- a/src/mem/protocol/RubySlicc_Util.sm +++ b/src/mem/protocol/RubySlicc_Util.sm @@ -35,6 +35,7 @@ int random(int number); Cycles zero_time(); NodeID intToID(int nodenum); int IDToInt(NodeID id); +int addressToInt(Address addr); void procProfileCoherenceRequest(NodeID node, bool needCLB); void dirProfileCoherenceRequest(NodeID node, bool needCLB); int max_tokens(); 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) |