Jump to content

Ivan

Members
  • Content Count

    6
  • Joined

  • Last visited

  • Days Won

    1
  1. Thank you a lot Roman! You definitely clarified all the things that were not clear to me! Have a nice day.
  2. I was trying to understand the output of your program referring to the section 4.2.1.1: Elaboration both sig0 and sig1 are put in the update list Initialization a) Update: sig0 and sig1 get updated, since method1 and method2 are sensitive to sig1.value_changed_event, sig2.value_changed_event respectively so both method1 and method2 should be put in delta notifications list D = {method1, method2}. b) We put method0 in the runnable list R = {method0} c) Delta notification: contents of D stored in R, R = {method0, method1, method2} Evaluation: Should
  3. Thanks Roman and Philipp, I think I finally fully understood it. The document you provided helped me a lot to understand how simulation works. I have to say it's much more descriptive than the previous old version I was using. However I just have one more question to clarify my understanding of the simulation. I was reading LRM document and came up to the following: 4.2.2 Initialization, cycles, and pauses in the scheduling algorithm Update requests may be created during elaboration or before the initialization phase, and they shall be scheduled to execute in the update phase during
  4. Hey Roman sc_delta_count() is very useful for understanding the code. I ran code with sc_delta_count now and I got reasonable result: p2: 0 s delta: 1 p1: 0 s delta: 1 p1: 0 s delta: 2 p2: 0 s delta: 2 p2: 0 s delta: 3 p1: 0 s delta: 3 … What I also learnt using this command is that once the simulation time gets incremented, delta count doesn't get reset to 0. So when I call wait(0, SC_NS) it will internally make call to event.notify(0, SC_NS) and wait(>0, SC_NS) would call event.notify(0>, SC_NS)?
  5. Hallo Phillip, thank you for the document. It's exactly what I needed. I find it to be very helpful. I want to ask two more things. I read section 4.2.1 of the document you provided and there it's stated: "A time-out results from, and only from, certain calls to functions wait or next_trigger, which are member functions of class sc_module, member functions of class sc_prim_channel, and non-member functions. A time-out resulting from a call with a zero-valued time argument is added to the set of delta notifications and time-outs. A time-out resulting from a call
  6. Hello everyone, first of all I apologize if the post is too big and I know sometimes people get discouraged to read big posts. On the other hand I spent quite some time trying to make the post as clear as possible for the reader. So please do not get discouraged :). My SystemC version: SystemC 2.3.1 My operating System: Ubuntu 16.04 I am trying to understand how SystemC simulator works, and for that I ran the following code: SC_MODULE(EventNotifications) { sc_event evt1; void p1() { evt1.notify(10, SC_NS); evt1.notify(5, SC_NS); evt1.notify(); evt1.notify(0, S
×
×
  • Create New...