Jump to content

David Long

  • Content Count

  • Joined

  • Last visited

  • Days Won


David Long last won the day on January 3 2019

David Long had the most liked content!


About David Long

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi Karandeep, We presented a paper "A Beginner's Guide to Using SystemC TLM-2.0 IP with UVM" at several European Synopsys User Group (SNUG) meetings in 2012. This included a discussion of using the Generic Payload in a UVM environment which may help. You can download it from the "KnowHow" pages on the Doulos website - http://www.doulos.com/knowhow/sysverilog/SNUG12_uvm_tlm2/ Regards, Dave
  2. This free webinar will be presented in in English, French and German. To see further details and to register please visit: http://www.doulos.com/content/events/easierUVM_FirstSteps_English.php http://www.doulos.com/content/events/easierUVM_FirstSteps_French.php http://www.doulos.com/content/events/easierUVM_FirstSteps_German.php
  3. Hi Amit, Pretty much - static processes are created using the SC_METHOD and SC_THREAD macros. Dynamic processes are created by calling sc_spawn. There is one slight complication, calling sc_spawn from a module's constructor will actually create a static process since the LRM defines a dynamic process as one created from "the end_of_elaboration callback or during simulation" (see Glossary B.51). The LRM uses the term "spawned" and "unspawned" to try to avoid this confusion! Regards, Dave
  4. Hi Amit, The scheduling mechanism for sc_mutex and sc_semaphore is very simple and does not have fifo characteristics (i.e. if several processes are waiting for the mutex/semaphore, they are not granted it based on the order in which they requested it - although there is nothing to stop an implementation of SystemC from executing processes in the same order as they are added to the list of runnable processes, the LRM says that the order is implementation defined). The basic operation of a set of processes using a mutex/semaphore could be like this: 1) a process runs and grabs the f
  5. Hi Amit, I think you are talking about semaphore and mutex in the context of an embedded, multi-threaded software system here. SystemC does not provide all of the features required to model that kind of system (for example there is no built-in scheduler that supports process priorities and pre-emption. The SystemC mutex and semaphore classes run in the evaluation phase and use immediate event notifications so cannot be used to control which process gets access to a shared resource if several are waiting for the mutex/semaphore. sc_mutex and sc_semaphore use the same scheduling mechanis
  6. Hi KS, By default, proc1 runs once during the initialization phase (unless dont_initialize() is called immediately after SC_METHOD(proc1) in the module constructor). Once proc1 has executed, the next_trigger statement changes its sensitivity so that from then on it will be called whenever event x is notified, not when clk has an event. Regards, Dave
  7. Hi KS, If you are just starting out with SystemC, you can probably safely ignore dynamic (spawned) processes - just use SC_METHOD or SC_THREAD in the module's constructor. Dynamic processes can be useful for advanced cases (e.g. responding to some condition that is not known at compile time). Regards, Dave
  8. Hi Amit, I would not say that next_trigger is "like a delay element" since it does not hold up execution of an SC_METHOD (which would be illegal). It overrides the static sensititivity of an SC_METHOD and so changes the conditions which next cause the method to execute. There is an example on page 51 of the LRM. Regards, Dave
  9. Hi Amit, A mutex is used to ensure mutual-exclusive access to a shared resource. Think of it as being like having a single key to unlock access to the resource that you pass between processes that request it. Only one process can have it at a time - any other process that wants it will have to wait until the key becomes available. A semaphore is similar but is more like a bucket containing multiple keys. You can set the number of keys in the bucket when it is created, processes request keys just like the mutex and will have to wait ("block") when no key is available. However, unlike th
  10. Hi KS, No, you are mixing up static/dynamic sensitivity with static/dynamic processes. You can for example have a static process (e.g SC_THREAD) that makes use of dynamic sensitivity (e.g wait(x) ) or a dynamic process (sc_spawn) with static sensitivity (using sc_spawn_options - see section 5.5 of the LRM)). Regards, Dave
  11. Hi, Because process 2 has to suspend and wait for event x, and because event x is only notified by process 1, the state of the instructions seen by process 2 when it wakes up will alway depend on what has happened in process 1 or process 3. Once a process is active, it will remain active until either it reaches the end of the function or it reaches a wait statement. Only one process can be active at the same time. The SystemC scheduler does not currently allow one process to pre-empt another (this feature might be added to a future version). This confirms your assumption above "So the
  12. Hi Amit, Static processes are created before the start of simulation, by calling e.g. SC_THREAD macro or sc_spawn in the constructor or end_elaboration callback. Dynamic processes are created by calling sc_spawn within another process (which will not be executed until the simulation is running). Regards, Dave
  13. Hi KS, Before answering your question, it is worth pointing out the way the SystemC scheduler works. After inititialization, it advances time to the earliest time step where there is a scheduled event notification. It adds all processes that are sensitive to that event (or other events at the same time step) into a list of "runnable" processes. It then resumes execution of every process in the list of runnable processes (one at a time) in some non-deterministic order. This is known as the evaluation phase. An immediate event notification can add processes to the list of runnable processes
  14. John Aynsley, Doulos CTO will be presenting a FREE webinar on "VHDL versus SystemVerilog versus SystemC" on Friday 3 May 2013 There will be 2 sessions to enable attendees from different time zones: 1st run: Time: 9am-10am (BST - UK) 10am-11am (CEST) 1.30pm-2.30pm (IST) 2nd run: Time: 9am-10am (PDT) 12pm-1pm (EDT) 5pm-6pm (BST - UK) For further details and to register, please see the link on the Doulos website: http://www.doulos.com/content/events/VHDL_vs_SV_vs_SC.php
  • Create New...