hadjer Posted February 13, 2013 Report Share Posted February 13, 2013 Bonjours, I am new to systemC and i have ubuntu 12.04 and systemc 2.3 I was trying to run this example code from this link but there is an error I cant resolve. Can you please help. This is the errors I get. test_shift.cpp:51:16: error: no matching function for call to `sc_start(int)' test_shift.cpp:51:16: note: candidates are: /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:106:13: note: void sc_core::sc_start() /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:106:13: note: candidate expects 0 arguments, 1 provided /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:173:17: note: void sc_core::sc_start(const sc_core::sc_time&, sc_core::sc_starvation_policy) /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:173:17: note: no known conversion for argument 1 from `int' to `const sc_core::sc_time&' /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:109:13: note: void sc_core::sc_start(int, sc_core::sc_time_unit, sc_core::sc_starvation_policy) /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:109:13: note: candidate expects 3 arguments, 1 provided /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:115:13: note: void sc_core::sc_start(double, sc_core::sc_time_unit, sc_core::sc_starvation_policy) /usr/local/systemc/include/sysc/kernel/sc_simcontext.h:115:13: note: candidate expects 3 arguments, 1 provided make: *** [test_shift.o] Error 1 Thanks. hadjer 1 Quote Link to comment Share on other sites More sharing options...
Gino Posted February 13, 2013 Report Share Posted February 13, 2013 Hi, I tried the example from that page: http://comelec.enst..../test_shift.tgz It compiles and runs fine in my case. ( 64bit CentOS6.2 and SystemC 2.3.0, gcc 4.4.2) Did you install SystemC 2.3.0 correctly? After untarring I edited this line in the Makefile to point to my SystemC 2.3.0 install SYSTEMC = /home/ginov/Desktop/systemc-2.3.0_install/ Next type gmake , it makes simulation.x Which you can run with LD_LIBRARY_PATH=<path to your SystemC lib> ./simulation.x Could you check your SystemC 2.3.0 installation? Best regards, Gino Quote Link to comment Share on other sites More sharing options...
Gino Posted February 13, 2013 Report Share Posted February 13, 2013 Hi, I looked again at that webpage. I guess you copied the text from the webpage, which is wrong, and didn't use the tar file: sc_start(1); which should be sc_start(1,SC_NS); This causes the compile error you see. So please correct these 2 sc_start() calls. In the tar file it is correct. Best regards, Gino hadjer 1 Quote Link to comment Share on other sites More sharing options...
hadjer Posted February 13, 2013 Author Report Share Posted February 13, 2013 thank you very much for your answer but this error appeared to me in Sev example, even in the compilation of the model given in this link and also in the compilation of another example. PS: SystemC is installed correctly Quote Link to comment Share on other sites More sharing options...
David Black Posted February 13, 2013 Report Share Posted February 13, 2013 The old syntax sc_start(int) was deprecated when we removed the sc_set_default_time_unit(sc_time) concept. Your choices for sc_start are limited to sc_start(void), sc_start(sc_time) and sc_start(double),sc_time_unit). Philipp A Hartmann, apfitch and hadjer 3 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.