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"
97 std::greater<MsgPtr>());
107 DPRINTF(RubyQueue,
"Setting consumer: %s\n", *consumer);
109 fatal(
"Trying to connect %s to MessageBuffer %s. \
110 \n%s already connected. Check the cntrl_id's.\n",
155 void print(std::ostream& out)
const;
306 #endif //__MEM_RUBY_NETWORK_MESSAGEBUFFER_HH__
This is a simple scalar statistic, like a counter.
uint32_t functionalWrite(Packet *pkt)
#define fatal(...)
This implements a cprintf based fatal() function.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
void recycle(Tick current_time, Tick recycle_latency)
void unregisterDequeueCallback()
std::shared_ptr< Message > MsgPtr
Tick m_time_last_time_size_checked
statistics::Formula m_avg_stall_time
void enqueueDeferredMessages(Addr addr, Tick curTime, Tick delay)
int getIncomingLink() const
std::ostream & operator<<(std::ostream &os, const BoolVec &myvector)
Consumer * m_consumer
Consumer to signal a wakeup(), can be NULL.
MessageBufferParams Params
void setPriority(int rank)
void reanalyzeList(std::list< MsgPtr > &, Tick)
DeferredMsgMapType m_deferred_msg_map
A stat that calculates the per tick average of a value.
void enqueue(MsgPtr message, Tick curTime, Tick delta)
MessageBuffer(const Params &p)
statistics::Scalar m_stall_time
const unsigned int m_max_dequeue_rate
When != 0, isReady returns false once m_max_dequeue_rate messages have been dequeued in the same cycl...
bool functionalRead(Packet *pkt, WriteMask &mask)
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 stallMessage(Addr addr, Tick current_time)
const PortID InvalidPortID
unsigned int getStallMapSize()
static RubyDummyPort & instance()
void delayHead(Tick current_time, Tick delta)
statistics::Formula m_occupancy
void reanalyzeMessages(Addr addr, Tick current_time)
constexpr uint64_t mask(unsigned nbits)
Generate a 64-bit mask of 'nbits' 1s, right justified.
const MsgPtr & peekMsgPtr() const
const Message * peek() const
Function for extracting the message at the head of the message queue.
unsigned int m_size_last_time_size_checked
unsigned int m_stalled_at_cycle_start
unsigned int m_msgs_this_cycle
const int m_routing_priority
uint32_t functionalAccess(Packet *pkt, bool is_read, WriteMask *mask)
int routingPriority() const
unsigned int m_size_at_cycle_start
void print(std::ostream &out) const
statistics::Scalar m_not_avail_count
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
bool functionalRead(Packet *pkt)
uint64_t Tick
Tick count type.
std::map< Addr, std::list< MsgPtr > > StallMsgMapType
const MessageRandomization m_randomization
StallMsgMapType m_stall_msg_map
A map from line addresses to lists of stalled messages for that line.
Abstract superclass for simulation objects.
const unsigned int m_max_size
The maximum capacity.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool isDeferredMsgMapEmpty(Addr addr) const
void setIncomingLink(int link_id)
void setConsumer(Consumer *consumer)
bool isReady(Tick current_time) const
std::unordered_map< Addr, std::vector< MsgPtr > > DeferredMsgMapType
A map from line addresses to corresponding vectors of messages that are deferred for enqueueing.
std::vector< MsgPtr > m_prio_heap
Ports are used to interface objects to each other.
void registerDequeueCallback(std::function< void()> callback)
Tick m_time_last_time_pop
bool areNSlotsAvailable(unsigned int n, Tick curTime)
Port & getPort(const std::string &, PortID idx=InvalidPortID) override
Get a port with a given name and index.
int m_stall_map_size
Current size of the stall map.
std::function< void()> m_dequeue_callback
statistics::Average m_buf_msgs
statistics::Scalar m_msg_count
bool hasStalledMsg(Addr addr) const
statistics::Scalar m_stall_count
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
unsigned int m_dequeues_this_cy
const bool m_allow_zero_latency
void deferEnqueueingMessage(Addr addr, MsgPtr message)
void reanalyzeAllMessages(Tick current_time)
unsigned int getSize(Tick curTime)
Tick m_time_last_time_enqueue
Generated on Sun Jul 30 2023 01:56:58 for gem5 by doxygen 1.8.17