Go to the documentation of this file.
34 #ifndef __MEM_TOKEN_PORT_HH__
35 #define __MEM_TOKEN_PORT_HH__
void recvTokens(int num_tokens)
Increment the number of available tokens by num_tokens.
A ResponsePort is a specialization of a port.
TokenManager * tokenManager
void acquireTokens(int num_tokens)
Decrement the number of available tokens by num_tokens.
const PortID InvalidPortID
bool haveTokens(int num_tokens)
Query is num_tokens tokens are available.
void bind(Port &peer) override
Bind this response port to a request port.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
bool trySatisfyFunctional(PacketPtr)
int getMaxTokenCount() const
Return the maximum possible tokens.
void recvTokens(int num_tokens)
Receive tokens returned by the response port.
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
TokenManager(int init_tokens)
void acquireTokens(int num_tokens)
Acquire tokens by decrementing the number of available tokens across the port.
bool sendTimingResp(PacketPtr pkt)
std::deque< PacketPtr > respQueue
TokenRequestPort(const std::string &name, SimObject *owner, PortID id=InvalidPortID)
Ports are used to interface objects to each other.
void unbind() override
Unbind this response port and associated request port.
const PortID id
A numeric identifier to distinguish ports in a vector, and set to InvalidPortID in case this port is ...
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
const std::string name() const
Return port name (for DPRINTF).
void bind(Port &peer) override
Bind this request port to response port.
void recvRespRetry() override
Called by the peer if sendTimingResp was called on this protocol (causing recvTimingResp to be called...
TokenRequestPort * tokenRequestPort
void unbind() override
Unbind port.
bool haveTokens(int num_tokens)
Query if there are at least num_tokens tokens available to acquire.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
TokenResponsePort(const std::string &name, ClockedObject *owner, PortID id=InvalidPortID)
void setTokenManager(TokenManager *_tokenManager)
Specify a token manger, which will handle tracking of tokens for a TokenRequestPort/ResponseRequestPo...
void sendTokens(int num_tokens)
Return num_tokens tokens back to the request port.
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17