Jump to content

Error E0304 and C2665


bruce

Recommended Posts

Hello friend, I am super beginner. I am trying to run this example code http://www.asic-world.com/systemc/first1.html#Counter_Design_Specs  counter design and counter testbench on my  systemc with visual studio. So I got two error. Here I put the error together.

  • Severity    Code    Description    Project    File    Line    Suppression State
    Error (active)    E0304    no instance of overloaded function "sc_start" matches the argument list    Project1    C:\Users\60182\source\repos\Project1\Project1\first_counter_tb.cpp    17    
     
  • Severity    Code    Description    Project    File    Line    Suppression State
    Error    C2665    'sc_core::sc_start': none of the 4 overloads could convert all the argument types    Project1    c:\users\60182\source\repos\project1\project1\first_counter_tb.cpp    17    
     

Capture.PNG

Link to comment
Share on other sites

The example you are refering to is for SystemC 2.0 and more over has errors. Actually this is a bad example to start with.

  • the sc_start() in line 17 needs to be commented out for 2 reasons: a) it doesn't make any sense and b) it runs elaboration and tracing (VCD) needs to be initialized before that. After elaboration you cannot add signals for tracing anymore
  • sc_start() (lines 32, 34, 40, 42, 47, 49, 56 58) has to be called either without any arguments (so it runs to the end) or with a duration in terms of sc_time like this:
    sc_start(1, SC_NS);

     

My recommendation would be to either use  the Doulus tutorials: https://www.doulos.com/knowhow/systemc/tutorial/ or the stuff from SCLive (https://sclive.wordpress.com/)

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...