Go to the documentation of this file.
46 #ifndef __MEM_RUBY_NETWORK_MESSAGEBUFFER_HH__
47 #define __MEM_RUBY_NETWORK_MESSAGEBUFFER_HH__
54 #include <unordered_map>
58 #include "debug/RubyQueue.hh"
65 #include "params/MessageBuffer.hh"
88 std::greater<MsgPtr>());
98 DPRINTF(RubyQueue,
"Setting consumer: %s\n", *consumer);
100 fatal(
"Trying to connect %s to MessageBuffer %s. \
101 \n%s already connected. Check the cntrl_id's.\n",
146 void print(std::ostream& out)
const;
272 #endif //__MEM_RUBY_NETWORK_MESSAGEBUFFER_HH__
#define fatal(...)
This implements a cprintf based fatal() function.
std::unordered_map< Addr, std::vector< MsgPtr > > DeferredMsgMapType
A map from line addresses to corresponding vectors of messages that are deferred for enqueueing.
unsigned int m_msgs_this_cycle
Tick dequeue(Tick current_time, bool decrement_messages=true)
Updates the delay cycles of the message at the head of the queue, removes it from the queue and retur...
Stats::Average m_stall_time
uint32_t functionalAccess(Packet *pkt, bool is_read)
const PortID InvalidPortID
const Message * peek() const
Function for extracting the message at the head of the message queue.
void delayHead(Tick current_time, Tick delta)
unsigned int m_size_at_cycle_start
std::function< void()> m_dequeue_callback
std::map< Addr, std::list< MsgPtr > > StallMsgMapType
DeferredMsgMapType m_deferred_msg_map
uint64_t Tick
Tick count type.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
std::ostream & operator<<(std::ostream &out, const MessageBuffer &obj)
unsigned int getSize(Tick curTime)
void reanalyzeMessages(Addr addr, Tick current_time)
Tick m_time_last_time_pop
void setConsumer(Consumer *consumer)
void stallMessage(Addr addr, Tick current_time)
void enqueue(MsgPtr message, Tick curTime, Tick delta)
void regStats() override
Callback to set stat parameters.
Port & getPort(const std::string &, PortID idx=InvalidPortID) override
Get a port with a given name and index.
std::vector< MsgPtr > m_prio_heap
This is a simple scalar statistic, like a counter.
const MsgPtr & peekMsgPtr() const
const unsigned int m_max_size
The maximum capacity.
void deferEnqueueingMessage(Addr addr, MsgPtr message)
static RubyDummyPort & instance()
Tick m_time_last_time_enqueue
unsigned int m_stalled_at_cycle_start
bool isReady(Tick current_time) const
bool isDeferredMsgMapEmpty(Addr addr) const
Ports are used to interface objects to each other.
void setPriority(int rank)
bool functionalRead(Packet *pkt)
void reanalyzeAllMessages(Tick current_time)
bool hasStalledMsg(Addr addr) const
Stats::Scalar m_not_avail_count
unsigned int m_size_last_time_size_checked
Consumer * m_consumer
Consumer to signal a wakeup(), can be NULL.
void unregisterDequeueCallback()
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
unsigned int getStallMapSize()
MessageBuffer(const Params *p)
void setIncomingLink(int link_id)
int m_stall_map_size
Current size of the stall map.
MessageBufferParams Params
std::shared_ptr< Message > MsgPtr
bool areNSlotsAvailable(unsigned int n, Tick curTime)
void recycle(Tick current_time, Tick recycle_latency)
void registerDequeueCallback(std::function< void()> callback)
A stat that calculates the per tick average of a value.
void print(std::ostream &out) const
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void reanalyzeList(std::list< MsgPtr > &, Tick)
Stats::Formula m_occupancy
void enqueueDeferredMessages(Addr addr, Tick curTime, Tick delay)
const bool m_randomization
Stats::Average m_buf_msgs
Tick m_time_last_time_size_checked
Stats::Scalar m_stall_count
uint32_t functionalWrite(Packet *pkt)
StallMsgMapType m_stall_msg_map
A map from line addresses to lists of stalled messages for that line.
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17