From: Tony Gutierrez Date: Fri, 13 Nov 2015 22:30:58 +0000 (-0500) Subject: slicc: fixes for the Address to Addr changeset (11025) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d10fac27bc940d2cdd65c40ca6e6db80371b2d3b;p=gem5.git slicc: fixes for the Address to Addr changeset (11025) misc changes now that Address has become Addr including int to address util function --- diff --git a/src/mem/protocol/RubySlicc_Util.sm b/src/mem/protocol/RubySlicc_Util.sm index a179e5bbc..848f8c2c9 100644 --- a/src/mem/protocol/RubySlicc_Util.sm +++ b/src/mem/protocol/RubySlicc_Util.sm @@ -36,6 +36,7 @@ Cycles zero_time(); NodeID intToID(int nodenum); int IDToInt(NodeID id); int addressToInt(Addr addr); +Addr intToAddress(int addr); void procProfileCoherenceRequest(NodeID node, bool needCLB); void dirProfileCoherenceRequest(NodeID node, bool needCLB); int max_tokens(); @@ -43,6 +44,9 @@ Addr setOffset(Addr addr, int offset); Addr makeLineAddress(Addr addr); int getOffset(Addr addr); int mod(int val, int mod); +Addr bitSelect(Addr addr, int small, int big); +Addr maskLowOrderBits(Addr addr, int number); +Addr makeNextStrideAddress(Addr addr, int stride); structure(BoolVec, external="yes") { } int countBoolVec(BoolVec bVec); diff --git a/src/mem/ruby/slicc_interface/RubySlicc_Util.hh b/src/mem/ruby/slicc_interface/RubySlicc_Util.hh index 4a48d3efe..55f229d20 100644 --- a/src/mem/ruby/slicc_interface/RubySlicc_Util.hh +++ b/src/mem/ruby/slicc_interface/RubySlicc_Util.hh @@ -65,6 +65,13 @@ addressToInt(Addr addr) return addr; } +inline Addr +intToAddress(int addr) +{ + assert(!(addr & 0xffffffff00000000)); + return addr; +} + inline int mod(int val, int mod) { diff --git a/src/mem/slicc/symbols/Transition.py b/src/mem/slicc/symbols/Transition.py index 856d3f4b0..8f88352c8 100644 --- a/src/mem/slicc/symbols/Transition.py +++ b/src/mem/slicc/symbols/Transition.py @@ -40,7 +40,7 @@ class Transition(Symbol): # check to make sure there is a getNextState function declared found = False for func in machine.functions: - if func.c_ident == 'getNextState_Address': + if func.c_ident == 'getNextState_Addr': found = True break if found == False: