mem-ruby: Expose MessageBuffer methods
authorTiago Mück <tiago.muck@arm.com>
Thu, 28 May 2020 17:31:03 +0000 (12:31 -0500)
committerTiago Mück <tiago.muck@arm.com>
Tue, 13 Oct 2020 15:25:34 +0000 (15:25 +0000)
SLICC interface for checking the capacity of MessageBuffers

Change-Id: I28e2d22a405d33fcbe6a183dffc31bd936fa26c4
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31271
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/ruby/protocol/RubySlicc_Types.sm

index a7b9d345b98edda34e27a58e463ab2594729aba9..af7c0170b5736e7f3b1e8bb4598ac341a72911c2 100644 (file)
 // 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") {