Jump to content

Errors in code written written using SystemC TLM


Recommended Posts

I am getting errors like below.

 

1)

 /home/amitk3553/Desktop/BLE/systemc-2.3.0/include/tlm_utils/simple_target_socket.h: In constructor ‘tlm_utils::simple_target_socket::fw_process::fw_process(tlm_utils::simple_target_socket*)’:          /home/amitk3553/Desktop/BLE/systemc-2.3.0/include/tlm_utils/simple_target_socket.h:197: error: invalid use of incomplete type ‘struct sc_core::sc_spawn_options’

 /home/amitk3553/Desktop/BLE/systemc-2.3.0/include/sysc/kernel/sc_process.h:204: error: forward declaration of ‘struct sc_core::sc_spawn_options’

 /home/amitk3553/Desktop/BLE/systemc-2.3.0/include/tlm_utils/simple_target_socket.h:198: error: ‘sc_spawn’ is not a member of ‘sc_core’

 

2)

   hci_test.cpp:12: error: redefinition of ‘class hci_test’

   hci_test.cpp:13: error: previous definition of ‘class hci_test’

 

 

3)

  Error: hci_host_monitor.cpp:24: error: ‘class tlm_utils::simple_initiator_socket’ has no member named ‘b_transport’

 

  Code corresponding to error:  

                                                        hci_host_monitor(sc_module_name nm): sc_module(nm),monitor_tar_socket("monitor_tar_socket")

                                                        {

                                                            monitor_tar_socket.b_transport(this, (&hci_host_monitor::compare_rx_data));

                                                        }

 

Please tell me the reasons behind these errors

 

 

Regards

cam

Link to comment
Share on other sites

 1)

/simple_target_socket.h:197: error: invalid use of incomplete type ‘struct sc_core::sc_spawn_options’

 

See my answer in this thread.

 

2)

hci_test.cpp:12: error: redefinition of ‘class hci_test’

hci_test.cpp:13: error: previous definition of ‘class hci_test’

 

Make sure to use proper include guards.

 

3)

Error: hci_host_monitor.cpp:24: error: ‘class tlm_utils::simple_initiator_socket’ has no member named ‘b_transport’

 

This is probably a follow-up error of (1).

 

Greetings from Oldenburg,

  Philipp

Link to comment
Share on other sites

Thanks Philipp,

 

First two errors(1,2) are solved with your suggestion. But third one is still there.

 

3)

  Error: hci_host_monitor.cpp:24: error: ‘class tlm_utils::simple_initiator_socket’ has no member named ‘b_transport’

 

  Code corresponding to error:  

                                                        hci_host_monitor(sc_module_name nm): sc_module(nm),monitor_tar_socket("monitor_tar_socket")

                                                        {

                                                            monitor_tar_socket.b_transport(this, (&hci_host_monitor::compare_rx_data));

                                                        }

 

 

 

Regards

cam

Link to comment
Share on other sites

Thanks Philipp,

 

First two errors(1,2) are solved with your suggestion. But third one is still there.

 

3)

  Error: hci_host_monitor.cpp:24: error: ‘class tlm_utils::simple_initiator_socket’ has no member named ‘b_transport’

 

  Code corresponding to error:  

                                                        hci_host_monitor(sc_module_name nm): sc_module(nm),monitor_tar_socket("monitor_tar_socket")

                                                        {

                                                            monitor_tar_socket.b_transport(this, (&hci_host_monitor::compare_rx_data));

                                                        }

 

 

 

Regards

cam

 

 

Its resolved.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...