<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Verification Martial Arts</title>
	
	<link>http://www.vmmcentral.org/vmartialarts</link>
	<description>A Blog on Verification Methodology</description>
	<lastBuildDate>Thu, 17 May 2012 09:19: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>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/vmmcentral/vma" /><feedburner:info uri="vmmcentral/vma" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>vmmcentral/vma</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Are You Afraid of Breakpoints?</title>
		<link>http://feedproxy.google.com/~r/vmmcentral/vma/~3/fEMletaClgU/</link>
		<comments>http://www.vmmcentral.org/vmartialarts/2012/05/are-you-afraid-of-breakpoints/#comments</comments>
		<pubDate>Thu, 17 May 2012 08:50:14 +0000</pubDate>
		<dc:creator>Yaron Ilani</dc:creator>
				<category><![CDATA[Debug]]></category>
		<category><![CDATA[SystemVerilog]]></category>
		<category><![CDATA[UVM]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Breakpoints]]></category>
		<category><![CDATA[DVE]]></category>

		<guid isPermaLink="false">http://www.vmmcentral.org/vmartialarts/?p=2947</guid>
		<description><![CDATA[Are you afraid of breakpoints? Don&#8217;t worry, many of us have been.  After all, breakpoints are for software folks, not for us chip heads, right?? Well, not really&#8230; In many ways, chip verification is pretty much a software project. Still, most of the people I know fall into one of these two categories &#8211; the [...]]]></description>
			<content:encoded><![CDATA[<p>Are you afraid of breakpoints? Don&#8217;t worry, many of us have been.  After all, breakpoints are for software folks, not for us chip heads, right??<br />
Well, not really&#8230; In many ways, chip verification is pretty much a software project.<br />
Still, most of the people I know fall into one of these two categories &#8211; the $display person, or the breakpoints person.</p>
<p>The former doesn&#8217;t like breakpoints. He or she would rather fill up their code with $display&#8217;s and UVM_INFO&#8217;s and recompile their code every time around.<br />
That&#8217;s cool.<br />
The latter likes and appreciates breakpoints and uses them whenever possible instead of traditional $display commands.</p>
<p>So if you are the second type &#8211; here&#8217;s some great news from DVE that will help you be even more efficient.<br />
And $display folks &#8211; stay tuned as it may be time for you to finally convert <img src='http://www.vmmcentral.org/vmartialarts/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>In this short video I show how to use Object ID&#8217;s &#8211; a new infrastructure in DVE &#8211; to break in a specific class <span style="text-decoration: underline">instance </span>!</p>
<p><iframe width="500" height="281" src="http://www.youtube.com/embed/XExts9srRnk?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p><strong> </strong></p>
<p><strong>Want more ?</strong></p>
<p>Go here to catch up with our latest DVE and UVM short videos:<br />
<a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS9wbGF5bGlzdD9saXN0PVBMMDZEQTUyNzA0ODBGQzdFMQ==">http://www.youtube.com/playlist?list=PL06DA5270480FC7E1</a></p>
 <img src="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?view=1&post_id=2947" width="1" height="1" style="display: none;" /><img src="http://feeds.feedburner.com/~r/vmmcentral/vma/~4/fEMletaClgU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.vmmcentral.org/vmartialarts/2012/05/are-you-afraid-of-breakpoints/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.vmmcentral.org/vmartialarts/2012/05/are-you-afraid-of-breakpoints/</feedburner:origLink></item>
		<item>
		<title>Namespaces, Build Order, and Chickens</title>
		<link>http://feedproxy.google.com/~r/vmmcentral/vma/~3/_HHQDqWdvNM/</link>
		<comments>http://www.vmmcentral.org/vmartialarts/2012/05/namespaces-build-order-and-chickens/#comments</comments>
		<pubDate>Mon, 14 May 2012 21:06:45 +0000</pubDate>
		<dc:creator>Brian Hunter</dc:creator>
				<category><![CDATA[Organization]]></category>
		<category><![CDATA[Structural Components]]></category>
		<category><![CDATA[SystemVerilog]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[UVM]]></category>

		<guid isPermaLink="false">http://www.vmmcentral.org/vmartialarts/?p=2921</guid>
		<description><![CDATA[As described in the video, vkits are our convenient method of lumping together reusable UVM packages with the interface(s) that they operate on. Because code within packages can only peek or poke wires that are contained by a virtual interface, it is often useful to wrap these together somehow, and vkits are our technique at [...]]]></description>
			<content:encoded><![CDATA[<p><iframe width="500" height="281" src="http://www.youtube.com/embed/cj5xeaopTQQ?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>As described in the video, <i>vkits</i> are our convenient method of lumping together reusable UVM packages with the interface(s) that they operate on.  Because code within packages can only peek or poke wires that are contained by a virtual interface, it is often useful to wrap these together somehow, and vkits are our technique at Cavium for doing that.</p>
<p>What goes in a vkit?  Anything that is reusable.  From simple agents and the interfaces they work on to complete UVM environments that connect these agents together, including scoreboards, sequence libraries, types, and utility functions.</p>
<p>What does not go in a vkit are items that are bound to a specific testbench, including the tests themselves.</p>
<p>The video describes the wildcard import syntax as an &#8220;egregiously bad idea.&#8221;  First and foremost, doing so can lead to <i>namespace pollution</i>, which comes about when one engineer independently adds types or classes to their package and only later finds out that they conflict with those of another package.  Secondly, wildcard imports prevent our shorter naming conventions of having an agent_c, drv_c, env_c, etc., within each package.</p>
<p>Not described in the video are CSR packages that are auto-generated by RAL, IP-XACT, or your script of choice.  These packages should be independent of your vkits, such that your vkits refer to them with their explicit scopes (i.e., chx_csr_pkg::PLUCKING_CFG_C).</p>
<p>Future posts will go into more detail about how we architect UVM testbenches and some of our other conventions that work within this framework.  Until then, I&#8217;ve got a lot of pies to eat.</p>
<p><i>PS. I&#8217;ll be at DAC this year!  Come see me on Tuesday, June 5, during the &#8220;Industry Leaders Verify with Synopsys&#8221; lunch.  Hopefully they&#8217;ll be serving some of my favorite foods!</i></p>
 <img src="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?view=1&post_id=2921" width="1" height="1" style="display: none;" /><img src="http://feeds.feedburner.com/~r/vmmcentral/vma/~4/_HHQDqWdvNM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.vmmcentral.org/vmartialarts/2012/05/namespaces-build-order-and-chickens/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.vmmcentral.org/vmartialarts/2012/05/namespaces-build-order-and-chickens/</feedburner:origLink></item>
		<item>
		<title>Customizing UVM Messages Without Getting a Sunburn</title>
		<link>http://feedproxy.google.com/~r/vmmcentral/vma/~3/s8lDB7WWEVk/</link>
		<comments>http://www.vmmcentral.org/vmartialarts/2012/04/customizing-uvm-messages-without-getting-a-sunburn/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 19:01:55 +0000</pubDate>
		<dc:creator>Brian Hunter</dc:creator>
				<category><![CDATA[Debug]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[SystemVerilog]]></category>
		<category><![CDATA[UVM]]></category>
		<category><![CDATA[Verification Planning & Management]]></category>

		<guid isPermaLink="false">http://www.vmmcentral.org/vmartialarts/?p=2903</guid>
		<description><![CDATA[The code snippets presented are available below the video. my_macros.sv: `define my_info(MSG, VERBOSITY) \ begin \ if(uvm_report_enabled(VERBOSITY,UVM_INFO,get_full_name())) \ uvm_report_info(get_full_name(), $sformatf MSG, 0, `uvm_file, `uvm_line); \ end `define my_err(MSG) \ begin \ if(uvm_report_enabled(UVM_NONE,UVM_ERROR,get_full_name())) \ uvm_report_error(get_full_name(), $sformatf MSG, UVM_NONE, `uvm_file, `uvm_line); \ end `define my_warn(MSG) \ begin \ if(uvm_report_enabled(UVM_NONE,UVM_WARNING,get_full_name())) \ uvm_report_warning(get_full_name(), $sformatf MSG, UVM_NONE, `uvm_file, `uvm_line); \ [...]]]></description>
			<content:encoded><![CDATA[<p>The code snippets presented are available below the video.</p>
<p><iframe width="640" height="360" src="http://www.youtube.com/embed/K7V505WKxuU?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p><strong>my_macros.sv:</strong></p>
<pre>   `define my_info(MSG, VERBOSITY) \
      begin \
         if(uvm_report_enabled(VERBOSITY,UVM_INFO,get_full_name())) \
            uvm_report_info(get_full_name(), $sformatf MSG, 0, `uvm_file, `uvm_line); \
      end

  `define my_err(MSG)         \
      begin \
         if(uvm_report_enabled(UVM_NONE,UVM_ERROR,get_full_name())) \
            uvm_report_error(get_full_name(), $sformatf MSG, UVM_NONE, `uvm_file, `uvm_line); \
      end

   `define my_warn(MSG)        \
      begin \
         if(uvm_report_enabled(UVM_NONE,UVM_WARNING,get_full_name())) \
            uvm_report_warning(get_full_name(), $sformatf MSG, UVM_NONE, `uvm_file, `uvm_line); \
      end

   `define my_fatal(MSG)       \
      begin \
         if(uvm_report_enabled(UVM_NONE,UVM_FATAL,get_full_name())) \
            uvm_report_fatal(get_full_name(), $sformatf MSG, UVM_NONE, `uvm_file, `uvm_line); \
      end</pre>
<p><strong>my_init.sv:</strong></p>
<pre>initial begin
      my_report_server_c report_server = new("my_report_server");

      if($value$plusargs("fname_width=%d", fwidth)) begin
         report_server.file_name_width = fwidth;
      end
      if($value$plusargs("hier_width=%d", hwidth)) begin
         report_server.hier_width = hwidth;
      end

      uvm_pkg::uvm_report_server::set_server(report_server);

      // all "%t" shall print out in ns format with 8 digit field width
      $timeformat(-9,0,"ns",8);
   end</pre>
<p><strong>my_report_server.sv:</strong></p>
<pre>class my_report_server_c extends uvm_report_server;
   `uvm_object_utils(my_report_server_c)

   string filename_cache[string];
   string hier_cache[string];

   int unsigned file_name_width = 28;
   int unsigned hier_width = 60;

   uvm_severity_type sev_type;
   string prefix, time_str, code_str, fill_char, file_str, hier_str;
   int last_slash, flen, hier_len;

   function new(string name="my_report_server");
      super.new();
   endfunction : new

   virtual function string compose_message(uvm_severity severity, string name, string id, string message,
                                           string filename, int line);
      // format filename &amp; line-number
      last_slash = filename.len() - 1;
      if(file_name_width &gt; 0) begin
         if(filename_cache.exists(filename))
           file_str = filename_cache[filename];
         else begin
	           while(filename[last_slash] != "/" &amp;&amp; last_slash != 0)
	             last_slash--;
            file_str = (filename[last_slash] == "/")?
	                      filename.substr(last_slash+1, filename.len()-1) :
                       filename;

	           flen = file_str.len();
            file_str = (flen &gt; file_name_width)?
	                      file_str.substr((flen - file_name_width), flen-1) :
                       {{(file_name_width-flen){" "}}, file_str};
	           filename_cache[filename] = file_str;
	        end
	        $swrite(file_str, "(%s:%6d) ", file_str, line);
      end else
	       file_str = "";

      // format hier
      hier_len = id.len();
      if(hier_width &gt; 0) begin
         if(hier_cache.exists(id))
           hier_str = hier_cache[id];
         else begin
	           if(hier_len &gt; 13 &amp;&amp; id.substr(0,12) == "uvm_test_top.") begin
               id = id.substr(13, hier_len-1);
               hier_len -= 13;
	           end
	           if(hier_len  hier_width)
               hier_str = id.substr(hier_len - hier_width, hier_len - 1);
	           else
               hier_str = id;
	           hier_str = {"[", hier_str, "]"};
	           hier_cache[id] = hier_str;
	        end
      end else
	       hier_str = "";

      // format time
      $swrite(time_str, " {%t}", $time);

      // determine fill character
      sev_type = uvm_severity_type'(severity);
      case(sev_type)
        UVM_INFO:    begin code_str = "%I"; fill_char = " "; end
        UVM_ERROR:   begin code_str = "%E"; fill_char = "_"; end
        UVM_WARNING: begin code_str = "%W"; fill_char = "."; end
        UVM_FATAL:   begin code_str = "%F"; fill_char = "*"; end
        default:     begin code_str = "%?"; fill_char = "?"; end
      endcase

      // create line's prefix (everything up to time)
      $swrite(prefix, "%s-%s%s%s", code_str, file_str, hier_str, time_str);
      if(fill_char != " ") begin
         for(int x = 0; x &lt; prefix.len(); x++)
           if(prefix[x] == " ")
             prefix.putc(x, fill_char);
      end

      // append message
      return {prefix, " ", message};
   endfunction : compose_message
endclass : my_report_server_c</pre>
 <img src="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?view=1&post_id=2903" width="1" height="1" style="display: none;" /><img src="http://feeds.feedburner.com/~r/vmmcentral/vma/~4/s8lDB7WWEVk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.vmmcentral.org/vmartialarts/2012/04/customizing-uvm-messages-without-getting-a-sunburn/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.vmmcentral.org/vmartialarts/2012/04/customizing-uvm-messages-without-getting-a-sunburn/</feedburner:origLink></item>
		<item>
		<title>Leveraging UVM for verifying High-speed IOs with Verilog-AMS</title>
		<link>http://feedproxy.google.com/~r/vmmcentral/vma/~3/1-Zct9fQeDI/</link>
		<comments>http://www.vmmcentral.org/vmartialarts/2012/04/leveraging-uvm-for-verifying-high-speed-ios-with-verilog-ams/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 01:12:48 +0000</pubDate>
		<dc:creator>Shankar Hemmady</dc:creator>
				<category><![CDATA[AMS]]></category>
		<category><![CDATA[UVM]]></category>
		<category><![CDATA[CustomSim]]></category>
		<category><![CDATA[VCS]]></category>
		<category><![CDATA[Verilog-AMS]]></category>

		<guid isPermaLink="false">http://www.vmmcentral.org/vmartialarts/?p=2886</guid>
		<description><![CDATA[When the industry decided to standardize on UVM, we had high hopes that some day we will be able to use the standard to raise the level of abstraction and solve many open issues. Take the case of AMS verification of High-speed IOs, which has largely been the turf of hand-crafted custom designs verified mostly [...]]]></description>
			<content:encoded><![CDATA[<p>When the industry decided to standardize on UVM, we had high hopes that some day we will be able to use the standard to raise the level of abstraction and solve many open issues.  Take the case of AMS verification of High-speed IOs, which has largely been the turf of hand-crafted custom designs verified mostly with directed tests.</p>
<p>Warren Anderson and his team at AMD <a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2Jsb2dzLnN5bm9wc3lzLmNvbS9hbmFsb2dpbnNpZ2h0cy8yMDEyLzA0LzE3L3V2bS1iYXNlZC1yYW5kb20tdmVyaWZpY2F0aW9uLXVzaW5nLWN1c3RvbXNpbS12Y3MtZm9yLWFuYWxvZy1taXhlZC1zaWduYWwtZGVzaWducy8=">here </a>describe a simple, innovative approach they used with UVM and Verilog-AMS running VCS and CustomSim/XA&#8230; yes, UVM really works wonders when used prudently with the right flow.</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2Jsb2dzLnN5bm9wc3lzLmNvbS9hbmFsb2dpbnNpZ2h0cy8yMDEyLzA0LzE3L3V2bS1iYXNlZC1yYW5kb20tdmVyaWZpY2F0aW9uLXVzaW5nLWN1c3RvbXNpbS12Y3MtZm9yLWFuYWxvZy1taXhlZC1zaWduYWwtZGVzaWducy8=">http://blogs.synopsys.com/analoginsights/2012/04/17/uvm-based-random-verification-using-customsim-vcs-for-analog-mixed-signal-designs/</a></p>
 <img src="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?view=1&post_id=2886" width="1" height="1" style="display: none;" /><img src="http://feeds.feedburner.com/~r/vmmcentral/vma/~4/1-Zct9fQeDI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.vmmcentral.org/vmartialarts/2012/04/leveraging-uvm-for-verifying-high-speed-ios-with-verilog-ams/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.vmmcentral.org/vmartialarts/2012/04/leveraging-uvm-for-verifying-high-speed-ios-with-verilog-ams/</feedburner:origLink></item>
		<item>
		<title>Using the VMM Datastream Scoreboard in a UVM environment</title>
		<link>http://feedproxy.google.com/~r/vmmcentral/vma/~3/wixZkBFGNLQ/</link>
		<comments>http://www.vmmcentral.org/vmartialarts/2012/02/using-the-vmm-datastream-scoreboard-in-a-uvm-environment/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 06:32:13 +0000</pubDate>
		<dc:creator>Amit Sharma</dc:creator>
				<category><![CDATA[Communication]]></category>
		<category><![CDATA[Interoperability]]></category>
		<category><![CDATA[Reuse]]></category>
		<category><![CDATA[Scoreboarding]]></category>
		<category><![CDATA[UVM]]></category>
		<category><![CDATA[VMM infrastructure]]></category>

		<guid isPermaLink="false">http://www.vmmcentral.org/vmartialarts/?p=2875</guid>
		<description><![CDATA[Implementing the response checking mechanism in a self-checking environment remains the most time-consuming task. The VMM Data Stream Scoreboard package facilitates the implementation of verifying the correct transformation, destination and ordering of ordered data streams. This package is intuitively applicable to packet-oriented design, such as modems, routers and protocol interfaces. This package can also be [...]]]></description>
			<content:encoded><![CDATA[<p>Implementing the response checking mechanism in a self-checking environment remains the most time-consuming task. The VMM Data Stream Scoreboard package facilitates the implementation of verifying the correct transformation, destination and ordering of ordered data streams. This package is intuitively applicable to packet-oriented design, such as modems, routers and protocol interfaces. This package can also be used to verify any design transforming and moving sequences of data items, such as DSP data paths and floating-point units. Out-of-the-box, the VMM data stream scoreboard can be used to verify single-stream designs that do not modify the data flowing through them. For example, it can be used to verify FIFOs, Ethernet media access controllers (MACs) and bridges.</p>
<p>The VMM data scoreboard can also be used to verify multi-stream designs with user-defined data transformation and input-to-output stream routing. The transformation from input data items into expected data items is not limited to one-to-one transformation. An input data item may be transformed into multiple expected data items (e.g. segmenters) or none (e.g. reassemblers). Compared to this, the functionality available through UVM in-order comparator or the algorithmic comparator is significantly less. Thus, users might want to have access to the functionality provided by the VMM DS Scoreboard in a UVM environment. Using the UBUS example available in $VCS_HOME/doc/examples/uvm/integrated/ubus as a demo vehicle, this article shows how simple adapters are used to integrate the VMM DS scoreboard in a UVM environment and thus get access to more advanced scoreboarding functionality within the UVM environment</p>
<p>The UBUS example uses an example scoreboard to verify that the slave agent is operating as a simple memory. It extends from the <em>uvm_scoreboard</em> class and implements a memory_verify() function to makes the appropriate calls and comparisons needed to verify a memory operation. An <em>uvm_analysis_export</em> is explicitly created and implementation for ‘write’ defined. In the top level environment, the analysis export is connected to the analysis port of the slave monitor.</p>
<p><em>ubus0.slaves[0].monitor.item_collected_port.connect(scoreboard0.item_collected_export);</em></p>
<p>The simple scoreboard with its explicit implementation of the comparison routines suffices for verifying the basic operations, but would require to be enhanced significantly to provide more detailed information which the user might need. For example, lets take the ‘test_2m_4s’ test. Here , the environment is configured to have 2 Masters and 4 slaves.. Depending on how the slave memory map is configured, different slaves respond to different transfers on the bus. Now, if we want to get some information on how many transfer went into the scoreboard for a specific combination (eg: Master 1 to Slave 3), how many were verified to be processed correctly etc, it would be fair enough to conclude that the existing scoreboarding schemes will not suffice..</p>
<p>Hence, it was felt that the Data Stream Scoreboard with its advanced functionality and support for data transformation, data reordering, data loss, and multi-stream data routing should be available for verification environments not necessarily based on VMM. From VCS  2011.12-1, this integration have meed made very simple.  This VMM DS scoreboard implements a generic data stream scoreboard that accepts parameters for the input and output packet types. A single instance of this class is used to check the proper transformation, multiplexing and ordering of multiple data streams. The scoreboard class now  leverages a policy-based design and parameterized specializations to accepts any ‘Packet’ class or d, be it VMM, UVM or OVM.</p>
<p>The central element in policy-based design is a class template (called the host class, which in this case in the VMM DS Scoreboad), taking several type parameters as input, which are specialized with types selected by the user (called policy classes), each implementing a particular implicit method (called a policy), and encapsulating some orthogonal (or mostly orthogonal) aspect of the behavior of the instantiated host class. In this case, the ‘policies’ implemented by the policy classes are the ‘compare’ and ‘display’ routines.</p>
<p>By supplying a host class combined with a set of different, canned implementations for each policy, the VMM DS scoreboard can support all different behavior combinations, resolved at compile time, and selected by mixing and matching the different supplied policy classes in the instantiation of the host class template. Additionally, by writing a custom implementation of a given policy, a policy-based library can be used in situations requiring behaviors unforeseen by the library implementor .</p>
<p>So, lets go through a set of simple steps to see how you can use the VMM DS scoreboard in the UVM environment</p>
<p><strong><span style="text-decoration: underline;">Step 1:</span></strong> Creating the policy class for UVM and define its ‘policies’</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTIvMDIvaW1hZ2UucG5n"><img style="margin-left: 0px; margin-right: 0px; border: 0px initial initial;" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2012/02/image_thumb.png" border="0" alt="image" width="369" height="269" /></a></p>
<p><strong> </strong></p>
<p><strong><span style="text-decoration: underline;">Step 2:</span></strong> Replacing the UVM scoreboard with a VMM one extended from <em>“vmm_sb_ds_typed”</em> and specialize it with the <em>ubus_transfer </em>type and the previous created <em>uvm_object_policy.</em></p>
<p><em>class ubus_example_scoreboard extends vmm_sb_ds_typed #(<strong>ubus_transfer,ubus_transfer, uvm_object_policy</strong>);</em></p>
<p><em>`vmm_typename(ubus_example_scoreboard)<br />
…<br />
endclass: ubus_example_scoreboard</em></p>
<p>Once, this is done, you can either declare an VMM TLM Analysis export to connect to the Bus Monitor in the UBUS environment or use the pre-defined on in the VMM DS scoreboard</p>
<p><em>vmm_tlm_analysis_export #(ubus_example_scoreboard,ubus_transfer) analysis_exp;</em></p>
<p>Given that for any configuration, one master and slave would be active, define the appropriate streams in the constructor (though this is not required if there are only single streams, we are defining this explicitly so that this can scale up to multiple input and expect streams for different tests)</p>
<p><em>this.define_stream(0, &#8220;Slave 0&#8243;, EXPECT);<br />
this.define_stream(0, &#8220;Master 0&#8243;, INPUT);</em></p>
<p><em> </em></p>
<p><strong><span style="text-decoration: underline;">Step 2 .a:</span></strong> Create the ‘write’ implementation for the Analysis export</p>
<p>Since, we are verifying the operation of the slave as a simple memory, we just add in the appropriate logic to insert a packet to the scoreboard when we do a ‘WRITE’ and an expect/check when the transfer is a ‘READ’ with an address that has already been written to.</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTIvMDIvaW1hZ2UxLnBuZw=="><img style="margin: 0px; border: 0px initial initial;" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2012/02/image_thumb1.png" border="0" alt="image" width="370" height="273" /></a></p>
<p><strong> </strong></p>
<p><strong><span style="text-decoration: underline;">Step 2.b:</span></strong> Implement the stream_id() method</p>
<p>You can use this method to determine to which stream a specific ‘transfer’ belongs to based on the packet’s content, such as a source or destination address. In this case, the BUS Monitor updates the ‘slave’ property of the collected transfer w.r.t where the address falls on the slave memory map.</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTIvMDIvaW1hZ2UyLnBuZw=="><img style="margin-left: 0px; margin-right: 0px; border: 0px;" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2012/02/image_thumb2.png" border="0" alt="image" width="539" height="301" /></a></p>
<p><em><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTIvMDIvaW1hZ2UzLnBuZw=="><img style="border: 0px initial initial;" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2012/02/image_thumb3.png" border="0" alt="image" width="372" height="161" /></a> </em></p>
<p><strong><span style="text-decoration: underline;">Step 3:</span></strong> Create the UVM Analysis to VMM Analysis Adapter</p>
<p>The uvm_analysis_to_vmm_analysis is used to connect any UVM component with an analysis port to any VMM component via an analysis export. The adapter will convert all incoming UVM transactions to a VMM transaction and drive this converted transaction to the VMM component through the analysis port-export. If you are using the VMM UVM interoperability library, you do not have to create the adapter as it will be available in the library</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTIvMDIvaW1hZ2U0LnBuZw=="><img style="margin-left: 0px; margin-right: 0px; border: 0px;" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2012/02/image_thumb4.png" border="0" alt="image" width="551" height="218" /></a></p>
<p><em><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTIvMDIvaW1hZ2U1LnBuZw=="><img style="border: 0px initial initial;" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2012/02/image_thumb5.png" border="0" alt="image" width="371" height="134" /></a> </em></p>
<p>Create the ‘write’ implementation for the analysis export in the adapter</p>
<p>The write method, called via the &lt;analysis_export&gt; would just post the receive UBUS transfer from the UVM analysis port to the VMM analysis port.</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTIvMDIvaW1hZ2U2LnBuZw=="><img style="border: 0px initial initial;" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2012/02/image_thumb6.png" border="0" alt="image" width="372" height="59" /></a></p>
<p><strong> </strong></p>
<p><strong><span style="text-decoration: underline;">Step 4:</span></strong> Make the TLM connections</p>
<p>In the original example, the <em>item_collected_port</em> of the slave monitor was connected to the analysis export of the example scoreboard. Here, the DataStream scoreboard has an analysis port which expects a VMM transaction. Hence, we need the adapter created above to intermediate between the analysis port of the UVM Bus monitor and the analysis export of the VMM DS scoreboard..</p>
<p><em><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTIvMDIvaW1hZ2U3LnBuZw=="><img style="border: 0px initial initial;" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2012/02/image_thumb7.png" border="0" alt="image" width="373" height="98" /></a> </em></p>
<p><strong><span style="text-decoration: underline;">Step 5:</span></strong> Define Additional streams if required for multi-master multi-slave configurations</p>
<p>This step is not required for a single master/slave configuration. However, would need to create additional streams so that you can verify the correctness on all the different permutations in terms of tests like “test_2m_4s” .</p>
<p>In this case, the following is added in the test_2m_2s in the connect_phase()</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTIvMDIvaW1hZ2U4LnBuZw=="><img style="border: 0px initial initial;" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2012/02/image_thumb8.png" border="0" alt="image" width="373" height="113" /></a></p>
<p><strong><span style="text-decoration: underline;">Step 6:</span></strong> Add appropriate options to your compile command and analyze your results</p>
<p>Change the Makefile by adding –ntb_opts rvm on the command line and add +define+UVM_ON_TOP</p>
<p><em>vcs -sverilog -timescale=1ns/1ns -ntb_opts uvm-1.1+rvm +incdir+../sv ubus_tb_top.sv -l comp.log +define+UVM_ON_TOP </em></p>
<p><em> </em></p>
<p>And that is all, as far and you are ready to go and validate your DUT with a more advanced scoreboard with loads of built-in functionality. This is what you will get when you execute the “test_2m_4s” test</p>
<p><a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy52bW1jZW50cmFsLm9yZy92bWFydGlhbGFydHMvd3AtY29udGVudC91cGxvYWRzLzIwMTIvMDIvc2NiZF9yZXN1bHRzLnBuZw=="><img class="alignnone size-full wp-image-2877" src="http://www.vmmcentral.org/vmartialarts/wp-content/uploads/2012/02/scbd_results.png" alt="" width="648" height="344" /></a></p>
<p>Thus, not only do you have stream specific information now, but you now have access to much more functionality as mentioned earlier. For example, you can model transformations, checks for out of order matches, allow for dropped packets, and iterate over different streams to get access to the specific transfers. Again, depending on your requirements, you can use the simple UVM comparator for your basic checks and switch over to the DS scoreboard for the more complex scenarios with the flip of a switch in the same setup. This is what we did for a UVM PCIe VIP we developed earlier ( <a href="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dzEwLmVkYWNhZmUuY29tL2xpbmsvRFZDb24tMjAxMS1NYWdpY2lhbiVFMiU4MCU5OXMtSGF0LURldmVsb3BpbmctTXVsdGktTWV0aG9kb2xvZ3ktUENJZS1HZW4yLVZJUC8zNDU2MS92aWV3Lmh0bWw=">From the Magician&#8217;s Hat: Developing a Multi-methodology PCIe Gen2 VIP)</a> so that the users has access to all the information they require. Hopefully, this will keep you going, till we have a more powerful UVM scoreboard with some subsequent UVM version</p>
 <img src="http://www.vmmcentral.org/vmartialarts/wp-content/plugins/feed-statistics.php?view=1&post_id=2875" width="1" height="1" style="display: none;" /><img src="http://feeds.feedburner.com/~r/vmmcentral/vma/~4/wixZkBFGNLQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.vmmcentral.org/vmartialarts/2012/02/using-the-vmm-datastream-scoreboard-in-a-uvm-environment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.vmmcentral.org/vmartialarts/2012/02/using-the-vmm-datastream-scoreboard-in-a-uvm-environment/</feedburner:origLink></item>
	</channel>
</rss>

