17 #ifndef SCC_VCD_PULL_TRACE_H
18 #define SCC_VCD_PULL_TRACE_H
20 #include <sysc/tracing/sc_trace.h>
21 #include <sysc/kernel/sc_ver.h>
45 #define DECL_TRACE_METHOD_A(tp) void trace(const tp& object, const std::string& name) override;
46 #define DECL_TRACE_METHOD_B(tp) void trace(const tp& object, const std::string& name, int width) override;
48 #if (SYSTEMC_VERSION >= 20171012)
49 DECL_TRACE_METHOD_A( sc_core::sc_event )
50 DECL_TRACE_METHOD_A( sc_core::sc_time )
52 DECL_TRACE_METHOD_A(
bool )
53 DECL_TRACE_METHOD_A( sc_dt::sc_bit )
54 DECL_TRACE_METHOD_A( sc_dt::sc_logic )
56 DECL_TRACE_METHOD_B(
unsigned char )
57 DECL_TRACE_METHOD_B(
unsigned short )
58 DECL_TRACE_METHOD_B(
unsigned int )
59 DECL_TRACE_METHOD_B(
unsigned long )
60 #ifdef SYSTEMC_64BIT_PATCHES
61 DECL_TRACE_METHOD_B(
unsigned long long)
63 DECL_TRACE_METHOD_B(
char )
64 DECL_TRACE_METHOD_B(
short )
65 DECL_TRACE_METHOD_B(
int )
66 DECL_TRACE_METHOD_B(
long )
67 DECL_TRACE_METHOD_B( sc_dt::int64 )
68 DECL_TRACE_METHOD_B( sc_dt::uint64 )
70 DECL_TRACE_METHOD_A(
float )
71 DECL_TRACE_METHOD_A(
double )
72 DECL_TRACE_METHOD_A( sc_dt::sc_int_base )
73 DECL_TRACE_METHOD_A( sc_dt::sc_uint_base )
74 DECL_TRACE_METHOD_A( sc_dt::sc_signed )
75 DECL_TRACE_METHOD_A( sc_dt::sc_unsigned )
77 DECL_TRACE_METHOD_A( sc_dt::sc_fxval )
78 DECL_TRACE_METHOD_A( sc_dt::sc_fxval_fast )
79 DECL_TRACE_METHOD_A( sc_dt::sc_fxnum )
80 DECL_TRACE_METHOD_A( sc_dt::sc_fxnum_fast )
82 DECL_TRACE_METHOD_A( sc_dt::sc_bv_base )
83 DECL_TRACE_METHOD_A( sc_dt::sc_lv_base )
84 #undef DECL_TRACE_METHOD_A
85 #undef DECL_TRACE_METHOD_B
87 void trace(
const unsigned int&
object,
88 const std::string& name,
89 const char** enum_literals )
override;
92 void write_comment(
const std::string& comment)
override;
95 void cycle(
bool delta_cycle)
override;
97 void set_time_unit(
double v, sc_core::sc_time_unit tu )
override;
99 void set_time_unit(
int exponent10_seconds )
override;
103 #if WITH_SC_TRACING_PHASE_CALLBACKS
105 virtual void trace( sc_trace_file* )
const;
109 std::string prune_name(std::string
const& name);
110 std::string obtain_name();
111 std::function<bool()> check_enabled;
113 FILE* vcd_out{
nullptr};
119 std::vector<trace_entry> all_traces, active_traces;
120 std::vector<trace::vcd_trace*> changed_traces;;
121 bool initialized{
false};
122 unsigned vcd_name_index{0};