<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>VerificationOnWeb (VoW)</title>
	<atom:link href="http://www.cvcblr.com/blog/?feed=rss2&#038;p=216" rel="self" type="application/rss+xml" />
	<link>http://www.cvcblr.com/blog</link>
	<description>Community contributed, quality DV blog</description>
	<lastBuildDate>Sun, 21 Apr 2013 21:32:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Mind the GAP &#8211; even in SystemVerilog macro definition</title>
		<link>http://www.cvcblr.com/blog/?p=755</link>
		<comments>http://www.cvcblr.com/blog/?p=755#comments</comments>
		<pubDate>Sun, 21 Apr 2013 21:32:07 +0000</pubDate>
		<dc:creator>TeamCVC www.cvcblr.com</dc:creator>
				<category><![CDATA[SystemVerilog]]></category>
		<category><![CDATA[trainings]]></category>
		<category><![CDATA[Verilog]]></category>

		<guid isPermaLink="false">http://www.cvcblr.com/blog/?p=755</guid>
		<description><![CDATA[SystemVerilog enhances the TEXT-MACRO feature (a.k.a `define-s by many young engineers) of Verilog by a good length. Significant enhancements done are: Added capability to extend the definition to multiple lines Added macros with arguments; Macro arguments can have default values &#8230; <a href="http://www.cvcblr.com/blog/?p=755">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>SystemVerilog enhances the TEXT-MACRO feature (a.k.a `define-s by many young engineers) of Verilog by a good length. Significant enhancements done are:</p>
<ol>
<li>Added capability to extend the definition to multiple lines</li>
<li>Added macros with arguments; </li>
<li>Macro arguments can have default values too! (not fully supported by all tools though)</li>
</ol>
<p>However there are few caveats – in general any text-macro usage in any computer language is hard to debug when it fails to compile. So be ready to be patient while debugging macro code. </p>
<p>Recently an online forum user asked a question on SystemVerilog macros. Here is what the user defined to start with:</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/04/image5.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/04/image_thumb5.png" width="294" height="91" /></a> </p>
<p>To a bare eye, the above looks fine. However a&#160; SV compiler would through an error at it. As per the LRM:</p>
<p>&#160;</p>
<blockquote><p><font size="3">If formal arguments are used, the list of formal argument names shall be enclosed in parentheses following       <br />the name of the macro. The left parenthesis shall follow the text <strong><u>macro name immediately, with no space in           <br />between.</u></strong></font></p>
</blockquote>
<p>In other words – as it is with any Metro station sign, you should be careful with the GAP/spaces <img src='http://www.cvcblr.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<p><img src="http://3.bp.blogspot.com/_v4gr42wd_kk/TGhzYxyau3I/AAAAAAAAANE/gCp9-eEsbRw/s1600/mind_the_gap-logo.jpg" width="308" height="205" /></p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/04/image6.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/04/image_thumb6.png" width="246" height="88" /></a> </p>
<p>Notice that “extra space” after the macro name <strong><em>CHECK1</em></strong> is now gone! This works in Questa 10.2.</p>
<p>So next time when you code your macros – mind the GAP <img src='http://www.cvcblr.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://www.cvcblr.com" target="_blank">TeamCVC</a></p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:082be9b5-0d3c-4ab7-82c7-fa7db9968c60" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SystemVerilog" rel="tag">SystemVerilog</a>,<a href="http://technorati.com/tags/Verilog" rel="tag">Verilog</a>,<a href="http://technorati.com/tags/EDA" rel="tag">EDA</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.cvcblr.com/blog/?feed=rss2&#038;p=755</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smart constraint modeling in SystemVerilog</title>
		<link>http://www.cvcblr.com/blog/?p=750</link>
		<comments>http://www.cvcblr.com/blog/?p=750#comments</comments>
		<pubDate>Fri, 19 Apr 2013 16:28:46 +0000</pubDate>
		<dc:creator>TeamCVC www.cvcblr.com</dc:creator>
				<category><![CDATA[SystemVerilog]]></category>
		<category><![CDATA[UVM]]></category>

		<guid isPermaLink="false">http://www.cvcblr.com/blog/?p=750</guid>
		<description><![CDATA[With SystemVerilog language gaining popularity among user, it is getting interesting to see user asking similar/repeating “patterns” of challenges in various forums. One of them is on constraint modeling when it becomes more than simple “a &#62; 10” like stuff. &#8230; <a href="http://www.cvcblr.com/blog/?p=750">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>With SystemVerilog language gaining popularity among user, it is getting interesting to see user asking similar/repeating “patterns” of challenges in various forums. One of them is on constraint modeling when it becomes more than simple “a &gt; 10” like stuff. Recently a VerifAcademy user asked:</p>
<p>&#160;</p>
<blockquote><p>in my testbench i have to make a random signal &quot;[31:0] distortion&quot;. it must contain one (or, in other case, two) hot bit(s) (hot bit is &quot;1&quot;, all others are &quot;0&quot;). So i have a problem with writing a constraint: i really don&#8217;t want to write all possible combinations of these bits (if there are two of them, there will be 32! combinations, so&#8230;). Does anyone have solution for this problem?</p>
</blockquote>
<p>&#160;</p>
<p>A smart model is indeed available via 2 features of this vast language – System Verilog:</p>
<p>1. A handy system function to count the number of “ones”</p>
<p>2. Constraints can use functions in expressions. </p>
<p>Combining the above two, here is a full solution to the above problem along with a sample run from Questa 10.2</p>
<p>&#160;</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/04/image4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/04/image_thumb4.png" width="639" height="407" /></a> </p>
<p>Hope you enjoy the concise solution. Do call us via +91-9620209226 or <a href="mailto:training@cvcblr.com">training@cvcblr.com</a> for learning more about this wonderful language and its applicability for your verification projects.</p>
<p><a href="http://www.cvcblr.com" target="_blank">TeamCVC</a></p>
<p>&#160;
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:84cdb619-1468-42a0-a824-6c4923779065" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/systemVerilog" rel="tag">systemVerilog</a>,<a href="http://technorati.com/tags/EDA" rel="tag">EDA</a></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cvcblr.com/blog/?feed=rss2&#038;p=750</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SystemVerilog 2009 macro `__FILE__ &#8211; absolute or relative path?</title>
		<link>http://www.cvcblr.com/blog/?p=747</link>
		<comments>http://www.cvcblr.com/blog/?p=747#comments</comments>
		<pubDate>Mon, 01 Apr 2013 17:06:32 +0000</pubDate>
		<dc:creator>TeamCVC www.cvcblr.com</dc:creator>
				<category><![CDATA[SystemVerilog]]></category>
		<category><![CDATA[trainings]]></category>
		<category><![CDATA[UVM]]></category>

		<guid isPermaLink="false">http://www.cvcblr.com/blog/?p=747</guid>
		<description><![CDATA[As many of our customer learn during our regular VSV training sessions, System Verilog added `__FILE__ &#38; `__LINE__ macros similar to C language. It is quite handy for debugging remotely developed code for a newcomer especially. Recently at an UVM &#8230; <a href="http://www.cvcblr.com/blog/?p=747">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>As many of our customer learn during our regular <a href="http://www.cvcblr.com/trng_profiles/CVC_LG_VSV_profile.pdf" target="_blank"><a href="http://www.cvcblr.com/trng_profiles/CVC_LG_VSV_profile.pdf" target="_blank">VSV training sessions</a>,</a> System Verilog added `__FILE__ &amp; `__LINE__ macros similar to C language. It is quite handy for debugging remotely developed code for a newcomer especially. Recently at an UVM forum a user asked how to get the relative path vs. absolute path from this macro. Consider the following code:</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/04/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/04/image_thumb.png" width="462" height="250" /></a> </p>
<p>&#160;</p>
<p>The SV LRM says;</p>
<blockquote><p><strong><u>22.13 `__FILE__ and `__LINE__</u></strong>       <br />`__FILE__ expands to the name of the current input file, in the form of a string literal. This is the path by      <br />which a tool opened the file, </p>
</blockquote>
<p>So if you provide the absolute path name during compile command, you are bound to get the FULL PATH.</p>
<p>Questa when run with full path to the file as below:</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/04/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/04/image_thumb1.png" width="558" height="78" /></a> </p>
<p>produces the following output:</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/04/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/04/image_thumb2.png" width="600" height="93" /></a> </p>
</p>
<p>&#160;</p>
<p>And you could get a pretty short output as below if you do a “magic” (Left as exercise to the interested reader <img src='http://www.cvcblr.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  )</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/04/image3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/04/image_thumb3.png" width="422" height="74" /></a> </p>
<p>Enjoy System Verilog and have fun!</p>
<p><a href="http://www.cvcblr.com" target="_blank">TeamCVC</a>&#160;</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5c11255b-b589-496b-8a9a-7706b5eff072" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SystemVerilog" rel="tag">SystemVerilog</a>,<a href="http://technorati.com/tags/EDA" rel="tag">EDA</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.cvcblr.com/blog/?feed=rss2&#038;p=747</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SV solver puzzle part II &#8211; &#8220;guidance&#8221; vs. &#8220;dictation&#8221;</title>
		<link>http://www.cvcblr.com/blog/?p=737</link>
		<comments>http://www.cvcblr.com/blog/?p=737#comments</comments>
		<pubDate>Fri, 22 Mar 2013 17:48:51 +0000</pubDate>
		<dc:creator>TeamCVC www.cvcblr.com</dc:creator>
				<category><![CDATA[SystemVerilog]]></category>
		<category><![CDATA[trainings]]></category>

		<guid isPermaLink="false">http://www.cvcblr.com/blog/?p=737</guid>
		<description><![CDATA[&#160; With one of our recent blog entries on SystemVerilog constraint solver (http://www.cvcblr.com/blog/?p=725) becoming so popular, several readers have contacted us via email to know little more about the puzzle. Specifically they wanted to understand how the solver ordering of &#8230; <a href="http://www.cvcblr.com/blog/?p=737">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>&#160;</p>
<p>With one of our recent blog entries on SystemVerilog constraint solver (<a title="http://www.cvcblr.com/blog/?p=725" href="http://www.cvcblr.com/blog/?p=725" target="_blank">http://www.cvcblr.com/blog/?p=725</a>) becoming so popular, several readers have contacted us via email to know little more about the puzzle. Specifically they wanted to understand how the solver ordering of variables is determined. Consider the same example as in that previous blog entry:</p>
<p><img title="cnst2" border="0" alt="cnst2" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/03/cnst2_thumb.png" width="465" height="207" /></p>
<p>As noted in the previous blog, this creates an “implicit ordering” of variables – i.e. ‘v1” is solved BEFORE “v2”. A smart engineer (<a href="http://www.linkedin.com/pub/muthurasu-sivaramakrishnan/15/38/77b/" target="_blank">Muthurasu Sivaramakrishnan</a>) asked this: </p>
<ul>
<li><em>Nice one. However, why cant we use Solve.. Before constraint in this scenario? </em></li>
</ul>
<p>The answer is a little involved with yet-another subtlety in the language, and hence this new entry:</p>
<p>This reader’s question boils down to whether the above constraint “<strong><em>cst_ordered”</em></strong> is same as the following;</p>
<blockquote><p><strong><em>constraint cst_guidance {solve v1 before v2;}</em></strong></p>
</blockquote>
<p>First intuition says YES, but the answer unfortunately is NO. In SV there are 2 kinds of solver ordering &#8211; an ordering constraint is more of a &quot;guidance on probability&quot; and does NOT change the solution space. Hence it can&#8217;t lead to a failure from a success or vice-versa. This is what happens with a <strong><em>solve..before – </em></strong>i.e. it is simply a “guidance” or suggestion to the solver.</p>
<p>However the ordering that gets enforced via function call is more <strong>STRICT/DICTATIVE</strong> in nature. It enforces the order by further &quot;subdividing&quot; the solution space and in a sense invokes the solver twice. In Questa you can actually see this in action via -solveverbose &#8211; you will see 2 &quot;Working Set&quot; prints for function based constraint:</p>
<p>1. First the solver gets “dictated” to solve “v1” INDEPENDENTLY. In a random choice, say it picked a value “1”</p>
<p>2. Now the solver takes up the next variable to be solved in THAT order, i.e. “v2” – you see in Questa the “Working Set’ print with details (note: <strong><em>randomize</em></strong> is called only once per iteration in user code)</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/03/cnst4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="cnst4" border="0" alt="cnst4" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/03/cnst4_thumb.png" width="707" height="456" /></a> </p>
<p>&#160;</p>
<p>So this leads to a constraint solver failure. Whereas a mere “guidance” shown by a <strong><em>solve..before</em></strong> would have solved both the variables TOGETHER, leading to a successful solving operation.</p>
<p>Bottomline: The function call “strictly enforces” the solve order, while the “<strong><em>solve..before”</em></strong> is more of a “guidance/suggestion”.</p>
<p>To learn more about this and other advanced SystemVerilog topics, join our training via <a href="http://www.cvcblr.com/trainings">www.cvcblr.com/trainings</a> </p>
<p>Good Luck</p>
<p><a href="http://www.cvcblr.com" target="_blank">TeamCVC</a>&#160;</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8044b162-cc6e-4180-bf69-14cc3ea6a725" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SystemVerilog" rel="tag">SystemVerilog</a>,<a href="http://technorati.com/tags/EDA" rel="tag">EDA</a>,<a href="http://technorati.com/tags/Constraints" rel="tag">Constraints</a>,<a href="http://technorati.com/tags/Questa" rel="tag">Questa</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.cvcblr.com/blog/?feed=rss2&#038;p=737</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVA: default disable &#8211; a boon or a bane?</title>
		<link>http://www.cvcblr.com/blog/?p=733</link>
		<comments>http://www.cvcblr.com/blog/?p=733#comments</comments>
		<pubDate>Thu, 21 Mar 2013 19:12:32 +0000</pubDate>
		<dc:creator>TeamCVC www.cvcblr.com</dc:creator>
				<category><![CDATA[ABV]]></category>
		<category><![CDATA[Assertions]]></category>
		<category><![CDATA[SoC]]></category>
		<category><![CDATA[SVA]]></category>
		<category><![CDATA[SystemVerilog]]></category>
		<category><![CDATA[trainings]]></category>

		<guid isPermaLink="false">http://www.cvcblr.com/blog/?p=733</guid>
		<description><![CDATA[As the SVA usage expands/grows in the industry, so do the language syntax/features. One of the recent (2009) addition to System Verilog language was the ability to code “default disabling condition”. It is very handy to have an “inferred” disabling &#8230; <a href="http://www.cvcblr.com/blog/?p=733">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>As the SVA usage expands/grows in the industry, so do the language syntax/features. One of the recent (2009) addition to System Verilog language was the ability to code “default disabling condition”.</p>
<p>It is very handy to have an “inferred” disabling condition for all assertions so that one can save on verbosity while typing – every assertion doesn’t have to repeat;</p>
<blockquote><p>&#160; a_without_default_disable : assert property (disable iff (!rst_n) my_prop);</p>
<p>vs. </p>
<p>a_with_default_disable : assert property (my_prop);</p>
</blockquote>
<p>Obviously anything that helps to save some typing is a BOON.<img src="http://t3.gstatic.com/images?q=tbn:ANd9GcTGeSzFySeqa9bE-SCQ2d1TKVk5aTcdS7zaJaZbXcTMIO7cm5akLQ" width="87" height="76" /></p>
<p>However there are some special category of assertions that may get unintentionally disabled by this. For instance the “reset-checks” – assertions that check the reset value of various DUT outputs. For e.g. </p>
<ul>
<li>FIFO empty flag during reset</li>
<li>serialout signal from a de-serializer design</li>
</ul>
<p>We recently had a similar DUT being verified with SVA. In the below code, notice the “default disable” and the reset-check</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/03/sva_def_dis_1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="sva_def_dis_1" border="0" alt="sva_def_dis_1" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/03/sva_def_dis_1_thumb.png" width="612" height="447" /></a> </p>
<p>As the callout/marking shows – there is a bug in DUT, the signal “serialout” is indeed HIGH during reset, yet the assertion doesn’t fire (Questa shows it as INACTIVE – meaning it is a vacuous success in this case). </p>
<p>So that begs the question of “is the default disable a boon or a BANE”?&#160;&#160;&#160;&#160;&#160;&#160;&#160; <img src="http://1.bp.blogspot.com/_vur4pyt6k-w/TU5ab2CkD7I/AAAAAAAAABQ/newF1E1ZH8w/s1600/Boon-Bane-714094.jpg" width="209" height="119" /></p>
<p>The answer is – you need a methodology and a plan while doing your assertions – categorize the assertions appropriately. Specifically group them as:</p>
<ul>
<li>Reset checks</li>
<li>Functional checks</li>
<li>Low Power checks</li>
</ul>
<p>etc. Here is a nice work-around for this:</p>
<ul>
<li>Use an explicit “<strong><em>disable iff (1’b0)”</em></strong> for those special category assertions</li>
</ul>
<p> <a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/03/sva_def_dis_2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="sva_def_dis_2" border="0" alt="sva_def_dis_2" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/03/sva_def_dis_2_thumb.png" width="587" height="223" /></a>
<p>&#160;</p>
<p>Now Questa flags it nicely as below:</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/03/sva_def_dis_3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="sva_def_dis_3" border="0" alt="sva_def_dis_3" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/03/sva_def_dis_3_thumb.png" width="593" height="223" /></a> </p>
<p>So do use the new SVA stuff on “<strong><em>default disable”</em></strong> – it is indeed a BOON. Just make sure you “think” before you code those special category of assertions.</p>
<p>This is part of our larger story of ABV methodology being rolled out as next generation verification training sessions at <a href="http://www.cvcblr.com" target="_blank">CVC</a>. So do contact us via <a href="mailto:training@cvcblr.com">training@cvcblr.com</a>&#160; for more advanced, practical usage of this wonderful technology.</p>
<p>Good Luck</p>
<p><a href="http://www.cvcblr.com" target="_blank">TeamCVC</a></p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:0aacfb85-d055-43db-b69f-1eb9b22ce823" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SystemVerilog" rel="tag">SystemVerilog</a>,<a href="http://technorati.com/tags/SVA" rel="tag">SVA</a>,<a href="http://technorati.com/tags/ABV" rel="tag">ABV</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.cvcblr.com/blog/?feed=rss2&#038;p=733</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SystemVerilog constraint puzzle &#8211; treat for CRV lovers</title>
		<link>http://www.cvcblr.com/blog/?p=725</link>
		<comments>http://www.cvcblr.com/blog/?p=725#comments</comments>
		<pubDate>Wed, 13 Mar 2013 16:05:45 +0000</pubDate>
		<dc:creator>TeamCVC www.cvcblr.com</dc:creator>
				<category><![CDATA[SystemVerilog]]></category>
		<category><![CDATA[trainings]]></category>

		<guid isPermaLink="false">http://www.cvcblr.com/blog/?p=725</guid>
		<description><![CDATA[Are you an avid fan of CRV – Constraint Random Verification? Have you played enough with System Verilog constraints? Many of our customers having attended our regular VSV training (http://www.cvcblr.com/trainings) do become so! One of the nice features of SystemVerilog &#8230; <a href="http://www.cvcblr.com/blog/?p=725">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Are you an avid fan of CRV – Constraint Random Verification? Have you played enough with System Verilog constraints? Many of our customers having attended our regular <a href="http://www.cvcblr.com/trng_profiles/CVC_LG_VSV_profile.pdf" target="_blank">VSV training</a> (<a title="http://www.cvcblr.com/trainings" href="http://www.cvcblr.com/trainings">http://www.cvcblr.com/trainings</a>) do become so! One of the nice features of SystemVerilog constraint mechanism is its “bi-directionality” – a key feature that makes the distribution fairly wide spread and makes the state space well covered. </p>
<p>The industry has learnt it over the last decade of CRV usage – bidirectional constraints are better than unidirectional ones (that was the default in previous generation solver inside popular tool like Specman – called PGen. Even Specman has moved to a more robust, bi-directional IGEN/Intelligen few years back).</p>
<p>In SV this bi-directionality is subtle. Consider the code below:</p>
</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/03/cnst2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="cnst2" border="0" alt="cnst2" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/03/cnst2_thumb.png" width="465" height="207" /></a> </p>
<p>To an average SV engineer the above 2 constraints look “same” as the function is trivially doing a return job. However they are different for an avid SV user or a solid SV solver such as Questa from Mentor. As per LRM:</p>
<blockquote><p><strong>Random variables used as function arguments shall establish an implicit variable ordering.</strong></p>
</blockquote>
<p>Hence in case of “<strong><em>cst_ordered”</em></strong>, the variable “v1” is solved FIRST and then the “v2” – i.e. they are solved separately and not together (Which is what happens with ‘<strong><em>cst_bidir”</em></strong>). </p>
<p>So what’s the big deal? Consider “v1” is chosen to be “1” first, then the solver has NO solution for “v2” <img src='http://www.cvcblr.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  leading to a constraint failure.</p>
<p>So, next time when you use a function in a constraint, remember/recall/read this blog <img src='http://www.cvcblr.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Care for a proof? See what Questa’s solveverbose prints:</p>
<blockquote><p>qverilog file.sv –R –solveverbose=2</p>
</blockquote>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/03/cnst3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="cnst3" border="0" alt="cnst3" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/03/cnst3_thumb.png" width="704" height="520" /></a> </p>
<p>Enjoy CRV, enjoy SystemVerilog. In case you want to delve deeper into SV, do call us via <a href="mailto:training@cvcblr.com">training@cvcblr.com</a> </p>
<p><a href="http://www.cvcblr.com" target="_blank">TeamCVC</a></p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:91249610-b17b-43ff-837e-7e6ced3daa9e" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SystemVerilog" rel="tag">SystemVerilog</a>,<a href="http://technorati.com/tags/EDA" rel="tag">EDA</a>,<a href="http://technorati.com/tags/Questa" rel="tag">Questa</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.cvcblr.com/blog/?feed=rss2&#038;p=725</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dare to think beyond UVM for SoC verification</title>
		<link>http://www.cvcblr.com/blog/?p=719</link>
		<comments>http://www.cvcblr.com/blog/?p=719#comments</comments>
		<pubDate>Tue, 19 Feb 2013 18:15:48 +0000</pubDate>
		<dc:creator>TeamCVC www.cvcblr.com</dc:creator>
				<category><![CDATA[New Technology]]></category>
		<category><![CDATA[SoC]]></category>
		<category><![CDATA[SystemVerilog]]></category>
		<category><![CDATA[TrekSoC]]></category>
		<category><![CDATA[UVM]]></category>

		<guid isPermaLink="false">http://www.cvcblr.com/blog/?p=719</guid>
		<description><![CDATA[&#160; Over the past few years, the term “pre-silicon verification” has been quite popular and several technology advancements have helped in solving that puzzle. Some of the biggest contributors have been languages such as e/Specman and SystemVerilog with supporting technologies &#8230; <a href="http://www.cvcblr.com/blog/?p=719">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h3>&#160;</h3>
<p>Over the past few years, the term “pre-silicon verification” has been quite popular and several technology advancements have helped in solving that puzzle. Some of the biggest contributors have been languages such as <b><i>e</i></b>/Specman and SystemVerilog with supporting technologies such as constrained-random verification (CRV), coverage-driven verification (CDV) and assertion-based verification (ABV). All these three technologies when used in unison addressed the challenge at the block or intellectual property (IP)level fairly well. Recently UVM has been developed as a framework to use these languages in the best possible manner to try and keep these technologies scalable to larger designs, such as system-on-chips (SoC). Thanks to the Accellera committee devoting time and effort, UVM is becoming quite popular and the de-facto IP verification approach.</p>
<p>However with SoCs, there are several new challenges in the verification space that threaten to quickly outgrow the current prevalent technologies such as CRV and UVM. One of the key pieces in an SoC is the embedded processor/CPU – either single or multiple of them. Witha transaction-based verification approach such as UVM, typically the CPU gets modeled as a BFM (bus functional model). Some customers term this as a “headless environment” indicating that the “head” of a SoC is indeed the CPU(s). In theory, both the CPU bus and the peripherals can be made to go through grinding transactions via their BFMs.</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/image_thumb.png" width="471" height="411" /></a> </p>
<p align="center">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Figure-1: Sample headless SoC environment</p>
<p>While this certainly helps to get started, soon engineers find it difficult to scale things up with advanced UVM features such as the Virtual Sequencer, Virtual Sequences etc. Even with deep understanding of these, developing scenarios around them has not been an easy task. The length of such sequences/tests, their debug-ability and review-ability have started begging the question of “are we hitting the limits of UVM” &#8211; especially in the context of SoCs?</p>
<p>If you thought this is too premature of an assessment, hold-on: the trouble has just started. Anyone involved in an SoC design cycle would agree that the so called “headless environment” is just a start, and would most certainly want to run with the actual CPU RTL model(s) running C/assembly code running on the same.</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/image_thumb1.png" width="350" height="485" /></a> </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Figure-2: SoC environment with actual CPU RTL running C/assembly code</p>
<p>This is a significant step in the pre-silicon verification process. The current UVM focus doesn’t really address this immediate need, thereby forcing users to create a separate flow with a C-based environment around the CPU and hand-coding many of the same scenarios that were earlier tested with “headless UVM” environment. Though the peripherals can still reuse their UVM BFMs, the “head” is now replaced with actual RTL and the co-ordination/synchronization among the peripherals needs to be managed manually – no less than a herculean task. We have heard customer saying “I’ve spent two months in re-creating concurrent traffic, a la the headless environment in the C-based setup”. </p>
<p>The hunt has been on for a higher level modeling of the system level scenarios that can then be run on either a headless or C-based environment – keeping much of the scenarios as-is. Here is where the graphs start to make lot of sense as human beings are well versed with the idea of mind maps (<a href="http://en.wikipedia.org/wiki/Mind_map">http://en.wikipedia.org/wiki/Mind_map</a>) as a natural, intuitive way of thinking about simultaneous activities, interactions and flow of thoughts. </p>
<p>Breker has been the pioneer in this space by introducing a graph-based approach to functional verification. With graphs, users capture the IP level scenarios as nodes and arcs making it ideal to capture the typical day-in-the-life (DITL) for the IP. Many such IP-level graphs can then be quickly combined to form a SoC level scenario model such as the one below:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/image_thumb2.png" width="380" height="315" /></a> </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Figure-3: SoC level scenario model</p>
<p>With a graphical scenario model, TrekSoc (<a href="http://www.brekersystems.com/products/treksoc">http://www.brekersystems.com/products/treksoc</a>), the flagship SoC verification solution from Breker, can then be asked to either churn out transactions for a headless environment or embedded C-tests for the actual CPU based system with a flip of a switch. </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/image3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/image_thumb3.png" width="566" height="346" /></a>&#160;&#160;&#160; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Figure-4: Using scenario models with TrekSoC</p>
<p>This is clearly way beyond current UVM intended goals as UVM is created to solve the problem of VIP reuse and it serves its purpose very well. </p>
<p>Now, with C-tests being auto-generated, the possibilities are endless – they can be reused across the breadth of verification and validation in various platforms starting with simulation, through emulation/prototyping, and all the way up to post-silicon validation.</p>
<p>Bottom line: UVM is serving the very purpose it has been developed for – to create interoperable, reusable VIPs. However a full SoC verification is much more than a bunch of VIPs. It requires next abstraction level models such as the graph based scenario models. Such scenario models can then be compiled by TrekSoC to produce C-tests and/or UVM transactions. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.cvcblr.com/blog/?feed=rss2&#038;p=719</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Missed a UVM field macro? Be ready for surprises &#8211; and a debug assistant!</title>
		<link>http://www.cvcblr.com/blog/?p=709</link>
		<comments>http://www.cvcblr.com/blog/?p=709#comments</comments>
		<pubDate>Tue, 19 Feb 2013 15:57:33 +0000</pubDate>
		<dc:creator>TeamCVC www.cvcblr.com</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cvcblr.com/blog/?p=709</guid>
		<description><![CDATA[Recently a UVM user pondered over the following question: randomization NOT happening for seq_item variable if uvm_field_* is NOT enabled? (http://goo.gl/TNSaz) To appreciate the issue, consider the code snippet as below: Since both hdr and pkt_len are declared rand, one &#8230; <a href="http://www.cvcblr.com/blog/?p=709">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Recently a UVM user pondered over the following question:</p>
<blockquote><h4>randomization NOT happening for seq_item variable if uvm_field_* is NOT enabled?</h4>
<p>(<a title="http://goo.gl/TNSaz" href="http://goo.gl/TNSaz" target="_blank">http://goo.gl/TNSaz</a>)</p>
</blockquote>
<p>To appreciate the issue, consider the code snippet as below:</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/uvm_dbg_1.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="uvm_dbg_1" border="0" alt="uvm_dbg_1" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/uvm_dbg_1_thumb.png" width="487" height="215" /></a> </p>
<p>Since both <strong><em>hdr </em></strong>and <strong><em>pkt_len </em></strong>are declared rand, one expects them to be randomized. Note that one of the <strong><em>`uvm_field_int </em></strong>is commented – to demo the issue.</p>
<p>Now a recipient/consumer of this transaction does a <strong><em>copy/clone</em></strong> at destination. See a code snippet:</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/uvm_dbg_3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="uvm_dbg_3" border="0" alt="uvm_dbg_3" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/uvm_dbg_3_thumb.png" width="511" height="219" /></a> </p>
</p>
<p>So far so good, let’s see what happens in a typical Questa simulation:</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/uvm_dbg_4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="uvm_dbg_4" border="0" alt="uvm_dbg_4" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/uvm_dbg_4_thumb.png" width="577" height="132" /></a></p>
<p>The above results of <strong><em>hdr </em></strong>being NOT generated occurs consistently for all seeds (See the forum post if needed). So a typical user suspects that the missing <strong><em>uvm_field_int</em></strong> macro does control the randomization – though not intuitive/true. This could consume quite a few debug cycles (recall that the macro above is commented for demo only, in actual work, as reported in that forum posting, user forgot to&#160; add that at the first place).</p>
<h2><u>A Debug assistant</u></h2>
<p>Now as in our regular <a href="http://www.cvcblr.com/trng_profiles/CVC_LG_VSV_profile.pdf" target="_blank">VSV training sessions</a> (<a href="http://www.cvcblr.com/trainings" target="_blank">www.cvcblr.com/trainings</a>) , we showcase the potential applications of <strong><em>post_randomize</em></strong> and one of the prominent ones is to “debug” the generated fields. See below code snippet:</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/uvm_dbg_5.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="uvm_dbg_5" border="0" alt="uvm_dbg_5" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/uvm_dbg_5_thumb.png" width="591" height="288" /></a> </p>
<p>With the above code added, here is what our friendly Questa has to show for us in simulation:</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/uvm_dbg_2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="uvm_dbg_2" border="0" alt="uvm_dbg_2" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/uvm_dbg_2_thumb.png" width="550" height="172" /></a> </p>
<p>So clearly the <strong><em>hdr </em></strong>field does get randomly generated. It is only when a copy of the container class being created, it skips the “copy process”. And this has to do with the lack of macro. Focus on the missing/commented macro below:</p>
</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/uvm_dbg_1.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="uvm_dbg_1" border="0" alt="uvm_dbg_1" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/uvm_dbg_1_thumb.png" width="487" height="215" /></a> </p>
<p>Hope the above makes it self-explanatory – add the macro, you get <strong><em>copy/clone</em></strong> enabled for that specific field. So 2 lessons learnt today:</p>
<p>1. Use field macros consistently</p>
<p>2. More importantly, use <strong><em>post_randomize</em></strong> as your friendly, automated debug assistant for random generation!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cvcblr.com/blog/?feed=rss2&#038;p=709</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple assertion can save hours of debug time</title>
		<link>http://www.cvcblr.com/blog/?p=697</link>
		<comments>http://www.cvcblr.com/blog/?p=697#comments</comments>
		<pubDate>Sat, 09 Feb 2013 20:09:26 +0000</pubDate>
		<dc:creator>TeamCVC www.cvcblr.com</dc:creator>
				<category><![CDATA[ABV]]></category>
		<category><![CDATA[Assertions]]></category>
		<category><![CDATA[SVA]]></category>
		<category><![CDATA[SystemVerilog]]></category>
		<category><![CDATA[trainings]]></category>

		<guid isPermaLink="false">http://www.cvcblr.com/blog/?p=697</guid>
		<description><![CDATA[Recently a user sought to assign a 4-state array (declared as logic) from the DUT side to a 2-state, bit typed array on TB side. Quite normal and intelligent choice of datatype – as all the TB components at higher &#8230; <a href="http://www.cvcblr.com/blog/?p=697">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Recently a user sought to assign a 4-state array (declared as <strong><em>logic</em></strong>) from the DUT side to a 2-state, <strong><em>bit</em></strong> typed array on TB side. Quite normal and intelligent choice of datatype – as all the TB components at higher level should work on abstract models. However there are 2 important notes – one on the “syntax/semantic” and other on real functional aspect. </p>
<p>Focusing on the functional aspect first (as the semantic would be caught by the compiler anyway), what if the DUT signal contained X/Z on the 4-state array value? </p>
<p>&#160;</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/Picture2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="svd1" border="0" alt="svd1" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/svd1.png" width="655" height="221" />&#160; </a></p>
<p>&#160;</p>
<p>When you assign it to the 2-state array counterpart on the TB side – there is information loss and potentially wrong data <img src='http://www.cvcblr.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>&#160;</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="svd2" border="0" alt="svd2" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/svd2.png" width="738" height="178" /></p>
<p>Here is where a simple assertion could save hours of debug time for you. Recall that SV has a handy system-function to detect unknown values. One could write a simple assertion using that function at the DUT-TB boundary. See the full code below, with the assertion part highlighted:</p>
<p>&#160;<a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/SVD_SVA.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SVD_SVA" border="0" alt="SVD_SVA" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/SVD_SVA_thumb.png" width="688" height="399" /></a></p>
<p>With the SVA included, here is a transcript – Thank GOD, I used assertions <img src='http://www.cvcblr.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/Picture2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Picture2" border="0" alt="Picture2" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/Picture2_thumb.png" width="658" height="347" /></a></p>
<p>So next time you move data from DUT-2-TB, consider this simple trick.</p>
<p>For those wondering what’s the compile time issue in dealing with 4-state vs. 2-state, read VerifAcademy forum @ <a title="http://bit.ly/11xsgO0" href="http://bit.ly/11xsgO0" target="_blank">http://bit.ly/11xsgO0</a></p>
<p>&#160;<a href="http://www.cvcblr.com" target="_blank">TeamCVC</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cvcblr.com/blog/?feed=rss2&#038;p=697</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pragmatic choice of ABV language &#8211; PSL still shines better than SVA</title>
		<link>http://www.cvcblr.com/blog/?p=689</link>
		<comments>http://www.cvcblr.com/blog/?p=689#comments</comments>
		<pubDate>Sat, 09 Feb 2013 18:26:22 +0000</pubDate>
		<dc:creator>TeamCVC www.cvcblr.com</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cvcblr.com/blog/?p=689</guid>
		<description><![CDATA[&#160; As many of our readers would recall, CVC first became very visible to the industry with our early contribution to the assertion-based verification (ABV) via IEEE-1850 PSL (Property Specification Language). Back in 2004 we co-authored our first book on &#8230; <a href="http://www.cvcblr.com/blog/?p=689">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>&#160;</p>
<p>As many of our readers would recall, <a href="http://www.cvcblr.com" target="_blank">CVC</a> first became very visible to the industry with our early contribution to the assertion-based verification (ABV) via IEEE-1850 PSL (Property Specification Language). Back in 2004 we co-authored our first book on this wonderful language, first of its kind in the temporal assertion languages to become a standard (<a title="https://www.facebook.com/cvcblr" href="https://www.facebook.com/cvcblr" target="_blank">See our timeline in Facebook for more</a>). Since then it has been a wonderful run of events in this world of functional verification for close to a decade by now. </p>
<p>One of the significant features of PSL has been its simplicity and succinct means of expressing complex temporals through its “Foundation Language” (a.k.a LTL style) subset. We talk about this in detail in our PSL book (<a title="http://www.systemverilog.us/psl_info.html" href="http://www.systemverilog.us/psl_info.html" target="_blank">http://www.systemverilog.us/psl_info.html</a>). Recently a user came up with a nice requirement at Forum in Verification Academy (See: <a title="http://bit.ly/14JTHlI" href="http://bit.ly/14JTHlI" target="_blank">http://bit.ly/14JTHlI)</a></p>
<p>The spec goes as follows:</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/PSL_in_SV_spec.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PSL_in_SV_spec" border="0" alt="PSL_in_SV_spec" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/PSL_in_SV_spec_thumb.png" width="687" height="213" /></a> </p>
<p>The user attempted a simple SVA 2005 style, but got weird results, then our beloved co-author and guru of assertions, Ben Cohen provided assistance as below (unverified):</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/SVA05.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SVA05" border="0" alt="SVA05" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/SVA05_thumb.png" width="690" height="163" /></a> </p>
<p>Do the same in PSL with FL/LTL style:</p>
<p><a href="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/PSL_in_SV.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PSL_in_SV" border="0" alt="PSL_in_SV" src="http://www.cvcblr.com/blog/wp-content/uploads/2013/02/PSL_in_SV_thumb.png" width="673" height="182" /></a> </p>
<p>Now relate the PSL code back to user spec/requirement:</p>
<blockquote><p>May be simple, but drives me crazy..</p>
<p>&quot;Req&quot; -&gt; &quot;Gnt&quot; -&gt; &quot;Rel&quot;</p>
<p><strong>When granted, assert if it is going to Idle state before releasing the</strong> lock.</p>
</blockquote>
<p>Won’t you agree that PSL with its FL/LTL style is lot closer to the spec than the erstwhile SVA-05 sequence based approach? </p>
<p>There is light at the end of tunnel:</p>
<p>1. PSL works well, nice and is usable in all flavors – Verilog, SV, VHDL, SystemC etc.</p>
<p>2. It costs nothing extra in tools – if you have paid for SV, it is very likely you got the PSL too </p>
<p>3. SV 2009 standard did add this LTL features into it, but yet to be supported by many vendors. So your chances of using it in live projects is weak. Of-course push your vendor for it though.</p>
<p>Bottomline – use what works today, PSL is alive &amp; kicking and you’ve already paid for it in your tool. There is hardly any extra learning – if you know one temporal language, the syntax is very similar, so why not get pragmatic and use it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cvcblr.com/blog/?feed=rss2&#038;p=689</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
