From: Tiago Mück Date: Thu, 28 May 2020 17:31:03 +0000 (-0500) Subject: mem-ruby: Expose MessageBuffer methods X-Git-Tag: develop-gem5-snapshot~632 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=544bf8bde79bd4785c63faec1c5f10a73d501ac7;p=gem5.git mem-ruby: Expose MessageBuffer methods SLICC interface for checking the capacity of MessageBuffers Change-Id: I28e2d22a405d33fcbe6a183dffc31bd936fa26c4 Signed-off-by: Tiago Mück Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31271 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- diff --git a/src/mem/ruby/protocol/RubySlicc_Types.sm b/src/mem/ruby/protocol/RubySlicc_Types.sm index a7b9d345b..af7c0170b 100644 --- a/src/mem/ruby/protocol/RubySlicc_Types.sm +++ b/src/mem/ruby/protocol/RubySlicc_Types.sm @@ -48,7 +48,15 @@ // undefined declaration error. // -external_type(MessageBuffer, buffer="yes", inport="yes", outport="yes"); +structure(MessageBuffer, buffer="yes", inport="yes", outport="yes", + external = "yes", primitive="yes") { + // NOTE: it's recommended to use SLICC's built in resource stall management. + // These functions are mostly for including resource utilization info + // in debug traces dumped by the protocol. + bool areNSlotsAvailable(int n, Tick curTime); + int getSize(Tick curTime); +} + external_type(Scalar, primitive="yes"); structure(OutPort, external = "yes", primitive="yes") {