gem5  v20.1.0.0
vcd.cc
Go to the documentation of this file.
1 /*
2  * Copyright 2018 Google, Inc.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met: redistributions of source code must retain the above copyright
7  * notice, this list of conditions and the following disclaimer;
8  * redistributions in binary form must reproduce the above copyright
9  * notice, this list of conditions and the following disclaimer in the
10  * documentation and/or other materials provided with the distribution;
11  * neither the name of the copyright holders nor the names of its
12  * contributors may be used to endorse or promote products derived from
13  * this software without specific prior written permission.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #include "systemc/utils/vcd.hh"
29 
30 #include <ctime>
31 #include <iomanip>
32 
33 #include "base/bitfield.hh"
34 #include "base/cprintf.hh"
49 
50 namespace sc_gem5
51 {
52 
53 namespace
54 {
55 
56 std::string
57 cleanName(std::string name)
58 {
59  for (int i = 0; i < name.length(); i++) {
60  if (name[i] == '[')
61  name[i] = '(';
62  else if (name[i] == ']')
63  name[i] = ')';
64  }
65  return name;
66 }
67 
68 } // anonymous namespace
69 
71 {
72  protected:
73  std::string _vcdName;
74 
75  const char *
76  stripLeadingBits(const char *orig)
77  {
78  const char first = orig[0];
79 
80  if (first != 'z' && first != 'x' && first != '0')
81  return orig;
82 
83  const char *res = orig;
84  while (*++res == first) {}
85 
86  if (first != '0' || *res != '1')
87  res--;
88 
89  return res;
90  }
91 
92  char
94  {
95  switch (in) {
96  case 'U':
97  case 'X':
98  case 'W':
99  case 'D':
100  return 'x';
101  case '0':
102  case 'L':
103  return '0';
104  case '1':
105  case 'H':
106  return '1';
107  case 'Z':
108  return 'z';
109  default:
110  return '?';
111  }
112  }
113 
114  void
115  printVal(std::ostream &os, const std::string &rep)
116  {
117  switch (width()) {
118  case 0:
119  return;
120  case 1:
121  os << rep << vcdName() << std::endl;;
122  return;
123  default:
124  os << "b" << stripLeadingBits(rep.c_str()) << " " <<
125  vcdName() << std::endl;
126  return;
127  }
128  }
129 
130  public:
133 
134  void vcdName(const std::string &vcd_name) { _vcdName = vcd_name; }
135  const std::string &vcdName() { return _vcdName; }
136  virtual std::string vcdType() { return "wire"; }
137 
138  virtual void output(std::ostream &os) = 0;
139 };
140 
141 void
142 VcdTraceScope::addValue(const std::string &name, VcdTraceValBase *value)
143 {
144  size_t pos = name.find_first_of('.');
145  if (pos == std::string::npos) {
146  values.emplace_back(name, value);
147  } else {
148  std::string sname = name.substr(0, pos);
149  auto it = scopes.find(sname);
150  if (it == scopes.end())
151  it = scopes.emplace(sname, new VcdTraceScope).first;
152  it->second->addValue(name.substr(pos + 1), value);
153  }
154 }
155 
156 void
157 VcdTraceScope::output(const std::string &name, std::ostream &os)
158 {
159  os << "$scope module " << name << " $end" << std::endl;
160 
161  for (auto &p: values) {
162  const std::string &name = p.first;
163  VcdTraceValBase *value = p.second;
164 
165  int w = value->width();
166  if (w <= 0) {
167  std::string msg = csprintf("'%s' has 0 bits", name);
168  // The typo in this error message is intentional to match the
169  // Accellera output.
170  SC_REPORT_ERROR("(E710) object cannot not be traced", msg.c_str());
171  return;
172  }
173 
174  std::string clean_name = cleanName(name);
175  if (w == 1) {
176  ccprintf(os, "$var %s % 3d %s %s $end\n",
177  value->vcdType(), w, value->vcdName(), clean_name);
178  } else {
179  ccprintf(os, "$var %s % 3d %s %s [%d:0] $end\n",
180  value->vcdType(), w, value->vcdName(), clean_name, w - 1);
181  }
182  }
183 
184  for (auto &p: scopes)
185  p.second->output(p.first, os);
186 
187  os << "$upscope $end" << std::endl;
188 }
189 
190 template <typename T>
191 class VcdTraceVal : public TraceVal<T, VcdTraceValBase>
192 {
193  public:
194  typedef T TracedType;
195 
196  VcdTraceVal(const T* t, const std::string &vcd_name, int width) :
198  {
199  this->vcdName(vcd_name);
200  }
201 };
202 
203 std::string
205 {
206  std::string name(_nextName);
207 
208  bool carry = false;
209  int pos = NextNameChars - 1;
210  do {
211  carry = (_nextName[pos] == 'z');
212  if (carry)
213  _nextName[pos--] = 'a';
214  else
215  _nextName[pos--]++;
216  } while (carry && pos >= 0);
217 
218  return name;
219 }
220 
221 void
223 {
224  finalizeTime();
225 
226  // Date.
227  stream() << "$date" << std::endl;
228  time_t long_time;
229  time(&long_time);
230  struct tm *p_tm = localtime(&long_time);
231  stream() << std::put_time(p_tm, " %b %d, %Y %H:%M:%S\n");
232  stream() << "$end" << std::endl << std::endl;
233 
234  // Version.
235  stream() << "$version" << std::endl;
236  stream() << " " << ::sc_core::sc_version() << std::endl;
237  stream() << "$end" << std::endl << std::endl;
238 
239  // Timescale.
240  stream() << "$timescale" << std::endl;
242  std::endl;
243  stream() << "$end" << std::endl << std::endl;
244 
245  for (auto tv: traceVals)
246  tv->finalize();
247 
248  topScope.output("SystemC", stream());
249 
250  stream() << "$enddefinitions $end" << std::endl << std::endl;
251 
252  Tick now = scheduler.getCurTick();
253 
254  std::string timedump_comment =
255  csprintf("All initial values are dumped below at time "
256  "%g sec = %g timescale units.",
257  static_cast<double>(now) / SimClock::Float::s,
258  static_cast<double>(now / timeUnitTicks));
259  writeComment(timedump_comment);
260 
262 
263  stream() << "$dumpvars" << std::endl;
264  for (auto tv: traceVals)
265  tv->output(stream());
266  stream() << "$end" << std::endl << std::endl;
267 
268  initialized = true;
269 }
270 
272 {
273  for (auto tv: traceVals)
274  delete tv;
275  traceVals.clear();
276 
277  if (timeUnitTicks)
279 }
280 
281 void
283 {
284  if (!delta)
285  deltasAtNow = 0;
286 
287  uint64_t deltaOffset = deltasAtNow;
288 
289  if (delta)
290  deltaOffset = deltasAtNow++;
291 
292  if (_traceDeltas != delta)
293  return;
294 
295  if (!initialized) {
296  initialize();
297  return;
298  }
299 
300  Tick now = scheduler.getCurTick() / timeUnitTicks + deltaOffset;
301 
302  if (now <= lastPrintedTime) {
303  // TODO warn about reversed time?
304  return;
305  }
306 
307  bool time_printed = false;
308  for (auto tv: traceVals) {
309  if (tv->check()) {
310  if (!time_printed) {
311  lastPrintedTime = now;
312  ccprintf(stream(), "#%u\n", now);
313  time_printed = true;
314  }
315 
316  tv->output(stream());
317  }
318  }
319  if (time_printed)
320  stream() << std::endl;
321 }
322 
323 class VcdTraceValBool : public VcdTraceVal<bool>
324 {
325  public:
327 
328  void
329  output(std::ostream &os) override
330  {
331  printVal(os, this->value() ? "1" : "0");
332  }
333 };
334 
335 void
336 VcdTraceFile::addTraceVal(const bool *v, const std::string &name)
337 {
338  addNewTraceVal<VcdTraceValBool>(v, name);
339 }
340 
341 template <typename T>
342 class VcdTraceValFloat : public VcdTraceVal<T>
343 {
344  public:
346 
347  std::string vcdType() override { return "real"; }
348 
349  void
350  output(std::ostream &os) override
351  {
352  ccprintf(os, "r%.16g %s\n", this->value(), this->vcdName());
353  }
354 };
355 
356 void
357 VcdTraceFile::addTraceVal(const float *v, const std::string &name)
358 {
359  addNewTraceVal<VcdTraceValFloat<float>>(v, name);
360 }
361 void
362 VcdTraceFile::addTraceVal(const double *v, const std::string &name)
363 {
364  addNewTraceVal<VcdTraceValFloat<double>>(v, name);
365 }
366 
367 class VcdTraceValScLogic : public VcdTraceVal<sc_dt::sc_logic>
368 {
369  public:
371 
372  void
373  output(std::ostream &os) override
374  {
375  char str[2] = {
376  scLogicToVcdState(value().to_char()),
377  '\0'
378  };
379  printVal(os, str);
380  }
381 };
382 
383 void
384 VcdTraceFile::addTraceVal(const sc_dt::sc_logic *v, const std::string &name)
385 {
386  addNewTraceVal<VcdTraceValScLogic>(v, name);
387 }
388 
389 template <typename T>
391 {
392  public:
394 
395  void
396  finalize() override
397  {
399  this->_width = this->value().length();
400  }
401 
402  void
403  output(std::ostream &os) override
404  {
405  std::string str;
406  const int w = this->width();
407 
408  str.reserve(w);
409  for (int i = w - 1; i >= 0; i--)
410  str += this->value()[i].to_bool() ? '1' : '0';
411 
412  this->printVal(os, str);
413  }
414 };
415 
416 void
418  const std::string &name)
419 {
420  addNewTraceVal<VcdTraceValFinite<sc_dt::sc_int_base>>(v, name);
421 }
422 void
424  const std::string &name)
425 {
426  addNewTraceVal<VcdTraceValFinite<sc_dt::sc_uint_base>>(v, name);
427 }
428 
429 void
431 {
432  addNewTraceVal<VcdTraceValFinite<sc_dt::sc_signed>>(v, name);
433 }
434 void
436  const std::string &name)
437 {
438  addNewTraceVal<VcdTraceValFinite<sc_dt::sc_unsigned>>(v, name);
439 }
440 
441 template <typename T>
442 class VcdTraceValLogic : public VcdTraceVal<T>
443 {
444  public:
446 
447  void
448  finalize() override
449  {
451  this->_width = this->value().length();
452  }
453 
454  void
455  output(std::ostream &os) override
456  {
457  this->printVal(os, this->value().to_string());
458  }
459 };
460 
461 void
463 {
464  addNewTraceVal<VcdTraceValLogic<::sc_dt::sc_bv_base>>(v, name);
465 }
466 void
468 {
469  addNewTraceVal<VcdTraceValLogic<::sc_dt::sc_lv_base>>(v, name);
470 }
471 
472 template <typename T>
473 class VcdTraceValFxval : public VcdTraceVal<T>
474 {
475  public:
477 
478  std::string vcdType() override { return "real"; }
479 
480  void
481  output(std::ostream &os) override
482  {
483  ccprintf(os, "r%.16g %s\n",
484  this->value().to_double(), this->vcdName());
485  }
486 };
487 
488 void
489 VcdTraceFile::addTraceVal(const sc_dt::sc_fxval *v, const std::string &name)
490 {
491  addNewTraceVal<VcdTraceValFxval<sc_dt::sc_fxval>>(v, name);
492 }
493 void
495  const std::string &name)
496 {
497  addNewTraceVal<VcdTraceValFxval<sc_dt::sc_fxval_fast>>(v, name);
498 }
499 
500 template <typename T>
501 class VcdTraceValFxnum : public VcdTraceVal<T>
502 {
503  public:
505 
506  void
507  output(std::ostream &os) override
508  {
509  std::string str;
510  const int w = this->width();
511 
512  str.reserve(w);
513  for (int i = w - 1; i >= 0; i--)
514  str += this->value()[i] ? '1' : '0';
515 
516  this->printVal(os, str);
517  }
518 };
519 
520 void
521 VcdTraceFile::addTraceVal(const sc_dt::sc_fxnum *v, const std::string &name)
522 {
523  addNewTraceVal<VcdTraceValFxnum<::sc_dt::sc_fxnum>>(v, name);
524 }
525 void
527  const std::string &name)
528 {
529  addNewTraceVal<VcdTraceValFxnum<::sc_dt::sc_fxnum_fast>>(v, name);
530 }
531 
532 class VcdTraceValEvent : public VcdTraceVal<::sc_core::sc_event>
533 {
534  public:
536 
537  std::string vcdType() override { return "event"; }
538 
539  void
540  output(std::ostream &os) override
541  {
542  if (value())
543  printVal(os, "1");
544  else
545  os << std::endl;
546  }
547 };
548 
549 void
551 {
552  addNewTraceVal<VcdTraceValEvent>(v, name);
553 }
554 
555 class VcdTraceValTime : public VcdTraceVal<::sc_core::sc_time>
556 {
557  private:
558  static const int TimeWidth = 64;
559 
560  public:
562 
563  std::string vcdType() override { return "time"; }
564 
565  void
566  finalize() override
567  {
569  _width = TimeWidth;
570  }
571 
572  void
573  output(std::ostream &os) override
574  {
575  char str[TimeWidth + 1];
576  str[TimeWidth] = '\0';
577 
578  const uint64_t val = value().value();
579  for (int i = 0; i < TimeWidth; i++)
580  str[i] = ::bits(val, TimeWidth - i - 1) ? '1' : '0';
581 
582  printVal(os, str);
583  }
584 };
585 void
587 {
588  addNewTraceVal<VcdTraceValTime>(v, name);
589 }
590 
591 template <typename T>
592 class VcdTraceValInt : public VcdTraceVal<T>
593 {
594  public:
596 
597  void
598  output(std::ostream &os) override
599  {
600  const int w = this->width();
601  char str[w + 1];
602  str[w] = '\0';
603 
604  const uint64_t val =
605  static_cast<uint64_t>(this->value()) & ::mask(sizeof(T) * 8);
606 
607  if (::mask(w) < val) {
608  for (int i = 0; i < w; i++)
609  str[i] = 'x';
610  } else {
611  for (int i = 0; i < w; i++)
612  str[i] = ::bits(val, w - i - 1) ? '1' : '0';
613  }
614 
615  this->printVal(os, str);
616  }
617 };
618 
619 void
620 VcdTraceFile::addTraceVal(const unsigned char *v, const std::string &name,
621  int width)
622 {
623  addNewTraceVal<VcdTraceValInt<unsigned char>>(v, name, width);
624 }
625 void
626 VcdTraceFile::addTraceVal(const char *v, const std::string &name, int width)
627 {
628  addNewTraceVal<VcdTraceValInt<char>>(v, name, width);
629 }
630 void
631 VcdTraceFile::addTraceVal(const unsigned short *v, const std::string &name,
632  int width)
633 {
634  addNewTraceVal<VcdTraceValInt<unsigned short>>(v, name, width);
635 }
636 void
637 VcdTraceFile::addTraceVal(const short *v, const std::string &name, int width)
638 {
639  addNewTraceVal<VcdTraceValInt<short>>(v, name, width);
640 }
641 void
642 VcdTraceFile::addTraceVal(const unsigned int *v, const std::string &name,
643  int width)
644 {
645  addNewTraceVal<VcdTraceValInt<unsigned int>>(v, name, width);
646 }
647 void
648 VcdTraceFile::addTraceVal(const int *v, const std::string &name, int width)
649 {
650  addNewTraceVal<VcdTraceValInt<int>>(v, name, width);
651 }
652 void
653 VcdTraceFile::addTraceVal(const unsigned long *v, const std::string &name,
654  int width)
655 {
656  addNewTraceVal<VcdTraceValInt<unsigned long>>(v, name, width);
657 }
658 void
659 VcdTraceFile::addTraceVal(const long *v, const std::string &name, int width)
660 {
661  addNewTraceVal<VcdTraceValInt<long>>(v, name, width);
662 }
663 
664 void
665 VcdTraceFile::addTraceVal(const sc_dt::int64 *v, const std::string &name,
666  int width)
667 {
668  addNewTraceVal<VcdTraceValInt<sc_dt::int64>>(v, name, width);
669 }
670 void
671 VcdTraceFile::addTraceVal(const sc_dt::uint64 *v, const std::string &name,
672  int width)
673 {
674  addNewTraceVal<VcdTraceValInt<sc_dt::uint64>>(v, name, width);
675 }
676 
677 void
678 VcdTraceFile::addTraceVal(const unsigned int *v, const std::string &name,
679  const char **literals)
680 {
681  uint64_t count = 0;
682  while (*literals++)
683  count++;
684 
685  int bits = 0;
686  while (count >> bits)
687  bits++;
688 
689  addNewTraceVal<VcdTraceValInt<unsigned int>>(v, name, bits);
690 }
691 
692 void
693 VcdTraceFile::writeComment(const std::string &comment)
694 {
695  stream() << "$comment" << std::endl;
696  stream() << comment << std::endl;
697  stream() << "$end" << std::endl << std::endl;
698 }
699 
700 } // namespace sc_gem5
sc_gem5::VcdTraceValBase::printVal
void printVal(std::ostream &os, const std::string &rep)
Definition: vcd.cc:115
sc_gem5::TraceValBase
Definition: tracefile.hh:46
sc_fxnum.hh
sc_core::sc_time::from_value
static sc_time from_value(sc_dt::uint64)
Definition: sc_time.cc:210
SimClock::Float::s
double s
These variables equal the number of ticks in the unit of time they're named after in a double.
Definition: core.cc:49
sc_gem5::VcdTraceScope::scopes
std::map< std::string, VcdTraceScope * > scopes
Definition: vcd.hh:44
sc_gem5::VcdTraceValTime::output
void output(std::ostream &os) override
Definition: vcd.cc:573
X86ISA::os
Bitfield< 17 > os
Definition: misc.hh:803
sc_gem5::VcdTraceValBase::vcdName
const std::string & vcdName()
Definition: vcd.cc:135
sc_gem5::VcdTraceFile::initialize
void initialize()
Definition: vcd.cc:222
sc_gem5::VcdTraceVal
Definition: vcd.cc:191
sc_gem5::VcdTraceValEvent::vcdType
std::string vcdType() override
Definition: vcd.cc:537
sc_gem5::VcdTraceValBase::scLogicToVcdState
char scLogicToVcdState(char in)
Definition: vcd.cc:93
sc_gem5::VcdTraceValBase::output
virtual void output(std::ostream &os)=0
ArmISA::i
Bitfield< 7 > i
Definition: miscregs_types.hh:63
sc_gem5::VcdTraceValLogic::finalize
void finalize() override
Definition: vcd.cc:448
sc_gem5::TraceFile::finalizeTime
void finalizeTime()
Definition: tracefile.cc:75
sc_gem5::VcdTraceValInt
Definition: vcd.cc:592
sc_gem5::TraceVal< bool, VcdTraceValBase >::value
const bool & value()
Definition: tracefile.hh:74
sc_gem5::VcdTraceValTime::TimeWidth
static const int TimeWidth
Definition: vcd.cc:558
sc_gem5::VcdTraceFile::nextSignalName
std::string nextSignalName()
Definition: vcd.cc:204
ArmISA::width
Bitfield< 4 > width
Definition: miscregs_types.hh:68
sc_int_base.hh
sc_dt::sc_fxnum_fast
Definition: sc_fxnum.hh:844
sc_gem5::VcdTraceValBase::stripLeadingBits
const char * stripLeadingBits(const char *orig)
Definition: vcd.cc:76
sc_dt::sc_fxval
Definition: sc_fxval.hh:86
sc_dt::to_string
const std::string to_string(sc_enc enc)
Definition: sc_fxdefs.cc:91
sc_dt::sc_bv_base
Definition: sc_bv_base.hh:105
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
sc_gem5::Scheduler::getCurTick
Tick getCurTick()
Definition: scheduler.hh:228
sc_dt::sc_int_base
Definition: sc_int_base.hh:494
sc_gem5::VcdTraceValFxnum::output
void output(std::ostream &os) override
Definition: vcd.cc:507
sc_gem5::VcdTraceFile::trace
void trace(bool delta) override
Definition: vcd.cc:282
sc_gem5::VcdTraceFile::deltasAtNow
uint64_t deltasAtNow
Definition: vcd.hh:55
functions.hh
sc_bv_base.hh
sc_gem5::VcdTraceValFxval::output
void output(std::ostream &os) override
Definition: vcd.cc:481
X86ISA::count
count
Definition: misc.hh:703
sc_dt::sc_signed
Definition: sc_signed.hh:984
sc_dt::sc_logic
Definition: sc_logic.hh:130
sc_gem5::VcdTraceFile::~VcdTraceFile
~VcdTraceFile()
Definition: vcd.cc:271
sc_gem5::TraceFile::timeUnitTicks
uint64_t timeUnitTicks
Definition: tracefile.hh:194
sc_event.hh
sc_gem5::TraceValBase::width
int width()
Definition: tracefile.hh:55
sc_gem5::VcdTraceFile::_nextName
char _nextName[NextNameChars+1]
Definition: vcd.hh:58
sc_gem5::VcdTraceVal::VcdTraceVal
VcdTraceVal(const T *t, const std::string &vcd_name, int width)
Definition: vcd.cc:196
sc_gem5::VcdTraceValScLogic::output
void output(std::ostream &os) override
Definition: vcd.cc:373
bitfield.hh
SC_REPORT_ERROR
#define SC_REPORT_ERROR(msg_type, msg)
Definition: sc_report_handler.hh:127
sc_gem5::VcdTraceScope::output
void output(const std::string &name, std::ostream &os)
Definition: vcd.cc:157
sc_dt::uint64
uint64_t uint64
Definition: sc_nbdefs.hh:206
sc_gem5::VcdTraceValEvent::output
void output(std::ostream &os) override
Definition: vcd.cc:540
MipsISA::w
Bitfield< 0 > w
Definition: pra_constants.hh:278
sc_gem5::VcdTraceValFxval
Definition: vcd.cc:473
sc_gem5::VcdTraceValBase::vcdName
void vcdName(const std::string &vcd_name)
Definition: vcd.cc:134
sc_gem5::VcdTraceValLogic
Definition: vcd.cc:442
sc_gem5::VcdTraceFile::NextNameChars
static const int NextNameChars
Definition: vcd.hh:57
sc_core::sc_event
Definition: sc_event.hh:169
sc_gem5::TraceFile::_traceDeltas
bool _traceDeltas
Definition: tracefile.hh:198
sc_gem5::VcdTraceValBase::VcdTraceValBase
VcdTraceValBase(int width)
Definition: vcd.cc:131
sc_main.hh
sc_gem5::VcdTraceValFinite::output
void output(std::ostream &os) override
Definition: vcd.cc:403
sc_core::sc_time
Definition: sc_time.hh:49
sc_core::sc_time::value
sc_dt::uint64 value() const
Definition: sc_time.cc:115
sc_dt::sc_fxnum
Definition: sc_fxnum.hh:483
sc_gem5::VcdTraceValFinite
Definition: vcd.cc:390
sc_uint_base.hh
sc_gem5::TraceVal< T, VcdTraceValBase >::finalize
void finalize() override
Definition: tracefile.hh:73
sc_core::sc_version
const char * sc_version()
Definition: functions.cc:44
cprintf.hh
sc_gem5::VcdTraceValFloat
Definition: vcd.cc:342
sc_gem5::VcdTraceValBase::_vcdName
std::string _vcdName
Definition: vcd.cc:73
sc_gem5::VcdTraceValTime::finalize
void finalize() override
Definition: vcd.cc:566
sc_dt::int64
int64_t int64
Definition: sc_nbdefs.hh:205
sc_gem5::VcdTraceFile::lastPrintedTime
Tick lastPrintedTime
Definition: vcd.hh:54
sc_gem5::VcdTraceValFinite::finalize
void finalize() override
Definition: vcd.cc:396
sc_gem5::VcdTraceFile::addTraceVal
void addTraceVal(const bool *v, const std::string &name) override
Definition: vcd.cc:336
X86ISA::val
Bitfield< 63 > val
Definition: misc.hh:769
sc_gem5::VcdTraceFile::writeComment
void writeComment(const std::string &comment) override
Definition: vcd.cc:693
sc_gem5::VcdTraceValBase::vcdType
virtual std::string vcdType()
Definition: vcd.cc:136
sc_gem5::VcdTraceScope
Definition: vcd.hh:40
name
const std::string & name()
Definition: trace.cc:50
sc_dt::sc_uint_base
Definition: sc_uint_base.hh:465
sc_gem5::VcdTraceValLogic::output
void output(std::ostream &os) override
Definition: vcd.cc:455
sc_gem5::VcdTraceValEvent
Definition: vcd.cc:532
sc_gem5::VcdTraceValFloat::output
void output(std::ostream &os) override
Definition: vcd.cc:350
sc_signed.hh
sc_dt::sc_lv_base
Definition: sc_lv_base.hh:118
sc_gem5::VcdTraceScope::values
std::vector< std::pair< std::string, VcdTraceValBase * > > values
Definition: vcd.hh:43
sc_unsigned.hh
sc_gem5::TraceFile::stream
std::ostream & stream()
Definition: tracefile.cc:53
vcd.hh
sc_dt::sc_fxval_fast
Definition: sc_fxval.hh:376
X86ISA::rep
Bitfield< 6 > rep
Definition: types.hh:76
sc_gem5::VcdTraceValFxval::vcdType
std::string vcdType() override
Definition: vcd.cc:478
sc_gem5::VcdTraceValScLogic
Definition: vcd.cc:367
sc_dt::sc_unsigned
Definition: sc_unsigned.hh:890
sc_gem5::VcdTraceValTime
Definition: vcd.cc:555
sc_gem5::VcdTraceFile::initialized
bool initialized
Definition: vcd.hh:61
ccprintf
void ccprintf(cp::Print &print)
Definition: cprintf.hh:127
sc_gem5::VcdTraceValFloat::vcdType
std::string vcdType() override
Definition: vcd.cc:347
sc_gem5::VcdTraceValBool::output
void output(std::ostream &os) override
Definition: vcd.cc:329
sc_gem5::TraceVal< T, VcdTraceValBase >::t
const T * t
Definition: tracefile.hh:65
sc_gem5
Definition: sc_clock.cc:42
sc_gem5::TraceVal
Definition: tracefile.hh:62
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
sc_gem5::VcdTraceValBase::~VcdTraceValBase
~VcdTraceValBase()
Definition: vcd.cc:132
sc_gem5::scheduler
Scheduler scheduler
Definition: scheduler.cc:489
sc_gem5::VcdTraceScope::addValue
void addValue(const std::string &name, VcdTraceValBase *value)
Definition: vcd.cc:142
sc_gem5::VcdTraceFile::traceVals
std::vector< VcdTraceValBase * > traceVals
Definition: vcd.hh:64
sc_lv_base.hh
sc_gem5::TraceValBase::_width
int _width
Definition: tracefile.hh:49
sc_gem5::VcdTraceValInt::output
void output(std::ostream &os) override
Definition: vcd.cc:598
sc_time.hh
sc_logic.hh
sc_fxval.hh
csprintf
std::string csprintf(const char *format, const Args &...args)
Definition: cprintf.hh:158
scheduler.hh
ArmISA::v
Bitfield< 28 > v
Definition: miscregs_types.hh:51
sc_gem5::VcdTraceValBase
Definition: vcd.cc:70
sc_gem5::VcdTraceValBool
Definition: vcd.cc:323
sc_gem5::VcdTraceValFxnum
Definition: vcd.cc:501
sc_gem5::VcdTraceVal::TracedType
T TracedType
Definition: vcd.cc:194
sc_gem5::VcdTraceFile::topScope
VcdTraceScope topScope
Definition: vcd.hh:65
ArmISA::mask
Bitfield< 28, 24 > mask
Definition: miscregs_types.hh:711
sc_gem5::VcdTraceValTime::vcdType
std::string vcdType() override
Definition: vcd.cc:563
bits
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Definition: bitfield.hh:75

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