DS1701 Posted April 24, 2022 Report Share Posted April 24, 2022 Hello @all Description: I have 2 input port sc_in<Data> input; 2 method "HandleInput(int port_index)" (using sc_spawn) with sensitive is input port 1 method "MainProcess" "HandleInput" method will trigger "MainProcess" with main_process_event.notify(SC_ZERO_TIME) Symptom : "HandleInput" is called 2 times ( port_index = 0 and 1) at the same time (It is called before "MainProcess" is called ) "MainProcess" is called 2 times -> This is not desirable, My expected is "MainProcess" is called 1 time I tried to reproduce it with the simple code ( as my attached), but I can't As my check: 1. "HandleInput" with port index = 0 is called -> main_process_event.notify(SC_ZERO_TIME) is called -> m_notify_type = DELTA -> sc_event::trigger() is called 2. "HandleInput" with port index = 1 is called -> main_process_event.notify(SC_ZERO_TIME) is called .... Because at (1) : sc_event::trigger() is called => m_notify_type = NONE => So, at (2), when main_process_event.notify(SC_ZERO_TIME) is called, kernel add new delta event => MainProcess triggered 2 times But I don't know why at(1) sc_event::trigger() is called ?, I think (1) and (2) are same phase (Evaluate), I don't know this is a systemc bug or not? Could you please to support? BRs DUT.cpp main.cpp Quote Link to comment Share on other sites More sharing options...
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.