Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > ffa1e6f5ad04360808fe8840fe3ba036 > files > 437

vrq-devel-1.0.88-1.fc14.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>vrq: Xprop Tool</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
  <table border="0" cellspacing="0" cellpadding="0" width="100%">
   <tr>
    <td width="180"><a href="index.html"><img src="vrq.png" width="150" height="100" border="0" alt="vrq"></a></td>
    <td background="top_bg.png" align="right" width="100%">
      <img src="glyth.png" width="500" height="100" border="0" alt="">
    </td>
   </tr>
   <tr>
    <td background="#FFFFFF" align="right" width="50" height="4"></td>
   </tr>
  </table>
</head><body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<h1>Xprop Tool </h1>  </div>
</div>
<div class="contents">
<p>The xprop tool is specified using the -tool xprop switch on the command line.</p>
<p>This filter will cause the verilog code (ASTs) to be instrumented such that X's are properly propagated by verilog simulation tools. This is used to reduce the simlulated differences between gatelevels representations and RTL. I a properly constructed design flow this greatly reduces the need for gate level simulation (which is much more expensive than RTL simulation). For a detailed description of the transformations done by vrq and the reasoning behind it see the <a class="el" href="xpropRational.html">Xprop Rational</a> page.</p>
<h2><a class="anchor" id="xprop_switches"></a>
Xprop Switches</h2>
<p>Vrq adds instrumentation all constructs except clock gating. The switches below may be used to alter the default behavior:</p>
<ul>
<li><b>+xprop-disable-if</b> Disable if instrumentation</li>
<li><b>+xprop-disable-case</b> Disable case instrumentation</li>
<li><b>+xprop-disable-index</b> Disable reference assignment instrumentation</li>
<li><b>+xprop-disable-ternary</b> Disable ’?’ instrumentation</li>
<li><b>+xprop-enable-clock</b> Enable instrumentation of clocks (to check clock gaters)</li>
</ul>
<p>The following switches alter how variables and constructs are treated. By default all variables are assume to be able to be 0,1,x,z. You can selectively indicate certain variables can never be x using these switches:</p>
<ul>
<li><b>+xprop-nox-attr=</b> &lt;name&gt;: Allow an attribute on a variable declaration to specify the variable will never be x. 'name' is the attribute name that will be used to indicate the variable will never be x. For instance if the switch +xprop-nox-attr=NOX is used then a variable tag as non-x by: <div class="fragment"><pre class="fragment"> (* NOX *) reg v1;          <span class="comment">// indicate v1 is never x</span>
 (* NOX *) wire w1, w2, w3; <span class="comment">// indicate w1, w2 and w3 will never be x&lt;/pre&gt;</span>
</pre></div></li>
</ul>
<ul>
<li><b>+xprop-int-nox</b> Declare that all variables specified as integer will never be x. This is useful when the local design rules only use integers as index in loops, etc.</li>
</ul>
<p>The <b>+xprop-nox-attr=</b> &lt;name&gt; switch may also be used to disable x-propagation on selected constructs:</p>
<ul>
<li><b>if</b> <div class="fragment"><pre class="fragment"> <span class="comment">// In the case below the attribute indicates that this if statement</span>
 <span class="comment">// should not be xprop&#39;d.</span>
 (* NOX *) <span class="keywordflow">if</span>( condition ) ...
</pre></div></li>
</ul>
<ul>
<li><b>case</b> <div class="fragment"><pre class="fragment"> <span class="comment">// In the case below the attribute indicates that this case statement</span>
 <span class="comment">// should not be xprop&#39;d.</span>
 (* NOX *) <span class="keywordflow">case</span>( condition ) ...
</pre></div></li>
</ul>
<ul>
<li><b>procedural</b> blocks <div class="fragment"><pre class="fragment"> <span class="comment">// In the case below the attribute indicates that all statements</span>
 <span class="comment">// between the begin/end pair should not be xprop&#39;d.</span>
 (* NOX *) begin
        ...
 end
