<?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>Verification Martial Arts &#187; Debug</title>
	<atom:link href="http://www.vmmcentral.org/vmartialarts/category/debug/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vmmcentral.org/vmartialarts</link>
	<description>A Blog on Verification Methodology</description>
	<lastBuildDate>Fri, 03 Feb 2012 03:34:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Cool Things You Can Do With DVE &#8211; Part 4</title>
		<link>http://www.vmmcentral.org/vmartialarts/2011/04/cool-things-you-can-do-with-dve-part-4/</link>
		<comments>http://www.vmmcentral.org/vmartialarts/2011/04/cool-things-you-can-do-with-dve-part-4/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 13:28:14 +0000</pubDate>
		<dc:creator>Yaron Ilani</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Breakpoints]]></category>
		<category><![CDATA[DVE]]></category>
		<category><![CDATA[Interactive]]></category>

		<guid isPermaLink="false">http://www.vmmcentral.org/vmartialarts/?p=2405</guid>
		<description><![CDATA[Yaron Ilani, Apps. Consultant, Synopsys If you liked part 2 where I explained how Interactive Rewind could save you precious time during debug, then here’s another one for you. Obviously one of the most powerful methods of debugging interactively is by adding breakpoints at interesting points. You could have a single breakpoint as a starting [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em>Yaron Ilani, Apps. Consultant, Synopsys</em></strong></p>
<p>If you liked <a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvMjAxMS8wNC9jb29sLXRoaW5ncy15b3UtY2FuLWRvLXdpdGgtZHZlLXBhcnQtMi8=">part 2</a> where I explained how <em>Interactive Rewind</em> could save you precious time during debug, then here’s another one for you. Obviously one of the most powerful methods of debugging interactively is by adding breakpoints at interesting points. You could have a single breakpoint as a starting point and then go on step by step. But in most cases it would be wiser to put multiple breakpoints in your code so that you could have more control over your simulation or even jump from one interesting point to another (remember you can always go <a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvMjAxMS8wNC9jb29sLXRoaW5ncy15b3UtY2FuLWRvLXdpdGgtZHZlLXBhcnQtMi8=">backwards</a> in time).</p>
<p>So the process of adding breakpoints and refining them might take some time and ideally you wouldn’t want to repeat that process all over again when you start a new interactive debug session. Wouldn’t it be nice to be able to save your breakpoints so that you or someone else from your team could reuse them in a different simulation? Well, DVE lets you do that! Simply launch the Breakpoints window from the Simulator menu:</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTEvMDQveWlsYW5pX2QxLmpwZw=="><img class="alignnone size-full wp-image-2407" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2011/04/yilani_d1.jpg" alt="" width="627" height="433" /></a></p>
<p>In the example above I’ve added 3 breakpoints. In the source code window they are marked in red, but they are also listed in the Breakpoints window where each breakpoint can be enabled or disabled individually. In the bottom left you can see the “Save” button. Clicking on it will save all your breakpoints to a TCL file. You may use this file later on in any other DVE session by clicking on the “Load” button.</p>
<p>Once your test bench code is more or less stable, with this new feature you can actually create a number of useful breakpoints files (a breakpoints library if you will…). Each breakpoints file could be designed to help debugging a different part of your test bench. Or if you’re debugging some unfamiliar verification IP, you can create a breakpoints file and send it to its owner for help.</p>
<p>Happy debugging!</p>
<p>Check out the <a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvP3M9Y29vbCt0aGluZ3MrZHZl">previous parts</a> of this series to learn more about more cool features available today in DVE.</p>
 <img src="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?view=1&post_id=2405" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.vmmcentral.org/vmartialarts/2011/04/cool-things-you-can-do-with-dve-part-4/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Cool Things You Can Do With DVE &#8211; Part 3</title>
		<link>http://www.vmmcentral.org/vmartialarts/2011/04/cool-things-you-can-do-with-dve-part-3/</link>
		<comments>http://www.vmmcentral.org/vmartialarts/2011/04/cool-things-you-can-do-with-dve-part-3/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 14:00:50 +0000</pubDate>
		<dc:creator>Yaron Ilani</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[DVE]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[waveform]]></category>

		<guid isPermaLink="false">http://www.vmmcentral.org/vmartialarts/?p=2393</guid>
		<description><![CDATA[Yaron Ilani, Apps. Consultant, Synopsys If you missed part 1 or part 2 of this series don’t worry, you can go on reading and catch up with the previous parts later on. Today I’m going to show you a small, yet very powerful feature in DVE that you may not be aware of. Remember the [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em>Yaron Ilani, Apps. Consultant, Synopsys</em></strong></p>
<p>If you missed <a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvMjAxMS8wNC9jb29sLXRoaW5ncy15b3UtY2FuLWRvLXdpdGgtZHZlLXBhcnQtMS8=" target=\"_blank\">part 1</a> or <a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvMjAxMS8wNC9jb29sLXRoaW5ncy15b3UtY2FuLWRvLXdpdGgtZHZlLXBhcnQtMi8=" target=\"_blank\">part 2</a> of this series don’t worry, you can go on reading and catch up with the previous parts later on. Today I’m going to show you a small, yet very powerful feature in DVE that you may not be aware of.</p>
<p>Remember the last time you had to count clock cycles in the waveform window? Sometimes this is a quick way to verify that an internal counter behaves correctly or that a signal goes up just at the right clock edge. Remember how frustrating it is when you lose count for some reason and have to start over? Remember how you’re never 100% sure about the result even if you calculated the time difference between the left and right cursors and divided by the clock period? If your answer was yes to any of those questions then you’re going to love the Grid feature. What Grid simply does, as its name suggests, is draw a grid on top of the waveform. Here’s what it looks like:</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTEvMDQveWlsYW5pX2MxLmpwZw=="><img class="alignnone size-full wp-image-2386" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2011/04/yilani_c1.jpg" alt="" width="468" height="174" /></a></p>
<p>If you click on the Grid button (in the red circle) the Grid will show up as dotted lines. As you can see, the Grid can count clock cycles for you. You can set it up to count falling edges, rising edges or any edge. You can also set the range either by entering the start time and end time, or simply by placing the cursors at the desired points and clicking on the “Get Time From C1/C2” button in the Grid Properties window:</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTEvMDQveWlsYW5pX2MyLmpwZw=="><img class="alignnone size-full wp-image-2388" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2011/04/yilani_c2.jpg" alt="" width="406" height="431" /></a></p>
<p>The Grid Properties window lets you have even more control over the grid. For example – you can set its cycle time to a custom value. This could be very useful if you want to be able to visually inspect drifting clocks or duty-cycle issues, etc.</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTEvMDQveWlsYW5pX2MzLmpwZw=="><img class="alignnone size-full wp-image-2392" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2011/04/yilani_c3.jpg" alt="" width="394" height="121" /></a></p>
<p>In short, the Grid is one of those little things that make a big difference when it comes to efficient debugging and you should definitely become familiar with it. If you ever have to count clock cycles again, remember that you no longer have to do this manually. You don’t even have to make any calculations. Simply launch the Grid and voila!</p>
<p>If you&#8217;d like to learn more about DVE&#8217;s advanced debug features check out <a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvMjAxMS8wNC9jb29sLXRoaW5ncy15b3UtY2FuLWRvLXdpdGgtZHZlLXBhcnQtMS8=" target=\"_blank\">part 1</a> and <a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvMjAxMS8wNC9jb29sLXRoaW5ncy15b3UtY2FuLWRvLXdpdGgtZHZlLXBhcnQtMi8=" target=\"_blank\">part 2</a> of this series.</p>
 <img src="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?view=1&post_id=2393" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.vmmcentral.org/vmartialarts/2011/04/cool-things-you-can-do-with-dve-part-3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Cool Things You Can Do With DVE &#8211; Part 2</title>
		<link>http://www.vmmcentral.org/vmartialarts/2011/04/cool-things-you-can-do-with-dve-part-2/</link>
		<comments>http://www.vmmcentral.org/vmartialarts/2011/04/cool-things-you-can-do-with-dve-part-2/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 15:00:02 +0000</pubDate>
		<dc:creator>Yaron Ilani</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[Breakpoints]]></category>
		<category><![CDATA[DVE]]></category>
		<category><![CDATA[Interactive]]></category>
		<category><![CDATA[Rewind]]></category>

		<guid isPermaLink="false">http://www.vmmcentral.org/vmartialarts/?p=2366</guid>
		<description><![CDATA[Yaron Ilani, Apps. Consultant, Synopsys In Part 1 of this series we discussed how SystemVerilog macros might add complexity when it comes to debugging your test bench and how DVE can make your life much easier in that area. Today we’re going to show you another cool feature in DVE that if used wisely, could [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em>Yaron Ilani, Apps. Consultant, Synopsys</em></strong></p>
<p>In <a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvMjAxMS8wNC9jb29sLXRoaW5ncy15b3UtY2FuLWRvLXdpdGgtZHZlLXBhcnQtMS8=" target=\"_self\">Part 1</a> of this series we discussed how SystemVerilog macros might add complexity when it comes to debugging your test bench and how DVE can make your life much easier in that area. Today we’re going to show you another cool feature in DVE that if used wisely, could save you a significant amount of time when debugging. Let’s recall for a moment the two main use models of DVE &#8211; <em>Post Processing</em> and <em>Interactive</em>. The former is where you&#8217;re debugging your simulation results after it has completed. The latter is where you&#8217;re running and debugging your simulation simultaneously, trading off performance for enhanced debug capabilities. Today we shall focus on the interactive mode. We&#8217;re about to see how the Interactive Rewind feature will help you minimize your debug turnaround time.</p>
<p>So during a typical interactive session you put a breakpoint somewhere in your code and let the simulation run until it reaches your breakpoint. From that point and on you take the controls and advance the simulation step by step which allows you to inspect your signals or variables very closely. You may assign different values to signals along the way to try out potential workarounds or fixes. Now here&#8217;s the tricky part: simulation can only advance forward! So if your breakpoint occurs late in the simulation, every time you want to restart your debug trail you&#8217;re bound to wait for the simulation to rerun from the beginning. Why would you want to start over? Well, you might want to change a signal value (remember you can force signals interactively in DVE). But more often than not, stepping through your code gets very complicated and you might miss the interesting point where the bug occurs, or you lose track of the debug trail and need to start fresh. In certain cases your breakpoints occur periodically (e.g. every time a packet is transmitted) and you just wish you could go back in time to the previous occurrence to step through the code again.</p>
<p>The good news is that DVE allows you to navigate backwards in simulation!  We call it <em>Interactive Rewind</em>. All you have to do is set up one or more checkpoints along the simulation. Upon each checkpoint a snapshot of the simulation is saved and you may use it later on to literally go back in time. To give you a sense of how easy it is to work with checkpoints, here&#8217;s how it looks like &#8211; the left button is used to add a new checkpoint. The right button will be used later to rewind to any of the previously added checkpoints.</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTEvMDQveWlsYW5pX2IxLmpwZw=="><img class="alignnone size-full wp-image-2369" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2011/04/yilani_b1.jpg" alt="" width="451" height="275" /></a></p>
<p>Selecting a checkpoint to rewind to is easy: simply select one from the drop-down menu:</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTEvMDQveWlsYW5pX2IyLmpwZw=="><img class="alignnone size-full wp-image-2370" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2011/04/yilani_b2.jpg" alt="" width="428" height="201" /></a></p>
<p>You can also control your checkpoints via UCLI, where you’ll find many advanced features such as the ability to add periodic checkpoints automatically.</p>
<p>To sum up, interactive debugging with DVE becomes much more efficient with Interactive Rewind. Simply add checkpoints at strategic points along the debug trail. Then use Step/Next to advance simulation time and Rewind to go back. This will keep your debug turnaround time to minimum, thus enabling you to focus on debugging and not waiting.</p>
 <img src="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?view=1&post_id=2366" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.vmmcentral.org/vmartialarts/2011/04/cool-things-you-can-do-with-dve-part-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Cool Things You Can Do With DVE &#8211; Part 1</title>
		<link>http://www.vmmcentral.org/vmartialarts/2011/04/cool-things-you-can-do-with-dve-part-1/</link>
		<comments>http://www.vmmcentral.org/vmartialarts/2011/04/cool-things-you-can-do-with-dve-part-1/#comments</comments>
		<pubDate>Sun, 03 Apr 2011 14:00:07 +0000</pubDate>
		<dc:creator>Yaron Ilani</dc:creator>
				<category><![CDATA[Debug]]></category>
		<category><![CDATA[SystemVerilog]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[DVE]]></category>
		<category><![CDATA[Macro]]></category>

		<guid isPermaLink="false">http://www.vmmcentral.org/vmartialarts/?p=2347</guid>
		<description><![CDATA[Yaron Ilani, Apps. Consultant, Synopsys A SystemVerilog test bench could get quite complex. Typical projects today have thousands of lines of code, and the number is constantly on the rise. However, standard base class libraries such as VMM and UVM can help you minimize the amount of code that needs to be rewritten by providing [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em>Yaron Ilani, Apps. Consultant, Synopsys</em></strong></p>
<p>A SystemVerilog test bench could get quite complex. Typical projects today have thousands of lines of code, and the number is constantly on the rise. However, standard base class libraries such as VMM and UVM can help you minimize the amount of code that needs to be rewritten by providing a rich set of macros that substitute long lines of code with a single line. For example, the simple line `vmm_channel(atm_cell) defines a standard VMM channel for an ATM cell with all the necessary fields and methods, all under the hood. All you have to do is instantiate the newly defined channel wherever you need it.A close cousin to the SV macro is the `include directive which basically substitutes an entire file with a single line. This is a neat way to reuse files and enhance code clarity.</p>
<p>But what happens when you need to debug your source code? Indeed, macros and `includes allow for less clutter and enhanced readability, but at the same time hide from you pieces of code you might actually need access to during debug. Fortunately enough, DVE ships with some new cool features that give you quick and easy access to any underlying code and thus taking the pain out of debugging a SystemVerilog test bench. Let’s see some of them:</p>
<p><strong>Macro Tooltips </strong></p>
<p>Hover your mouse over a macro statement and a tooltip window will pop up displaying the underlying code &#8211; very useful for short macros. The tooltip’s height can be customized to your liking!</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTEvMDQveWlsYW5pX2ExLmpwZw=="><img class="alignnone size-full wp-image-2351" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2011/04/yilani_a1.jpg" alt="" width="478" height="324" /></a></p>
<p><strong>Macro Expand/Collapse</strong></p>
<p>Macros can be expanded interactively so that the underlying source code is presented in the source file you are viewing. Very powerful!</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTEvMDQveWlsYW5pX2EyLmpwZw=="><img class="alignnone size-full wp-image-2352" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2011/04/yilani_a2.jpg" alt="" width="491" height="292" /></a></p>
<p><strong>Hyperlinks / Back / Forward</strong></p>
<p>Clicking on a macro/include statement will take you to the original source code or file.</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTEvMDQveWlsYW5pX2EzLmpwZw=="><img class="alignnone size-full wp-image-2353" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2011/04/yilani_a3.jpg" alt="" width="582" height="355" /></a></p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTEvMDQveWlsYW5pX2E0LmpwZw=="><img class="alignnone size-full wp-image-2354" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2011/04/yilani_a4.jpg" alt="" width="597" height="375" /></a></p>
<p>Don’t worry, you can always go back and forth using the browser-like Back/Forward buttons.</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTEvMDQveWlsYW5pX2E1LmpwZw=="><img class="alignnone size-full wp-image-2355" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2011/04/yilani_a5.jpg" alt="" width="435" height="176" /></a></p>
<p>To sum up, DVE offers a really comfortable way to debug your SystemVerilog source code – be it plain code, macros or `included files. While keeping you focused on the important part of your code, DVE provides quick and easy access to any underlying code. And thanks to the Back &amp; Forward buttons you can skip back and forth between macros, `included files and your main source file as smoothly as you would in your internet browser. This really takes the pain out of debugging a modern SystemVerilog test bench.</p>
 <img src="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?view=1&post_id=2347" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.vmmcentral.org/vmartialarts/2011/04/cool-things-you-can-do-with-dve-part-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Transaction Debugging with Discovery Visualization Environment (DVE) Part-2</title>
		<link>http://www.vmmcentral.org/vmartialarts/2011/03/transaction-debugging-with-discovery-visualization-environment-dve-part-2/</link>
		<comments>http://www.vmmcentral.org/vmartialarts/2011/03/transaction-debugging-with-discovery-visualization-environment-dve-part-2/#comments</comments>
		<pubDate>Tue, 08 Mar 2011 19:06:29 +0000</pubDate>
		<dc:creator>JL Gray</dc:creator>
				<category><![CDATA[Debug]]></category>
		<category><![CDATA[VMM infrastructure]]></category>

		<guid isPermaLink="false">http://www.vmmcentral.org/vmartialarts/2011/03/transaction-debugging-with-discovery-visualization-environment-dve-part-2/</guid>
		<description><![CDATA[Asif Jafri, Verilab Inc. In my previous blog post, I introduced how to dump waves and how to use $tblog for dynamic data and message recording. If you need more control over scope sensitive transaction debugging, $msglog task is very useful. This blog has been divided into two sections: in the the first section, I [...]]]></description>
			<content:encoded><![CDATA[<h3>Asif Jafri, Verilab Inc.</h3>
<p><span style="font-family: Verdana;">In my previous </span><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvMjAxMS8wMi90cmFuc2FjdGlvbi1kZWJ1Z2dpbmctd2l0aC1kaXNjb3ZlcnktdmlzdWFsaXphdGlvbi1lbnZpcm9ubWVudC1kdmUtcGFydC0xLTIv"><span style="font-family: Verdana;">blog post</span></a><span style="font-family: Verdana;">, I introduced how to dump waves and how to use $tblog for dynamic data and message recording. If you need more control over scope sensitive transaction debugging, $msglog task is very useful. This blog has been divided into two sections: in the the first section, I talk about how to use $msglog. In the second section, I will discuss how VMM performs transaction recording by calling $msglog from within the VMM library. The call is protected so as not to confuse other simulators or tools. You can use $msglog in any of your code as well. </span></p>
<p><span style="font-family: Verdana;">•    The advantage of using $msglog is that we have more control over the debug messaging. If a transaction can be divided into start and finish, it is possible to identify cause and effect.<br />
•    Parent and child relationship can be shown<br />
•    Identify execution stream with start and end time. </span></p>
<p><span style="font-family: Verdana;">The following steps need to be followed to invoke $msglog. </span></p>
<p><span style="font-family: Verdana;">Include <em>msglog.svh</em> in testbench code<br />
Add <em>+incdir+${VCS_HOME}/include</em> in the compile line </span></p>
<p><span style="font-family: Verdana;">1) The example below shows how to call the $msglog task in the testbench. The first msglog statement creates a transaction (read) on a stream (stream1) which has an attribute addr. It also sets the header text (RD) and body text (text 1). This statement can be placed in a read task of your transactor.  The second msglog statement once again can be placed in the read task and it shows when the read completes. Streams are global and do not need to be created explicitly. They are created implicitly as they are needed. </span></p>
<p><span style="font-family: Verdana;">$msglog (“stream1”, XACTION, “read”, NORMAL, “RD”, “text 1”, START, addr); </span></p>
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="208"></td>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="208"></td>
</tr>
<tr>
<td><img style="margin: 0px 0px 0px 20px; border-width: 0px;" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2011/03/clip_image00119.gif" border="0" alt="clip_image001[19]" width="338" height="112" /></td>
<td></td>
</tr>
</tbody>
</table>
</td>
<td></td>
</tr>
</tbody>
</table>
<p><span style="font-family: Verdana;">$msglog (“stream1”, XACTION, “read”, NORMAL, “”, FINISH); </span></p>
<p><span style="font-family: Verdana;"> </span></p>
<p><span style="font-family: Verdana;">The table below shows the various possible parameters for the type, severity and relation field in the $msglog task:</span></p>
<table class="MsoTableGrid" style="border-collapse: collapse; border: medium none;" border="1" cellspacing="0" cellpadding="0" width="504">
<tbody>
<tr>
<td style="border: 1pt solid black; padding: 0in 5.4pt; width: 2.05in;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt; text-align: center;">Type</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: 1pt 1pt 1pt medium solid solid solid none black black black -moz-use-text-color;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt; text-align: center;">Severity</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: 1pt 1pt 1pt medium solid solid solid none black black black -moz-use-text-color;" width="10" valign="top">
<p class="MsoNormal" style="margin-right: -27pt; text-align: center;">Relation</p>
</td>
</tr>
<tr>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt none solid solid -moz-use-text-color black black;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">FAILURE</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">FATAL</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="10" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">START</p>
</td>
</tr>
<tr>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt none solid solid -moz-use-text-color black black;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">NOTE</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">ERROR</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="10" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">FINISH</p>
</td>
</tr>
<tr>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt none solid solid -moz-use-text-color black black;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">DEBUG</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">WARNING</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="10" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">PRED</p>
</td>
</tr>
<tr>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt none solid solid -moz-use-text-color black black;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">REPORT</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">NORMAL</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="10" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">SUCC</p>
</td>
</tr>
<tr>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt none solid solid -moz-use-text-color black black;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">NOTIFY</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">TRACE</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="10" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">SUB</p>
</td>
</tr>
<tr>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt none solid solid -moz-use-text-color black black;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">TIMING</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">DEBUG</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="10" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">PARENT</p>
</td>
</tr>
<tr>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt none solid solid -moz-use-text-color black black;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">XHANDLING</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">VERBOSE</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="10" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">CHILD</p>
</td>
</tr>
<tr>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt none solid solid -moz-use-text-color black black;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">XACTION</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">HIDDEN</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="10" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">XTEND</p>
</td>
</tr>
<tr>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt none solid solid -moz-use-text-color black black;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">PROTOCOL</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">IGNORE</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="10" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">USER</p>
</td>
</tr>
<tr>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt none solid solid -moz-use-text-color black black;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">COMMAND</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="10" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">
</td>
</tr>
<tr>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt none solid solid -moz-use-text-color black black;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">CYCLE</p>
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="246" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">
</td>
<td style="border-right: 1pt solid black; padding: 0in 5.4pt; width: 2.05in; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color black black -moz-use-text-color;" width="10" valign="top">
<p class="MsoNormal" style="margin-right: -27pt;">
</td>
</tr>
</tbody>
</table>
<p><span style="font-family: Verdana;"> </span></p>
<p><span style="font-family: Verdana;">As shown above you can also place $msglog tasks in the response task of the responding transactor if the transaction needs to be followed into the response transactor. </span></p>
<p><span style="font-family: Verdana;">$msglog(&#8220;stream1&#8243;, XACTION, &#8220;resp&#8221;, NORMAL, &#8220;RESP&#8221;, START, data); </span></p>
<p><span style="font-family: Verdana;">2) VMM provides build-in transaction recording. To enable it use “+define+VMM_TR_RECORD” when compiling your code. At simulation runtime, recording of transactions is controlled by setting “+vmm_tr_verbosity=debug” in the command line.<br />
The following VMM base classes have build-in recording support:<br />
vmm_channel, vmm_voter, vmm_env, vmm_subenv, vmm_timeline </span></p>
<p><span style="font-family: Verdana;">The figure below shows an example of the recorded transactions as viewed in the waveform viewer:</span></p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTEvMDMvaW1hZ2UucG5n"><img style="margin: 5px 0px; border-width: 0px;" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2011/03/image_thumb.png" border="0" alt="image" width="740" height="526" /></a></p>
<p><span style="font-family: Verdana;"><br />
You can also do your own transaction recording by using the following VMM functions: </span></p>
<p><span style="font-family: Verdana;"> vmm_tr_record::open_stream<br />
vmm_tr_record::open_sub_stream<br />
vmm_tr_record::close_stream<br />
vmm_tr_record::start_tr<br />
vmm_tr_record::extend_tr<br />
vmm_tr_record::end_tr<br />
</span></p>
<p><span style="font-family: Verdana;"><br />
e.g.<br />
mystream = vmm_tr_record::open_stream(get_instance(), “MyChannel”);<br />
…<br />
vmm_tr_record::start_tr(mystream, “Read”, “Text line 1\nText line 2”);<br />
…<br />
vmm_tr_record::end_tr(mystream);<br />
…<br />
vmm_tr_record::close_stream(mystream);<br />
</span></p>
<p><span style="font-family: Verdana;"><br />
As shown in the two part blogs on transaction debugging, $tblog and $msglog can be very useful transaction debugging constructs. You can choose to dump transactions and follow them through the environment, dump channel data, notification ID, phase names etc. To be able to see all this information on the waveform viewer has been a blessing for me.  I hope it is helpful to you.</span></p>
 <img src="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?view=1&post_id=2216" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.vmmcentral.org/vmartialarts/2011/03/transaction-debugging-with-discovery-visualization-environment-dve-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

