Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
eyck committed Aug 7, 2024
2 parents 621a069 + b33c1ac commit 010aac1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/sysc/scc/configurable_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ configurable_tracer::configurable_tracer(std::string const&& name, file_type typ
default_trace_enable = default_enable;
}

configurable_tracer::configurable_tracer(std::string const&& name, file_type tx_type, file_type sig_type, bool default_enable,
sc_core::sc_object* top)
: tracer(std::move(name), tx_type, sig_type, top) {
default_trace_enable = default_enable;
}

configurable_tracer::configurable_tracer(std::string const&& name, file_type type, sc_core::sc_trace_file* tf, bool default_enable,
sc_core::sc_object* top)
: tracer(std::move(name), type, tf, top) {
Expand Down
17 changes: 15 additions & 2 deletions src/sysc/scc/configurable_tracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class configurable_tracer : public tracer {
* constructs a tracer object
*
* @param name basename of the trace file(s)
* @param enable_tx enables transaction teacing
* @param enable_tx enables transaction tracing
* @param enable_vcd enable VCD (signal based) tracing
* @param default_enable value of parameter enableTracing if not defined by module or CCIs
*/
Expand All @@ -48,7 +48,7 @@ class configurable_tracer : public tracer {
* constructs a tracer object
*
* @param name basename of the trace file(s)
* @param enable_tx enables transaction teacing
* @param enable_tx enables transaction tracing
* @param enable_vcd enable VCD (signal based) tracing
* @param default_enable value of parameter enableTracing if not defined by module or CCIs
*/
Expand Down Expand Up @@ -76,6 +76,19 @@ class configurable_tracer : public tracer {
configurable_tracer(std::string const& name, file_type type, bool enable_vcd = true, bool default_enable = false,
sc_core::sc_object* top = nullptr)
: configurable_tracer(std::string(name), type, enable_vcd, default_enable, top) {}
/**
* constructs a tracer object
*
* @param name basename of the trace file(s)
* @param tx_type type of trace file for transactions
* @param sig_type type of trace file for signals
* @param default_enable value of parameter enableTracing if not defined by module or CCIs
*/
configurable_tracer(std::string const&& name, file_type tx_type, file_type sig_type, bool default_enable = false,
sc_core::sc_object* top = nullptr);
configurable_tracer(std::string const& name, file_type tx_type, file_type sig_type, bool default_enable = false,
sc_core::sc_object* top = nullptr)
: configurable_tracer(std::string(name), tx_type, sig_type, default_enable, top) {}
/**
* constructs a tracer object
*
Expand Down
2 changes: 1 addition & 1 deletion src/sysc/scc/trace/vcd_trace.hh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ inline void vcdEmitValueChange64(FPTR os, std::string const& handle, unsigned bi

template<typename T>
inline void vcdEmitValueChangeReal(FPTR os, std::string const& handle, unsigned bits, T val){
auto buf = fmt::format("r{:.16g} {}\n", val, handle);
auto buf = fmt::format("r{:.16g} {}\n", static_cast<double>(val), handle);
FWRITE(buf.c_str(), 1, buf.size(), os);
}

Expand Down

0 comments on commit 010aac1

Please sign in to comment.