simulavr
1.1.0
|
#include <traceval.h>
Public Member Functions | |
DumpVCD (std::ostream *os, const std::string &tscale="ns", const bool rstrobes=false, const bool wstrobes=false) | |
Create tracer with time scale tscale and output os. More... | |
DumpVCD (const std::string &name, const std::string &tscale="ns", const bool rstrobes=false, const bool wstrobes=false) | |
Create tracer with time scale tscale for output file name. More... | |
void | setActiveSignals (const TraceSet &act) |
void | start () |
Writes header stuff and the initial state. More... | |
void | stop () |
Writes a last time marker. More... | |
void | cycle () |
Writes next clock cycle and resets all RS and WS states. More... | |
void | markRead (const TraceValue *t) |
void | markWrite (const TraceValue *t) |
void | markChange (const TraceValue *t) |
bool | enabled (const TraceValue *t) const |
Returns true iff tracing a particular value is enabled. More... | |
~DumpVCD () | |
![]() | |
virtual void | markReadUnknown (const TraceValue *t) |
virtual | ~Dumper () |
Destructor, called for all dumpers at the very end of the run. More... | |
Private Member Functions | |
void | valout (const TraceValue *v) |
void | flushbuffer (void) |
writes content of osbuffer to os and empty osbuffer afterwards More... | |
Private Attributes | |
TraceSet | tv |
std::map< const TraceValue *, size_t > | id2num |
const std::string | tscale |
const bool | rs |
const bool | ws |
bool | changesWritten |
std::vector< int > | marked |
std::ostream * | os |
std::stringstream | osbuffer |
Produces value change dump files.
Definition at line 285 of file traceval.h.
DumpVCD::DumpVCD | ( | std::ostream * | os, |
const std::string & | tscale = "ns" , |
||
const bool | rstrobes = false , |
||
const bool | wstrobes = false |
||
) |
Create tracer with time scale tscale and output os.
Definition at line 420 of file traceval.cpp.
DumpVCD::DumpVCD | ( | const std::string & | name, |
const std::string & | tscale = "ns" , |
||
const bool | rstrobes = false , |
||
const bool | wstrobes = false |
||
) |
Create tracer with time scale tscale for output file name.
Definition at line 431 of file traceval.cpp.
DumpVCD::~DumpVCD | ( | ) |
Definition at line 562 of file traceval.cpp.
References DumpManager::_devidx, DumpManager::_instance, and os.
|
virtual |
Writes next clock cycle and resets all RS and WS states.
Reimplemented from Dumper.
Definition at line 507 of file traceval.cpp.
References changesWritten, flushbuffer(), SystemClock::GetCurrentTime(), SystemClock::Instance(), marked, and osbuffer.
Referenced by DumpManager::cycle().
|
virtual |
Returns true iff tracing a particular value is enabled.
FIXME: For a lot of values to trace, checking enabled() each time by doing find on a map() could be slow. Here is potential for more optimization!
Implements Dumper.
Definition at line 558 of file traceval.cpp.
References id2num.
Referenced by DumpManager::cycle().
|
private |
writes content of osbuffer to os and empty osbuffer afterwards
Definition at line 412 of file traceval.cpp.
|
virtual |
This will produce a change in the value CHANGE dump file :-)
Reimplemented from Dumper.
Definition at line 552 of file traceval.cpp.
References changesWritten, id2num, osbuffer, rs, valout(), and ws.
|
virtual |
Iff rstrobes is true, this will mark reads on a special R-strobe signal line.
Reimplemented from Dumper.
Definition at line 534 of file traceval.cpp.
References changesWritten, id2num, marked, osbuffer, rs, and ws.
|
virtual |
Iff wstrobes is true, this will mark writes on a special W-strobe signal line .
Reimplemented from Dumper.
Definition at line 544 of file traceval.cpp.
References changesWritten, id2num, marked, osbuffer, rs, and ws.
|
virtual |
|
virtual |
Writes header stuff and the initial state.
Reimplemented from Dumper.
Definition at line 453 of file traceval.cpp.
References changesWritten, flushbuffer(), os, osbuffer, rs, tscale, tv, valout(), and ws.
Referenced by DumpManager::start().
|
virtual |
Writes a last time marker.
Reimplemented from Dumper.
Definition at line 523 of file traceval.cpp.
References flushbuffer(), SystemClock::GetCurrentTime(), SystemClock::Instance(), and os.
|
private |
Definition at line 405 of file traceval.cpp.
References TraceValue::bits(), and TraceValue::VcdBit().
Referenced by markChange(), and start().
|
private |
Definition at line 326 of file traceval.h.
Referenced by cycle(), markChange(), markRead(), markWrite(), and start().
|
private |
Definition at line 323 of file traceval.h.
Referenced by enabled(), markChange(), markRead(), markWrite(), and setActiveSignals().
|
private |
Definition at line 329 of file traceval.h.
Referenced by cycle(), markRead(), and markWrite().
|
private |
Definition at line 330 of file traceval.h.
Referenced by start(), stop(), and ~DumpVCD().
|
private |
Definition at line 333 of file traceval.h.
Referenced by cycle(), markChange(), markRead(), markWrite(), and start().
|
private |
Definition at line 325 of file traceval.h.
Referenced by markChange(), markRead(), markWrite(), and start().
|
private |
Definition at line 324 of file traceval.h.
Referenced by start().
|
private |
Definition at line 322 of file traceval.h.
Referenced by DumpManager::save(), setActiveSignals(), start(), and trace_direct().
|
private |
Definition at line 325 of file traceval.h.
Referenced by markChange(), markRead(), markWrite(), and start().