|
ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
|
A simple logger dedicated to print PC trace. More...
#include <TracePrinter.h>


Public Member Functions | |
| TracePrinter (etiss::uint32 terminateAddr, bool printOnScreen=false, char terminateHit=1) | |
| ~TracePrinter () | |
| etiss::int32 | execute () |
| called before a block and may act in the same way as a block | |
| std::string | _getPluginName () const |
| void | init (ETISS_CPU *cpu, ETISS_System *system, etiss::CPUArch *arch) |
| this function is called before the plugin is used in the cpu execution loop (etiss::CPUCore::execute). | |
| void | cleanup () |
| this function is called after cpu execution loop (etiss::CPUCore::execute) finished. | |
Public Member Functions inherited from etiss::CoroutinePlugin | |
| CoroutinePlugin () | |
| virtual | ~CoroutinePlugin () |
| virtual void | executionEnd (int32_t code) |
| called when the simulation ends but before any deinitialization is done | |
| virtual bool | isActive () |
| indicates if the plugin will do something in execution loop. | |
Public Member Functions inherited from etiss::Plugin | |
| virtual | ~Plugin () |
| unsigned | getType () |
| InterruptListenerPlugin * | getInterruptListenerPlugin () |
| CoroutinePlugin * | getCoroutinePlugin () |
| SystemWrapperPlugin * | getSystemWrapperPlugin () |
| RegisterDevicePlugin * | getRegisterDevicePlugin () |
| TranslationPlugin * | getTranslationPlugin () |
| std::string | getPluginName () const |
| const std::string & | getLastAssignedCoreName () |
| std::string | toString () const |
Public Member Functions inherited from etiss::ToString | |
| ToString () | |
| virtual | ~ToString () |
Private Member Functions | |
| void | printLog () |
Private Attributes | |
| ETISS_CPU * | cpu_ |
| ETISS_System * | system_ |
| etiss::CPUArch * | arch_ |
| std::stringstream | pcTrace_ |
| char | hitTimes_ = 0 |
| bool | printOnScreen_ |
| const etiss::uint32 | terminateAddr_ |
| const char | terminateHit_ |
Additional Inherited Members | |
Static Public Attributes inherited from etiss::Plugin | |
| static const unsigned | INTERRUPTLISTENER = 1 << 0 |
| access to translated code | |
| static const unsigned | COROUTINE = 1 << 1 |
| callback after execution of each translated block | |
| static const unsigned | SYSTEMWRAPPER = 1 << 2 |
| can wrap/change ETISS_System structure at execution start | |
| static const unsigned | REGISTERDEVICE |
| gets noticed of changes to special registers (e.g. mmu register etc. [depends on architecture]) | |
| static const unsigned | TRANSLATION |
| access to translated code during translation phase or when instruction tree is built | |
Protected Member Functions inherited from etiss::Plugin | |
| Plugin (unsigned type=0) | |
| void | setCorrespondingCPUCoreName (std::string name) |
| virtual void | addedToCPUCore (etiss::CPUCore *core) |
| called as soon a plugin has been added to its CPUCore. | |
| virtual void | removedFromCPUCore (etiss::CPUCore *core) |
| called as soon a plugin has been removed from its CPUCore. | |
Protected Attributes inherited from etiss::Plugin | |
| ETISS_CPU * | plugin_cpu_ |
| holds a pointer to the cpu structure. will be set before init call and after cleanup call | |
| ETISS_System * | plugin_system_ |
| holds a pointer to the system structure. | |
| CPUArch * | plugin_arch_ |
| holds a pointer to the CPUArch instance. will be set before init call and after cleanup call | |
| CPUCore * | plugin_core_ |
| holds a pointer to the associated CPUCore instance. | |
A simple logger dedicated to print PC trace.
Most accurate when etiss.max_block_size in ETISS.ini is set to 1.
| terminateAddr | Terminate simulation when hit certain address |
| [Optional] | printOnScreen: Print PC on screen if true |
| [Optional] | terminateAddr:Terminate simulation only when hit the address *terminateHit* times. |
Definition at line 26 of file TracePrinter.h.
|
inline |
Definition at line 30 of file TracePrinter.h.
|
inline |
Definition at line 36 of file TracePrinter.h.
References printLog().

|
inlinevirtual |
Implements etiss::Plugin.
Definition at line 55 of file TracePrinter.h.
|
inlinevirtual |
this function is called after cpu execution loop (etiss::CPUCore::execute) finished.
Only the SystemWrapperPlugin::unwrap function is called AFTER Plugin::cleanup
Reimplemented from etiss::Plugin.
Definition at line 64 of file TracePrinter.h.
|
inlinevirtual |
called before a block and may act in the same way as a block
Implements etiss::CoroutinePlugin.
Definition at line 38 of file TracePrinter.h.
References cpu_, hitTimes_, ETISS_CPU::instructionPointer, pcTrace_, printLog(), printOnScreen_, terminateAddr_, and terminateHit_.

|
inlinevirtual |
this function is called before the plugin is used in the cpu execution loop (etiss::CPUCore::execute).
Only exception is the SystemWrapperPlugin whose SystemWrapperPlugin::wrap function is called BEFORE Plugin::init
Reimplemented from etiss::Plugin.
Definition at line 57 of file TracePrinter.h.
|
inlineprivate |
Definition at line 82 of file TracePrinter.h.
References pcTrace_.
Referenced by execute(), and ~TracePrinter().

|
private |
Definition at line 74 of file TracePrinter.h.
|
private |
Definition at line 72 of file TracePrinter.h.
|
private |
Definition at line 77 of file TracePrinter.h.
Referenced by execute().
|
private |
Definition at line 76 of file TracePrinter.h.
Referenced by execute(), and printLog().
|
private |
Definition at line 78 of file TracePrinter.h.
Referenced by execute().
|
private |
Definition at line 73 of file TracePrinter.h.
|
private |
Definition at line 79 of file TracePrinter.h.
Referenced by execute().
|
private |
Definition at line 80 of file TracePrinter.h.
Referenced by execute().