scc 2025.09
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
 tracer_base (const sc_core::sc_module_name &nm, sc_core::sc_trace_file *tf, bool owned=true)
 named constructor with trace file
 ~tracer_base ()
 destructor
void set_trace_types (trace_types t)
 set the types to trace
const sc_core::sc_trace_file * get_trace_file () const
 get the tracefile used by this tracer
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

Static Public Member Functions

static void set_default_trace_enable (bool)
static bool get_default_trace_enable ()

Public Attributes

cci::cci_param_handle default_trace_enable_handle

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

sc_core::sc_trace_file * trf {nullptr}
trace_types types_to_trace {trace_types::ALL}
cci::cci_broker_handle cci_broker
std::unique_ptr< cci::cci_param< bool > > default_trace_enable

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 80 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 91 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 )

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 310 of file tracer_base.cpp.

◆ ~tracer_base()

scc::tracer_base::~tracer_base ( )
inline

destructor

Definition at line 107 of file tracer_base.h.

Member Function Documentation

◆ descend()

void scc::tracer_base::descend ( const sc_core::sc_object * obj,
bool trace_all )
protectedvirtual

Reimplemented in scc::configurable_tracer.

Definition at line 271 of file tracer_base.cpp.

◆ get_default_trace_enable()

bool scc::tracer_base::get_default_trace_enable ( )
static

Definition at line 322 of file tracer_base.cpp.

◆ get_name()

std::string scc::tracer_base::get_name ( )
staticprotected

Definition at line 269 of file tracer_base.cpp.

◆ get_trace_file() [1/2]

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

Definition at line 128 of file tracer_base.h.

◆ get_trace_file() [2/2]

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 121 of file tracer_base.h.

◆ set_default_trace_enable()

void scc::tracer_base::set_default_trace_enable ( bool v)
static

Definition at line 331 of file tracer_base.cpp.

◆ 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 136 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 114 of file tracer_base.h.

◆ try_trace()

void scc::tracer_base::try_trace ( sc_core::sc_trace_file * trace_file,
const sc_core::sc_object * object,
trace_types t )
staticprotected

Definition at line 110 of file tracer_base.cpp.

Member Data Documentation

◆ cci_broker

cci::cci_broker_handle scc::tracer_base::cci_broker
protected

The broker used by all tracer classes.

Definition at line 156 of file tracer_base.h.

◆ default_trace_enable

std::unique_ptr<cci::cci_param<bool> > scc::tracer_base::default_trace_enable
protected

Definition at line 158 of file tracer_base.h.

◆ default_trace_enable_handle

cci::cci_param_handle scc::tracer_base::default_trace_enable_handle

cci parameter handle to determine if the tracing is enabled if not specified explicitly

Definition at line 84 of file tracer_base.h.

◆ trf

sc_core::sc_trace_file* scc::tracer_base::trf {nullptr}
protected

Definition at line 149 of file tracer_base.h.

◆ types_to_trace

trace_types scc::tracer_base::types_to_trace {trace_types::ALL}
protected

Definition at line 151 of file tracer_base.h.


The documentation for this class was generated from the following files:
  • /home/eyck/Projects/MINRES/SystemC-Components/src/sysc/scc/tracer_base.h
  • /home/eyck/Projects/MINRES/SystemC-Components/src/sysc/scc/tracer_base.cpp