OpenASIP
2.0
|
#include <BusTracker.hh>
Public Member Functions | |
BusTracker (SimulatorFrontend &frontend, std::ostream *traceStream) | |
BusTracker (SimulatorFrontend &frontend, std::ostream &traceStream) | |
virtual | ~BusTracker () |
virtual void | handleEvent () |
Public Member Functions inherited from Listener | |
Listener () | |
virtual | ~Listener () |
virtual void | handleEvent (int event) |
Private Attributes | |
SimulatorFrontend & | frontend_ |
the simulator frontend used to access simulation data More... | |
bool | ownsTraceStream_ |
std::ostream * | traceStream_ |
Static Private Attributes | |
static const int | COLUMN_WIDTH |
static const std::string | COLUMN_SEPARATOR = "," |
Tracks the bus activity.
Stores bus data as hexadecimal numbers in a bus trace file in CSV format.
Definition at line 53 of file BusTracker.hh.
BusTracker::BusTracker | ( | SimulatorFrontend & | frontend, |
std::ostream * | traceStream | ||
) |
Constructor.
frontend | The SimulationFrontend which is used to access simulation data. |
traceStream | Output stream where the trace data is written to. Takes ownership of the stream. |
Definition at line 63 of file BusTracker.cc.
References SimulatorFrontend::eventHandler(), Informer::registerListener(), and SimulationEventHandler::SE_CYCLE_END.
BusTracker::BusTracker | ( | SimulatorFrontend & | frontend, |
std::ostream & | traceStream | ||
) |
Constructor.
frontend | The SimulationFrontend which is used to access simulation data. |
traceStream | Output stream where the trace data is written to. |
Definition at line 80 of file BusTracker.cc.
References SimulatorFrontend::eventHandler(), Informer::registerListener(), and SimulationEventHandler::SE_CYCLE_END.
|
virtual |
Destructor.
Definition at line 92 of file BusTracker.cc.
References SimulatorFrontend::eventHandler(), frontend_, ownsTraceStream_, SimulationEventHandler::SE_CYCLE_END, traceStream_, and Informer::unregisterListener().
|
virtual |
Writes bus trace data to the trace stream.
If any error happens while writing the data, aborts program with an error message.
Reimplemented from Listener.
Definition at line 108 of file BusTracker.cc.
References TTAMachine::Machine::busNavigator(), MachineState::busState(), COLUMN_SEPARATOR, TTAMachine::Machine::Navigator< ComponentType >::count(), SimulatorFrontend::cycleCount(), frontend_, SimValue::hexValue(), BusState::isSquashed(), TTAMachine::Machine::Navigator< ComponentType >::item(), SimulatorFrontend::machine(), SimulatorFrontend::machineState(), traceStream_, RegisterState::value(), and BusState::width().
|
staticprivate |
Definition at line 67 of file BusTracker.hh.
Referenced by handleEvent().
|
staticprivate |
Definition at line 66 of file BusTracker.hh.
|
private |
the simulator frontend used to access simulation data
Definition at line 69 of file BusTracker.hh.
Referenced by handleEvent(), and ~BusTracker().
|
private |
Definition at line 70 of file BusTracker.hh.
Referenced by ~BusTracker().
|
private |
Definition at line 71 of file BusTracker.hh.
Referenced by handleEvent(), and ~BusTracker().