gem5  v20.1.0.0
buffers.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2014 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  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions are
16  * met: redistributions of source code must retain the above copyright
17  * notice, this list of conditions and the following disclaimer;
18  * redistributions in binary form must reproduce the above copyright
19  * notice, this list of conditions and the following disclaimer in the
20  * documentation and/or other materials provided with the distribution;
21  * neither the name of the copyright holders nor the names of its
22  * contributors may be used to endorse or promote products derived from
23  * this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  */
37 
44 #ifndef __CPU_MINOR_BUFFERS_HH__
45 #define __CPU_MINOR_BUFFERS_HH__
46 
47 #include <iostream>
48 #include <queue>
49 #include <sstream>
50 
51 #include "base/logging.hh"
52 #include "cpu/activity.hh"
53 #include "cpu/minor/trace.hh"
54 #include "cpu/timebuf.hh"
55 
56 namespace Minor
57 {
58 
63 class ReportIF
64 {
65  public:
68  virtual void reportData(std::ostream &os) const = 0;
69 
70  virtual ~ReportIF() { }
71 };
72 
77 class BubbleIF
78 {
79  public:
80  virtual bool isBubble() const = 0;
81 };
82 
89 template <typename ElemType> /* ElemType should implement ReportIF */
91 {
92  public:
93  static void
94  reportData(std::ostream &os, const ElemType &elem)
95  { elem.reportData(os); }
96 };
97 
100 template <typename PtrType>
102 {
103  public:
104  static void
105  reportData(std::ostream &os, const PtrType &elem)
106  { elem->reportData(os); }
107 };
108 
114 template <typename ElemType>
116 {
117  public:
118  static bool isBubble(const ElemType &) { return false; }
119  static ElemType
121  {
122  panic("bubble called but no bubble interface");
123  }
124 };
125 
127 template <typename ElemType>
129 {
130  public:
131  static bool isBubble(const ElemType &elem)
132  { return elem.isBubble(); }
133 
134  static ElemType bubble() { return ElemType::bubble(); }
135 };
136 
138 template <typename PtrType, typename ElemType>
140 {
141  public:
142  static bool isBubble(const PtrType &elem)
143  { return elem->isBubble(); }
144 
145  static PtrType bubble() { return ElemType::bubble(); }
146 };
147 
149 template <typename ElemType,
150  typename ReportTraits = ReportTraitsAdaptor<ElemType>,
151  typename BubbleTraits = BubbleTraitsAdaptor<ElemType> >
152 class MinorBuffer : public Named, public TimeBuffer<ElemType>
153 {
154  protected:
157 
159  std::string dataName;
160 
161  public:
162  MinorBuffer(const std::string &name,
163  const std::string &data_name,
164  int num_past, int num_future,
165  int report_left = -1, int report_right = -1) :
166  Named(name), TimeBuffer<ElemType>(num_past, num_future),
167  reportLeft(report_left), reportRight(report_right),
168  dataName(data_name)
169  { }
170 
171  public:
172  /* Is this buffer full of only bubbles */
173  bool
174  empty() const
175  {
176  bool ret = true;
177 
178  for (int i = -this->past; i <= this->future; i++) {
179  if (!BubbleTraits::isBubble((*this)[i]))
180  ret = false;
181  }
182 
183  return ret;
184  }
185 
190  void
191  minorTrace() const
192  {
193  std::ostringstream data;
194 
195  int step = (reportLeft > reportRight ? -1 : 1);
196  int end = reportRight + step;
197  int i = reportLeft;
198 
199  while (i != end) {
200  const ElemType &datum = (*this)[i];
201 
202  ReportTraits::reportData(data, datum);
203  i += step;
204  if (i != end)
205  data << ',';
206  }
207 
208  MINORTRACE("%s=%s\n", dataName, data.str());
209  }
210 };
211 
214 template <typename Data>
215 class Latch
216 {
217  public:
219 
220  protected:
224 
226 
227  public:
230  Latch(const std::string &name,
231  const std::string &data_name,
232  Cycles delay_ = Cycles(1),
233  bool report_backwards = false) :
234  delay(delay_),
235  buffer(name, data_name, delay_, 0, (report_backwards ? -delay_ : 0),
236  (report_backwards ? 0 : -delay_))
237  { }
238 
239  public:
245  class Input
246  {
247  public:
249 
250  public:
251  Input(typename Buffer::wire input_wire) :
252  inputWire(input_wire)
253  { }
254  };
255 
256  class Output
257  {
258  public:
260 
261  public:
262  Output(typename Buffer::wire output_wire) :
263  outputWire(output_wire)
264  { }
265  };
266 
267  bool empty() const { return buffer.empty(); }
268 
270  Input input() { return Input(buffer.getWire(0)); }
271 
273  Output output() { return Output(buffer.getWire(-delay)); }
274 
275  void minorTrace() const { buffer.minorTrace(); }
276 
277  void evaluate() { buffer.advance(); }
278 };
279 
284 template <typename ElemType,
285  typename ReportTraits,
286  typename BubbleTraits = BubbleTraitsAdaptor<ElemType> >
287 class SelfStallingPipeline : public MinorBuffer<ElemType, ReportTraits>
288 {
289  protected:
294 
295  public:
297  bool stalled;
298 
300  unsigned int occupancy;
301 
302  public:
303  SelfStallingPipeline(const std::string &name,
304  const std::string &data_name,
305  unsigned depth) :
306  MinorBuffer<ElemType, ReportTraits>
307  (name, data_name, depth, 0, -1, -depth),
308  pushWire(this->getWire(0)),
309  popWire(this->getWire(-depth)),
310  stalled(false),
311  occupancy(0)
312  {
313  assert(depth > 0);
314 
315  /* Write explicit bubbles to get around the case where the default
316  * constructor for the element type isn't good enough */
317  for (unsigned i = 0; i <= depth; i++)
318  (*this)[-i] = BubbleTraits::bubble();
319  }
320 
321  public:
326  void push(ElemType &elem)
327  {
328  assert(!alreadyPushed());
329  *pushWire = elem;
330  if (!BubbleTraits::isBubble(elem))
331  occupancy++;
332  }
333 
335  ElemType &front() { return *popWire; }
336 
337  const ElemType &front() const { return *popWire; }
338 
340  bool alreadyPushed() { return !BubbleTraits::isBubble(*pushWire); }
341 
343  bool isPopable() { return !BubbleTraits::isBubble(front()); }
344 
348  void
350  {
351  bool data_at_end = isPopable();
352 
353  if (!stalled) {
355  /* If there was data at the end of the pipe that has now been
356  * advanced out of the pipe, we've lost data */
357  if (data_at_end)
358  occupancy--;
359  /* Is there data at the end of the pipe now? */
360  stalled = isPopable();
361  /* Insert a bubble into the empty input slot to make sure that
362  * element is correct in the case where the default constructor
363  * for ElemType doesn't produce a bubble */
364  ElemType bubble = BubbleTraits::bubble();
365  *pushWire = bubble;
366  }
367  }
368 };
369 
372 {
373  public:
375  virtual bool canReserve() const = 0;
376 
378  virtual void reserve() = 0;
379 
381  virtual void freeReservation() = 0;
382 
383  virtual ~Reservable() {};
384 };
385 
394 template <typename ElemType,
395  typename ReportTraits = ReportTraitsAdaptor<ElemType>,
396  typename BubbleTraits = BubbleTraitsAdaptor<ElemType> >
397 class Queue : public Named, public Reservable
398 {
399  private:
401 
404  unsigned int numReservedSlots;
405 
407  unsigned int capacity;
408 
410  std::string dataName;
411 
412  public:
413  Queue(const std::string &name, const std::string &data_name,
414  unsigned int capacity_) :
415  Named(name),
416  numReservedSlots(0),
417  capacity(capacity_),
418  dataName(data_name)
419  { }
420 
421  public:
425  void
426  push(ElemType &data)
427  {
428  if (!BubbleTraits::isBubble(data)) {
429  freeReservation();
430  queue.push_back(data);
431 
432  if (queue.size() > capacity) {
433  warn("%s: No space to push data into queue of capacity"
434  " %u, pushing anyway\n", name(), capacity);
435  }
436 
437  }
438  }
439 
442 
445  {
446  if (numReservedSlots != 0)
448  }
449 
453  void
455  {
456  /* Check reservable space */
457  if (unreservedRemainingSpace() == 0)
458  warn("%s: No space is reservable in queue", name());
459 
461  }
462 
463  bool canReserve() const { return unreservedRemainingSpace() != 0; }
464 
466  unsigned int totalSpace() const { return capacity; }
467 
469  unsigned int occupiedSpace() const { return queue.size(); }
470 
472  unsigned int reservedSpace() const { return numReservedSlots; }
473 
476  unsigned int
478  {
479  int ret = capacity - queue.size();
480 
481  return (ret < 0 ? 0 : ret);
482  }
483 
485  unsigned int
487  {
488  int ret = capacity - (queue.size() + numReservedSlots);
489 
490  return (ret < 0 ? 0 : ret);
491  }
492 
494  ElemType &front() { return queue.front(); }
495 
496  const ElemType &front() const { return queue.front(); }
497 
499  void pop() { queue.pop_front(); }
500 
502  bool empty() const { return queue.empty(); }
503 
504  void
505  minorTrace() const
506  {
507  std::ostringstream data;
508  /* If we become over-full, totalSpace() can actually be smaller than
509  * occupiedSpace(). Handle this */
510  unsigned int num_total = (occupiedSpace() > totalSpace() ?
511  occupiedSpace() : totalSpace());
512 
513  unsigned int num_reserved = reservedSpace();
514  unsigned int num_occupied = occupiedSpace();
515 
516  int num_printed = 1;
517  /* Bodge to rotate queue to report elements */
518  while (num_printed <= num_occupied) {
519  ReportTraits::reportData(data, queue[num_printed - 1]);
520  num_printed++;
521 
522  if (num_printed <= num_total)
523  data << ',';
524  }
525 
526  int num_printed_reserved = 1;
527  /* Show reserved slots */
528  while (num_printed_reserved <= num_reserved &&
529  num_printed <= num_total)
530  {
531  data << 'R';
532  num_printed_reserved++;
533  num_printed++;
534 
535  if (num_printed <= num_total)
536  data << ',';
537  }
538 
539  /* And finally pad with empty slots (if there are any) */
540  while (num_printed <= num_total) {
541  num_printed++;
542 
543  if (num_printed <= num_total)
544  data << ',';
545  }
546 
547  MINORTRACE("%s=%s\n", dataName, data.str());
548  }
549 };
550 
562 template <typename ElemType,
563  typename ReportTraits = ReportTraitsAdaptor<ElemType>,
564  typename BubbleTraits = BubbleTraitsAdaptor<ElemType> >
565 class InputBuffer : public Reservable
566 {
567  protected:
570 
572  mutable ElemType *elementPtr;
573 
574  public:
575  InputBuffer(const std::string &name, const std::string &data_name,
576  unsigned int capacity_) :
577  queue(name, data_name, capacity_),
578  elementPtr(NULL)
579  { }
580 
581  public:
585  void
586  setTail(ElemType &new_element)
587  {
588  assert(!elementPtr);
589  if (!BubbleTraits::isBubble(new_element)) {
590  if (queue.empty())
591  elementPtr = &new_element;
592  else
593  queue.push(new_element);
594  }
595  }
596 
598  bool empty() const { return !elementPtr && queue.empty(); }
599 
601  const ElemType &front() const
602  { return (elementPtr ? *elementPtr : queue.front()); }
603 
604  ElemType &front()
605  { return (elementPtr ? *elementPtr : queue.front()); }
606 
608  void
609  pop()
610  {
611  if (elementPtr) {
612  /* A popped element was expected to be pushed into queue
613  * and so take a reserved space */
614  elementPtr = NULL;
615  queue.freeReservation();
616  } else {
617  queue.pop();
618  }
619  }
620 
624  void
625  pushTail() const
626  {
627  if (elementPtr)
628  queue.push(*elementPtr);
629  elementPtr = NULL;
630  }
631 
633  void
634  minorTrace() const
635  {
636  pushTail();
637  queue.minorTrace();
638  }
639 
641  bool canReserve() const { return queue.canReserve(); }
642  void reserve() { queue.reserve(); }
643  void freeReservation() { queue.freeReservation(); }
644 
646  unsigned int
648  {
649  pushTail();
650  return queue.unreservedRemainingSpace();
651  }
652 };
653 
654 }
655 
656 #endif /* __CPU_MINOR_BUFFERS_HH__ */
Minor::Reservable::reserve
virtual void reserve()=0
Reserve a slot in whatever structure this is attached to.
Minor::Reservable::canReserve
virtual bool canReserve() const =0
Can a slot be reserved?
X86ISA::os
Bitfield< 17 > os
Definition: misc.hh:803
warn
#define warn(...)
Definition: logging.hh:239
Minor::SelfStallingPipeline::advance
void advance()
Try to advance the pipeline.
Definition: buffers.hh:349
Minor::InputBuffer::pushTail
void pushTail() const
Push the single element (if any) into the queue proper.
Definition: buffers.hh:625
Minor::MinorBuffer::minorTrace
void minorTrace() const
Report buffer states from 'slot' 'from' to 'to'.
Definition: buffers.hh:191
Minor::BubbleIF::isBubble
virtual bool isBubble() const =0
Minor::Latch::Input::inputWire
Buffer::wire inputWire
Definition: buffers.hh:248
Minor::Queue::Queue
Queue(const std::string &name, const std::string &data_name, unsigned int capacity_)
Definition: buffers.hh:413
Minor::SelfStallingPipeline::stalled
bool stalled
If true, advance will not advance the pipeline.
Definition: buffers.hh:297
TimeBuffer< ElemType >::future
int future
Definition: timebuf.hh:41
data
const char data[]
Definition: circlebuf.test.cc:42
Minor::SelfStallingPipeline::pushWire
TimeBuffer< ElemType >::wire pushWire
Wire at the input end of the pipeline (for convenience)
Definition: buffers.hh:291
Minor::SelfStallingPipeline::popWire
TimeBuffer< ElemType >::wire popWire
Wire at the output end of the pipeline (for convenience)
Definition: buffers.hh:293
Minor::SelfStallingPipeline::push
void push(ElemType &elem)
Write an element to the back of the pipeline.
Definition: buffers.hh:326
Minor::Queue::reservedSpace
unsigned int reservedSpace() const
Number of slots which are reserved.
Definition: buffers.hh:472
ArmISA::i
Bitfield< 7 > i
Definition: miscregs_types.hh:63
Minor::Queue::freeReservation
void freeReservation()
Clear a single reserved slot.
Definition: buffers.hh:444
Minor::InputBuffer::pop
void pop()
Pop either the head, or if none, the head of the queue.
Definition: buffers.hh:609
Minor::Queue::totalSpace
unsigned int totalSpace() const
Number of slots available in an empty buffer.
Definition: buffers.hh:466
Minor::Latch::Input
Encapsulate wires on either input or output of the latch.
Definition: buffers.hh:245
TimeBuffer< ElemType >::past
int past
Definition: timebuf.hh:40
Minor::Latch
Wraps a MinorBuffer with Input/Output interfaces to ensure that units within the model can only see t...
Definition: buffers.hh:215
Minor::Latch::output
Output output()
An interface to just the output of the buffer.
Definition: buffers.hh:273
Minor::Latch::evaluate
void evaluate()
Definition: buffers.hh:277
Minor::Queue::minorTrace
void minorTrace() const
Definition: buffers.hh:505
Minor::Reservable::~Reservable
virtual ~Reservable()
Definition: buffers.hh:383
Minor::NoBubbleTraits::bubble
static ElemType bubble()
Definition: buffers.hh:120
MINORTRACE
#define MINORTRACE(...)
DPRINTFN for MinorTrace reporting.
Definition: trace.hh:60
Minor::InputBuffer::queue
Queue< ElemType, ReportTraits, BubbleTraits > queue
Underlying queue.
Definition: buffers.hh:569
Minor::Queue::empty
bool empty() const
Is the queue empty?
Definition: buffers.hh:502
Minor::Latch::buffer
Buffer buffer
Definition: buffers.hh:225
Minor::Reservable
Base class for space reservation requestable objects.
Definition: buffers.hh:371
Minor::Queue::push
void push(ElemType &data)
Push an element into the buffer if it isn't a bubble.
Definition: buffers.hh:426
Minor::BubbleTraitsAdaptor::isBubble
static bool isBubble(const ElemType &elem)
Definition: buffers.hh:131
Minor::Queue::unreservedRemainingSpace
unsigned int unreservedRemainingSpace() const
Like remainingSpace but does not count reserved spaces.
Definition: buffers.hh:486
Minor::Latch::Latch
Latch(const std::string &name, const std::string &data_name, Cycles delay_=Cycles(1), bool report_backwards=false)
forward/backwardDelay specify the delay from input to output in each direction.
Definition: buffers.hh:230
Minor::Queue::remainingSpace
unsigned int remainingSpace() const
Number of slots yet to fill in this buffer.
Definition: buffers.hh:477
Minor::ReportIF
Interface class for data with reporting/tracing facilities.
Definition: buffers.hh:63
Minor::ReportTraitsPtrAdaptor
A similar adaptor but for elements held by pointer ElemType should implement ReportIF.
Definition: buffers.hh:101
Minor::Queue::front
const ElemType & front() const
Definition: buffers.hh:496
Minor
Definition: activity.cc:44
TimeBuffer
Definition: timebuf.hh:37
Minor::Queue::reserve
void reserve()
Reserve space in the queue for future pushes.
Definition: buffers.hh:454
Minor::NoBubbleTraits::isBubble
static bool isBubble(const ElemType &)
Definition: buffers.hh:118
Minor::ReportTraitsAdaptor
...ReportTraits are trait classes with the same functionality as ReportIF, but with elements explicit...
Definition: buffers.hh:90
Minor::SelfStallingPipeline
A pipeline simulating class that will stall (not advance when advance() is called) if a non-bubble va...
Definition: buffers.hh:287
Minor::BubbleTraitsPtrAdaptor
Pass on call to the element where the element is a pointer.
Definition: buffers.hh:139
timebuf.hh
Minor::Latch::minorTrace
void minorTrace() const
Definition: buffers.hh:275
Minor::Latch::empty
bool empty() const
Definition: buffers.hh:267
Minor::InputBuffer::InputBuffer
InputBuffer(const std::string &name, const std::string &data_name, unsigned int capacity_)
Definition: buffers.hh:575
Minor::Queue::canReserve
bool canReserve() const
Can a slot be reserved?
Definition: buffers.hh:463
Minor::SelfStallingPipeline::front
ElemType & front()
Peek at the end element of the pipe.
Definition: buffers.hh:335
Minor::MinorBuffer::empty
bool empty() const
Definition: buffers.hh:174
Minor::InputBuffer::setTail
void setTail(ElemType &new_element)
Set the tail of the queue, this is like push but needs to be followed by pushTail for the new tail to...
Definition: buffers.hh:586
Minor::Latch::Output
Definition: buffers.hh:256
Minor::InputBuffer::front
const ElemType & front() const
Return the element, or the front of the queue.
Definition: buffers.hh:601
Minor::SelfStallingPipeline::alreadyPushed
bool alreadyPushed()
Have we already pushed onto this pipe without advancing.
Definition: buffers.hh:340
Minor::Queue::dataName
std::string dataName
Name to use for the data in MinorTrace.
Definition: buffers.hh:410
Minor::Queue
Wrapper for a queue type to act as a pipeline stage input queue.
Definition: buffers.hh:397
Minor::ReportIF::reportData
virtual void reportData(std::ostream &os) const =0
Print the data in a format suitable to be the value in "name=value" trace lines.
activity.hh
Minor::MinorBuffer::MinorBuffer
MinorBuffer(const std::string &name, const std::string &data_name, int num_past, int num_future, int report_left=-1, int report_right=-1)
Definition: buffers.hh:162
Minor::Queue::front
ElemType & front()
Head value.
Definition: buffers.hh:494
Minor::Latch::Output::Output
Output(typename Buffer::wire output_wire)
Definition: buffers.hh:262
Minor::Latch::Output::outputWire
Buffer::wire outputWire
Definition: buffers.hh:259
Minor::InputBuffer
Like a Queue but with a restricted interface and a setTail function which, when the queue is empty,...
Definition: buffers.hh:565
Minor::Latch::delay
Cycles delay
Delays, in cycles, writing data into the latch and seeing it on the latched wires.
Definition: buffers.hh:223
Minor::Queue::pop
void pop()
Pop the head item.
Definition: buffers.hh:499
Minor::Queue::capacity
unsigned int capacity
Need this here as queues usually don't have a limited capacity.
Definition: buffers.hh:407
Minor::BubbleTraitsAdaptor
Pass on call to the element.
Definition: buffers.hh:128
Minor::Latch::Input::Input
Input(typename Buffer::wire input_wire)
Definition: buffers.hh:251
Minor::InputBuffer::elementPtr
ElemType * elementPtr
Pointer to the single element (if not NULL)
Definition: buffers.hh:572
Minor::Queue::occupiedSpace
unsigned int occupiedSpace() const
Number of slots already occupied in this buffer.
Definition: buffers.hh:469
name
const std::string & name()
Definition: trace.cc:50
Minor::SelfStallingPipeline::SelfStallingPipeline
SelfStallingPipeline(const std::string &name, const std::string &data_name, unsigned depth)
Definition: buffers.hh:303
Named
Definition: trace.hh:147
Minor::Queue::numReservedSlots
unsigned int numReservedSlots
Number of slots currently reserved for future (reservation respecting) pushes.
Definition: buffers.hh:404
Minor::BubbleTraitsPtrAdaptor::isBubble
static bool isBubble(const PtrType &elem)
Definition: buffers.hh:142
Minor::Reservable::freeReservation
virtual void freeReservation()=0
Free a reserved slot.
Minor::InputBuffer::reserve
void reserve()
Reserve a slot in whatever structure this is attached to.
Definition: buffers.hh:642
Minor::Latch::input
Input input()
An interface to just the input of the buffer.
Definition: buffers.hh:270
Minor::MinorBuffer
TimeBuffer with MinorTrace and Named interfaces.
Definition: buffers.hh:152
Minor::SelfStallingPipeline::isPopable
bool isPopable()
There's data (not a bubble) at the end of the pipe.
Definition: buffers.hh:343
Minor::InputBuffer::canReserve
bool canReserve() const
Reservable interface, passed on to queue.
Definition: buffers.hh:641
Minor::SelfStallingPipeline::occupancy
unsigned int occupancy
The number of slots with non-bubbles in them.
Definition: buffers.hh:300
Minor::Latch::Buffer
MinorBuffer< Data > Buffer
Definition: buffers.hh:218
std::deque< ElemType >
Minor::MinorBuffer::reportLeft
int reportLeft
The range of elements that should appear in trace lines.
Definition: buffers.hh:156
logging.hh
TimeBuffer< Data >::wire
friend class wire
Definition: timebuf.hh:55
Cycles
Cycles is a wrapper class for representing cycle counts, i.e.
Definition: types.hh:83
Minor::MinorBuffer::dataName
std::string dataName
Name to use for the data in a MinorTrace line.
Definition: buffers.hh:159
Minor::InputBuffer::front
ElemType & front()
Definition: buffers.hh:604
Minor::NoBubbleTraits
...
Definition: buffers.hh:115
Minor::ReportTraitsPtrAdaptor::reportData
static void reportData(std::ostream &os, const PtrType &elem)
Definition: buffers.hh:105
Minor::InputBuffer::unreservedRemainingSpace
unsigned int unreservedRemainingSpace()
Like remainingSpace but does not count reserved spaces.
Definition: buffers.hh:647
Minor::InputBuffer::empty
bool empty() const
No single element or queue entries.
Definition: buffers.hh:598
Minor::InputBuffer::minorTrace
void minorTrace() const
Report elements.
Definition: buffers.hh:634
TimeBuffer< ElemType >::data
char * data
Definition: timebuf.hh:45
Minor::ReportIF::~ReportIF
virtual ~ReportIF()
Definition: buffers.hh:70
TimeBuffer::advance
void advance()
Definition: timebuf.hh:176
Named::name
const std::string & name() const
Definition: trace.hh:156
trace.hh
Minor::MinorBuffer::reportRight
int reportRight
Definition: buffers.hh:156
Minor::BubbleTraitsPtrAdaptor::bubble
static PtrType bubble()
Definition: buffers.hh:145
Minor::Queue::queue
std::deque< ElemType > queue
Definition: buffers.hh:400
Minor::BubbleIF
Interface class for data with 'bubble' values.
Definition: buffers.hh:77
Minor::SelfStallingPipeline::front
const ElemType & front() const
Definition: buffers.hh:337
Minor::InputBuffer::freeReservation
void freeReservation()
Free a reserved slot.
Definition: buffers.hh:643
Minor::Queue::clearReservedSpace
void clearReservedSpace()
Clear all allocated space.
Definition: buffers.hh:441
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
TimeBuffer::getWire
wire getWire(int idx)
Definition: timebuf.hh:229
Minor::ReportTraitsAdaptor::reportData
static void reportData(std::ostream &os, const ElemType &elem)
Definition: buffers.hh:94
Minor::BubbleTraitsAdaptor::bubble
static ElemType bubble()
Definition: buffers.hh:134

Generated on Wed Sep 30 2020 14:02:08 for gem5 by doxygen 1.8.17