scc  2022.4.0
SystemC components library
scc::tracer_base Class Reference

base class for automatic tracer More...

#include <tracer_base.h>

Inheritance diagram for scc::tracer_base:
Collaboration diagram for scc::tracer_base:

Public Member Functions

 tracer_base (const sc_core::sc_module_name &nm)
 named constructor More...
 
 tracer_base (const sc_core::sc_module_name &nm, sc_core::sc_trace_file *tf, bool owned=true)
 named constructor with trace file More...
 
 ~tracer_base ()
 destructor
 
void set_trace_types (trace_types t)
 set the types to trace More...
 
const sc_core::sc_trace_file * get_trace_file () const
 get the tracefile used by this tracer More...
 
sc_core::sc_trace_file * get_trace_file ()
 
void set_trace_file (sc_core::sc_trace_file *trf)
 set the trace file of this tracer More...
 

Protected Member Functions

virtual void descend (const sc_core::sc_object *, bool trace_all)
 

Static Protected Member Functions

static std::string get_name ()
 
static void try_trace (sc_core::sc_trace_file *trace_file, const sc_core::sc_object *object, trace_types t)
 

Protected Attributes

bool default_trace_enable {true}
 the default for tracing if no attribute is configured
 
sc_core::sc_trace_file * trf {nullptr}
 
trace_types types_to_trace {trace_types::ALL}
 

Detailed Description

base class for automatic tracer

it provide the basic infrastructure to automagically trace ports, signals, tlm sockets and sc_variables. It comes with some limitations:

  • arbitrary sized data types are only traced if
    • size is less or equal 1024,
    • if size is less than or equal 128 or a multiple of 8
  • sc_variables holding std::array or std::vector are only supported for native C++ datatypes

Definition at line 78 of file tracer_base.h.

Constructor & Destructor Documentation

◆ tracer_base() [1/2]

scc::tracer_base::tracer_base ( const sc_core::sc_module_name &  nm)
inline

named constructor

Parameters
nmthe instance name

Definition at line 86 of file tracer_base.h.

◆ tracer_base() [2/2]

scc::tracer_base::tracer_base ( const sc_core::sc_module_name &  nm,
sc_core::sc_trace_file *  tf,
bool  owned = true 
)
inline

named constructor with trace file

Parameters
nmthe instance name of the tracer
tfthe trace file
ownedif true the tracefile is owned by the tracer and closed upon simulation end

Definition at line 96 of file tracer_base.h.

Member Function Documentation

◆ get_trace_file()

const sc_core::sc_trace_file * scc::tracer_base::get_trace_file ( ) const
inline

get the tracefile used by this tracer

Returns
the tracefile

Definition at line 118 of file tracer_base.h.

◆ set_trace_file()

void scc::tracer_base::set_trace_file ( sc_core::sc_trace_file *  trf)
inline

set the trace file of this tracer

The provided file is not owned by the tracer. Hence the caller is responsible for closing the tracefile

Parameters
trf

Definition at line 133 of file tracer_base.h.

◆ set_trace_types()

void scc::tracer_base::set_trace_types ( trace_types  t)
inline

set the types to trace

Parameters
t

Definition at line 111 of file tracer_base.h.


The documentation for this class was generated from the following files: