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