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.
This commit is contained in:
Brad Beckmann 2015-07-20 09:15:18 -05:00
parent d0f6aad3c6
commit 0c78abb302
2 changed files with 9 additions and 0 deletions

View file

@ -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();

View file

@ -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)