diff --git a/src/mem/ruby/protocol/RubySlicc_Exports.sm b/src/mem/ruby/protocol/RubySlicc_Exports.sm index 0eb10a7aa0..c2f2c9df48 100644 --- a/src/mem/ruby/protocol/RubySlicc_Exports.sm +++ b/src/mem/ruby/protocol/RubySlicc_Exports.sm @@ -50,6 +50,7 @@ external_type(Packet, primitive="yes"); external_type(Addr, primitive="yes"); external_type(Cycles, primitive="yes", default="Cycles(0)"); external_type(Tick, primitive="yes", default="0"); +external_type(RequestPtr, primitive="yes", default="nullptr"); structure(WriteMask, external="yes", desc="...") { void clear(); diff --git a/src/mem/ruby/protocol/RubySlicc_Types.sm b/src/mem/ruby/protocol/RubySlicc_Types.sm index 339e99acae..c3a2f2d939 100644 --- a/src/mem/ruby/protocol/RubySlicc_Types.sm +++ b/src/mem/ruby/protocol/RubySlicc_Types.sm @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 ARM Limited + * Copyright (c) 2020-2021 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -170,6 +170,8 @@ structure(RubyRequest, desc="...", interface="Message", external="yes") { PacketPtr pkt, desc="Packet associated with this request"; bool htmFromTransaction, desc="Memory request originates within a HTM transaction"; int htmTransactionUid, desc="Used to identify the unique HTM transaction that produced this request"; + + RequestPtr getRequestPtr(); } structure(AbstractCacheEntry, primitive="yes", external = "yes") { diff --git a/src/mem/ruby/slicc_interface/RubyRequest.hh b/src/mem/ruby/slicc_interface/RubyRequest.hh index 55b645e936..3a2f486528 100644 --- a/src/mem/ruby/slicc_interface/RubyRequest.hh +++ b/src/mem/ruby/slicc_interface/RubyRequest.hh @@ -154,6 +154,7 @@ class RubyRequest : public Message const RubyAccessMode& getAccessMode() const { return m_AccessMode; } const int& getSize() const { return m_Size; } const PrefetchBit& getPrefetch() const { return m_Prefetch; } + RequestPtr getRequestPtr() const { return m_pkt->req; } void print(std::ostream& out) const; bool functionalRead(Packet *pkt);