Santhosh_Michael Posted July 20, 2018 Report Share Posted July 20, 2018 Hi, Example , chosen a D-f/f void do_dff() { q=d; } sc_ctor() { sc_method(do_dff); sensitive<<enable && clk; } the method do_dff() should invoke only when both changes (enable and clk) Quote Link to comment Share on other sites More sharing options...
Eyck Posted July 20, 2018 Report Share Posted July 20, 2018 Actually this is not going to work as it is quite unlikely that both events fire at the same delta cycle. So you would write something like void do_dff(){ if(enable.read()) q=d; } sc_ctor(){ SC_METHOD(do_dff); sensitive << clk; } The only option to concatenate events is to use sc_core::sc_event_and_list and sc_core::sc_event_or_list but those can only use in dynamic sensitivity (wait() for SC_THREADs and next_trigger() for SC_METHODs). Best maehne 1 Quote Link to comment Share on other sites More sharing options...
Santhosh_Michael Posted July 23, 2018 Author Report Share Posted July 23, 2018 Thank you ! 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.