Flori_He Posted June 15, 2016 Report Share Posted June 15, 2016 Hello everyone,I've built a little system in SystemC, which compiles without errors. But when I run the simulation, I get (besides a seg fault, which I will debug) the warnings:Warning: (W505) object already exists: _dummy_socks.AT_LT_conv_peq. Latter declaration will be renamed to _dummy_socks.AT_LT_conv_peq_0In file: ../../../../src/sysc/kernel/sc_object_manager.cpp:149Warning: (W505) object already exists: _dummy_socks.AT_LT_conv_peq. Latter declaration will be renamed to _dummy_socks.AT_LT_conv_peq_1In file: ../../../../src/sysc/kernel/sc_object_manager.cpp:149Warning: (W505) object already exists: _dummy_socks.AT_LT_conv_peq. Latter declaration will be renamed to _dummy_socks.AT_LT_conv_peq_2In file: ../../../../src/sysc/kernel/sc_object_manager.cpp:149Warning: (W505) object already exists: _dummy_socks.AT_LT_conv_peq. Latter declaration will be renamed to _dummy_socks.AT_LT_conv_peq_3In file: ../../../../src/sysc/kernel/sc_object_manager.cpp:149Warning: (W505) object already exists: _dummy_socks.AT_LT_conv_peq. Latter declaration will be renamed to _dummy_socks.AT_LT_conv_peq_4In file: ../../../../src/sysc/kernel/sc_object_manager.cpp:149Warning: (W505) object already exists: _dummy_socks.AT_LT_conv_peq. Latter declaration will be renamed to _dummy_socks.AT_LT_conv_peq_5In file: ../../../../src/sysc/kernel/sc_object_manager.cpp:149Warning: (W505) object already exists: _dummy_socks.AT_LT_conv_peq. Latter declaration will be renamed to _dummy_socks.AT_LT_conv_peq_6In file: ../../../../src/sysc/kernel/sc_object_manager.cpp:149Warning: (W505) object already exists: _dpr1_10.AT_LT_conv_peq. Latter declaration will be renamed to _dpr1_10.AT_LT_conv_peq_0In file: ../../../../src/sysc/kernel/sc_object_manager.cpp:149Warning: (W505) object already exists: _dpr1_10.AT_LT_conv_peq. Latter declaration will be renamed to _dpr1_10.AT_LT_conv_peq_1In file: ../../../../src/sysc/kernel/sc_object_manager.cpp:149Warning: (W505) object already exists: _dpr1_10.AT_LT_conv_peq. Latter declaration will be renamed to _dpr1_10.AT_LT_conv_peq_2In file: ../../../../src/sysc/kernel/sc_object_manager.cpp:149Warning: (W505) object already exists: _dpr2_10.AT_LT_conv_peq. Latter declaration will be renamed to _dpr2_10.AT_LT_conv_peq_0In file: ../../../../src/sysc/kernel/sc_object_manager.cpp:149Warning: (W505) object already exists: _dpr2_10.AT_LT_conv_peq. Latter declaration will be renamed to _dpr2_10.AT_LT_conv_peq_1In file: ../../../../src/sysc/kernel/sc_object_manager.cpp:149Warning: (W505) object already exists: _dpr2_10.AT_LT_conv_peq. Latter declaration will be renamed to _dpr2_10.AT_LT_conv_peq_2In file: ../../../../src/sysc/kernel/sc_object_manager.cpp:149I've found a previous thread in the archive which discussed a similar problem:http://workspace.accellera.org/Discussion_Forums/systemc-forum/archive/msg/msg?list_name=systemc-forum&monthdir=200506&msg=msg00014.htmlHere, there were two possible solutions proposed:-Either the warnings are because of separate multiple inheritance (class/module is inherited multiple times and so multiple objects/modules with the same sc_module_name are created) -> make class/module which is inherited virtual-Or I have multiple objects/modules with the same sc_module_name on the same system hierarchy -> rename classes/modulesOption 1 cannot be the solution for me because the said modules are templated. And also, the only class which is inherited by all modules individually is sc_module.Option 2 (seems) to be not working for me too, because every module I created has a unique name. Here are (all?) relevant infos on my classes/modules and constructors and how I build and connect them in sc_main:template<unsigned int BUSWIDTH_0, unsigned int BUSWIDTH_1>class dummy_socks: public sc_module { ....}...template<unsigned int BUSWIDTH_0, unsigned int BUSWIDTH_1>dummy_socks<BUSWIDTH_0, BUSWIDTH_1>::dummy_socks(sc_module_name name): sc_module(name), slave_sock_dummy_1("ssockd1", amba::amba_AXI, amba::amba_AT, false), slave_sock_dummy_2("ssockd2", amba::amba_AXI, amba::amba_AT, false), slave_sock_dummy_3("ssockd3", amba::amba_AXI, amba::amba_AT, false), slave_sock_dummy_4("ssockd4", amba::amba_AXI, amba::amba_AT, false), slave_sock_dummy_5("ssockd5", amba::amba_AXI, amba::amba_AT, false), slave_sock_dummy_6("ssockd6", amba::amba_AXI, amba::amba_AT, false), slave_sock_dummy_7("ssockd7", amba::amba_AXI, amba::amba_AT, false), slave_sock_dummy_8("ssockd8", amba::amba_AXI, amba::amba_AT, false){}...template<class T, unsigned int BUSWIDTH_0, unsigned int BUSWIDTH_1>class dpr_two_even_regions: public sc_module { .... };...template<class T, unsigned int BUSWIDTH_0, unsigned int BUSWIDTH_1>dpr_two_even_regions<T, BUSWIDTH_0, BUSWIDTH_1>::dpr_two_even_regions(sc_module_name name, unsigned int _wl, unsigned int _iwl, unsigned int _mem_size, unsigned int _bytes_per_word, sc_time& _delay_r, sc_time& _delay_w, addr_sub_space _a_subspace_1, addr_sub_space _a_subspace_2, sc_mutex* _m0, sc_mutex* _m1): sc_module(name), wl(_wl), iwl(_iwl), mem_size(_mem_size), bit_shift_int(1), bytes_per_word(_bytes_per_word), slave_sock_r_0("ssockr2_0", amba::amba_AXI, amba::amba_AT, false), slave_sock_w_0("ssockw2_0", amba::amba_AXI, amba::amba_AT, false), slave_sock_r_1("ssockr2_1", amba::amba_AXI, amba::amba_AT, false), slave_sock_w_1("ssockw2_1", amba::amba_AXI, amba::amba_AT, false), delay_r(_delay_r), delay_w(_delay_w), a_subspace_1(_a_subspace_1), a_subspace_2(_a_subspace_2), m0(_m0), m1(_m1) { ... } ...template<class T, unsigned int BUSWIDTH_0, unsigned int BUSWIDTH_1>class dpr: public sc_module { ...}...template<class T, unsigned int BUSWIDTH_0, unsigned int BUSWIDTH_1>dpr<T, BUSWIDTH_0, BUSWIDTH_1>::dpr(sc_module_name name, unsigned int _wl, unsigned int _iwl, unsigned int _mem_size, unsigned int _bytes_per_word, unsigned int _regions_nmbr, unsigned int* _sub_region_sizes, addr_sub_space _dpr_addr_space, sc_mutex**_mutexes): sc_module(name), wl(_wl), iwl(_iwl), mem_size(_mem_size), bytes_per_word(_bytes_per_word), regions_nmbr(_regions_nmbr), sub_region_sizes(_sub_region_sizes), dpr_addr_space(_dpr_addr_space), mutexes(_mutexes), bit_shift_int(1), slave_sock_r_0("ssockr1_0", amba::amba_AXI, amba::amba_AT, false), slave_sock_w_0("ssockw1_0", amba::amba_AXI, amba::amba_AT, false), slave_sock_r_1("ssockr1_1", amba::amba_AXI, amba::amba_AT, false), slave_sock_w_1("ssockw1_1", amba::amba_AXI, amba::amba_AT, false) { ...}...int sc_main(int argc, char *argv[]) { ... dpr_two_even_regions<sc_uint<10>, 16, 16> dpr1("_dpr1_10", resolution, iwl, dpr1_mem_size, bytes_per_word, delay_r_dpr1, delay_w_dpr1, dpr1_a_subspace, dpr1_a_subspace, &_m1_1, &_m2_1); dpr<sc_uint<10>, 16, 16> dpr2("_dpr2_10", resolution, iwl, dpr2_mem_size, bytes_per_word, dpr2_regions_nmbr, dpr2_sub_region_sizes, dpr2_a_subspace, mutexes); fft_correlator<sc_uint<10>, 16> fft_c("fft_c", resolution, iwl, bytes_per_word, fft_framesize, delay_cycles_fft, delay_cycles_ifft, delay_cycles_cross_corr, nmbr_of_tasks, fft_correl_a_subspace, tasks); fft_c.master_sock_r_1(dpr1.slave_sock_r_1); fft_c.master_sock_w_1(d_socks.slave_sock_dummy_5); fft_c.master_sock_r_2(dpr2.slave_sock_r_0); fft_c.master_sock_w_2(dpr2.slave_sock_w_0); fft_c.io_clk(c_io); fft_c.fft_clk(c_fft); fft_c.interrupt_clk(c_inter); fft_c.m1_1_port(_m1_1); fft_c.m2_1_port(_m2_1); fft_c.m3_1_port(_m_dummy); fft_c.m4_1_port(_m_dummy); fft_c.m1_2_port(_m1_2); fft_c.m2_2_port(_m2_2); fft_c.m3_2_port(_m3_2); fft_c.m4_2_port(_m4_2); sc_report_handler::set_actions(SC_ID_MORE_THAN_ONE_SIGNAL_DRIVER_, SC_DO_NOTHING); sc_time sim_time = sc_time(s_time, s_time_unit); // run the simulation sc_start(sim_time); ....}Anyone has an idea why this is happening?Thanks and regards,Florian Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted June 15, 2016 Report Share Posted June 15, 2016 SystemC issues this warning when multiple objects were given the same name in constructor. However, in your code I don't see an object initialized with "AT_LT_conv_pe" name, so I can't trace down the source of problem. Quote Link to comment Share on other sites More sharing options...
Flori_He Posted June 16, 2016 Author Report Share Posted June 16, 2016 Hello,I think there must be a relation between these warnings and the fact that every said class/module has exactly the same number of amba slave sockets(these are types from the amba toolkit by Carbon Design Systems included with the header #include <amba.h>) minus one. Minus one is because the module related to the first socket doesn't have to be renamed. In my class definitions this looks like:template<class T, unsigned int BUSWIDTH_0, unsigned int BUSWIDTH_1>class dpr_two_even_regions: public sc_module { ... public: amba::amba_slave_socket<BUSWIDTH_0> slave_sock_r_0; amba::amba_slave_socket<BUSWIDTH_0> slave_sock_w_0; amba::amba_slave_socket<BUSWIDTH_1> slave_sock_r_1; amba::amba_slave_socket<BUSWIDTH_1> slave_sock_w_1;};...template<class T, unsigned int BUSWIDTH_0, unsigned int BUSWIDTH_1>class dpr: public sc_module { .... public: amba::amba_slave_socket<BUSWIDTH_0> slave_sock_r_0; amba::amba_slave_socket<BUSWIDTH_0> slave_sock_w_0; amba::amba_slave_socket<BUSWIDTH_1> slave_sock_r_1; amba::amba_slave_socket<BUSWIDTH_1> slave_sock_w_1;};...template<unsigned int BUSWIDTH_0, unsigned int BUSWIDTH_1>class dummy_socks: public sc_module { public: amba::amba_slave_socket<BUSWIDTH_0> slave_sock_dummy_1; amba::amba_slave_socket<BUSWIDTH_0> slave_sock_dummy_2; amba::amba_slave_socket<BUSWIDTH_0> slave_sock_dummy_3; amba::amba_slave_socket<BUSWIDTH_0> slave_sock_dummy_4; amba::amba_slave_socket<BUSWIDTH_1> slave_sock_dummy_5; amba::amba_slave_socket<BUSWIDTH_1> slave_sock_dummy_6; amba::amba_slave_socket<BUSWIDTH_1> slave_sock_dummy_7; amba::amba_slave_socket<BUSWIDTH_1> slave_sock_dummy_8; ...};Does this mean each socket calls the sc_module constructor with the same sc_module_name?Greetings Florian Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted June 16, 2016 Report Share Posted June 16, 2016 Probably, you will need to dig into amba_slave_socket source code. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.