| <html><head><title>uvm_packer</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="uvm_packer" href="../../src/base/uvm_packer.svh">uvm_packer</a></h1><div class=CBody><p>The uvm_packer class provides a policy object for packing and unpacking uvm_objects. The policies determine how packing and unpacking should be done. Packing an object causes the object to be placed into a bit (byte or int) array. If the `uvm_field_* macro are used to implement pack and unpack, by default no metadata information is stored for the packing of dynamic objects (strings, arrays, class objects).</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="#uvm_packer" >uvm_packer</a></td></tr> |
| <tr class=SMain><td colspan=2 class=SWideDescription>The uvm_packer class provides a policy object for packing and unpacking uvm_objects. </td></tr> |
| <!-- index=1 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_packer.Packing" >Packing</a></td><td class=SDescription></td></tr> |
| <!-- index=2 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_packer.pack_field" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">pack_field</a></td><td class=SDescription>Packs an integral value (less than or equal to 4096 bits) into the packed array. </td></tr> |
| <!-- index=3 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_packer.pack_field_int" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">pack_field_int</a></td><td class=SDescription>Packs the integral value (less than or equal to 64 bits) into the pack array. </td></tr> |
| <!-- index=4 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_packer.pack_bits" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">pack_bits</a></td><td class=SDescription>Packs bits from upacked array of bits into the pack array.</td></tr> |
| <!-- index=5 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_packer.pack_bytes" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">pack_bytes</a></td><td class=SDescription>Packs bits from an upacked array of bytes into the pack array.</td></tr> |
| <!-- index=6 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_packer.pack_ints" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">pack_ints</a></td><td class=SDescription>Packs bits from an unpacked array of ints into the pack array.</td></tr> |
| <!-- index=7 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_packer.pack_string" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">pack_string</a></td><td class=SDescription>Packs a string value into the pack array.</td></tr> |
| <!-- index=8 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_packer.pack_time" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">pack_time</a></td><td class=SDescription>Packs a time <i>value</i> as 64 bits into the pack array.</td></tr> |
| <!-- index=9 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_packer.pack_real" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">pack_real</a></td><td class=SDescription>Packs a real <i>value</i> as 64 bits into the pack array.</td></tr> |
| <!-- index=10 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_packer.pack_object" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">pack_object</a></td><td class=SDescription>Packs an object value into the pack array.</td></tr> |
| <!-- index=11 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_packer.Unpacking" >Unpacking</a></td><td class=SDescription></td></tr> |
| <!-- index=12 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_packer.is_null" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">is_null</a></td><td class=SDescription>This method is used during unpack operations to peek at the next 4-bit chunk of the pack data and determine if it is 0.</td></tr> |
| <!-- index=13 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_packer.unpack_field" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">unpack_field</a></td><td class=SDescription>Unpacks bits from the pack array and returns the bit-stream that was unpacked. </td></tr> |
| <!-- index=14 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_packer.unpack_field_int" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">unpack_field_int</a></td><td class=SDescription>Unpacks bits from the pack array and returns the bit-stream that was unpacked.</td></tr> |
| <!-- index=15 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_packer.unpack_bits" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">unpack_bits</a></td><td class=SDescription>Unpacks bits from the pack array into an unpacked array of bits.</td></tr> |
| <!-- index=16 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_packer.unpack_bytes" id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')">unpack_bytes</a></td><td class=SDescription>Unpacks bits from the pack array into an unpacked array of bytes.</td></tr> |
| <!-- index=17 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_packer.unpack_ints" id=link15 onMouseOver="ShowTip(event, 'tt15', 'link15')" onMouseOut="HideTip('tt15')">unpack_ints</a></td><td class=SDescription>Unpacks bits from the pack array into an unpacked array of ints.</td></tr> |
| <!-- index=18 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_packer.unpack_string" id=link16 onMouseOver="ShowTip(event, 'tt16', 'link16')" onMouseOut="HideTip('tt16')">unpack_string</a></td><td class=SDescription>Unpacks a string.</td></tr> |
| <!-- index=19 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_packer.unpack_time" id=link17 onMouseOver="ShowTip(event, 'tt17', 'link17')" onMouseOut="HideTip('tt17')">unpack_time</a></td><td class=SDescription>Unpacks the next 64 bits of the pack array and places them into a time variable.</td></tr> |
| <!-- index=20 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_packer.unpack_real" id=link18 onMouseOver="ShowTip(event, 'tt18', 'link18')" onMouseOut="HideTip('tt18')">unpack_real</a></td><td class=SDescription>Unpacks the next 64 bits of the pack array and places them into a real variable.</td></tr> |
| <!-- index=21 --> |
| |
| <tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#uvm_packer.unpack_object" id=link19 onMouseOver="ShowTip(event, 'tt19', 'link19')" onMouseOut="HideTip('tt19')">unpack_object</a></td><td class=SDescription>Unpacks an object and stores the result into <i>value</i>.</td></tr> |
| <!-- index=22 --> |
| |
| <tr class="SMethod SIndent2"><td class=SEntry><a href="#uvm_packer.get_packed_size" id=link20 onMouseOver="ShowTip(event, 'tt20', 'link20')" onMouseOut="HideTip('tt20')">get_packed_size</a></td><td class=SDescription>Returns the number of bits that were packed.</td></tr> |
| <!-- index=23 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#uvm_packer.Variables" >Variables</a></td><td class=SDescription></td></tr> |
| <!-- index=24 --> |
| |
| <tr class="SVariable SIndent2"><td class=SEntry><a href="#uvm_packer.physical" id=link21 onMouseOver="ShowTip(event, 'tt21', 'link21')" onMouseOut="HideTip('tt21')">physical</a></td><td class=SDescription>This bit provides a filtering mechanism for fields.</td></tr> |
| <!-- index=25 --> |
| |
| <tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#uvm_packer.abstract" id=link22 onMouseOver="ShowTip(event, 'tt22', 'link22')" onMouseOut="HideTip('tt22')">abstract</a></td><td class=SDescription>This bit provides a filtering mechanism for fields.</td></tr> |
| <!-- index=26 --> |
| |
| <tr class="SVariable SIndent2"><td class=SEntry><a href="#uvm_packer.use_metadata" id=link23 onMouseOver="ShowTip(event, 'tt23', 'link23')" onMouseOut="HideTip('tt23')">use_metadata</a></td><td class=SDescription>This flag indicates whether to encode metadata when packing dynamic data, or to decode metadata when unpacking. </td></tr> |
| <!-- index=27 --> |
| |
| <tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#uvm_packer.big_endian" id=link24 onMouseOver="ShowTip(event, 'tt24', 'link24')" onMouseOut="HideTip('tt24')">big_endian</a></td><td class=SDescription>This bit determines the order that integral data is packed (using <a href="#uvm_packer.pack_field" class=LMethod id=link25 onMouseOver="ShowTip(event, 'tt1', 'link25')" onMouseOut="HideTip('tt1')">pack_field</a>, <a href="#uvm_packer.pack_field_int" class=LMethod id=link26 onMouseOver="ShowTip(event, 'tt2', 'link26')" onMouseOut="HideTip('tt2')">pack_field_int</a>, <a href="#uvm_packer.pack_time" class=LMethod id=link27 onMouseOver="ShowTip(event, 'tt7', 'link27')" onMouseOut="HideTip('tt7')">pack_time</a>, or <a href="#uvm_packer.pack_real" class=LMethod id=link28 onMouseOver="ShowTip(event, 'tt8', 'link28')" onMouseOut="HideTip('tt8')">pack_real</a>) and how the data is unpacked from the pack array (using <a href="#uvm_packer.unpack_field" class=LMethod id=link29 onMouseOver="ShowTip(event, 'tt11', 'link29')" onMouseOut="HideTip('tt11')">unpack_field</a>, <a href="#uvm_packer.unpack_field_int" class=LMethod id=link30 onMouseOver="ShowTip(event, 'tt12', 'link30')" onMouseOut="HideTip('tt12')">unpack_field_int</a>, <a href="#uvm_packer.unpack_time" class=LMethod id=link31 onMouseOver="ShowTip(event, 'tt17', 'link31')" onMouseOut="HideTip('tt17')">unpack_time</a>, or <a href="#uvm_packer.unpack_real" class=LMethod id=link32 onMouseOver="ShowTip(event, 'tt18', 'link32')" onMouseOut="HideTip('tt18')">unpack_real</a>). </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="uvm_packer.Packing" href="../../src/base/uvm_packer.svh">Packing</a></h3></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=2 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.pack_field" href="../../src/base/uvm_packer.svh">pack_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 colspan=3>virtual function void pack_field (</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_bitstream_t </td> |
| <td class=PParameter nowrap width=100%>value,</td> |
| </tr><tr><td> </td> <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap width=100%>size</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Packs an integral value (less than or equal to 4096 bits) into the packed array. <i>size</i> is the number of bits of <i>value</i> to pack.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=3 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.pack_field_int" href="../../src/base/uvm_packer.svh">pack_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 colspan=3>virtual function void pack_field_int (</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_integral_t </td> |
| <td class=PParameter nowrap width=100%>value,</td> |
| </tr><tr><td> </td> <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap width=100%>size</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Packs the integral value (less than or equal to 64 bits) into the pack array. The <i>size</i> is the number of bits to pack, usually obtained by <i>$bits</i>. This optimized version of <a href="#uvm_packer.pack_field" class=LMethod id=link33 onMouseOver="ShowTip(event, 'tt1', 'link33')" onMouseOut="HideTip('tt1')">pack_field</a> is useful for sizes up to 64 bits.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=4 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.pack_bits" href="../../src/base/uvm_packer.svh">pack_bits</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 colspan=6>virtual function void pack_bits(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref </td> |
| <td class=PType nowrap>bit </td> |
| <td class=PParameter nowrap>value[],</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>input </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>size</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> -1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Packs bits from upacked array of bits into the pack array.</p><p>See <a href="#uvm_packer.pack_ints" class=LMethod id=link34 onMouseOver="ShowTip(event, 'tt5', 'link34')" onMouseOut="HideTip('tt5')">pack_ints</a> for additional information.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=5 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.pack_bytes" href="../../src/base/uvm_packer.svh">pack_bytes</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 colspan=6>virtual function void pack_bytes(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref </td> |
| <td class=PType nowrap>byte </td> |
| <td class=PParameter nowrap>value[],</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>input </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>size</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> -1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Packs bits from an upacked array of bytes into the pack array.</p><p>See <a href="#uvm_packer.pack_ints" class=LMethod id=link35 onMouseOver="ShowTip(event, 'tt5', 'link35')" onMouseOut="HideTip('tt5')">pack_ints</a> for additional information.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=6 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.pack_ints" href="../../src/base/uvm_packer.svh">pack_ints</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 colspan=6>virtual function void pack_ints(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>value[],</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>input </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>size</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> -1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Packs bits from an unpacked array of ints into the pack array.</p><p>The bits are appended to the internal pack array. This method allows for fields of arbitrary length to be passed in, using the SystemVerilog <i>stream</i> operator.</p><p>For example</p><blockquote><pre>bit[511:0] my_field; |
| begin |
| int my_stream[]; |
| { << int {my_stream}} = my_field; |
| packer.pack_ints(my_stream); |
| end</pre></blockquote><p>When appending the stream to the internal pack array, the packer will obey the value of <a href="#uvm_packer.big_endian" class=LVariable id=link36 onMouseOver="ShowTip(event, 'tt24', 'link36')" onMouseOut="HideTip('tt24')">big_endian</a> (appending the array from MSB to LSB if set).</p><p>An optional <i>size</i> parameter is provided, which defaults to ‘-1’. If set to any value greater than ‘-1’ (including 0), then the packer will use the size as the number of bits to pack, otherwise the packer will simply pack the entire stream.</p><p>An error will be asserted if the <i>size</i> has been specified, and exceeds the size of the source array.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=7 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.pack_string" href="../../src/base/uvm_packer.svh">pack_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 colspan=3>virtual function void pack_string (</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap width=100%>value</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Packs a string value into the pack array.</p><p>When the metadata flag is set, the packed string is terminated by a <i>null</i> character to mark the end of the string.</p><p>This is useful for mixed language communication where unpacking may occur outside of SystemVerilog UVM.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=8 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.pack_time" href="../../src/base/uvm_packer.svh">pack_time</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 colspan=3>virtual function void pack_time (</td> </tr><tr><td> </td> <td class=PType nowrap>time </td> |
| <td class=PParameter nowrap width=100%>value</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Packs a time <i>value</i> as 64 bits into the pack array.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=9 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.pack_real" href="../../src/base/uvm_packer.svh">pack_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 colspan=3>virtual function void pack_real (</td> </tr><tr><td> </td> <td class=PType nowrap>real </td> |
| <td class=PParameter nowrap width=100%>value</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Packs a real <i>value</i> as 64 bits into the pack array.</p><p>The real <i>value</i> is converted to a 6-bit scalar value using the function $real2bits before it is packed into the array.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=10 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.pack_object" href="../../src/base/uvm_packer.svh">pack_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 colspan=3>virtual function void pack_object (</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_object </td> |
| <td class=PParameter nowrap width=100%>value</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Packs an object value into the pack array.</p><p>A 4-bit header is inserted ahead of the string to indicate the number of bits that was packed. If a <i>null</i> object was packed, then this header will be 0.</p><p>This is useful for mixed-language communication where unpacking may occur outside of SystemVerilog UVM.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=11 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.Unpacking" href="../../src/base/uvm_packer.svh">Unpacking</a></h3></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=12 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.is_null" href="../../src/base/uvm_packer.svh">is_null</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function bit is_null () |
| </td></tr></table></blockquote><div class=CBody><p>This method is used during unpack operations to peek at the next 4-bit chunk of the pack data and determine if it is 0.</p><p>If the next four bits are all 0, then the return value is a 1; otherwise it is 0.</p><p>This is useful when unpacking objects, to decide whether a new object needs to be allocated or not.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=13 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.unpack_field" href="../../src/base/uvm_packer.svh">unpack_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 colspan=3>virtual function uvm_bitstream_t unpack_field (</td> </tr><tr><td> </td> <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap width=100%>size</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Unpacks bits from the pack array and returns the bit-stream that was unpacked. <i>size</i> is the number of bits to unpack; the maximum is 4096 bits.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=14 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.unpack_field_int" href="../../src/base/uvm_packer.svh">unpack_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 colspan=3>virtual function uvm_integral_t unpack_field_int (</td> </tr><tr><td> </td> <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap width=100%>size</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Unpacks bits from the pack array and returns the bit-stream that was unpacked.</p><p><i>size</i> is the number of bits to unpack; the maximum is 64 bits. This is a more efficient variant than unpack_field when unpacking into smaller vectors.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=15 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.unpack_bits" href="../../src/base/uvm_packer.svh">unpack_bits</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 colspan=6>virtual function void unpack_bits(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref </td> |
| <td class=PType nowrap>bit </td> |
| <td class=PParameter nowrap>value[],</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>input </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>size</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> -1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Unpacks bits from the pack array into an unpacked array of bits.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=16 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.unpack_bytes" href="../../src/base/uvm_packer.svh">unpack_bytes</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 colspan=6>virtual function void unpack_bytes(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref </td> |
| <td class=PType nowrap>byte </td> |
| <td class=PParameter nowrap>value[],</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>input </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>size</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> -1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Unpacks bits from the pack array into an unpacked array of bytes.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=17 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.unpack_ints" href="../../src/base/uvm_packer.svh">unpack_ints</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 colspan=6>virtual function void unpack_ints(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>value[],</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>input </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>size</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> -1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Unpacks bits from the pack array into an unpacked array of ints.</p><p>The unpacked array is unpacked from the internal pack array. This method allows for fields of arbitrary length to be passed in without expanding into a pre-defined integral type first.</p><p>For example</p><blockquote><pre>bit[511:0] my_field; |
| begin |
| int my_stream[] = new[16]; // 512/32 = 16 |
| packer.unpack_ints(my_stream); |
| my_field = {<<{my_stream}}; |
| end</pre></blockquote><p>When unpacking the stream from the internal pack array, the packer will obey the value of <a href="#uvm_packer.big_endian" class=LVariable id=link37 onMouseOver="ShowTip(event, 'tt24', 'link37')" onMouseOut="HideTip('tt24')">big_endian</a> (unpacking the array from MSB to LSB if set).</p><p>An optional <i>size</i> parameter is provided, which defaults to ‘-1’. If set to any value greater than ‘-1’ (including 0), then the packer will use the size as the number of bits to unpack, otherwise the packer will simply unpack the entire stream.</p><p>An error will be asserted if the <i>size</i> has been specified, and exceeds the size of the target array.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=18 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.unpack_string" href="../../src/base/uvm_packer.svh">unpack_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 colspan=5>virtual function string unpack_string (</td> </tr><tr><td> </td> <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>num_chars</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%>-1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Unpacks a string.</p><p>num_chars bytes are unpacked into a string. If num_chars is -1 then unpacking stops on at the first <i>null</i> character that is encountered.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=19 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.unpack_time" href="../../src/base/uvm_packer.svh">unpack_time</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function time unpack_time () |
| </td></tr></table></blockquote><div class=CBody><p>Unpacks the next 64 bits of the pack array and places them into a time variable.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=20 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.unpack_real" href="../../src/base/uvm_packer.svh">unpack_real</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function real unpack_real () |
| </td></tr></table></blockquote><div class=CBody><p>Unpacks the next 64 bits of the pack array and places them into a real variable.</p><p>The 64 bits of packed data are converted to a real using the $bits2real system function.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=21 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.unpack_object" href="../../src/base/uvm_packer.svh">unpack_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 colspan=3>virtual function void unpack_object (</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_object </td> |
| <td class=PParameter nowrap width=100%>value</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| <div class=CBody><p>Unpacks an object and stores the result into <i>value</i>.</p><p><i>value</i> must be an allocated object that has enough space for the data being unpacked. The first four bits of packed data are used to determine if a <i>null</i> object was packed into the array.</p><p>The <a href="#uvm_packer.is_null" class=LMethod id=link38 onMouseOver="ShowTip(event, 'tt10', 'link38')" onMouseOut="HideTip('tt10')">is_null</a> function can be used to peek at the next four bits in the pack array before calling this method.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=22 --> |
| <div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.get_packed_size" href="../../src/base/uvm_packer.svh">get_packed_size</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function int get_packed_size() |
| </td></tr></table></blockquote><div class=CBody><p>Returns the number of bits that were packed.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=23 --> |
| <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.Variables" href="../../src/base/uvm_packer.svh">Variables</a></h3></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=24 --> |
| <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.physical" href="../../src/base/uvm_packer.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 <a href="#uvm_packer.abstract" class=LVariable id=link39 onMouseOver="ShowTip(event, 'tt22', 'link39')" onMouseOut="HideTip('tt22')">abstract</a> and physical settings allow an object to distinguish between two different classes of fields. It is up to you, in the <a href="uvm_object-svh.html#uvm_object.do_pack" class=LMethod id=link40 onMouseOver="ShowTip(event, 'tt25', 'link40')" onMouseOut="HideTip('tt25')">uvm_object::do_pack</a> and <a href="uvm_object-svh.html#uvm_object.do_unpack" class=LMethod id=link41 onMouseOver="ShowTip(event, 'tt26', 'link41')" onMouseOut="HideTip('tt26')">uvm_object::do_unpack</a> methods, to test the setting of this field if you want to use it as a filter.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=25 --> |
| <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.abstract" href="../../src/base/uvm_packer.svh">abstract</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>bit abstract |
| </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. It is up to you, in the <a href="uvm_object-svh.html#uvm_object.do_pack" class=LMethod id=link42 onMouseOver="ShowTip(event, 'tt25', 'link42')" onMouseOut="HideTip('tt25')">uvm_object::do_pack</a> and <a href="uvm_object-svh.html#uvm_object.do_unpack" class=LMethod id=link43 onMouseOver="ShowTip(event, 'tt26', 'link43')" onMouseOut="HideTip('tt26')">uvm_object::do_unpack</a> routines, to test the setting of this field if you want to use it as a filter.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=26 --> |
| <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.use_metadata" href="../../src/base/uvm_packer.svh">use_metadata</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>bit use_metadata |
| </td></tr></table></blockquote><div class=CBody><p>This flag indicates whether to encode metadata when packing dynamic data, or to decode metadata when unpacking. Implementations of <a href="uvm_object-svh.html#uvm_object.do_pack" class=LMethod id=link44 onMouseOver="ShowTip(event, 'tt25', 'link44')" onMouseOut="HideTip('tt25')">uvm_object::do_pack</a> and <a href="uvm_object-svh.html#uvm_object.do_unpack" class=LMethod id=link45 onMouseOver="ShowTip(event, 'tt26', 'link45')" onMouseOut="HideTip('tt26')">uvm_object::do_unpack</a> should regard this bit when performing their respective operation. When set, metadata should be encoded as follows:</p><ul><li>For strings, pack an additional <i>null</i> byte after the string is packed.</li><li>For objects, pack 4 bits prior to packing the object itself. Use 4’b0000 to indicate the object being packed is <i>null</i>, otherwise pack 4’b0001 (the remaining 3 bits are reserved).</li><li>For queues, dynamic arrays, and associative arrays, pack 32 bits indicating the size of the array prior to packing individual elements.</li></ul></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=27 --> |
| <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="uvm_packer.big_endian" href="../../src/base/uvm_packer.svh">big_endian</a></h3> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>bit big_endian = 1 |
| </td></tr></table></blockquote><div class=CBody><p>This bit determines the order that integral data is packed (using <a href="#uvm_packer.pack_field" class=LMethod id=link46 onMouseOver="ShowTip(event, 'tt1', 'link46')" onMouseOut="HideTip('tt1')">pack_field</a>, <a href="#uvm_packer.pack_field_int" class=LMethod id=link47 onMouseOver="ShowTip(event, 'tt2', 'link47')" onMouseOut="HideTip('tt2')">pack_field_int</a>, <a href="#uvm_packer.pack_time" class=LMethod id=link48 onMouseOver="ShowTip(event, 'tt7', 'link48')" onMouseOut="HideTip('tt7')">pack_time</a>, or <a href="#uvm_packer.pack_real" class=LMethod id=link49 onMouseOver="ShowTip(event, 'tt8', 'link49')" onMouseOut="HideTip('tt8')">pack_real</a>) and how the data is unpacked from the pack array (using <a href="#uvm_packer.unpack_field" class=LMethod id=link50 onMouseOver="ShowTip(event, 'tt11', 'link50')" onMouseOut="HideTip('tt11')">unpack_field</a>, <a href="#uvm_packer.unpack_field_int" class=LMethod id=link51 onMouseOver="ShowTip(event, 'tt12', 'link51')" onMouseOut="HideTip('tt12')">unpack_field_int</a>, <a href="#uvm_packer.unpack_time" class=LMethod id=link52 onMouseOver="ShowTip(event, 'tt17', 'link52')" onMouseOut="HideTip('tt17')">unpack_time</a>, or <a href="#uvm_packer.unpack_real" class=LMethod id=link53 onMouseOver="ShowTip(event, 'tt18', 'link53')" onMouseOut="HideTip('tt18')">unpack_real</a>). When the bit is set, data is associated msb to lsb; otherwise, it is associated lsb to msb.</p><p>The following code illustrates how data can be associated msb to lsb and lsb to msb:</p><blockquote><pre>class mydata extends uvm_object; |
| |
| logic[15:0] value = 'h1234; |
| |
| function void do_pack (uvm_packer packer); |
| packer.pack_field_int(value, 16); |
| endfunction |
| |
| function void do_unpack (uvm_packer packer); |
| value = packer.unpack_field_int(16); |
| endfunction |
| endclass |
| |
| mydata d = new; |
| bit bits[]; |
| |
| initial begin |
| d.pack(bits); // 'b0001001000110100 |
| uvm_default_packer.big_endian = 0; |
| d.pack(bits); // 'b0010110001001000 |
| end</pre></blockquote></div></div></div> |
| |
| </div><!--Content--> |
| |
| |
| |
| <!--START_ND_TOOLTIPS--> |
| <div class=CToolTip id="tt1"><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 colspan=3>virtual function void pack_field (</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_bitstream_t </td> |
| <td class=PParameter nowrap width=100%>value,</td> |
| </tr><tr><td> </td> <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap width=100%>size</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Packs an integral value (less than or equal to 4096 bits) into the packed array. </div></div><div class=CToolTip id="tt2"><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 colspan=3>virtual function void pack_field_int (</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_integral_t </td> |
| <td class=PParameter nowrap width=100%>value,</td> |
| </tr><tr><td> </td> <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap width=100%>size</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Packs the integral value (less than or equal to 64 bits) into the pack array. </div></div><div class=CToolTip id="tt3"><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 colspan=6>virtual function void pack_bits(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref </td> |
| <td class=PType nowrap>bit </td> |
| <td class=PParameter nowrap>value[],</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>input </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>size</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> -1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Packs bits from upacked array of bits into the pack array.</div></div><div class=CToolTip id="tt4"><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 colspan=6>virtual function void pack_bytes(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref </td> |
| <td class=PType nowrap>byte </td> |
| <td class=PParameter nowrap>value[],</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>input </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>size</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> -1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Packs bits from an upacked array of bytes into the pack array.</div></div><div class=CToolTip id="tt5"><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 colspan=6>virtual function void pack_ints(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>value[],</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>input </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>size</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> -1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Packs bits from an unpacked array of ints into the pack array.</div></div><div class=CToolTip id="tt6"><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 colspan=3>virtual function void pack_string (</td> </tr><tr><td> </td> <td class=PType nowrap>string </td> |
| <td class=PParameter nowrap width=100%>value</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Packs a string value into the pack array.</div></div><div class=CToolTip id="tt7"><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 colspan=3>virtual function void pack_time (</td> </tr><tr><td> </td> <td class=PType nowrap>time </td> |
| <td class=PParameter nowrap width=100%>value</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Packs a time <i>value</i> as 64 bits into the pack array.</div></div><div class=CToolTip id="tt8"><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 colspan=3>virtual function void pack_real (</td> </tr><tr><td> </td> <td class=PType nowrap>real </td> |
| <td class=PParameter nowrap width=100%>value</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Packs a real <i>value</i> as 64 bits into the pack array.</div></div><div class=CToolTip id="tt9"><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 colspan=3>virtual function void pack_object (</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_object </td> |
| <td class=PParameter nowrap width=100%>value</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Packs an object value into the pack array.</div></div><div class=CToolTip id="tt10"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function bit is_null () |
| </td></tr></table></blockquote>This method is used during unpack operations to peek at the next 4-bit chunk of the pack data and determine if it is 0.</div></div><div class=CToolTip id="tt11"><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 colspan=3>virtual function uvm_bitstream_t unpack_field (</td> </tr><tr><td> </td> <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap width=100%>size</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Unpacks bits from the pack array and returns the bit-stream that was unpacked. </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 colspan=3>virtual function uvm_integral_t unpack_field_int (</td> </tr><tr><td> </td> <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap width=100%>size</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Unpacks bits from the pack array and returns the bit-stream that was unpacked.</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 colspan=6>virtual function void unpack_bits(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref </td> |
| <td class=PType nowrap>bit </td> |
| <td class=PParameter nowrap>value[],</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>input </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>size</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> -1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Unpacks bits from the pack array into an unpacked array of 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 colspan=6>virtual function void unpack_bytes(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref </td> |
| <td class=PType nowrap>byte </td> |
| <td class=PParameter nowrap>value[],</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>input </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>size</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> -1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Unpacks bits from the pack array into an unpacked array of bytes.</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 colspan=6>virtual function void unpack_ints(</td> </tr><tr><td> </td> <td class=PTypePrefix nowrap>ref </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>value[],</td> |
| <td class=PDefaultValuePrefix> </td> |
| <td class=PDefaultValue width=100%></td> |
| </tr><tr><td> </td> <td class=PTypePrefix nowrap>input </td> |
| <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>size</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%> -1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=6>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Unpacks bits from the pack array into an unpacked array of ints.</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 colspan=5>virtual function string unpack_string (</td> </tr><tr><td> </td> <td class=PType nowrap>int </td> |
| <td class=PParameter nowrap>num_chars</td> |
| <td class=PDefaultValuePrefix> = </td> |
| <td class=PDefaultValue width=100%>-1</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=5>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Unpacks a string.</div></div><div class=CToolTip id="tt17"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function time unpack_time () |
| </td></tr></table></blockquote>Unpacks the next 64 bits of the pack array and places them into a time variable.</div></div><div class=CToolTip id="tt18"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function real unpack_real () |
| </td></tr></table></blockquote>Unpacks the next 64 bits of the pack array and places them into a real variable.</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 colspan=3>virtual function void unpack_object (</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_object </td> |
| <td class=PParameter nowrap width=100%>value</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| Unpacks an object and stores the result into <i>value</i>.</div></div><div class=CToolTip id="tt20"><div class=CMethod> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function int get_packed_size() |
| </td></tr></table></blockquote>Returns the number of bits that were packed.</div></div><div class=CToolTip id="tt21"><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="tt22"><div class=CVariable> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>bit abstract |
| </td></tr></table></blockquote>This bit provides a filtering mechanism for fields.</div></div><div class=CToolTip id="tt23"><div class=CVariable> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>bit use_metadata |
| </td></tr></table></blockquote>This flag indicates whether to encode metadata when packing dynamic data, or to decode metadata when unpacking. </div></div><div class=CToolTip id="tt24"><div class=CVariable> |
| <blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>bit big_endian = 1 |
| </td></tr></table></blockquote>This bit determines the order that integral data is packed (using pack_field, pack_field_int, pack_time, or pack_real) and how the data is unpacked from the pack array (using unpack_field, unpack_field_int, unpack_time, or unpack_real). </div></div><div class=CToolTip id="tt25"><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 colspan=3>virtual function void do_pack (</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_packer </td> |
| <td class=PParameter nowrap width=100%>packer</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| The <i>do_pack</i> method is the user-definable hook called by the pack methods. </div></div><div class=CToolTip id="tt26"><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 colspan=3>virtual function void do_unpack (</td> </tr><tr><td> </td> <td class=PType nowrap>uvm_packer </td> |
| <td class=PParameter nowrap width=100%>packer</td> |
| </tr> |
| <tr> |
| <td class=PAfterParameters colspan=3>)</td></tr> |
| </table></td></tr> |
| </table></blockquote> |
| The <i>do_unpack</i> method is the user-definable hook called by the unpack method. </div></div><!--END_ND_TOOLTIPS--> |
| |
| <script language=JavaScript><!-- |
| if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> |