From aa8bca47f416a226cda146112f5a59398e698f8f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tiago=20M=C3=BCck?= Date: Wed, 27 May 2020 16:40:33 -0500 Subject: [PATCH] mem-ruby: int to Cycle converter MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/mem/ruby/protocol/RubySlicc_Util.sm | 1 + src/mem/ruby/slicc_interface/RubySlicc_Util.hh | 2 ++ 2 files changed, 3 insertions(+) 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) { -- 2.30.2