blob: 253815d89b17b2bb924a13cbad17f4f35869bd22 [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="../../ovm_ref/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 OVM library provides a base class called <i>ovm_in_order_comparator</i> and two derived classes: <i>ovm_in_order_built_in_comparator</i> for comparing streams of built-in types and <i>ovm_in_order_class_comparator</i> for comparing streams of class objects.</p><p>The <i>ovm_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="nd/Images/ovm_ref_comparators.gif" width="306" height="305"></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>