Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by yatung

  1. Hello Everyone, I am a beginner at systemc. I am interested in sc_fifo channel and investigated the OSCI simulator source code. I found sc_fifo has a member function named "data_written_event" and its prototype is like below: virtual const sc_event& data_written_event() const; I want to get a callback/notify when a specific sc_fifo channel is written or read. My solution is: - Preface I used the sc_get_top_level_objects() and get_child_objects() to iterate out all the sc_object. (This is the way I get the sc_fifo object) - Make a callback/sensitive by user code 1. Try to get the written/read event data member of sc_fifo 2. Use the add_static() member function of sc_event to register a written/read event callback for this sc_fifo Is the solution above workable? ---------------------------------------------- - My Test Result 1. Try to get the written/read event data member of sc_fifo ==> Because of the "operator=" is overwritten as private: sc_fifo& operator = ( const sc_fifo<T>& ); I canNOT get the event in user code. ex: sc_event e; e = sc_fifo_obj->data_written_event(); //<-- Error! Of course. 2. add_static() is s private member function of sc_event class and I can neither use it in user code. Can you experts guide me how to do it or give me any hint? Appreciate your feedback. by yaTung
  • Create New...