adds proper tracing setup

This commit is contained in:
Eyck Jentzsch 2023-11-20 18:25:07 +01:00
parent a88eb938ee
commit dc8a74d787
2 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="sc_main"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-f fw/hello-world/hello&#10;--dump-structure=tgc_vp.json&#10;--config cfg.yaml"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-f fw/hello-world/hello&#10;--dump-structure=tgc_vp.json&#10;--config cfg.yaml&#10;-t 3"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/${config_name:TGC-VP}/src/tgc-vp"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="TGC-VP"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>

View File

@ -74,8 +74,8 @@ int sc_main(int argc, char *argv[]) {
auto enable_sig_trace = (trace_level&0x1) != 0;// bit0 enables sig trace
auto tx_trace_type = static_cast<scc::tracer::file_type>(trace_level >> 1); // bit3-bit1 define the kind of transaction trace
auto trace_default_on = parser.is_set("trace-default-on");
cfg.set_value("*.tx_trace_type", static_cast<unsigned>(scc::tracer::file_type::FTR));
cfg.set_value("*.sig_trace_type", static_cast<unsigned>(scc::tracer::file_type::SC_VCD));
cfg.set_value("$$$scc_tracer$$$.tx_trace_type", static_cast<unsigned>(scc::tracer::file_type::FTR));
cfg.set_value("$$$scc_tracer$$$.sig_trace_type", static_cast<unsigned>(scc::tracer::file_type::SC_VCD));
tracer = scc::make_unique<scc::configurable_tracer>(file_name, tx_trace_type, enable_sig_trace, trace_default_on);
}
///////////////////////////////////////////////////////////////////////////