blob: dbced806cf034d0d649fd0aeee43bcbc581ffadd [file] [log] [blame]
<html><head><title>Comparators</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script></head><body class="FramedContentPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
<!-- Generated by Natural Docs, version Development Release 01-12-2008 (1.35 base) -->
<!-- http://www.naturaldocs.org -->
<!-- saved from url=(0026)http://www.naturaldocs.org -->
<!--TOP - START OF CONTENT-->
<div id=Content>
<!--CONTENT index=0 -->
<div class="CGroup"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="Comparators" href="../../src/overviews/comparators.txt">Comparators</a></h1><div class=CBody><p>A common function of testbenches is to compare streams of transactions for equivalence.&nbsp; For example, a testbench may compare a stream of transactions from a DUT with expected results.</p><p>The UVM library provides a base class called <i>uvm_in_order_comparator</i> and two derived classes: <i>uvm_in_order_built_in_comparator</i> for comparing streams of built-in types and <i>uvm_in_order_class_comparator</i> for comparing streams of class objects.</p><p>The <i>uvm_algorithmic_comparator</i> also compares two streams of transactions, but the transaction streams might be of different type objects.&nbsp; Thus, this comparator will employ a user-defined transformation function to convert one type to another before performing a comparison.</p><img src="../../images/uvm_ref_comparators.gif" width="306" height="305">
<!--START_ND_SUMMARY index=0-->
<div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable>
<!-- index=0 -->
<tr class="SMain"><td colspan=2 class=SEntry><a href="#Comparators" >Comparators</a></td></tr>
<tr class=SMain><td colspan=2 class=SWideDescription>A common function of testbenches is to compare streams of transactions for equivalence. </td></tr></table></div></div><!--END_ND_SUMMARY-->
</div></div></div>
</div><!--Content-->
<!--START_ND_TOOLTIPS-->
<!--END_ND_TOOLTIPS-->
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>