From: Tiago Mück Date: Wed, 27 May 2020 21:40:33 +0000 (-0500) Subject: mem-ruby: int to Cycle converter X-Git-Tag: develop-gem5-snapshot~646 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aa8bca47f416a226cda146112f5a59398e698f8f;p=gem5.git mem-ruby: int to Cycle converter Change-Id: I493b16a0bdd01a4cef4891e273a376ebe9509fe8 Signed-off-by: Tiago Mück Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31266 Reviewed-by: Jason Lowe-Power Reviewed-by: Matthew Poremba Maintainer: Jason Lowe-Power Tested-by: kokoro --- diff --git a/src/mem/ruby/protocol/RubySlicc_Util.sm b/src/mem/ruby/protocol/RubySlicc_Util.sm index f509d09ad..b8b005ab2 100644 --- a/src/mem/ruby/protocol/RubySlicc_Util.sm +++ b/src/mem/ruby/protocol/RubySlicc_Util.sm @@ -32,6 +32,7 @@ void error(std::string msg); void assert(bool condition); Cycles zero_time(); +Cycles intToCycles(int c); NodeID intToID(int nodenum); int IDToInt(NodeID id); int addressToInt(Addr addr); diff --git a/src/mem/ruby/slicc_interface/RubySlicc_Util.hh b/src/mem/ruby/slicc_interface/RubySlicc_Util.hh index a5a18ff6d..b51b30c63 100644 --- a/src/mem/ruby/slicc_interface/RubySlicc_Util.hh +++ b/src/mem/ruby/slicc_interface/RubySlicc_Util.hh @@ -59,6 +59,8 @@ inline Cycles zero_time() { return Cycles(0); } +inline Cycles intToCycles(int c) { return Cycles(c); } + inline NodeID intToID(int nodenum) {