Skip to content

Commit 3abaf9f

Browse files
committed
fixes trace to also trace optional connected ports
1 parent 5a7baa0 commit 3abaf9f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sysc/scc/tracer_base.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
#include "tracer_base.h"
1818
#include "observer.h"
19-
#include "sc_variable.h"
2019
#include "traceable.h"
2120
#include <cstring>
21+
#include <sysc/communication/sc_signal_ifs.h>
2222
#include <systemc>
2323

2424
#define SC_TRACE_NS ::scc::
@@ -32,13 +32,13 @@ using sc_object = sc_core::sc_object;
3232

3333
template <typename T> inline auto try_trace_obj(sc_trace_file* trace_file, const sc_object* object, trace_types types_to_trace) -> bool {
3434
if((types_to_trace & trace_types::PORTS) == trace_types::PORTS) {
35-
if(auto const* ptr = dynamic_cast<sc_core::sc_in<T> const*>(object)) {
35+
if(auto const* ptr = dynamic_cast<sc_core::sc_port_b<sc_core::sc_signal_in_if<T>> const*>(object)) {
3636
if(auto* if_ptr = ptr->get_interface(0)) {
3737
SC_TRACE_NS sc_trace(trace_file, *if_ptr, object->name());
3838
return true;
3939
}
4040
}
41-
if(auto const* ptr = dynamic_cast<sc_core::sc_inout<T> const*>(object)) {
41+
if(auto const* ptr = dynamic_cast<sc_core::sc_port_b<sc_core::sc_signal_inout_if<T>> const*>(object)) {
4242
if(auto* if_ptr = ptr->get_interface(0)) {
4343
SC_TRACE_NS sc_trace(trace_file, *if_ptr, object->name());
4444
return true;
@@ -140,7 +140,7 @@ void tracer_base::try_trace(sc_trace_file* trace_file, const sc_object* object,
140140
return;
141141
if(try_trace_obj<double>(trace_file, object, types_to_trace))
142142
return;
143-
#if(SYSTEMC_VERSION >= 20171012)
143+
#if (SYSTEMC_VERSION >= 20171012)
144144
if(try_trace_obj<sc_core::sc_time>(trace_file, object, types_to_trace))
145145
return;
146146
#endif

0 commit comments

Comments
 (0)