34 #ifndef __MEM_RUBY_BUFFERS_MESSAGEBUFFER_HH__
35 #define __MEM_RUBY_BUFFERS_MESSAGEBUFFER_HH__
45 #include "debug/RubyQueue.hh"
50 #include "params/MessageBuffer.hh"
71 std::greater<MsgPtr>());
73 enqueue(m, current_time, delta);
81 DPRINTF(RubyQueue,
"Setting consumer: %s\n", *consumer);
83 fatal(
"Trying to connect %s to MessageBuffer %s. \
84 \n%s already connected. Check the cntrl_id's.\n",
117 void print(std::ostream& out)
const;
215 #endif // __MEM_RUBY_BUFFERS_MESSAGEBUFFER_HH__
void print(std::ostream &out) const
Tick m_time_last_time_size_checked
std::shared_ptr< Message > MsgPtr
const bool m_randomization
MessageBuffer(const Params *p)
unsigned int getStallMapSize()
A stat that calculates the per tick average of a value.
StallMsgMapType m_stall_msg_map
A map from line addresses to lists of stalled messages for that line.
void recycle(Tick current_time, Tick recycle_latency)
void reanalyzeMessages(Addr addr, Tick current_time)
void stallMessage(Addr addr, Tick current_time)
Stats::Average m_stall_time
unsigned int m_size_last_time_size_checked
uint32_t functionalWrite(Packet *pkt)
This is a simple scalar statistic, like a counter.
Stats::Average m_buf_msgs
unsigned int getSize(Tick curTime)
bool areNSlotsAvailable(unsigned int n, Tick curTime)
const MsgPtr & peekMsgPtr() const
void setPriority(int rank)
uint64_t Tick
Tick count type.
Stats::Scalar m_not_avail_count
int m_stall_map_size
Current size of the stall map.
void setConsumer(Consumer *consumer)
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...
void unregisterDequeueCallback()
const Message * peek() const
Function for extracting the message at the head of the message queue.
unsigned int m_msgs_this_cycle
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void regStats()
Register statistics for this object.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
unsigned int m_size_at_cycle_start
Stats::Formula m_occupancy
std::map< Addr, std::list< MsgPtr > > StallMsgMapType
bool isReady(Tick current_time) const
Consumer * m_consumer
Consumer to signal a wakeup(), can be NULL.
void reanalyzeList(std::list< MsgPtr > &, Tick)
Declaration of the Packet class.
void setIncomingLink(int link_id)
std::ostream & operator<<(std::ostream &out, const MessageBuffer &obj)
Tick m_time_last_time_pop
Stats::Scalar m_stall_count
Tick m_time_last_time_enqueue
void reanalyzeAllMessages(Tick current_time)
const unsigned int m_max_size
The maximum capacity.
std::function< void()> m_dequeue_callback
void delayHead(Tick current_time, Tick delta)
std::vector< MsgPtr > m_prio_heap
void enqueue(MsgPtr message, Tick curTime, Tick delta)
void registerDequeueCallback(std::function< void()> callback)
MessageBufferParams Params
Abstract superclass for simulation objects.