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:
parent
d0f6aad3c6
commit
0c78abb302
2 changed files with 9 additions and 0 deletions
|
@ -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();
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue