?? 1076_12.html
字號:
<p>-- If S is a resolved signal and has one or more sources, then the driving values of the sources of S are examined. It is an error if any of these driving values is a composite where one or more subelement values are determined by the null transaction (see <a href = "1076_8.HTM#8.4.1"> 8.4.1 </a> ) and one or more subelement values are not determined by the null transaction. If S is of signal kind <b>register</b> and all the sources of S have values determined by the null transaction, then the driving value of S is unchanged from its previous value. Otherwise, the driving value of S is obtained by executing the resolution function associated with S, where that function is called with an input parameter consisting of the concatenation of the driving values of the sources of S, with the exception of the value of any source of S whose current value is determined by the null transaction.
</ul>
<p>The driving value of any signal S that is not a basic signal is determined as follows:
<ul>
<p>-- If S is a subelement of a resolved signal R, the driving value of S is the corresponding subelement value of the driving value of R.
<p>-- Otherwise (S is a nonresolved, composite signal), the driving value of Sis equal to the aggregate of the driving values of each of the basic signals that are the subelements of S.
</ul>
<p>For a scalar signal S, the <i>effective value</i> of S is determined in the following manner:
<ul>
<p>-- If S is a signal declared by a signal declaration, a port of mode <b>buffer</b>, or an unconnected port of mode <b>inout</b>, then the effective value of S is the same as the driving value of S.
<p>-- If S is a connected port of mode <b>in</b> or <b>inout</b>, then the effective value of S is the same as the effective value of the actual part of the association element that associates an actual with S (see <a href = "1076_4.HTM#4.3.2.2"> 4.3.2.2 </a> ). The effective value of an actual part is obtained by evaluating the actual part, using the effective value of the signal denoted by the actual designator in place of the actual designator.
<p>-- If S is an unconnected port of mode <b>in</b>, the effective value of S is given by the default value associated with S (see <a href = "1076_4.HTM#4.3.1.2"> 4.3.1.2 </a> ).
</ul>
<p>For a composite signal R, the effective value of R is the aggregate of the effective values of each of the subelements of R.
<p>For a scalar signal S, both the driving and effective values must belong to the subtype of the signal. For a composite signal R, an implicit subtype conversion is performed to the subtype of R; for each element of R, there must be a matching element in both the driving and the resolved value, and vice versa.
<p>In order to update a signal during a given simulation cycle, the kernel process first determines the driving and effective values of that signal. The kernel process then updates the variable containing the current value of the signal with the newly determined effective value, as follows:
<ul>
<p>a) If S is a signal of some type that is not an array type, the effective value of S is used to update the current value of S. A check is made that the effective value of S belongs to the subtype of S. An error occurs if this subtype check fails. Finally, the effective value of S is assigned to the variable representing the current value of the signal.<br>
<p>b) If S is an array signal (including a slice of an array), the effective value of S is implicitly converted to the subtype of S. The subtype conversion checks that for each element of S there is a matching element in the effective value and vice versa. An error occurs if this check fails. The result of this subtype conversion is then assigned to the variable representing the current value of S.
</ul>
<p>If updating a signal causes the current value of that signal to change, then an <i>event</i> is said to have occurred on the signal. This definition applies to any updating of a signal, whether such updating occurs according to the above rules or according to the rules for updating implicit signals given in <a href = "1076_12.HTM#12.6.3"> 12.6.3 </a> . The occurrence of an event may cause the resumption and subsequent execution of certain processes during the simulation cycle in which the event occurs.
<p>For any signal other than one declared with the signal kind <b>register</b>,the driving and effective values of the signal are determined and the current value of that signal is updated as described above in every simulation cycle. A signal declared with the signal kind <b>register</b> is updated in the same fashion during every simulation cycle except those in which all of its sources have current values that are determined by null transactions.
<p>A <i>net</i> is a collection of drivers, signals (including ports and implicit signals), conversion functions, and resolution functions that, taken together,determine the effective and driving values of every signal on the net.
<p>Implicit signals GUARD S'Stable(T), S'Quiet(T), and S'Transaction, for any prefix S and any time T, are not updated according to the above rules; such signals are updated according to the rules described in <a href = "1076_12.HTM#12.6.3"> 12.6.3 </a> .
<p><a>NOTES</a>
<p>1--In a simulation cycle, a subelement of a composite signal may be quiet,but the signal itself may be active.
<p>2--The rules concerning association of actuals with formals (see <a href = "1076_4.HTM#4.3.2.2"> 4.3.2.2 </a> ) imply that, if a composite signal is associated with a composite port of mode <b>out</b>, <b>inout</b>, or <b>buffer</b>, and if no conversion function or type conversion appears in either the actual or formal part of the association element, then each scalar subelement of the formal is a source of the matching subelement of the actual. In such a case, a given subelement of the actual will be active if and only if the matching subelement of the formal is active.
<p>3--The algorithm for computing the driving value of a scalar signal S is recursive. For example, if S is a local signal appearing as an actual in a port association list whose formal is of mode <b>out</b> or <b>inout</b>, the driving value of S can only be obtained after the driving value of the corresponding formal part is computed. This computation may involve multiple executions of the above algorithm.
<p>4--Similarly, the algorithm for computing the effective value of a signal S is recursive. For example, if a formal port S of mode <b>in</b> corresponds to an actual A, the effective value of A must be computed before the effective value of S can be computed. The actual A may itself appear as a formal port in aport association list.
<p>5--No effective value is specified for <b>out</b> and <b>linkage</b> ports, since these ports may not be read.
<p>6--Overloading the operator "=" has no effect on the propagation of signal values.
<p>7--A signal of kind <b>register</b> may be active even if its associated resolution function does not execute in the current simulation cycle if the values of all of its drivers are determined by the null transaction and at least one of its drivers is also active.
<p>8--The definition of the driving value of a basic signal exhausts all cases, with the exception of a non-resolved signal with more than one source. This condition is defined as an error in <a href = "1076_4.HTM#4.3.1.2"> 4.3.1.2 </a> .
<h3><a name="12.6.3"> <a href = "1076_12.HTM#12.6.3"> 12.6.3 </a> Updating implicit signals</a></h3>
<p>The kernel process updates the value of each implicit signal GUARD associated with a block statement that has a guard expression. Similarly, the kernel process updates the values of each implicit signal S'Stable(T), S'Quiet(T), or S'Transaction for any prefix S and any time T; this also involves updating the drivers of S'Stable(T) and S'Quiet(T).
<p>For any implicit signal GUARD, the current value of the signal is modified if and only if the corresponding guard expression contains a reference to a signal S and if S is active during the current simulation cycle. In such a case, the implicit signal GUARD is updated by evaluating the corresponding guard expression and assigning the result of that evaluation to the variable representing the current value of the signal.
<p>For any implicit signal S'Stable(T), the current value of the signal (and likewise the current state of the corresponding driver) is modified if and only if one of the following statements is true:
<ul>
<p>-- An event has occurred on S in this simulation cycle.
<p>-- The driver of S'Stable(T) is active.
</ul>
<p>If an event has occurred on signal S, then S'Stable(T) is updated by assigning the value FALSE to the variable representing the current value of S'Stable(T), and the driver of S'Stable(T) is assigned the waveform TRUE <b>after</b> T. Otherwise, if the driver of S'Stable(T) is active, then S'Stable(T) is updated by assigning the current value of the driver to the variable representing the current value of S'Stable(T). Otherwise, neither the variable nor the driver is modified.
<p>Similarly, for any implicit signal S'Quiet(T), the current value of the signal (and likewise the current state of the corresponding driver) is modified if and only if one of the following statements is true:
<ul>
<p>-- S is active.
<p>-- The driver of S'Quiet(T) is active.
</ul>
<p>If signal S is active, then S'Quiet(T) is updated by assigning the value FALSE to the variable representing the current value of S'Quiet(T), and the driver of S'Quiet(T) is assigned the waveform TRUE <b>after</b> T. Otherwise, if the driver of S'Quiet(T) is active, then S'Quiet(T) is updated by assigning the current value of the driver to the variable representing the current value of S'Quiet(T). Otherwise, neither the variable nor the driver is modified.
<p>Finally, for any implicit signal S'Transaction, the current value of the signal is modified if and only if S is active. If signal S is active, then S'Transaction is updated by assigning the value of the expression (<b>not</b> S'Transaction) to the variable representing the current value of S'Transaction. At most one such assignment will occur during any given simulation cycle.
<p>For any implicit signal S'Delayed(T), the signal is not updated by the kernel process. Instead, it is updated by constructing an equivalent process (see <a href = "1076_14.HTM#14.1"> 14.1 </a> ) and executing that process.
<p>The current value of a given implicit signal denoted by R is said to <i>depend</i> upon the current value of another signal S if one of the following statements is true:
<ul>
<p>-- R denotes an implicit GUARD signal and S is any other implicit signal named within the guard expression that defines the current value of R.
<p>-- R denotes an implicit signal S'Stable(T).
<p>-- R denotes an implicit signal S'Quiet(T).
<p>-- R denotes an implicit signal S'Transaction.
<p>-- R denotes an implicit signal S'Delayed(T).
</ul>
<p>These rules define a partial ordering on all signals within a model. The updating of implicit signals by the kernel process is guaranteed to proceed in such a manner that, if a given implicit signal R depends upon the current value of another signal S, then the current value of S will be updated during a particular simulation cycle prior to the updating of the current value of R.
<p>NOTE<i>--</i>These rules imply that, if the driver of S'Stable(T) is active, then the new current value of that driver is the value TRUE. Furthermore, these rules imply that, if an event occurs on S during a given simulation cycle, and if the driver of S'Stable(T) becomes active during the same cycle, the variable representing the current value of S'Stable(T) will be assigned the value FALSE, and the current value of the driver of S'Stable(T) during the given cycle will never be assigned to that signal.
<h3><a name="12.6.4"> <a href = "1076_12.HTM#12.6.4"> 12.6.4 </a> The simulation cycle</a></h3>
<p>The execution of a model consists of an initialization phase followed by the repetitive execution of process statements in the description of that model. Each such repetition is said to be a <i>simulation cycle.</i> In each cycle, the values of all signals in the description are computed. If as a result of this computation an event occurs on a given signal, process statements that are sensitive to that signal will resume and will be executed as part of the simulation cycle.
<p>At the beginning of initialization, the current time, T<sub>c</sub>, is assumed to be 0 ns.
<p>The initialization phase consists of the following steps:
<ul>
<p>-- The driving value and the effective value of each explicitly declared signal are computed, and the current value of the signal is set to the effective value. This value is assumed to have been the value of the signal for an infinite length of time prior to the start of simulation.
<p>-- The value of each implicit signal of the form S'Stable(T) or S'Quiet(T)is set to True. The value of each implicit signal of the form S'Delayed(T) is set to the initial value of its prefix, S.
<p>-- The value of each implicit GUARD signal is set to the result of evaluating the corresponding guard expression.
<p>-- Each nonpostponed process in the model is executed until it suspends.
<p>-- Each postponed process in the model is executed until it suspends.
<p>-- The time of the next simulation cycle (which in this case is the first simulation cycle), T<sub>n</sub>, is calculated according to the rules of step f of the simulation cycle, below.
</ul>
<p>A simulation cycle consists of the following steps:
<ol type="a">
<li>The current time, T<sub>c</sub> is set equal to T<sub>n</sub>. Simulation is complete when T<sub>n</sub>= TIME'HIGH and there are no active drivers or process resumptions at T<sub>n</sub>.<br>
<li>Each active explicit signal in the model is updated. (Events may occur on signals as a result.)<br>
<li>Each implicit signal in the model is updated. (Events may occur on signals as a result.)<br>
<li>For each process P, if P is currently sensitive to a signal S and if an event has occurred on S in this simulation cycle, then P resumes.<br>
<li>Each nonpostponed process that has resumed in the current simulation cycle is executed until it suspends.<br>
<li>The time of the next simulation cycle, T<sub>n</sub>, is determined by setting it to the earliest of<br>
<ol>
<li>TIME'HIGH,<br>
<li>The next time at which a driver becomes active, or<br>
<li>The next time at which a process resumes.<br>
<li>If T<sub>n</sub> = T<sub>c</sub>, then the next simulation cycle (if any) will be a <i>delta cycle</i>.
</ol>
<li>If the next simulation cycle will be a delta cycle, the remainder of this step is skipped. Otherwise, each postponed process that has resumed but has not been executed since its last resumption is executed until it suspends. Then T<sub>n</sub> is recalculated according to the rules of step f. It is an error if the execution of any postponed process causes a delta cycle to occur immediately after the current simulation cycle.
</ol>
<p>NOTES
<p>1--The initial value of any implicit signal of the form S'Transaction is not defined.
<p>2--Updating of explicit signals is described in <a href = "1076_12.HTM#12.6.2"> 12.6.2 </a> ; updating of implicit signals is described in <a href = "1076_12.HTM#12.6.3"> 12.6.3 </a> .
<p>3--When a process resumes, it is added to one of two sets of processes to be executed (the set of postponed processes and the set of nonpostponed processes). However, no process actually begins to execute until all signals have been updated and all executable processes for this simulation cycle have been identified. Nonpostponed processes are always executed during step e of every simulation cycle, while postponed processes are executed during step g of every simulation cycle that does not immediately precede a delta cycle.
<p>4--The second and third steps of the initialization phase and steps b and c of the simulation cycle may occur in interleaved fashion. This interleaving may occur because the implicit signal GUARD may be used as the prefix of another implicit signal; moreover, implicit signals may be associated as actuals with explicit signals, making the value of an explicit signal a function of an implicit signal.
<HR>
<a href="../../HTML/HOMEPG.HTM"><img src="HP.GIF" border=0></a>
<a href="1076_TOC.HTM"><img src="TOP.GIF" BORDER=0></a>
<a href="1076_11.HTM"><img src="LEFT.GIF" BORDER=0></a>
<a href="1076_13.HTM"><img src="RIGHT.GIF" BORDER=0></a>
</body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -