30 #ifndef __SYSTEMC_UTILS_TRACEFILE_HH__ 31 #define __SYSTEMC_UTILS_TRACEFILE_HH__ 60 virtual bool check() = 0;
63 template <
typename T,
typename Base=TraceValBase>
76 const T &
value() {
return oldVal; }
81 bool changed = (*t != oldVal);
87 template <
typename T,
typename Base>
91 const ::sc_core::sc_signal_in_if<T> *
iface;
96 Base(_width), iface(_iface), oldVal(iface->read())
100 void finalize()
override { oldVal = iface->read(); }
106 T newVal = iface->read();
107 bool changed = (newVal != oldVal);
113 template <
typename Base>
123 Base(_width), triggered(false), oldStamp(0),
124 event(
Event::getFromScEvent(_event))
129 void finalize()
override { oldStamp =
event->triggeredStamp(); }
134 uint64_t newStamp =
event->triggeredStamp();
135 triggered = (oldStamp != newStamp);
141 template <
typename T,
typename Base>
151 oldVal(_t->m_params.type_params(), _t->m_params.enc(),
152 _t->m_params.cast_switch(), 0)
168 bool changed = (*t != oldVal);
174 template <
typename Base>
183 template <
typename Base>
204 std::ostream &stream();
214 virtual void trace(
bool delta) = 0;
216 virtual void addTraceVal(
const bool *
v,
const std::string &
name) = 0;
217 virtual void addTraceVal(
const float *v,
const std::string &name) = 0;
218 virtual void addTraceVal(
const double *v,
const std::string &name) = 0;
221 const std::string &name) = 0;
223 const std::string &name) = 0;
225 const std::string &name) = 0;
227 const std::string &name) = 0;
229 const std::string &name) = 0;
231 const std::string &name) = 0;
233 const std::string &name) = 0;
235 const std::string &name) = 0;
237 const std::string &name) = 0;
239 const std::string &name) = 0;
241 const std::string &name) = 0;
244 const std::string &name) = 0;
246 const std::string &name) = 0;
248 virtual void addTraceVal(
const unsigned char *v,
249 const std::string &name,
int width) = 0;
250 virtual void addTraceVal(
const char *v,
const std::string &name,
252 virtual void addTraceVal(
const unsigned short *v,
253 const std::string &name,
int width) = 0;
254 virtual void addTraceVal(
const short *v,
const std::string &name,
256 virtual void addTraceVal(
const unsigned int *v,
257 const std::string &name,
int width) = 0;
258 virtual void addTraceVal(
const int *v,
const std::string &name,
260 virtual void addTraceVal(
const unsigned long *v,
261 const std::string &name,
int width) = 0;
262 virtual void addTraceVal(
const long *v,
const std::string &name,
266 const std::string &name,
int width) = 0;
268 const std::string &name,
int width) = 0;
270 virtual void addTraceVal(
const unsigned int *,
271 const std::string &name,
272 const char **literals) = 0;
274 virtual void writeComment(
const std::string &comment) = 0;
279 #endif // __SYSTEMC_UTILS_TRACEFILE_HH__
TraceValFxnumBase(const T *_t, int _width)
const std::string & name()
const ::sc_core::sc_signal_in_if< T > * iface
void traceDeltas(bool on)
TraceVal(const ::sc_core::sc_signal_in_if< T > *_iface, int _width)
::sc_core::sc_time_unit timeUnitUnit
TraceVal(const ::sc_core::sc_event *_event, int _width)
TraceVal(const T *_t, int _width)