| <html><head><title>ovm_comparer</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="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="ovm_comparer" href="../../../../src/base/ovm_comparer.svh">ovm_comparer</a></h1><div class=CBody><p>The ovm_comparer class provides a policy object for doing comparisons. The policies determine how miscompares are treated and counted. Results of a comparison are stored in the comparer object. The <a href="ovm_object-svh.html#ovm_object.compare" class=LMethod id=link22 onMouseOver="ShowTip(event, 'tt18', 'link22')" onMouseOut="HideTip('tt18')">ovm_object::compare</a> and <a href="ovm_object-svh.html#ovm_object.do_compare" class=LMethod id=link23 onMouseOver="ShowTip(event, 'tt19', 'link23')" onMouseOut="HideTip('tt19')">ovm_object::do_compare</a> methods are passed an ovm_comparer policy object.</p> |
| |
| <!--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="SClass"><td colspan=2 class=SEntry><a href="#ovm_comparer" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">ovm_comparer</a></td></tr> |
| <tr class=SMain><td colspan=2 class=SWideDescription>The ovm_comparer class provides a policy object for doing comparisons. </td></tr> |
| <tr class="SPrototype SIndent1"> |
| <td colspan=2 class="SEntry SIndent1">Class Declaration</td><tr><tr class="SPrototype SIndent1"><td colspan=2 class=SDescription><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>class ovm_comparer</td></tr></table></blockquote></td></tr> |
| <!-- index=1 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#ovm_comparer.Variables" >Variables</a></td><td class=SDescription></td></tr> |
| <!-- index=2 --> |
| |
| <tr class="SVariable SIndent2"><td class=SEntry><a href="#ovm_comparer.policy" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">policy</a></td><td class=SDescription>Determines whether comparison is OVM_DEEP, OVM_REFERENCE, or OVM_SHALLOW.</td></tr> |
| <!-- index=3 --> |
| |
| <tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#ovm_comparer.show_max" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">show_max</a></td><td class=SDescription>Sets the maximum number of messages to send to the messager for miscompares of an object.</td></tr> |
| <!-- index=4 --> |
| |
| <tr class="SVariable SIndent2"><td class=SEntry><a href="#ovm_comparer.verbosity" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">verbosity</a></td><td class=SDescription>Sets the verbosity for printed messages.</td></tr> |
| <!-- index=5 --> |
| |
| <tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#ovm_comparer.sev" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">sev</a></td><td class=SDescription>Sets the severity for printed messages.</td></tr> |
| <!-- index=6 --> |
| |
| <tr class="SVariable SIndent2"><td class=SEntry><a href="#ovm_comparer.miscompares" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">miscompares</a></td><td class=SDescription>This string is reset to an empty string when a comparison is started.</td></tr> |
| <!-- index=7 --> |
| |
| <tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#ovm_comparer.physical" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">physical</a></td><td class=SDescription>This bit provides a filtering mechanism for fields.</td></tr> |
| <!-- index=8 --> |
| |
| <tr class="SVariable SIndent2"><td class=SEntry><a href="#ovm_comparer.abstract" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">abstract</a></td><td class=SDescription>This bit provides a filtering mechanism for fields.</td></tr> |
| <!-- index=9 --> |
| |
| <tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#ovm_comparer.check_type" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">check_type</a></td><td class=SDescription>This bit determines whether the type, given by <a href="ovm_object-svh.html#ovm_object.get_type_name" class=LMethod id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">ovm_object::get_type_name</a>, is used to verify that the types of two objects are the same.</td></tr> |
| <!-- index=10 --> |
| |
| <tr class="SVariable SIndent2"><td class=SEntry><a href="#ovm_comparer.result" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">result</a></td><td class=SDescription>This bit stores the number of miscompares for a given compare operation. </td></tr> |
| <!-- index=11 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#ovm_comparer.Methods" >Methods</a></td><td class=SDescription></td></tr> |
| <!-- index=12 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#ovm_comparer.compare_field" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">compare_field</a></td><td class=SDescription>Compares two integral values.</td></tr> |
| <!-- index=13 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#ovm_comparer.compare_field_int" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">compare_field_int</a></td><td class=SDescription>This method is the same as <a href="#ovm_comparer.compare_field" class=LMethod id=link14 onMouseOver="ShowTip(event, 'tt12', 'link14')" onMouseOut="HideTip('tt12')">compare_field</a> except that the arguments are small integers, less than or equal to 64 bits. </td></tr> |
| <!-- index=14 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#ovm_comparer.compare_field_real" id=link15 onMouseOver="ShowTip(event, 'tt14', 'link15')" onMouseOut="HideTip('tt14')">compare_field_real</a></td><td class=SDescription>This method is the same as <a href="#ovm_comparer.compare_field" class=LMethod id=link16 onMouseOver="ShowTip(event, 'tt12', 'link16')" onMouseOut="HideTip('tt12')">compare_field</a> except that the arguments are real numbers.</td></tr> |
| <!-- index=15 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#ovm_comparer.compare_object" id=link17 onMouseOver="ShowTip(event, 'tt15', 'link17')" onMouseOut="HideTip('tt15')">compare_object</a></td><td class=SDescription>Compares two class objects using the <a href="#ovm_comparer.policy" class=LVariable id=link18 onMouseOver="ShowTip(event, 'tt2', 'link18')" onMouseOut="HideTip('tt2')">policy</a> knob to determine whether the comparison should be deep, shallow, or reference.</td></tr> |
| <!-- index=16 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#ovm_comparer.compare_string" id=link19 onMouseOver="ShowTip(event, 'tt16', 'link19')" onMouseOut="HideTip('tt16')">compare_string</a></td><td class=SDescription>Compares two string variables.</td></tr> |
| <!-- index=17 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#ovm_comparer.print_msg" id=link20 onMouseOver="ShowTip(event, 'tt17', 'link20')" onMouseOut="HideTip('tt17')">print_msg</a></td><td class=SDescription>Causes the error count to be incremented and the message, <i>msg</i>, to be appended to the <a href="#ovm_comparer.miscompares" class=LVariable id=link21 onMouseOver="ShowTip(event, 'tt6', 'link21')" onMouseOut="HideTip('tt6')">miscompares</a> string (a newline is used to separate messages).</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=1 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.Variables" href="../../../../src/base/ovm_comparer.svh">Variables</a></h3></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=2 --> |
| <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.policy" href="../../../../src/base/ovm_comparer.svh">policy</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>ovm_recursion_policy_enum policy = OVM_DEFAULT_POLICY</td></tr></table></blockquote><div class=CBody><p>Determines whether comparison is OVM_DEEP, OVM_REFERENCE, or OVM_SHALLOW.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=3 --> |
| <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.show_max" href="../../../../src/base/ovm_comparer.svh">show_max</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int unsigned show_max = 1</td></tr></table></blockquote><div class=CBody><p>Sets the maximum number of messages to send to the messager for miscompares of an object.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=4 --> |
| <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.verbosity" href="../../../../src/base/ovm_comparer.svh">verbosity</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int unsigned verbosity = OVM_LOW</td></tr></table></blockquote><div class=CBody><p>Sets the verbosity for printed messages.</p><p>The verbosity setting is used by the messaging mechanism to determine whether messages should be suppressed or shown.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=5 --> |
| <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.sev" href="../../../../src/base/ovm_comparer.svh">sev</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>ovm_severity sev = OVM_INFO</td></tr></table></blockquote><div class=CBody><p>Sets the severity for printed messages.</p><p>The severity setting is used by the messaging mechanism for printing and filtering messages.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=6 --> |
| <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.miscompares" href="../../../../src/base/ovm_comparer.svh">miscompares</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>string miscompares = ""</td></tr></table></blockquote><div class=CBody><p>This string is reset to an empty string when a comparison is started.</p><p>The string holds the last set of miscompares that occurred during a comparison.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=7 --> |
| <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.physical" href="../../../../src/base/ovm_comparer.svh">physical</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>bit physical = 1</td></tr></table></blockquote><div class=CBody><p>This bit provides a filtering mechanism for fields.</p><p>The abstract and physical settings allow an object to distinguish between two different classes of fields.</p><p>It is up to you, in the <a href="ovm_object-svh.html#ovm_object.do_compare" class=LMethod id=link24 onMouseOver="ShowTip(event, 'tt19', 'link24')" onMouseOut="HideTip('tt19')">ovm_object::do_compare</a> method, to test the setting of this field if you want to use the physical trait as a filter.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=8 --> |
| <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.abstract" href="../../../../src/base/ovm_comparer.svh">abstract</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>bit abstract = 1</td></tr></table></blockquote><div class=CBody><p>This bit provides a filtering mechanism for fields.</p><p>The abstract and physical settings allow an object to distinguish between two different classes of fields.</p><p>It is up to you, in the <a href="ovm_object-svh.html#ovm_object.do_compare" class=LMethod id=link25 onMouseOver="ShowTip(event, 'tt19', 'link25')" onMouseOut="HideTip('tt19')">ovm_object::do_compare</a> method, to test the setting of this field if you want to use the abstract trait as a filter.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=9 --> |
| <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.check_type" href="../../../../src/base/ovm_comparer.svh">check_type</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>bit check_type = 1</td></tr></table></blockquote><div class=CBody><p>This bit determines whether the type, given by <a href="ovm_object-svh.html#ovm_object.get_type_name" class=LMethod id=link26 onMouseOver="ShowTip(event, 'tt10', 'link26')" onMouseOut="HideTip('tt10')">ovm_object::get_type_name</a>, is used to verify that the types of two objects are the same.</p><p>This bit is used by the <a href="#ovm_comparer.compare_object" class=LMethod id=link27 onMouseOver="ShowTip(event, 'tt15', 'link27')" onMouseOut="HideTip('tt15')">compare_object</a> method. In some cases it is useful to set this to 0 when the two operands are related by inheritance but are different types.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=10 --> |
| <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.result" href="../../../../src/base/ovm_comparer.svh">result</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int unsigned result = 0</td></tr></table></blockquote><div class=CBody><p>This bit stores the number of miscompares for a given compare operation. You can use the result to determine the number of miscompares that were found.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=11 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.Methods" href="../../../../src/base/ovm_comparer.svh">Methods</a></h3></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=12 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.compare_field" href="../../../../src/base/ovm_comparer.svh">compare_field</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual function bit compare_field (</td><td class=PType nowrap>string </td><td class=PParameter nowrap>name,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>ovm_bitstream_t </td><td class=PParameter nowrap>lhs,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>ovm_bitstream_t </td><td class=PParameter nowrap>rhs,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>size,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>ovm_radix_enum </td><td class=PParameter nowrap>radix</td><td class=PDefaultValuePrefix> = </td><td class=PDefaultValue width=100%>OVM_NORADIX</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>Compares two integral values.</p><p>The <i>name</i> input is used for purposes of storing and printing a miscompare.</p><p>The left-hand-side <i>lhs</i> and right-hand-side <i>rhs</i> objects are the two objects used for comparison.</p><p>The size variable indicates the number of bits to compare; size must be less than or equal to 4096.</p><p>The radix is used for reporting purposes, the default radix is hex.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=13 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.compare_field_int" href="../../../../src/base/ovm_comparer.svh">compare_field_int</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual function bit compare_field_int (</td><td class=PType nowrap>string </td><td class=PParameter nowrap>name,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>logic[63:0] </td><td class=PParameter nowrap>lhs,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>logic[63:0] </td><td class=PParameter nowrap>rhs,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>size,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>ovm_radix_enum </td><td class=PParameter nowrap>radix</td><td class=PDefaultValuePrefix> = </td><td class=PDefaultValue width=100%>OVM_NORADIX</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>This method is the same as <a href="#ovm_comparer.compare_field" class=LMethod id=link28 onMouseOver="ShowTip(event, 'tt12', 'link28')" onMouseOut="HideTip('tt12')">compare_field</a> except that the arguments are small integers, less than or equal to 64 bits. It is automatically called by <a href="#ovm_comparer.compare_field" class=LMethod id=link29 onMouseOver="ShowTip(event, 'tt12', 'link29')" onMouseOut="HideTip('tt12')">compare_field</a> if the operand size is less than or equal to 64.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=14 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.compare_field_real" href="../../../../src/base/ovm_comparer.svh">compare_field_real</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual function bit compare_field_real (</td><td class=PType nowrap>string </td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PType nowrap>real </td><td class=PParameter nowrap>lhs,</td></tr><tr><td></td><td class=PType nowrap>real </td><td class=PParameter nowrap>rhs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>This method is the same as <a href="#ovm_comparer.compare_field" class=LMethod id=link30 onMouseOver="ShowTip(event, 'tt12', 'link30')" onMouseOut="HideTip('tt12')">compare_field</a> except that the arguments are real numbers.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=15 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.compare_object" href="../../../../src/base/ovm_comparer.svh">compare_object</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual function bit compare_object (</td><td class=PType nowrap>string </td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PType nowrap>ovm_object </td><td class=PParameter nowrap>lhs,</td></tr><tr><td></td><td class=PType nowrap>ovm_object </td><td class=PParameter nowrap>rhs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>Compares two class objects using the <a href="#ovm_comparer.policy" class=LVariable id=link31 onMouseOver="ShowTip(event, 'tt2', 'link31')" onMouseOut="HideTip('tt2')">policy</a> knob to determine whether the comparison should be deep, shallow, or reference.</p><p>The name input is used for purposes of storing and printing a miscompare.</p><p>The <i>lhs</i> and <i>rhs</i> objects are the two objects used for comparison.</p><p>The <i>check_type</i> determines whether or not to verify the object types match (the return from <i>lhs.get_type_name()</i> matches <i>rhs.get_type_name()</i>).</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=16 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.compare_string" href="../../../../src/base/ovm_comparer.svh">compare_string</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual function bit compare_string (</td><td class=PType nowrap>string </td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PType nowrap>string </td><td class=PParameter nowrap>lhs,</td></tr><tr><td></td><td class=PType nowrap>string </td><td class=PParameter nowrap>rhs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>Compares two string variables.</p><p>The <i>name</i> input is used for purposes of storing and printing a miscompare.</p><p>The <i>lhs</i> and <i>rhs</i> objects are the two objects used for comparison.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=17 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="ovm_comparer.print_msg" href="../../../../src/base/ovm_comparer.svh">print_msg</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function void print_msg (</td><td class=PType nowrap>string </td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>Causes the error count to be incremented and the message, <i>msg</i>, to be appended to the <a href="#ovm_comparer.miscompares" class=LVariable id=link32 onMouseOver="ShowTip(event, 'tt6', 'link32')" onMouseOut="HideTip('tt6')">miscompares</a> string (a newline is used to separate messages).</p><p>If the message count is less than the <a href="#ovm_comparer.show_max" class=LVariable id=link33 onMouseOver="ShowTip(event, 'tt3', 'link33')" onMouseOut="HideTip('tt3')">show_max</a> setting, then the message is printed to standard-out using the current verbosity and severity settings. See the <a href="#ovm_comparer.verbosity" class=LVariable id=link34 onMouseOver="ShowTip(event, 'tt4', 'link34')" onMouseOut="HideTip('tt4')">verbosity</a> and <a href="#ovm_comparer.sev" class=LVariable id=link35 onMouseOver="ShowTip(event, 'tt5', 'link35')" onMouseOut="HideTip('tt5')">sev</a> variables for more information.</p></div></div></div> |
| |
| </div><!--Content--> |
| |
| |
| |
| <!--START_ND_TOOLTIPS--> |
| <div class=CToolTip id="tt1"><div class=CClass><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>class ovm_comparer</td></tr></table></blockquote>The ovm_comparer class provides a policy object for doing comparisons. </div></div><div class=CToolTip id="tt2"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>ovm_recursion_policy_enum policy = OVM_DEFAULT_POLICY</td></tr></table></blockquote>Determines whether comparison is OVM_DEEP, OVM_REFERENCE, or OVM_SHALLOW.</div></div><div class=CToolTip id="tt3"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int unsigned show_max = 1</td></tr></table></blockquote>Sets the maximum number of messages to send to the messager for miscompares of an object.</div></div><div class=CToolTip id="tt4"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int unsigned verbosity = OVM_LOW</td></tr></table></blockquote>Sets the verbosity for printed messages.</div></div><div class=CToolTip id="tt5"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>ovm_severity sev = OVM_INFO</td></tr></table></blockquote>Sets the severity for printed messages.</div></div><div class=CToolTip id="tt6"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>string miscompares = ""</td></tr></table></blockquote>This string is reset to an empty string when a comparison is started.</div></div><div class=CToolTip id="tt7"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>bit physical = 1</td></tr></table></blockquote>This bit provides a filtering mechanism for fields.</div></div><div class=CToolTip id="tt8"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>bit abstract = 1</td></tr></table></blockquote>This bit provides a filtering mechanism for fields.</div></div><div class=CToolTip id="tt9"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>bit check_type = 1</td></tr></table></blockquote>This bit determines whether the type, given by ovm_object::get_type_name, is used to verify that the types of two objects are the same.</div></div><div class=CToolTip id="tt10"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function string get_type_name ()</td></tr></table></blockquote>This function returns the type name of the object, which is typically the type identifier enclosed in quotes. </div></div><div class=CToolTip id="tt11"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int unsigned result = 0</td></tr></table></blockquote>This bit stores the number of miscompares for a given compare operation. </div></div><div class=CToolTip id="tt12"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual function bit compare_field (</td><td class=PType nowrap>string </td><td class=PParameter nowrap>name,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>ovm_bitstream_t </td><td class=PParameter nowrap>lhs,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>ovm_bitstream_t </td><td class=PParameter nowrap>rhs,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>size,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>ovm_radix_enum </td><td class=PParameter nowrap>radix</td><td class=PDefaultValuePrefix> = </td><td class=PDefaultValue width=100%>OVM_NORADIX</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Compares two integral values.</div></div><div class=CToolTip id="tt13"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual function bit compare_field_int (</td><td class=PType nowrap>string </td><td class=PParameter nowrap>name,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>logic[63:0] </td><td class=PParameter nowrap>lhs,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>logic[63:0] </td><td class=PParameter nowrap>rhs,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>size,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>ovm_radix_enum </td><td class=PParameter nowrap>radix</td><td class=PDefaultValuePrefix> = </td><td class=PDefaultValue width=100%>OVM_NORADIX</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>This method is the same as compare_field except that the arguments are small integers, less than or equal to 64 bits. </div></div><div class=CToolTip id="tt14"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual function bit compare_field_real (</td><td class=PType nowrap>string </td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PType nowrap>real </td><td class=PParameter nowrap>lhs,</td></tr><tr><td></td><td class=PType nowrap>real </td><td class=PParameter nowrap>rhs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>This method is the same as compare_field except that the arguments are real numbers.</div></div><div class=CToolTip id="tt15"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual function bit compare_object (</td><td class=PType nowrap>string </td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PType nowrap>ovm_object </td><td class=PParameter nowrap>lhs,</td></tr><tr><td></td><td class=PType nowrap>ovm_object </td><td class=PParameter nowrap>rhs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Compares two class objects using the policy knob to determine whether the comparison should be deep, shallow, or reference.</div></div><div class=CToolTip id="tt16"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual function bit compare_string (</td><td class=PType nowrap>string </td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PType nowrap>string </td><td class=PParameter nowrap>lhs,</td></tr><tr><td></td><td class=PType nowrap>string </td><td class=PParameter nowrap>rhs</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Compares two string variables.</div></div><div class=CToolTip id="tt17"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function void print_msg (</td><td class=PType nowrap>string </td><td class=PParameter nowrap>msg</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Causes the error count to be incremented and the message, <i>msg</i>, to be appended to the miscompares string (a newline is used to separate messages).</div></div><div class=CToolTip id="tt18"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function bit compare (</td><td class=PType nowrap>ovm_object </td><td class=PParameter nowrap>rhs,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PType nowrap>ovm_comparer </td><td class=PParameter nowrap>comparer</td><td class=PDefaultValuePrefix> = </td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>The compare method deep compares this data object with the object provided in the <i>rhs</i> (right-hand side) argument.</div></div><div class=CToolTip id="tt19"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual function bit do_compare (</td><td class=PType nowrap>ovm_object </td><td class=PParameter nowrap>rhs,</td></tr><tr><td></td><td class=PType nowrap>ovm_comparer </td><td class=PParameter nowrap>comparer</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>The do_compare method is the user-definable hook called by the compare method. </div></div><!--END_ND_TOOLTIPS--> |
| |
| <script language=JavaScript><!-- |
| if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> |