Kasturi Patil Posted October 29, 2013 Report Share Posted October 29, 2013 Hello, I tried modeling an initiator and a target and used PEQ.. but I am getting the following error.. what can be the reason??? In file included from target.h:3, from main.cpp:3: ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h: In constructor 'tlm_utils::simple_target_socket<MODULE, BUSWIDTH, TYPES>::fw_process::fw_process(tlm_utils::simple_target_socket<MODULE, BUSWIDTH, TYPES>*)': ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h:189: error: invalid use of incomplete type 'struct sc_core::sc_spawn_options' ../../systemc/systemc-install/include/sysc/kernel/sc_process.h:238: error: forward declaration of 'struct sc_core::sc_spawn_options' ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h:190: error: 'sc_spawn' is not a member of 'sc_core' ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h: In member function 'tlm::tlm_sync_enum tlm_utils::simple_target_socket<MODULE, BUSWIDTH, TYPES>::fw_process::nb_transport_fw(typename TYPES::tlm_payload_type&, typename TYPES::tlm_phase_type&, sc_core::sc_time&)': ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h:259: error: invalid use of incomplete type 'struct sc_core::sc_spawn_options' ../../systemc/systemc-install/include/sysc/kernel/sc_process.h:238: error: forward declaration of 'struct sc_core::sc_spawn_options' ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h:261: error: invalid use of incomplete type 'struct sc_core::sc_spawn_options' ../../systemc/systemc-install/include/sysc/kernel/sc_process.h:238: error: forward declaration of 'struct sc_core::sc_spawn_options' ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h:272: error: 'sc_spawn' is not a member of 'sc_core' ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h: In constructor 'tlm_utils::simple_target_socket_tagged<MODULE, BUSWIDTH, TYPES>::fw_process::fw_process(tlm_utils::simple_target_socket_tagged<MODULE, BUSWIDTH, TYPES>*)': ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h:738: error: invalid use of incomplete type 'struct sc_core::sc_spawn_options' ../../systemc/systemc-install/include/sysc/kernel/sc_process.h:238: error: forward declaration of 'struct sc_core::sc_spawn_options' ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h:739: error: 'sc_spawn' is not a member of 'sc_core' ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h: In member function 'tlm::tlm_sync_enum tlm_utils::simple_target_socket_tagged<MODULE, BUSWIDTH, TYPES>::fw_process::nb_transport_fw(typename TYPES::tlm_payload_type&, typename TYPES::tlm_phase_type&, sc_core::sc_time&)': ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h:813: error: invalid use of incomplete type 'struct sc_core::sc_spawn_options' ../../systemc/systemc-install/include/sysc/kernel/sc_process.h:238: error: forward declaration of 'struct sc_core::sc_spawn_options' ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h:815: error: invalid use of incomplete type 'struct sc_core::sc_spawn_options' ../../systemc/systemc-install/include/sysc/kernel/sc_process.h:238: error: forward declaration of 'struct sc_core::sc_spawn_options' ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h:826: error: 'sc_spawn' is not a member of 'sc_core' ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h: In constructor 'tlm_utils::simple_target_socket<MODULE, BUSWIDTH, TYPES>::fw_process::fw_process(tlm_utils::simple_target_socket<MODULE, BUSWIDTH, TYPES>*) [with MODULE = target, unsigned int BUSWIDTH = 32u, TYPES = tlm::tlm_base_protocol_types]': ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h:62: instantiated from 'tlm_utils::simple_target_socket<MODULE, BUSWIDTH, TYPES>::simple_target_socket(const char*) [with MODULE = target, unsigned int BUSWIDTH = 32u, TYPES = tlm::tlm_base_protocol_types]' target.h:18: instantiated from here ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h:188: error: 'opts' has incomplete type ../../TLM-2009-07-15/include/tlm/tlm_utils/simple_target_socket.h: In member function 'tlm::tlm_sync_enum tlm_utils::simple_target_socket<MODULE, BUSWIDTH, TYPES>::fw_process::nb_transport_fw(typename TYPES::tlm_payload_type&, typename TYPES::tlm_phase_type&, sc_core::sc_time&) [with MODULE = target, unsigned int BUSWIDTH = 32u, TYPES = tlm::tlm_base_protocol_types]': Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted October 29, 2013 Report Share Posted October 29, 2013 You need to define the preprocessor symbol "SC_INCLUDE_DYNAMIC_PROCESSES" before including SystemC, when you use the TLM-2.0 convenience sockets. The preferred way to do this is to add it to your compiler command-line switches ("-DSC_INCLUDE_DYNAMIC_PROCESSES"). hth, Philipp maehne 1 Quote Link to comment Share on other sites More sharing options...
Kasturi Patil Posted October 29, 2013 Author Report Share Posted October 29, 2013 Hey Philip, Thanx a tonne. It helped.... Regards, Kas Quote Link to comment Share on other sites More sharing options...
rana Posted February 3, 2020 Report Share Posted February 3, 2020 hello, i'm facing the same error error: invalid use of incomplete type ‘class sc_core::sc_spawn_options’_files when running the make file in linux i tried to add the command that Philipp wrote above in the terminal... but still having the same error. Can anyone help please? 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.