⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch15.2.htm

📁 Verilog DHL教程
💻 HTM
📖 第 1 页 / 共 2 页
字号:
 </A><B CLASS="Keyword">$dumpvars</B></P></TD></TR></TABLE><P CLASS="SubSubSect"><A NAME="pgfId=323"> </A><A NAME="marker=96"> </A>$comment</P><P CLASS="Body"><A NAME="pgfId=324"> </A>The <B CLASS="Keyword">$comment</B> section provides a means of inserting a comment in the VCD file. </P><P CLASS="Body"><A NAME="pgfId=325"> </A>Syntax:</P><PRE CLASS="BNFDef"><A NAME="pgfId=326"> </A>	<A NAME="marker=97"> </A><B CLASS="Keyword">$comment</B> <I CLASS="Emphasis">comment_text</I> <B CLASS="Keyword">$end</B></PRE><P CLASS="Body"><A NAME="pgfId=327"> </A>Examples:</P><PRE CLASS="CodeIndent"><A NAME="pgfId=328"> </A><B CLASS="Keyword">$comment</B> 	This is a single-line comment	      <B CLASS="Keyword">$end</B> </PRE><PRE CLASS="CodeIndent"><A NAME="pgfId=329"> </A><B CLASS="Keyword">$comment</B> 	This is a 		 multiple-line comment 	   <B CLASS="Keyword">$end</B>	</PRE><P CLASS="SubSubSect"><A NAME="pgfId=330"> </A>$date</P><P CLASS="Body"><A NAME="pgfId=331"> </A>The <B CLASS="Keyword">$date</B> section indicates the date on which the VCD file was generated.</P><P CLASS="Body"><A NAME="pgfId=332"> </A>Syntax:</P><PRE CLASS="BNFDef"><A NAME="pgfId=333"> </A><B CLASS="Keyword">	$date</B><A NAME="marker=98"> </A> <I CLASS="Emphasis">date_text </I><B CLASS="Keyword">$end </B></PRE><P CLASS="Body"><A NAME="pgfId=334"> </A>Example:</P><PRE CLASS="CodeIndent"><A NAME="pgfId=335"> </A><B CLASS="Keyword">$date </B>     		June 25, 1989 09:24:35<B CLASS="Keyword">$end</B></PRE><P CLASS="SubSubSect"><A NAME="pgfId=322"> </A>$enddefinitions</P><P CLASS="Body"><A NAME="pgfId=349"> </A>The<CODE CLASS="code"> </CODE><B CLASS="Keyword">$enddefinitions</B><CODE CLASS="code"> section </CODE>marks the end of the header information and definitions.</P><P CLASS="Body"><A NAME="pgfId=354"> </A>Syntax:</P><PRE CLASS="BNFDef"><A NAME="pgfId=356"> </A><B CLASS="Keyword">	$enddefinitions $end</B><A NAME="marker=78"> </A></PRE><P CLASS="SubSubSect"><A NAME="pgfId=291"> </A>$scope</P><P CLASS="Body"><A NAME="pgfId=292"> </A>The <B CLASS="Keyword">$scope</B> section defines the scope of the variables being dumped.</P><P CLASS="Body"><A NAME="pgfId=293"> </A>Syntax:</P><PRE CLASS="BNFDef"><A NAME="pgfId=294"> </A>	<B CLASS="Keyword">$scope</B><A NAME="marker=76"> </A> scope_type <I CLASS="Emphasis">scope</I>_identifier <B CLASS="Keyword">	$end</B></PRE><PRE CLASS="BNFDef"><A NAME="pgfId=179"> </A>	scope_type ::= <B CLASS="Keyword">module</B> | <B CLASS="Keyword">task</B> | <B CLASS="Keyword">function</B> | <B CLASS="Keyword">begin</B> | <B CLASS="Keyword">fork</B> </PRE><P CLASS="Body"><A NAME="pgfId=194"> </A>The scope type indicates one of the following scopes:</P><P CLASS="Type"><A NAME="pgfId=357"> </A><I CLASS="Emphasis">module</I>	 top-level module and module instances<BR><I CLASS="Emphasis">task</I>	 tasks<BR><I CLASS="Emphasis">function</I> 	 functions<BR><I CLASS="Emphasis">begin</I> 	 named sequential blocks<BR><I CLASS="Emphasis">fork</I> 	 named parallel blocks</P><P CLASS="Body"><A NAME="pgfId=361"> </A>Example:</P><PRE CLASS="CodeIndent"><A NAME="pgfId=362"> </A><B CLASS="Keyword">$scope</B>     		<B CLASS="Keyword">module</B> top<B CLASS="Keyword">$end</B></PRE><P CLASS="SubSubSect"><A NAME="pgfId=371"> </A>$timescale</P><P CLASS="Body"><A NAME="pgfId=372"> </A>The <B CLASS="Keyword">$timescale</B> keyword specifies what timescale was used for the simulation.</P><P CLASS="Body"><A NAME="pgfId=373"> </A>Syntax: 	 	</P><PRE CLASS="BNFDef"><A NAME="pgfId=374"> </A><B CLASS="Keyword">	$timescale</B><A NAME="marker=80"> </A> number time_unit <B CLASS="Keyword">$end</B>number ::= <B CLASS="Keyword">1</B> | <B CLASS="Keyword">10</B> | <B CLASS="Keyword">100</B>time_unit ::= <B CLASS="Keyword">s</B> | <B CLASS="Keyword">ms</B> | <B CLASS="Keyword">us</B> | <B CLASS="Keyword">ns</B> | <B CLASS="Keyword">ps</B> | <B CLASS="Keyword">fs</B></PRE><P CLASS="Body"><A NAME="pgfId=375"> </A>Example:</P><PRE CLASS="CodeIndent"><A NAME="pgfId=376"> </A><B CLASS="Keyword">$timescale</B>  10  ns  <B CLASS="Keyword">$end</B></PRE><P CLASS="SubSubSect"><A NAME="pgfId=363"> </A>$upscope</P><P CLASS="Body"><A NAME="pgfId=364"> </A>The <B CLASS="Keyword">$upscope</B> section indicates a change of scope to the next higher level in the design hierarchy.</P><P CLASS="Body"><A NAME="pgfId=365"> </A>Syntax:</P><PRE CLASS="BNFDef"><A NAME="pgfId=366"> </A><B CLASS="Keyword">	$upscope $end</B><A NAME="marker=79"> </A></PRE><P CLASS="SubSubSect"><A NAME="pgfId=336"> </A><A NAME="marker=99"> </A>$version</P><P CLASS="Body"><A NAME="pgfId=337"> </A>The <B CLASS="Keyword">$version</B> section indicates which version of the VCD writer was used to produce the VCD file.</P><P CLASS="Body"><A NAME="pgfId=338"> </A>Syntax:</P><PRE CLASS="BNFDef"><A NAME="pgfId=339"> </A><B CLASS="Keyword">	$version</B><A NAME="marker=100"> </A> <I CLASS="Emphasis">version_text </I><B CLASS="Keyword">$end</B></PRE><P CLASS="Body"><A NAME="pgfId=340"> </A>Example:</P><PRE CLASS="CodeIndent"><A NAME="pgfId=341"> </A><B CLASS="Keyword">$version</B>      VERILOG-SIMULATOR 1.0a <B CLASS="Keyword">$end</B></PRE><P CLASS="SubSubSect"><A NAME="pgfId=342"> </A>$var</P><P CLASS="Body"><A NAME="pgfId=343"> </A>The<B CLASS="Keyword"> $var</B> section prints the names and identifier codes of the variables being dumped.</P><P CLASS="Body"><A NAME="pgfId=344"> </A>Syntax:</P><PRE CLASS="BNFDef"><A NAME="pgfId=345"> </A><B CLASS="Keyword">$var </B><A NAME="marker=101"> </A>var_type size identifier_code reference<B CLASS="Keyword"> $end</B></PRE><PRE CLASS="BNFDef"><A NAME="pgfId=245"> </A></PRE><PRE CLASS="BNFDef"><A NAME="pgfId=289"> </A>var_type ::= <B CLASS="Keyword">event</B> | <B CLASS="Keyword">integer</B> | <B CLASS="Keyword">parameter </B>|<B CLASS="Keyword"> real</B> | <B CLASS="Keyword">reg</B> | <B CLASS="Keyword">supply0</B> | <B CLASS="Keyword">supply1</B> | <B CLASS="Keyword">time</B> | <B CLASS="Keyword">tri</B> | <B CLASS="Keyword">triand</B> | <B CLASS="Keyword">trior</B> | <B CLASS="Keyword">trireg</B> | <B CLASS="Keyword">tri0</B> | <B CLASS="Keyword">tri1</B> | <B CLASS="Keyword">wand</B> | <B CLASS="Keyword">wire</B> | <B CLASS="Keyword">wor</B></PRE><PRE CLASS="BNFDef"><A NAME="pgfId=347"> </A>size ::= decimal_number</PRE><PRE CLASS="BNFDef"><A NAME="pgfId=355"> </A>reference ::= identifier| identifier [ <I CLASS="Emphasis">bit_select</I>_index ]| identifier [ <I CLASS="Emphasis">msb</I>_index : <I CLASS="Emphasis">lsb</I>_index ]</PRE><PRE CLASS="BNFDef"><A NAME="pgfId=290"> </A>index ::= decimal_number</PRE><P CLASS="Body"><A NAME="pgfId=368"> </A>Size specifies how many bits are in the variable.</P><P CLASS="Body"><A NAME="pgfId=350"> </A>The identifier code specifies the name of the variable using printable ASCII characters, as previously described.</P><OL><P CLASS="NumberedLista"><A NAME="pgfId=358"> </A>a)	The msb index indicates the most significant index;  lsb index indicates the least significant index.</P><P CLASS="NumberedListb"><A NAME="pgfId=359"> </A>b)	More than one reference name may be mapped to the same identifier code. For example, net10 and net15 may be interconnected in the circuit, and therefore may have the same identifier code.</P><P CLASS="NumberedListb"><A NAME="pgfId=360"> </A>c)	The individual bits of vector nets may be dumped individually. </P><P CLASS="NumberedListb"><A NAME="pgfId=190"> </A>d)	The identifier is the name of the variable being dumped in the model .</P></OL><P CLASS="Body"><A NAME="pgfId=234"> </A>Example:</P><PRE CLASS="CodeIndent"><A NAME="pgfId=259"> </A><B CLASS="Keyword">$var </B>		     <B CLASS="Keyword">integer</B> 32 (2 index 	 <B CLASS="Keyword">$end</B></PRE><P CLASS="SubSubSect"><A NAME="pgfId=384"> </A>$dumpall</P><P CLASS="Body"><A NAME="pgfId=385"> </A><CODE CLASS="code">The</CODE> <B CLASS="Keyword">$dumpall</B> keyword specifies current values of all variables dumped.</P><P CLASS="Body"><A NAME="pgfId=386"> </A>Syntax:</P><PRE CLASS="BNFDef"><A NAME="pgfId=186"> </A><B CLASS="Keyword">	$dumpall </B><A NAME="marker=103"> </A>{ value_changes }<B CLASS="Keyword"> $end</B></PRE><P CLASS="Body"><A NAME="pgfId=388"> </A><A NAME="marker=102"> </A>Example:</P><PRE CLASS="CodeIndent"><A NAME="pgfId=389"> </A><B CLASS="Keyword">$dumpall</B>   1*@  x*#   0*$   bx   (k   <B CLASS="Keyword">$end </B>		</PRE><P CLASS="SubSubSect"><A NAME="pgfId=390"> </A>$dumpoff</P><P CLASS="Body"><A NAME="pgfId=391"> </A><CODE CLASS="code">The</CODE> <B CLASS="Keyword">$dumpoff</B> keyword indicates all variables dumped with X values.</P><P CLASS="Body"><A NAME="pgfId=392"> </A>Syntax:</P><PRE CLASS="BNFDef"><A NAME="pgfId=393"> </A><B CLASS="Keyword">	$dumpoff </B><A NAME="marker=104"> </A><A NAME="marker=105"> </A><A NAME="marker=106"> </A>{ value_changes }<B CLASS="Keyword"> $end</B></PRE><P CLASS="Body"><A NAME="pgfId=394"> </A>Example:</P><PRE CLASS="CodeIndent"><A NAME="pgfId=395"> </A>$dumpoff  x*@  x*#   x*$   bx   (k   $end 		</PRE><P CLASS="SubSubSect"><A NAME="pgfId=396"> </A>$dumpon</P><P CLASS="Body"><A NAME="pgfId=397"> </A><CODE CLASS="code">The</CODE> <B CLASS="Keyword">$dumpon</B> keyword indicates resuming of dumping and lists current values of all variables dumped.</P><P CLASS="Body"><A NAME="pgfId=398"> </A>Syntax:</P><PRE CLASS="BNFDef"><A NAME="pgfId=399"> </A><B CLASS="Keyword">	$dumpon </B><A NAME="marker=107"> </A><A NAME="marker=108"> </A>{ value_changes }<B CLASS="Keyword"> $end</B></PRE><P CLASS="Body"><A NAME="pgfId=400"> </A>Example:</P><PRE CLASS="CodeIndent"><A NAME="pgfId=401"> </A><B CLASS="Keyword">$dumpon</B>   x*@  0*#   x*$   b1   (k   <B CLASS="Keyword">$end</B> 		</PRE><P CLASS="SubSubSect"><A NAME="pgfId=346"> </A>$dumpvars</P><PRE CLASS="BNFDef"><A NAME="pgfId=377"> </A>The section beginning with <B CLASS="Keyword">$dumpvars</B> keyword lists initial values of all variables dumped.</PRE><P CLASS="Body"><A NAME="pgfId=378"> </A>Syntax:</P><PRE CLASS="BNFDef"><A NAME="pgfId=379"> </A><B CLASS="Keyword">	$dumpvars</B><A NAME="marker=81"> </A><A NAME="marker=84"> </A>  { value_changes } <B CLASS="Keyword">$end</B></PRE><P CLASS="Body"><A NAME="pgfId=380"> </A>Example:</P><PRE CLASS="CodeIndent"><A NAME="pgfId=381"> </A><B CLASS="Keyword">$dumpvars</B>   x*@   z*$   b0   (k   <B CLASS="Keyword">$end</B></PRE><P CLASS="SubSection"><A NAME="pgfId=247"> </A>Value change dump file format example</P><P CLASS="Body"><A NAME="pgfId=228"> </A>The following example illustrates the format of the value change dump file. </P><DIV><MAP NAME="ch15-7"></MAP><IMG SRC="ch15-7.gif" USEMAP="#ch15-7"></DIV><HR><P><A HREF="ch15.htm">Chapter&nbsp;&nbsp;start</A>&nbsp;&nbsp;&nbsp;<A HREF="ch15.1.htm">Previous&nbsp;&nbsp;page</A></P></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -