17 #ifndef _SCC_PERFORMANCETRACER_H_
18 #define _SCC_PERFORMANCETRACER_H_
20 #include <boost/date_time/posix_time/posix_time.hpp>
42 boost::posix_time::ptime wall_clock_stamp;
43 double proc_clock_stamp;
45 : wall_clock_stamp(boost::posix_time::microsec_clock::universal_time())
46 , proc_clock_stamp(get_cpu_time()) {}
47 time_stamp& operator=(
const time_stamp& o) {
48 wall_clock_stamp = o.wall_clock_stamp;
49 proc_clock_stamp = o.proc_clock_stamp;
53 wall_clock_stamp = boost::posix_time::microsec_clock::universal_time();
54 proc_clock_stamp = get_cpu_time();
58 static double get_cpu_time();
76 :
perf_estimator(sc_core::sc_gen_unique_name(
"$$$perf_estimator$$$", true), heart_beat) {}
89 void set_cycle_time(sc_core::sc_time cycle_period) { this->cycle_period = cycle_period; };
92 perf_estimator(
const sc_core::sc_module_name& nm, sc_core::sc_time heart_beat);
95 void start_of_simulation()
override;
96 void end_of_simulation()
override;
102 sc_core::sc_time beat_delay, cycle_period;
void set_cycle_time(sc_core::sc_time cycle_period)
set the cycle time for cylces per second calculation
perf_estimator()
default constructor creating an unnamed perf_estimator
void end_of_elaboration() override
SystemC callbacks.
perf_estimator(sc_core::sc_time heart_beat)
default constructor creating an unnamed perf_estimator having a heart beat
virtual ~perf_estimator()
destructor
time_stamp soc
the recorded time stamps