Search the Community
Showing results for tags 'binding information'.
-
Hello, To debug the bindings between various signals, ports and interfaces connections, is there a way to display the binding information? Consider the following example: // https://www.edaplayground.com/x/JZsM #include <systemc> using namespace sc_core; SC_MODULE(InternalCounter) { sc_in_clk clock{"clock"}; sc_in<bool> enable{"enable"}; SC_CTOR(InternalCounter){}; }; SC_MODULE (Counter) { sc_in_clk clock{"clock"}; sc_in<bool> reset{"reset"}; sc_in<bool> enable{"enable"}; InternalCounter ic{"ic"}; SC_CTOR(Counter){ ic.clock(clock); ic.enable(enable); } }; SC_MODULE (CounterDriver) { sc_clock clk_s {"clk_s"}; sc_out<bool> reset{"reset"}; sc_out<bool> enable{"enable"}; SC_CTOR(CounterDriver){} }; SC_MODULE(Top) { sc_signal<bool, SC_MANY_WRITERS> reset_s{"reset_s"}; sc_signal<bool> enable_s{"enable_s"}; Counter c {"c"}; CounterDriver cd{"cd"}; SC_CTOR(Top) { c.clock(cd.clk_s); c.reset(reset_s); cd.reset(reset_s); c.enable(enable_s); cd.enable(enable_s); } }; int sc_main(int argc, char**argv) { Top top("top"); sc_start(1, SC_NS); // print_connectivity(top); return 0; } What I would want is a function like print_connectivity below which prints the following. Signal Connectivity top.cd.clk_s:: top.c.clock -> top.c.ic.clock top.reset_s:: top.cd.reset -> top.c.reset top.enable_s:: top.cd.enable -> top.c.enable -> top.c.ic.enable