diff options
author | Lisa Hsu <Lisa.Hsu@amd.com> | 2011-03-17 17:01:41 -0700 |
---|---|---|
committer | Lisa Hsu <Lisa.Hsu@amd.com> | 2011-03-17 17:01:41 -0700 |
commit | 556b5c5488e01652ac52ac76337da9533ec6a169 (patch) | |
tree | 820a9d4ef9fd55f36945e4c403fb218f8af783ee /src/mem/ruby | |
parent | 3a44307e941feb5ec2b2d68ae69c8d1bba3d8437 (diff) | |
download | gem5-556b5c5488e01652ac52ac76337da9533ec6a169.tar.xz |
Ruby: expose a simple mod function in slicc interface.
Diffstat (limited to 'src/mem/ruby')
-rw-r--r-- | src/mem/ruby/slicc_interface/RubySlicc_Util.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mem/ruby/slicc_interface/RubySlicc_Util.hh b/src/mem/ruby/slicc_interface/RubySlicc_Util.hh index 7fff1525b..81de8e468 100644 --- a/src/mem/ruby/slicc_interface/RubySlicc_Util.hh +++ b/src/mem/ruby/slicc_interface/RubySlicc_Util.hh @@ -182,4 +182,10 @@ addressOffset(Address addr) return addr.getOffset(); } +inline int +mod(int val, int mod) +{ + return val % mod; +} + #endif // __MEM_RUBY_SLICC_INTERFACE_RUBYSLICCUTIL_HH__ |