?? 1076_8.html
字號:
[ <b>report</b> expression ]
[ <b>severity</b> expression ]
</pre>
<p>If the <b>report</b> clause is present, it must include an expression of predefined type STRING that specifies a message to be reported. If the <b>severity</b> clause is present, it must specify an expression of predefined type SEVERITY_LEVEL that specifies the severity level of the assertion.
<p>The<b> report</b> clause specifies a message string to be included in error messages generated by the assertion. In the absence of a <b>report</b> clause for a given assertion, the string "Assertion violation." is the default value for the message string. The <b>severity</b> clause specifies a severity level associated with the assertion. In the absence of a <b>severity</b> clause fora given assertion, the default value of the severity level is ERROR.
<p>Evaluation of an assertion statement consists of evaluation of the Boolean expression specifying the condition. If the expression results in the value FALSE, then an <i>assertion violation</i> is said to occur. When an assertion violation occurs, the <b>report</b> and <b>severity</b> clause expressions of the corresponding assertion, if present, are evaluated. The specified message string and severity level (or the corresponding default values, if not specified) are then used to construct an error message.
<p>The error message consists of at least
<ol type="a">
<li>An indication that this message is from an assertion
<li>The value of the severity level
<li>The value of the message string
<li>The name of the design unit (see <a href = "1076_11.HTM#11.1"> 11.1 </a> ) containing the assertion
</ol>
<h2><a name="8.3"> <a href = "1076_8.HTM#8.3"> 8.3 </a> Report statement</a></h2>
<p>A report statement displays a message.
<pre> report_statement ::=
[ label : ]
<b>report</b> expression
[ <b>severity</b> expression ] ;
</pre>
<p>The <b>report</b> statement expression must be of the predefined type STRING. The string value of this expression is included in the message generated by the report statement. If the <b>severity</b> clause is present, it must specify an expression of predefined type SEVERITY_LEVEL. The severity clause specifies a severity level associated with the report. In the absence of a <b>severity</b> clause for a given report, the default value of the severity level is NOTE.
<p>The evaluation of a report statement consists of the evaluation of the report expression and severity clause expression, if present. The specified message string and severity level (or corresponding default, if the severity level is not specified) are then used to construct a report message.
<p>The report message consists of at least
<ol type="a">
<li>An indication that this message is from a report statement
<li>The value of the severity level
<li>The value of the message string
<li>The name of the design unit containing the report statement
</ol>
<p><i>Example:</i>
<pre> <b>report</b> "Entering process P"; -- A report statement
-- with default severity NOTE.
<b>report</b> "Setup or Hold violation; outputs driven to 'X' -- Another report statement;
<b>severity</b> WARNING; -- severity is specified.
</pre>
<h2><a><a name="8.4"> <a href = "1076_8.HTM#8.4"> 8.4 </a> Signal assignment statement</a></a></h2>
<p>A signal assignment statement modifies the projected output waveforms contained in the drivers of one or more signals (see <a href = "1076_12.HTM#12.6.1"> 12.6.1 </a> ).
<pre> signal_assignment_statement ::=
[ label : ] target <= [ delay_mechanism ] waveform ;
delay_mechanism ::=
<b>transport</b>
| [ <b>reject</b> <i>time</i>_expression ] <b>inertial</b>
target ::=
name
| aggregate
waveform ::=
waveform_element { , waveform_element }
| <b>unaffected</b>
</pre>
<p>If the target of the signal assignment statement is a name, then the name must denote a signal, and the base type of the value component of each transaction produced by a waveform element on the right-hand side must be the same as the base type of the signal denoted by that name. This form of signal assignment assigns right-hand side values to the drivers associated with a single (scalar or composite) signal.
<p>If the target of the signal assignment statement is in the form of an aggregate, then the type of the aggregate must be determinable from the context, excluding the aggregate itself but including the fact that the type of the aggregate must be a composite type. The base type of the value component of each transaction produced by a waveform element on the right-hand side must be the same as the base type of the aggregate. Furthermore, the expression in each element association of the aggregate must be a locally static name that denotes a signal. This form of signal assignment assigns slices or subelements of the right-hand side values to the drivers associated with the signal named as the corresponding slice or subelement of the aggregate.
<p>If the target of a signal assignment statement is in the form of an aggregate,and if the expression in an element association of that aggregate is a signal name that denotes a given signal, then the given signal and each subelement thereof (if any) are said to be <i>identified</i> by that element association as targets of the assignment statement. It is an error if a given signal or any subelement thereof is identified as a target by more than one element association in such an aggregate. Furthermore, it is an error if an element association in such an aggregate contains an <b>others</b> choice or a choice that is a discrete range.
<p>The right-hand side of a signal assignment may optionally specify a delay mechanism. A delay mechanism consisting of the reserved word <b>transport</b> specifies that the delay associated with the first waveform element is to be construed as <i>transport</i> delay. Transport delay is characteristic of hardware devices (such as transmission lines) that exhibit nearly infinite frequency response: any pulse is transmitted, no matter how short its duration. If no delay mechanism is present, or if a delay mechanism including the reserved word <b>inertial</b> is present, the delay is construed to be <i>inertial</i> delay. Inertial delay is characteristic of switching circuits:a pulse whose duration is shorter than the switching time of the circuit will not be transmitted, or in the case that a pulse rejection limit is specified, a pulse whose duration is shorter than that limit will not be transmitted.
<p>Every inertially delayed signal assignment has a <i>pulse rejection limit</i>. If the delay mechanism specifies inertial delay, and if the reserved word <b>reject</b> followed by a time expression is present, then the time expression specifies the pulse rejection limit. In all other cases, the pulse rejection limit is specified by the time expression associated with the first waveform element.
<p>It is an error if the pulse rejection limit for any inertially delayed signal assignment statement is either negative or greater than the time expression associated with the first waveform element.
<p>It is an error if the reserved word <b>unaffected</b> appears as a waveform in a (sequential) signal assignment statement.
<p>NOTE<i>--</i>The reserved word <b>unaffected</b> may only appear as a waveform in concurrent signal assignment statements. See <a href = "1076_9.HTM#9.5.1"> 9.5.1 </a> .
<p><i>Examples:</i>
<pre>-- Assignments using inertial delay:
-- The following three assignments are equivalent to each other:
Output_pin <= Input_pin <b>after</b> 10 ns;
Output_pin <= <b>inertial</b> Input_pin <b>after</b> 10 ns;
Output_pin <= <b>reject</b> 10 ns <b>inertial</b> Input_pin <b>after</b> 10 ns;
-- Assignments with a <i>pulse rejection limit</i> less than the time expression:
Output_pin <= <b>reject</b> 5 ns <b>inertial</b> Input_pin <b>after</b> 10 ns;
Output_pin <= <b>reject</b> 5 ns <b>inertial</b> Input_pin <b>after</b> 10 ns, <b>not</b> Input_pin <b>after</b> 20 ns;
-- Assignments using transport delay:
<b> </b> Output_pin <= <b>transport</b> Input_pin <b>after</b> 10 ns;
Output_pin <= <b>transport</b> Input_pin <b>after</b> 10 ns, <b>not</b> Input_pin <b>after</b> 20 ns;
-- Their equivalent assignments:
Output_pin <= <b>reject</b> 0 ns <b>inertial</b> Input_pin <b>after</b> 10 ns;
Output_pin <= <b>reject</b> 0 ns <b>inertial</b> Input_pin <b>after</b> 10 ns, <b>not</b> Input_pin <b>after</b> 10 ns;
</pre>
<p>NOTE<i>--</i>If a right-hand side value expression is either a numeric literal or an attribute that yields a result of type <i>universal_integer</i> or <i>universal_real,</i>then an implicit type conversion is performed.
<h3><a name="8.4.1"> <a href = "1076_8.HTM#8.4.1"> 8.4.1 </a> Updating a projected output waveform</a></h3>
<p>The effect of execution of a signal assignment statement is defined in terms of its effect upon the projected output waveforms (see <a href = "1076_12.HTM#12.6.1"> 12.6.1 </a> ) representing the current and future values of drivers of signals.
<pre> waveform_element ::=
<i> value</i>_expression [ <b>after</b> <i>time</i>_expression ]
| <b>null</b> [ <b>after</b> <i>time</i>_expression ]
</pre>
<p>The future behavior of the driver(s) for a given target is defined by transactions produced by the evaluation of waveform elements in the waveform of a signal assignment statement. The first form of waveform element is used to specify that the driver is to assign a particular value to the target at the specified time. The second form of waveform element is used to specify that the driver of the signal is to be turned off, so that it (at least temporarily) stops contributing to the value of the target. This form of waveform element is called a <i>null waveform element</i>. It is an error if the target of a signal assignment statement containing a null waveform element is not a guarded signal or an aggregate of guarded signals.
<p>The base type of the time expression in each waveform element must be the predefined physical type TIME as defined in package STANDARD. If the <b>after</b> clause of a waveform element is not present, then an implicit"<b>after</b> 0 ns" is assumed. It is an error if the time expression in a waveform element evaluates to a negative value.
<p>Evaluation of a waveform element produces a single transaction. The time component of the transaction is determined by the current time added to the value of the time expression in the waveform element. For the first form of waveform element, the value component of the transaction is determined by the value expression in the waveform element. For the second form of waveform element, the value component is not defined by the language, but it is defined to be of the type of the target. A transaction produced by the evaluation of the second form of waveform element is called a <i>null transaction</i>.
<p>For the execution of a signal assignment statement whose target is of a scalar type, the waveform on its right-hand side is first evaluated. Evaluation of a waveform consists of the evaluation of each waveform element in the waveform. Thus, the evaluation of a waveform results in a sequence of transactions, where each transaction corresponds to one waveform element in the waveform. These transactions are called <i>new </i>transactions. It is an error if the sequence of new transactions is not in ascending order with respect to time.
<p>The sequence of transactions is then used to update the projected output waveform representing the current and future values of the driver associated with the signal assignment statement. Updating a projected output waveform consists of the deletion of zero or more previously computed transactions(called <i>old</i> transactions) from the projected output waveform and the addition of the new transactions, as follows:
<ol type="a">
<li>All old transactions that are projected to occur at or after the time at which the earliest new transaction is projected to occur are deleted from the projected output waveform.
<p><li>The new transactions are then appended to the projected output waveform in the order of their projected occurrence.
<p>If the initial delay is inertial delay according to the definitions of <a href = "1076_8.HTM#8.4"> 8.4 </a> , the projected output waveform is further modified as follows:
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -