mohitnegi Posted June 3, 2014 Report Share Posted June 3, 2014 hello all , Getting this error while compiling my system C moduole ... Could anyone explain me what this is ?? Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted June 3, 2014 Report Share Posted June 3, 2014 You don't have a member function called 'process' in your 'host_cntrl' class? Hard to tell without actual code. /Philipp Quote Link to comment Share on other sites More sharing options...
apfitch Posted June 3, 2014 Report Share Posted June 3, 2014 Or you are *not* using SC_CTOR, you've declared an SC_THREAD, and you've forgotten SC_HAS_PROCESS ? Alan P.S. As Philipp says, the code would help :-) sumit_tuwien 1 Quote Link to comment Share on other sites More sharing options...
mohitnegi Posted June 3, 2014 Author Report Share Posted June 3, 2014 Thanks for the response guys ... host_cntrl.hpp #ifndef HOST_CNTRL_H #define HOST_CNTRL_H #include "systemc.h" class host_cntrl : public sc_module { public: SC_CTOR(host_cntrl) { SC_THREAD(process); } //SC_HAS_PROCESS(host_cntrl); private ...... } then in host_cntrl.cpp #include "host_cntrl.hpp" void host_cntrl::process() { while(1) { wait(e_HCE);//Host COntroller is enabled by SW cout <<"hello"<<endl; } } Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted June 3, 2014 Report Share Posted June 3, 2014 Make sure that you have the "process" function declaration in the body of host_cntrl: class host_cntrl : public sc_module { public: // SC_CTOR(), etc. private: void process(); }; /Philipp Quote Link to comment Share on other sites More sharing options...
mohitnegi Posted June 4, 2014 Author Report Share Posted June 4, 2014 thanks that problem is solved .... now i am using this bool HCE_register::behavior_after_write(uint32_t data){ sc_event e_HCE; if(data==0x01) return e_HCE.notify(); else return 0; } and in other code as mentioned above host_cntrl.cpp i am using it ... But am getting this compilation error .. home/mic-24/Desktop/dmi/ufs_dmi/ufs/src/ufs_registers.cpp: In member function ‘bool HCE_register::behavior_after_write(uint32_t)’: /home/mic-24/Desktop/dmi/ufs_dmi/ufs/src/ufs_registers.cpp:614: error: void value not ignored as it ought to be could you explain me this errror here ??? Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted June 4, 2014 Report Share Posted June 4, 2014 bool HCE_register::behavior_after_write(uint32_t data){ sc_event e_HCE; // <-- strange if(data==0x01) return e_HCE.notify(); // <-- error else return 0; } The error is caused by the fact that the notify() function of sc_event returns nothing (i.e. 'void'). So you can't return the (non-existing) return value in the marked line above. Secondly, e_HCE is a local variable. You won't be able to trigger any other process by notifying this event. This looks wrong as well. /Philipp 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.