📄 ch13.3.htm
字号:
</A>The following example shows four edge-sensitive path declarations. Note that each path has a unique edge or condition.</P><P CLASS="Body"><A NAME="pgfId=617"> </A></P><DIV><IMG SRC="ch13-14.gif"></DIV><P CLASS="Body"><A NAME="pgfId=618"> </A>The two state-dependent path declarations shown below are not legal because even though they have different conditions, the destinations are not specified in the same way: the first destination is a part-select, the second is a bit-select.<A NAME="marker=172"> </A><A NAME="marker=175"> </A><A NAME="marker=176"> </A><A NAME="marker=177"> </A><A NAME="marker=178"> </A></P><P CLASS="Body"><A NAME="pgfId=620"> </A></P><DIV><MAP NAME="ch13-15"></MAP><IMG SRC="ch13-15.gif" USEMAP="#ch13-15"></DIV><P CLASS="SubSubSect"><A NAME="pgfId=635"> </A>The ifnone condition</P><P CLASS="Body"><A NAME="pgfId=636"> </A>The <B CLASS="Keyword">ifnone</B> keyword is used to specify a default state-dependant path delay for when all other conditions for the path are false. The <B CLASS="Keyword">ifnone</B> condition must specify the same module path source and destination as the state dependant module paths. The following rules apply to module paths specified with the <B CLASS="Keyword">ifnone</B> condition:</P><UL><LI CLASS="DashedList"><A NAME="pgfId=637"> </A>Only simple module paths may be described with an <B CLASS="Keyword">ifnone</B> condition.</LI><LI CLASS="DashedList"><A NAME="pgfId=638"> </A>The state-dependant paths which correspond to the <B CLASS="Keyword">ifnone</B> path may be either simple module paths or edge-sensitive paths.</LI><LI CLASS="DashedList"><A NAME="pgfId=639"> </A>If there are no corresponding state-dependent module paths to the <B CLASS="Keyword">ifnone</B> module path, then the <B CLASS="Keyword">ifnone</B> module path shall be treated the same as an unconditional simple module path. </LI><LI CLASS="DashedList"><A NAME="pgfId=653"> </A>It is illegal to specify both an <B CLASS="Keyword">ifnone</B> condition for a module path and an unconditional simple module path for the same module path.</LI></UL></DIV><DIV><H3 CLASS="Example"><A NAME="pgfId=656"> </A></H3><P CLASS="Body"><A NAME="pgfId=657"> </A>The following are valid state-dependant path combinations:</P><P CLASS="Body"><A NAME="pgfId=661"> </A></P><DIV><MAP NAME="ch13-16"></MAP><IMG SRC="ch13-16.gif" USEMAP="#ch13-16"></DIV><P CLASS="Body"><A NAME="pgfId=662"> </A>The following module path description combination is illegal because it combines a state-dependant path using an <B CLASS="Keyword">ifnone</B> condition and an unconditional path for the same module path.</P><P CLASS="Body"><A NAME="pgfId=664"> </A></P><DIV><MAP NAME="ch13-17"></MAP><IMG SRC="ch13-17.gif" USEMAP="#ch13-17"></DIV><P CLASS="SubSubSect"><A NAME="pgfId=341"> </A>State-dependent and unconditional path precedence</P><P CLASS="Body"><A NAME="pgfId=629"> </A>A simple module path with no edge-sensitive or state-dependant conditions is an unconditional path. If both an unconditional path and a state-dependant path are specified for the same module path, then the unconditional path delay shall take precedence over the state-dependent path delay.</P><P CLASS="SubSection"><A NAME="pgfId=344"> </A><A NAME="40926"> </A>Full connection and parallel connection paths</P><P CLASS="Body"><A NAME="pgfId=348"> </A>The operator <CODE CLASS="code">*></CODE> shall be used to establish a <I CLASS="Emphasis">full connection</I><A NAME="marker=76"> </A><A NAME="marker=107"> </A> between source and destination. In a full connection, every bit in the source shall connect to every bit in the destination. The module path source need not have the same number of bits as the module path destination.</P><P CLASS="Body"><A NAME="pgfId=423"> </A>The full connection can handle most types of module paths, since it does not restrict the size or number of source signals and destination signals. The following situations require the use of full connections:</P><UL><LI CLASS="DashedList"><A NAME="pgfId=429"> </A>to describe a module path between a vector and a scalar</LI><LI CLASS="DashedList"><A NAME="pgfId=430"> </A>to describe a module path between vectors of different sizes</LI><LI CLASS="DashedList"><A NAME="pgfId=431"> </A>to describe a module path with multiple sources or multiple destinations in a single statement (see <A HREF="ch13.3.htm#59756" CLASS="XRef">See Declaring multiple module paths in a single statement</A>)</LI></UL><P CLASS="Body"><A NAME="pgfId=365"> </A>The operator <CODE CLASS="code">=></CODE> shall be used to establish a <I CLASS="Emphasis">parallel connection</I><A NAME="marker=108"> </A><A NAME="marker=118"> </A> between source and destination. In a parallel connection, each bit in the source shall connect to one corresponding bit in the destination. Parallel module paths can be created only between sources and destinations that contain the same number of bits.</P><P CLASS="Body"><A NAME="pgfId=433"> </A>Parallel connections are more restrictive than full connections. They only connect one source to one destination, where each signal contains the same number of bits. Therefore, a parallel connection may only be used to describe a module path between two vectors of the same size. Since scalars are one bit wide, either *> or => may be used to set up bit-to-bit connections between two scalars.</P></DIV><DIV><H3 CLASS="Example"><A NAME="pgfId=434"> </A></H3><P CLASS="Body"><A NAME="pgfId=466"> </A><A HREF="ch13.3.htm#difference between parallel and full connections . . ." CLASS="XRef">See : The difference between parallel and full connection paths</A> illustrates how a parallel connection differs from a full connection between two 4-bit vectors.</P><P CLASS="Body"><A NAME="pgfId=472"> </A> </P><DIV><IMG SRC="ch13-18.gif"></DIV><P CLASS="FigCapBody"><A NAME="pgfId=479"> </A>Figure 13-2: The differenc<A NAME="difference between parallel and full connections . . ."> </A>e between parallel and full connection paths</P><P CLASS="Body"><A NAME="pgfId=623"> </A>The example below shows module paths for a 2:1 multiplexor with two 8-bit inputs and one 8-bit output.</P><P CLASS="Body"><A NAME="pgfId=486"> </A></P><DIV><IMG SRC="ch13-19.gif"></DIV><P CLASS="Body"><A NAME="pgfId=519"> </A>The module path from <CODE CLASS="code">s</CODE> to <CODE CLASS="code">q</CODE> uses a full connection (<CODE CLASS="code">*>)</CODE> because it connects a scalar source--the 1-bit select line--to a vector destination--the 8-bit output bus. The module paths from both input lines <CODE CLASS="code">in1</CODE> and <CODE CLASS="code">in2</CODE> to <CODE CLASS="code">q</CODE> use a parallel connection (<CODE CLASS="code">=></CODE>) because they set up parallel connections between two 8-bit buses.</P><P CLASS="SubSection"><A NAME="pgfId=502"> </A><A NAME="59756"> </A><A NAME="marker=202"> </A><A NAME="marker=203"> </A>Declaring multiple module paths in a single statement</P><P CLASS="Body"><A NAME="pgfId=294"> </A>Multiple module paths may be described in a single statement by using the symbol <CODE CLASS="code">*></CODE> to connect a comma separated list of sources to a comma separated list of destinations. When describing multiple module paths in one statement, the lists of <A NAME="marker=15"> </A>sources and <A NAME="marker=16"> </A>destinations may contain a mix of scalars and vectors of any size. </P><P CLASS="Body"><A NAME="pgfId=298"> </A>The connection in a multiple module path declaration is always a full connection.<A NAME="marker=157"> </A><A NAME="marker=158"> </A><A NAME="marker=159"> </A><A NAME="marker=160"> </A> <A NAME="marker=161"> </A></P></DIV><DIV><H3 CLASS="Example"><A NAME="pgfId=303"> </A></H3><PRE CLASS="CodeIndent"><A NAME="pgfId=505"> </A>(a, b, c *> q1, q2) = 10;</PRE><P CLASS="Body"><A NAME="pgfId=506"> </A>is equivalent to the following six individual module path assignments: </P><DIV><IMG SRC="ch13-20.gif"></DIV><P CLASS="SubSection"><A NAME="pgfId=295"> </A><A NAME="marker=19"> </A><A NAME="marker=100"> </A>Module path polarity</P><P CLASS="Body"><A NAME="pgfId=317"> </A>The polarity of a module path is an arbitrary specification indicating whether or not the direction of a signal transition is inverted as it propagates from the input to the output. This arbitrary polarity description does not affect the actual propagation of data or events through the model; how a rise or a fall at the source propagates to the destination depends on the internal logic of the module.</P><P CLASS="Body"><A NAME="pgfId=300"> </A>Module paths may specify <EM CLASS="-">any</EM> of three polarities:</P><UL><LI CLASS="DashedList"><A NAME="pgfId=401"> </A>unknown polarity</LI><LI CLASS="DashedList"><A NAME="pgfId=454"> </A>positive polarity</LI><LI CLASS="DashedList"><A NAME="pgfId=456"> </A>negative polarity</LI></UL><P CLASS="SubSubSect"><A NAME="pgfId=457"> </A>Unknown polarity</P><P CLASS="Body"><A NAME="pgfId=557"> </A>By default, module paths shall have <I CLASS="Emphasis">unknown polarity</I><A NAME="marker=101"> </A>--that is, a transition at the path source may propagate to the destination in an unpredictable way, as follows:</P><UL><LI CLASS="DashedList"><A NAME="pgfId=575"> </A>A rise at the source may cause either a rise transition, a fall transition, or no transition at the destination.</LI><LI CLASS="DashedList"><A NAME="pgfId=578"> </A>A fall at the source may cause either a rise transition, a fall transition, or no transition at the destination.</LI></UL><P CLASS="Body"><A NAME="pgfId=331"> </A>A module path specified either as a full connection or a parallel connection, but without a polarity operator <CODE CLASS="code">+</CODE> or <CODE CLASS="code">-</CODE>, shall be treated as a module path with unknown polarity.</P><P CLASS="SubSubSect"><A NAME="pgfId=606"> </A>Positive polarity</P><P CLASS="Body"><A NAME="pgfId=645"> </A>For module paths with <I CLASS="Emphasis">positive polarity</I><A NAME="marker=112"> </A>, any transition at the source may cause the same transition at the destination, as follows:</P><UL><LI CLASS="DashedList"><A NAME="pgfId=646"> </A>A rise at the source may cause either a rise transition or no transition at the destination.</LI><LI CLASS="DashedList"><A NAME="pgfId=648"> </A>A fall at the source may cause either a fall transition or no transition at the destination.</LI></UL><P CLASS="Body"><A NAME="pgfId=316"> </A>A module path with positive polarity shall be specified by prefixing <CODE CLASS="code">+</CODE> polarity operator to <CODE CLASS="code">=></CODE> or <CODE CLASS="code">*></CODE>.</P><P CLASS="SubSubSect"><A NAME="pgfId=649"> </A>Negative polarity</P><P CLASS="Body"><A NAME="pgfId=650"> </A>For module paths with <I CLASS="Emphasis">negative polarity</I><A NAME="marker=113"> </A>, any transition at the source may cause the opposite transition at the destination, as follows:</P><UL><LI CLASS="DashedList"><A NAME="pgfId=651"> </A>A rise at the source may cause either a fall transition or no transition at the destination.</LI><LI CLASS="DashedList"><A NAME="pgfId=652"> </A>A fall at the source may cause either a rise transition or no transition at the destination. </LI></UL><P CLASS="Body"><A NAME="pgfId=324"> </A>A module path with negative polarity shall be specified by prefixing <CODE CLASS="code">-</CODE> polarity operator to <CODE CLASS="code">=></CODE> or <CODE CLASS="code">*></CODE>.</P></DIV><DIV><H3 CLASS="Example"><A NAME="pgfId=318"> </A></H3><P CLASS="Body"><A NAME="pgfId=321"> </A>The following examples show each type of path polarity:</P><P CLASS="Body"><A NAME="pgfId=655"> </A></P><DIV><IMG SRC="ch13-21.gif"></DIV></DIV></DIV><HR><P><A HREF="ch13.htm">Chapter start</A> <A HREF="ch13.2.htm">Previous page</A> <A HREF="ch13.4.htm">Next page</A></P></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -