gem5  v21.1.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MessageBuffer.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2021 ARM Limited
3  * All rights reserved.
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
15  * All rights reserved.
16  *
17  * Redistribution and use in source and binary forms, with or without
18  * modification, are permitted provided that the following conditions are
19  * met: redistributions of source code must retain the above copyright
20  * notice, this list of conditions and the following disclaimer;
21  * redistributions in binary form must reproduce the above copyright
22  * notice, this list of conditions and the following disclaimer in the
23  * documentation and/or other materials provided with the distribution;
24  * neither the name of the copyright holders nor the names of its
25  * contributors may be used to endorse or promote products derived from
26  * this software without specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  */
40 
42 
43 #include <cassert>
44 
45 #include "base/cprintf.hh"
46 #include "base/logging.hh"
47 #include "base/random.hh"
48 #include "base/stl_helpers.hh"
49 #include "debug/RubyQueue.hh"
51 
52 namespace gem5
53 {
54 
55 namespace ruby
56 {
57 
58 using stl_helpers::operator<<;
59 
61  : SimObject(p), m_stall_map_size(0),
62  m_max_size(p.buffer_size), m_time_last_time_size_checked(0),
63  m_time_last_time_enqueue(0), m_time_last_time_pop(0),
64  m_last_arrival_time(0), m_strict_fifo(p.ordered),
65  m_randomization(p.randomization),
66  m_allow_zero_latency(p.allow_zero_latency),
67  ADD_STAT(m_not_avail_count, "Number of times this buffer did not have "
68  "N slots available"),
69  ADD_STAT(m_buf_msgs, "Average number of messages in buffer"),
70  ADD_STAT(m_stall_time, "Average number of cycles messages are stalled in "
71  "this MB"),
72  ADD_STAT(m_stall_count, "Number of times messages were stalled"),
73  ADD_STAT(m_occupancy, "Average occupancy of buffer capacity")
74 {
75  m_msg_counter = 0;
76  m_consumer = NULL;
81  m_priority_rank = 0;
82 
83  m_stall_msg_map.clear();
84  m_input_link_id = 0;
85  m_vnet_id = 0;
86 
87  m_buf_msgs = 0;
88  m_stall_time = 0;
89 
90  m_dequeue_callback = nullptr;
91 
92  // stats
95 
98 
101 
104 
107 
108  if (m_max_size > 0) {
110  } else {
111  m_occupancy = 0;
112  }
113 }
114 
115 unsigned int
117 {
118  if (m_time_last_time_size_checked != curTime) {
121  }
122 
124 }
125 
126 bool
127 MessageBuffer::areNSlotsAvailable(unsigned int n, Tick current_time)
128 {
129 
130  // fast path when message buffers have infinite size
131  if (m_max_size == 0) {
132  return true;
133  }
134 
135  // determine the correct size for the current cycle
136  // pop operations shouldn't effect the network's visible size
137  // until schd cycle, but enqueue operations effect the visible
138  // size immediately
139  unsigned int current_size = 0;
140  unsigned int current_stall_size = 0;
141 
142  if (m_time_last_time_pop < current_time) {
143  // no pops this cycle - heap and stall queue size is correct
144  current_size = m_prio_heap.size();
145  current_stall_size = m_stall_map_size;
146  } else {
147  if (m_time_last_time_enqueue < current_time) {
148  // no enqueues this cycle - m_size_at_cycle_start is correct
149  current_size = m_size_at_cycle_start;
150  } else {
151  // both pops and enqueues occured this cycle - add new
152  // enqueued msgs to m_size_at_cycle_start
153  current_size = m_size_at_cycle_start + m_msgs_this_cycle;
154  }
155 
156  // Stall queue size at start is considered
157  current_stall_size = m_stalled_at_cycle_start;
158  }
159 
160  // now compare the new size with our max size
161  if (current_size + current_stall_size + n <= m_max_size) {
162  return true;
163  } else {
164  DPRINTF(RubyQueue, "n: %d, current_size: %d, heap size: %d, "
165  "m_max_size: %d\n",
166  n, current_size + current_stall_size,
167  m_prio_heap.size(), m_max_size);
169  return false;
170  }
171 }
172 
173 const Message*
175 {
176  DPRINTF(RubyQueue, "Peeking at head of queue.\n");
177  const Message* msg_ptr = m_prio_heap.front().get();
178  assert(msg_ptr);
179 
180  DPRINTF(RubyQueue, "Message: %s\n", (*msg_ptr));
181  return msg_ptr;
182 }
183 
184 // FIXME - move me somewhere else
185 Tick
187 {
188  Tick time = 1;
189  time += random_mt.random(0, 3); // [0...3]
190  if (random_mt.random(0, 7) == 0) { // 1 in 8 chance
191  time += 100 + random_mt.random(1, 15); // 100 + [1...15]
192  }
193  return time;
194 }
195 
196 void
197 MessageBuffer::enqueue(MsgPtr message, Tick current_time, Tick delta)
198 {
199  // record current time incase we have a pop that also adjusts my size
200  if (m_time_last_time_enqueue < current_time) {
201  m_msgs_this_cycle = 0; // first msg this cycle
202  m_time_last_time_enqueue = current_time;
203  }
204 
205  m_msg_counter++;
207 
208  // Calculate the arrival time of the message, that is, the first
209  // cycle the message can be dequeued.
210  panic_if((delta == 0) && !m_allow_zero_latency,
211  "Delta equals zero and allow_zero_latency is false during enqueue");
212  Tick arrival_time = 0;
213 
214  // random delays are inserted if the RubySystem level randomization flag
215  // is turned on and this buffer allows it
216  if ((m_randomization == MessageRandomization::disabled) ||
217  ((m_randomization == MessageRandomization::ruby_system) &&
219  // No randomization
220  arrival_time = current_time + delta;
221  } else {
222  // Randomization - ignore delta
223  if (m_strict_fifo) {
224  if (m_last_arrival_time < current_time) {
225  m_last_arrival_time = current_time;
226  }
227  arrival_time = m_last_arrival_time + random_time();
228  } else {
229  arrival_time = current_time + random_time();
230  }
231  }
232 
233  // Check the arrival time
234  assert(arrival_time >= current_time);
235  if (m_strict_fifo) {
236  if (arrival_time < m_last_arrival_time) {
237  panic("FIFO ordering violated: %s name: %s current time: %d "
238  "delta: %d arrival_time: %d last arrival_time: %d\n",
239  *this, name(), current_time, delta, arrival_time,
241  }
242  }
243 
244  // If running a cache trace, don't worry about the last arrival checks
246  m_last_arrival_time = arrival_time;
247  }
248 
249  // compute the delay cycles and set enqueue time
250  Message* msg_ptr = message.get();
251  assert(msg_ptr != NULL);
252 
253  assert(current_time >= msg_ptr->getLastEnqueueTime() &&
254  "ensure we aren't dequeued early");
255 
256  msg_ptr->updateDelayedTicks(current_time);
257  msg_ptr->setLastEnqueueTime(arrival_time);
258  msg_ptr->setMsgCounter(m_msg_counter);
259 
260  // Insert the message into the priority heap
261  m_prio_heap.push_back(message);
262  push_heap(m_prio_heap.begin(), m_prio_heap.end(), std::greater<MsgPtr>());
263  // Increment the number of messages statistic
264  m_buf_msgs++;
265 
266  assert((m_max_size == 0) ||
267  ((m_prio_heap.size() + m_stall_map_size) <= m_max_size));
268 
269  DPRINTF(RubyQueue, "Enqueue arrival_time: %lld, Message: %s\n",
270  arrival_time, *(message.get()));
271 
272  // Schedule the wakeup
273  assert(m_consumer != NULL);
274  m_consumer->scheduleEventAbsolute(arrival_time);
276 }
277 
278 Tick
279 MessageBuffer::dequeue(Tick current_time, bool decrement_messages)
280 {
281  DPRINTF(RubyQueue, "Popping\n");
282  assert(isReady(current_time));
283 
284  // get MsgPtr of the message about to be dequeued
285  MsgPtr message = m_prio_heap.front();
286 
287  // get the delay cycles
288  message->updateDelayedTicks(current_time);
289  Tick delay = message->getDelayedTicks();
290 
291  m_stall_time = curTick() - message->getTime();
292 
293  // record previous size and time so the current buffer size isn't
294  // adjusted until schd cycle
295  if (m_time_last_time_pop < current_time) {
298  m_time_last_time_pop = current_time;
299  }
300 
301  pop_heap(m_prio_heap.begin(), m_prio_heap.end(), std::greater<MsgPtr>());
302  m_prio_heap.pop_back();
303  if (decrement_messages) {
304  // If the message will be removed from the queue, decrement the
305  // number of message in the queue.
306  m_buf_msgs--;
307  }
308 
309  // if a dequeue callback was requested, call it now
310  if (m_dequeue_callback) {
312  }
313 
314  return delay;
315 }
316 
317 void
318 MessageBuffer::registerDequeueCallback(std::function<void()> callback)
319 {
320  m_dequeue_callback = callback;
321 }
322 
323 void
325 {
326  m_dequeue_callback = nullptr;
327 }
328 
329 void
331 {
332  m_prio_heap.clear();
333 
334  m_msg_counter = 0;
339  m_msgs_this_cycle = 0;
340 }
341 
342 void
343 MessageBuffer::recycle(Tick current_time, Tick recycle_latency)
344 {
345  DPRINTF(RubyQueue, "Recycling.\n");
346  assert(isReady(current_time));
347  MsgPtr node = m_prio_heap.front();
348  pop_heap(m_prio_heap.begin(), m_prio_heap.end(), std::greater<MsgPtr>());
349 
350  Tick future_time = current_time + recycle_latency;
351  node->setLastEnqueueTime(future_time);
352 
353  m_prio_heap.back() = node;
354  push_heap(m_prio_heap.begin(), m_prio_heap.end(), std::greater<MsgPtr>());
355  m_consumer->scheduleEventAbsolute(future_time);
356 }
357 
358 void
360 {
361  while (!lt.empty()) {
362  MsgPtr m = lt.front();
363  assert(m->getLastEnqueueTime() <= schdTick);
364 
365  m_prio_heap.push_back(m);
366  push_heap(m_prio_heap.begin(), m_prio_heap.end(),
367  std::greater<MsgPtr>());
368 
370 
371  DPRINTF(RubyQueue, "Requeue arrival_time: %lld, Message: %s\n",
372  schdTick, *(m.get()));
373 
374  lt.pop_front();
375  }
376 }
377 
378 void
380 {
381  DPRINTF(RubyQueue, "ReanalyzeMessages %#x\n", addr);
382  assert(m_stall_msg_map.count(addr) > 0);
383 
384  //
385  // Put all stalled messages associated with this address back on the
386  // prio heap. The reanalyzeList call will make sure the consumer is
387  // scheduled for the current cycle so that the previously stalled messages
388  // will be observed before any younger messages that may arrive this cycle
389  //
391  assert(m_stall_map_size >= 0);
392  reanalyzeList(m_stall_msg_map[addr], current_time);
393  m_stall_msg_map.erase(addr);
394 }
395 
396 void
398 {
399  DPRINTF(RubyQueue, "ReanalyzeAllMessages\n");
400 
401  //
402  // Put all stalled messages associated with this address back on the
403  // prio heap. The reanalyzeList call will make sure the consumer is
404  // scheduled for the current cycle so that the previously stalled messages
405  // will be observed before any younger messages that may arrive this cycle.
406  //
407  for (StallMsgMapType::iterator map_iter = m_stall_msg_map.begin();
408  map_iter != m_stall_msg_map.end(); ++map_iter) {
409  m_stall_map_size -= map_iter->second.size();
410  assert(m_stall_map_size >= 0);
411  reanalyzeList(map_iter->second, current_time);
412  }
413  m_stall_msg_map.clear();
414 }
415 
416 void
418 {
419  DPRINTF(RubyQueue, "Stalling due to %#x\n", addr);
420  assert(isReady(current_time));
421  assert(getOffset(addr) == 0);
422  MsgPtr message = m_prio_heap.front();
423 
424  // Since the message will just be moved to stall map, indicate that the
425  // buffer should not decrement the m_buf_msgs statistic
426  dequeue(current_time, false);
427 
428  //
429  // Note: no event is scheduled to analyze the map at a later time.
430  // Instead the controller is responsible to call reanalyzeMessages when
431  // these addresses change state.
432  //
433  (m_stall_msg_map[addr]).push_back(message);
435  m_stall_count++;
436 }
437 
438 bool
440 {
441  return (m_stall_msg_map.count(addr) != 0);
442 }
443 
444 void
446 {
447  DPRINTF(RubyQueue, "Deferring enqueueing message: %s, Address %#x\n",
448  *(message.get()), addr);
449  (m_deferred_msg_map[addr]).push_back(message);
450 }
451 
452 void
454 {
455  assert(!isDeferredMsgMapEmpty(addr));
457  assert(msg_vec.size() > 0);
458 
459  // enqueue all deferred messages associated with this address
460  for (MsgPtr m : msg_vec) {
461  enqueue(m, curTime, delay);
462  }
463 
464  msg_vec.clear();
465  m_deferred_msg_map.erase(addr);
466 }
467 
468 bool
470 {
471  return m_deferred_msg_map.count(addr) == 0;
472 }
473 
474 void
475 MessageBuffer::print(std::ostream& out) const
476 {
477  ccprintf(out, "[MessageBuffer: ");
478  if (m_consumer != NULL) {
479  ccprintf(out, " consumer-yes ");
480  }
481 
483  std::sort_heap(copy.begin(), copy.end(), std::greater<MsgPtr>());
484  ccprintf(out, "%s] %s", copy, name());
485 }
486 
487 bool
488 MessageBuffer::isReady(Tick current_time) const
489 {
490  return ((m_prio_heap.size() > 0) &&
491  (m_prio_heap.front()->getLastEnqueueTime() <= current_time));
492 }
493 
494 uint32_t
496 {
497  DPRINTF(RubyQueue, "functional %s for %#x\n",
498  is_read ? "read" : "write", pkt->getAddr());
499 
500  uint32_t num_functional_accesses = 0;
501 
502  // Check the priority heap and write any messages that may
503  // correspond to the address in the packet.
504  for (unsigned int i = 0; i < m_prio_heap.size(); ++i) {
505  Message *msg = m_prio_heap[i].get();
506  if (is_read && !mask && msg->functionalRead(pkt))
507  return 1;
508  else if (is_read && mask && msg->functionalRead(pkt, *mask))
509  num_functional_accesses++;
510  else if (!is_read && msg->functionalWrite(pkt))
511  num_functional_accesses++;
512  }
513 
514  // Check the stall queue and write any messages that may
515  // correspond to the address in the packet.
516  for (StallMsgMapType::iterator map_iter = m_stall_msg_map.begin();
517  map_iter != m_stall_msg_map.end();
518  ++map_iter) {
519 
520  for (std::list<MsgPtr>::iterator it = (map_iter->second).begin();
521  it != (map_iter->second).end(); ++it) {
522 
523  Message *msg = (*it).get();
524  if (is_read && !mask && msg->functionalRead(pkt))
525  return 1;
526  else if (is_read && mask && msg->functionalRead(pkt, *mask))
527  num_functional_accesses++;
528  else if (!is_read && msg->functionalWrite(pkt))
529  num_functional_accesses++;
530  }
531  }
532 
533  return num_functional_accesses;
534 }
535 
536 } // namespace ruby
537 } // namespace gem5
gem5::curTick
Tick curTick()
The universal simulation clock.
Definition: cur_tick.hh:46
gem5::ruby::MessageBuffer::recycle
void recycle(Tick current_time, Tick recycle_latency)
Definition: MessageBuffer.cc:343
gem5::ruby::MessageBuffer::unregisterDequeueCallback
void unregisterDequeueCallback()
Definition: MessageBuffer.cc:324
gem5::ruby::MsgPtr
std::shared_ptr< Message > MsgPtr
Definition: Message.hh:59
gem5::ruby::MessageBuffer::m_time_last_time_size_checked
Tick m_time_last_time_size_checked
Definition: MessageBuffer.hh:243
gem5::ruby::WriteMask
Definition: WriteMask.hh:59
gem5::ruby::MessageBuffer::enqueueDeferredMessages
void enqueueDeferredMessages(Addr addr, Tick curTime, Tick delay)
Definition: MessageBuffer.cc:453
gem5::ruby::MessageBuffer::m_consumer
Consumer * m_consumer
Consumer to signal a wakeup(), can be NULL.
Definition: MessageBuffer.hh:195
gem5::ruby::MessageBuffer::Params
MessageBufferParams Params
Definition: MessageBuffer.hh:77
gem5::ruby::MessageBuffer::reanalyzeList
void reanalyzeList(std::list< MsgPtr > &, Tick)
Definition: MessageBuffer.cc:359
gem5::statistics::nozero
const FlagsType nozero
Don't print if this is zero.
Definition: info.hh:68
gem5::ruby::MessageBuffer::m_deferred_msg_map
DeferredMsgMapType m_deferred_msg_map
Definition: MessageBuffer.hh:225
random.hh
gem5::ruby::MessageBuffer::enqueue
void enqueue(MsgPtr message, Tick curTime, Tick delta)
Definition: MessageBuffer.cc:197
gem5::ruby::MessageBuffer::MessageBuffer
MessageBuffer(const Params &p)
Definition: MessageBuffer.cc:60
std::vector< MsgPtr >
gem5::ruby::MessageBuffer::dequeue
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...
Definition: MessageBuffer.cc:279
gem5::ruby::Message::getLastEnqueueTime
Tick getLastEnqueueTime() const
Definition: Message.hh:107
gem5::ruby::MessageBuffer::stallMessage
void stallMessage(Addr addr, Tick current_time)
Definition: MessageBuffer.cc:417
gem5::ruby::MessageBuffer::m_stall_time
statistics::Average m_stall_time
Definition: MessageBuffer.hh:268
gem5::ArmISA::i
Bitfield< 7 > i
Definition: misc_types.hh:66
gem5::ruby::MessageBuffer::m_occupancy
statistics::Formula m_occupancy
Definition: MessageBuffer.hh:270
gem5::ruby::MessageBuffer::reanalyzeMessages
void reanalyzeMessages(Addr addr, Tick current_time)
Definition: MessageBuffer.cc:379
gem5::ccprintf
void ccprintf(cp::Print &print)
Definition: cprintf.hh:130
gem5::mask
constexpr uint64_t mask(unsigned nbits)
Generate a 64-bit mask of 'nbits' 1s, right justified.
Definition: bitfield.hh:63
gem5::ruby::MessageBuffer::peek
const Message * peek() const
Function for extracting the message at the head of the message queue.
Definition: MessageBuffer.cc:174
gem5::ruby::MessageBuffer::m_last_arrival_time
Tick m_last_arrival_time
Definition: MessageBuffer.hh:250
gem5::ruby::MessageBuffer::m_size_last_time_size_checked
unsigned int m_size_last_time_size_checked
Definition: MessageBuffer.hh:244
gem5::ruby::MessageBuffer::m_stalled_at_cycle_start
unsigned int m_stalled_at_cycle_start
Definition: MessageBuffer.hh:253
gem5::ruby::MessageBuffer::m_msgs_this_cycle
unsigned int m_msgs_this_cycle
Definition: MessageBuffer.hh:254
gem5::ruby::Message::setMsgCounter
void setMsgCounter(uint64_t c)
Definition: Message.hh:110
gem5::ruby::MessageBuffer::functionalAccess
uint32_t functionalAccess(Packet *pkt, bool is_read, WriteMask *mask)
Definition: MessageBuffer.cc:495
gem5::ruby::Consumer::storeEventInfo
virtual void storeEventInfo(int info)
Definition: Consumer.hh:72
gem5::ruby::MessageBuffer::m_size_at_cycle_start
unsigned int m_size_at_cycle_start
Definition: MessageBuffer.hh:252
gem5::Random::random
std::enable_if_t< std::is_integral< T >::value, T > random()
Use the SFINAE idiom to choose an implementation based on whether the type is integral or floating po...
Definition: random.hh:90
gem5::Named::name
virtual std::string name() const
Definition: named.hh:47
gem5::ruby::MessageBuffer::print
void print(std::ostream &out) const
Definition: MessageBuffer.cc:475
gem5::ruby::MessageBuffer::m_not_avail_count
statistics::Scalar m_not_avail_count
Definition: MessageBuffer.hh:266
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:186
ADD_STAT
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
Definition: group.hh:75
gem5::Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:283
gem5::MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:326
gem5::Tick
uint64_t Tick
Tick count type.
Definition: types.hh:58
gem5::ruby::Message::functionalWrite
virtual bool functionalWrite(Packet *pkt)
Definition: Message.hh:94
gem5::ruby::getOffset
Addr getOffset(Addr addr)
Definition: Address.cc:54
gem5::ruby::RubySystem::getRandomization
static int getRandomization()
Definition: RubySystem.hh:71
gem5::ruby::MessageBuffer::m_randomization
const MessageRandomization m_randomization
Definition: MessageBuffer.hh:259
gem5::ruby::MessageBuffer::m_stall_msg_map
StallMsgMapType m_stall_msg_map
A map from line addresses to lists of stalled messages for that line.
Definition: MessageBuffer.hh:217
cprintf.hh
gem5::ruby::MessageBuffer::m_strict_fifo
const bool m_strict_fifo
Definition: MessageBuffer.hh:258
gem5::SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:146
gem5::ruby::MessageBuffer::m_max_size
const unsigned int m_max_size
The maximum capacity.
Definition: MessageBuffer.hh:241
gem5::ruby::Message::functionalRead
virtual bool functionalRead(Packet *pkt)
The two functions below are used for reading / writing the message functionally.
Definition: Message.hh:90
RubySystem.hh
gem5::ruby::MessageBuffer::m_msg_counter
uint64_t m_msg_counter
Definition: MessageBuffer.hh:256
gem5::ruby::MessageBuffer::m_priority_rank
int m_priority_rank
Definition: MessageBuffer.hh:257
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::ruby::Message::updateDelayedTicks
void updateDelayedTicks(Tick curTime)
Update the delay this message has experienced so far.
Definition: Message.hh:98
gem5::ruby::MessageBuffer::isDeferredMsgMapEmpty
bool isDeferredMsgMapEmpty(Addr addr) const
Definition: MessageBuffer.cc:469
gem5::ruby::MessageBuffer::isReady
bool isReady(Tick current_time) const
Definition: MessageBuffer.cc:488
gem5::ruby::MessageBuffer::clear
void clear()
Definition: MessageBuffer.cc:330
MessageBuffer.hh
gem5::ruby::MessageBuffer::m_prio_heap
std::vector< MsgPtr > m_prio_heap
Definition: MessageBuffer.hh:196
panic_if
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Definition: logging.hh:203
gem5::ArmISA::m
Bitfield< 0 > m
Definition: misc_types.hh:394
gem5::ruby::random_time
Tick random_time()
Definition: MessageBuffer.cc:186
gem5::ruby::MessageBuffer::registerDequeueCallback
void registerDequeueCallback(std::function< void()> callback)
Definition: MessageBuffer.cc:318
gem5::ruby::RubySystem::getWarmupEnabled
static bool getWarmupEnabled()
Definition: RubySystem.hh:75
gem5::ArmISA::n
Bitfield< 31 > n
Definition: misc_types.hh:455
gem5::ruby::MessageBuffer::m_input_link_id
int m_input_link_id
Definition: MessageBuffer.hh:262
gem5::ruby::MessageBuffer::m_time_last_time_pop
Tick m_time_last_time_pop
Definition: MessageBuffer.hh:249
gem5::ruby::MessageBuffer::areNSlotsAvailable
bool areNSlotsAvailable(unsigned int n, Tick curTime)
Definition: MessageBuffer.cc:127
gem5::ruby::MessageBuffer::m_stall_map_size
int m_stall_map_size
Current size of the stall map.
Definition: MessageBuffer.hh:233
gem5::ruby::Message::setLastEnqueueTime
void setLastEnqueueTime(const Tick &time)
Definition: Message.hh:106
logging.hh
gem5::ruby::MessageBuffer::m_dequeue_callback
std::function< void()> m_dequeue_callback
Definition: MessageBuffer.hh:198
gem5::PowerISA::lt
Bitfield< 31 > lt
Definition: misc.hh:50
gem5::ruby::Message
Definition: Message.hh:62
gem5::ruby::MessageBuffer::m_buf_msgs
statistics::Average m_buf_msgs
Definition: MessageBuffer.hh:267
gem5::statistics::DataWrap::flags
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
Definition: statistics.hh:355
gem5::ruby::MessageBuffer::hasStalledMsg
bool hasStalledMsg(Addr addr) const
Definition: MessageBuffer.cc:439
std::list
STL list class.
Definition: stl.hh:51
gem5::ruby::MessageBuffer::m_stall_count
statistics::Scalar m_stall_count
Definition: MessageBuffer.hh:269
gem5::Packet::getAddr
Addr getAddr() const
Definition: packet.hh:781
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::random_mt
Random random_mt
Definition: random.cc:99
gem5::ruby::MessageBuffer::m_allow_zero_latency
const bool m_allow_zero_latency
Definition: MessageBuffer.hh:260
stl_helpers.hh
gem5::ruby::MessageBuffer::deferEnqueueingMessage
void deferEnqueueingMessage(Addr addr, MsgPtr message)
Definition: MessageBuffer.cc:445
gem5::ruby::Consumer::scheduleEventAbsolute
void scheduleEventAbsolute(Tick timeAbs)
Definition: Consumer.cc:63
gem5::ruby::MessageBuffer::reanalyzeAllMessages
void reanalyzeAllMessages(Tick current_time)
Definition: MessageBuffer.cc:397
gem5::ruby::MessageBuffer::getSize
unsigned int getSize(Tick curTime)
Definition: MessageBuffer.cc:116
gem5::ruby::MessageBuffer::m_time_last_time_enqueue
Tick m_time_last_time_enqueue
Definition: MessageBuffer.hh:248
gem5::ruby::MessageBuffer::m_vnet_id
int m_vnet_id
Definition: MessageBuffer.hh:263
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:177
gem5::X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:84

Generated on Tue Sep 21 2021 12:25:41 for gem5 by doxygen 1.8.17