</pre></div></li>
</ul>
<ul>
<li><b>structural</b> blocks <div class="fragment"><pre class="fragment"> <span class="comment">// In the case below the attribute indicates that all statements</span>
 <span class="comment">// between the generate/endgenerate pair should not be xprop&#39;d.</span>
 (* NOX *) generate
        ...
 endgenerate
</pre></div></li>
</ul>
<ul>
<li><b>functions</b> <div class="fragment"><pre class="fragment"> <span class="comment">// In the case below the attribute indicates that the function </span>
 <span class="comment">// should not be xprop&#39;d.</span>
 (* NOX *) function funcName;
        ...
 endfunction
</pre></div></li>
</ul>
<ul>
<li><b>task</b> <div class="fragment"><pre class="fragment"> <span class="comment">// In the case below the attribute indicates that the task </span>
 <span class="comment">// should not be xprop&#39;d.</span>
 (* NOX *) task funcName;
        ...
 endtask
</pre></div></li>
</ul>
<ul>
<li><b>module</b> <div class="fragment"><pre class="fragment"> <span class="comment">// In the case below the attribute indicates that the module </span>
 <span class="comment">// should not be xprop&#39;d.</span>
 (* NOX *) task funcName;
        ...
 endmodule
</pre></div></li>
</ul>
<ul>
<li><b>ternary</b> operator <div class="fragment"><pre class="fragment"> <span class="comment">// In the case below the attribute indicates that the ternary operator</span>
 <span class="comment">// should not be xprop&#39;d.</span>
 initial out = cond ? (* NOX *) true_expression : false_expression;
</pre></div></li>
</ul>
<ul>
<li><b>clock</b> blocks <div class="fragment"><pre class="fragment"> <span class="comment">// In the case below the attribute indicates that the clock </span>
 <span class="comment">// should not be xprop&#39;d.</span>
 <span class="keywordflow">if</span> (* NOX *) @(posedge clock) ...
</pre></div></li>
</ul>
<p>These switches alter other miscellaneous behaviors:</p>
<ul>
<li><b>+xprop-allow-casex</b> Allow casex statements in instrumented code. Normally casex statements are disallowed due to the fact that an 'x' is treated as a true don't care in the matching criteria, making it no possible to instrument properly.</li>
<li><b>+xprop-begin=</b> &lt;pragma&gt; Supply a comment to append before the insertion of xprop instrumentation</li>
<li><b>+xprop-end=</b> &lt;pragma&gt; Supply a comment to post pend after the insertion of xprop instrumentation</li>
<li><b>+xprop-clk-begin=</b> &lt;pragma&gt; Supply a comment to append before the insertion of clock xprop instrumentation</li>
<li><b>+xprop-clk-end=</b> &lt;pragma&gt; Supply a comment to post pend after the insertion of clock xprop instrumentation</li>
<li><b>+xprop-clk-edge-control=</b>[!]&lt;tickdefine&gt; Supply a preprocessor tickdefine to enable instrumentation on both edges of the clock. ! indicates tickdefine disables both edges. If switch isn't supplied the behavior is single edge unless XPROP_BOTH_EDGES is defined.</li>
</ul>
<p>Note these constructs are useful for either visually flagging xprop code or to enable other tools like coverage or synthesis to recognize the instrumentation. For example when the following switches +xprop-begin="coverage off" +xprop-end="coverage on" are used on this code snippet: </p>
<div class="fragment"><pre class="fragment"> <span class="keywordflow">if</span>( cond ) begin
     a = b;
 end <span class="keywordflow">else</span> begin
     a = b+1;
 end
</pre></div><p>This is the resultant output: </p>
<div class="fragment"><pre class="fragment"> <span class="keywordflow">if</span>(cond) begin
    a = b;
 end <span class="keywordflow">else</span> <span class="keywordflow">if</span>(~cond) begin
    a = b+1;
 end
 <span class="comment">// coverage off</span>
 <span class="keywordflow">else</span> begin
    a = 1<span class="stringliteral">&#39;hx;</span>
<span class="stringliteral"> end</span>
<span class="stringliteral"> // coverage on</span>
</pre></div> </div>
<hr class="footer"/><address class="footer"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>