TLM 2.0 defines four different timing entities to describe temporal decoupling. These are illustrated in Figure 9.1.
This represents the time unit on which all threads synchronize. For example a Global Quantum of 100μs means that all threads synchronize on 100μs 200μs, 300μs etc. Although the TLM 2.0 standard refers to this as just the Global Quantum, it is a system wide concept and for clarity this application note refers to it as the System Global Quantum.
This represents the time unit on which a particular thread synchronizes. The TLM 2.0 standard allows different threads to have their own private time unit of synchronization, which is very confusingly also referred to in the standard as the Global Quantum.
To avoid confusion, in this application note, the term Thread Global Quantum is used to mean the global quantum used by a particular thread.
Having different values for the global quantum in different threads is a recipe for complete confusion, while offering few advantages. The user is strongly recommended to set the Thread Global Quantum to the same value as the System Global Quantum when the thread is created and not change it.
For each thread, this represents the time remaining from the
current SystemC time (as returned by
sc_time_stamp
) until the end of the
current Thread Global Quantum.
For example if the current SystemC time stamp is 235μs and the Thread Global Quantum is 100μs, then the Local Quantum will be 65μs—the time until the 300μs Thread Global Quantum synchronization is due.
If the recommendation that all threads set their Thread Global Quantum to be the same as the System Global Quantum is followed, then the value of the Local Quantum will be the same in all threads.
Each thread is allowed to hold a local view of time, which runs ahead of the current SystemC time. This is known as the Local Time Offset
The Local Time Offset must not take the thread's local view of time past the next Thread Global Quantum, i.e. it cannot exceed the Local Quantum.
For example if the current SystemC time stamp is 235μs and the Thread Global Quantum is 100μs, then a local time offset of 45μs would represent a thread local effective time of 280μs.