28 #ifndef __SYSTEMC_UTILS_VCD_HH__ 29 #define __SYSTEMC_UTILS_VCD_HH__ 38 class VcdTraceValBase;
44 std::map<std::string, VcdTraceScope *>
scopes;
57 static const int NextNameChars = 5;
58 char _nextName[NextNameChars + 1];
59 std::string nextSignalName();
69 TraceFile(name +
".vcd"), lastPrintedTime(0), deltasAtNow(0),
72 _nextName[NextNameChars] =
'\0';
73 for (
int i = 0;
i < NextNameChars;
i++)
78 void trace(
bool delta)
override;
86 traceVals.push_back(tv);
90 void addTraceVal(
const bool *
v,
const std::string &
name)
override;
91 void addTraceVal(
const float *v,
const std::string &name)
override;
92 void addTraceVal(
const double *v,
const std::string &name)
override;
95 const std::string &name)
override;
97 const std::string &name)
override;
99 const std::string &name)
override;
101 const std::string &name)
override;
103 const std::string &name)
override;
105 const std::string &name)
override;
107 const std::string &name)
override;
109 const std::string &name)
override;
111 const std::string &name)
override;
113 const std::string &name)
override;
115 const std::string &name)
override;
118 const std::string &name)
override;
120 const std::string &name)
override;
122 void addTraceVal(
const unsigned char *v,
123 const std::string &name,
int width)
override;
124 void addTraceVal(
const char *v,
const std::string &name,
126 void addTraceVal(
const unsigned short *v,
127 const std::string &name,
int width)
override;
128 void addTraceVal(
const short *v,
const std::string &name,
130 void addTraceVal(
const unsigned int *v,
131 const std::string &name,
int width)
override;
132 void addTraceVal(
const int *v,
const std::string &name,
134 void addTraceVal(
const unsigned long *v,
135 const std::string &name,
int width)
override;
136 void addTraceVal(
const long *v,
const std::string &name,
140 const std::string &name,
int width)
override;
142 const std::string &name,
int width)
override;
144 void addTraceVal(
const unsigned int *,
const std::string &name,
145 const char **literals)
override;
147 void writeComment(
const std::string &comment)
override;
152 #endif // __SYSTEMC_UTILS_VCD_HH__
const std::string & name()
void addValue(const std::string &name, VcdTraceValBase *value)
std::vector< std::pair< std::string, VcdTraceValBase * > > values
void addNewTraceVal(const typename TV::TracedType *v, const std::string &name, int width=1)
void output(const std::string &name, std::ostream &os)
uint64_t Tick
Tick count type.
VcdTraceFile(const std::string &name)
std::map< std::string, VcdTraceScope * > scopes
std::vector< VcdTraceValBase * > traceVals