<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>vrq: /net/fileserver/nas/home/mdh/vrq/src/cvector.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="180"><a href="index.html"><img src="vrq.png" width="150" height="100" border="0" alt="vrq"></a></td> <td background="top_bg.png" align="right" width="100%"> <img src="glyth.png" width="500" height="100" border="0" alt=""> </td> </tr> <tr> <td background="#FFFFFF" align="right" width="50" height="4"></td> </tr> </table> </head><body> <!-- Generated by Doxygen 1.5.5 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <h1>/net/fileserver/nas/home/mdh/vrq/src/cvector.h</h1><a href="cvector_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*****************************************************************************</span> <a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 1997-2007, Mark Hummel</span> <a name="l00003"></a>00003 <span class="comment"> * This file is part of Vrq.</span> <a name="l00004"></a>00004 <span class="comment"> *</span> <a name="l00005"></a>00005 <span class="comment"> * Vrq is free software; you can redistribute it and/or</span> <a name="l00006"></a>00006 <span class="comment"> * modify it under the terms of the GNU General Public</span> <a name="l00007"></a>00007 <span class="comment"> * License as published by the Free Software Foundation; either</span> <a name="l00008"></a>00008 <span class="comment"> * version 2 of the License, or (at your option) any later version.</span> <a name="l00009"></a>00009 <span class="comment"> *</span> <a name="l00010"></a>00010 <span class="comment"> * Vrq is distributed in the hope that it will be useful,</span> <a name="l00011"></a>00011 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00012"></a>00012 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00013"></a>00013 <span class="comment"> * General Public License for more details.</span> <a name="l00014"></a>00014 <span class="comment"> *</span> <a name="l00015"></a>00015 <span class="comment"> * You should have received a copy of the GNU General Public</span> <a name="l00016"></a>00016 <span class="comment"> * License along with this library; if not, write to the Free Software</span> <a name="l00017"></a>00017 <span class="comment"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, </span> <a name="l00018"></a>00018 <span class="comment"> * Boston, MA 02110-1301 USA</span> <a name="l00019"></a>00019 <span class="comment"> *****************************************************************************</span> <a name="l00020"></a>00020 <span class="comment"> */</span> <a name="l00021"></a>00021 <span class="comment">/******************************************************************************</span> <a name="l00022"></a>00022 <span class="comment"> *</span> <a name="l00023"></a>00023 <span class="comment"> *</span> <a name="l00024"></a>00024 <span class="comment"> * cvector.hpp</span> <a name="l00025"></a>00025 <span class="comment"> * - abstract class for bit vector declaration </span> <a name="l00026"></a>00026 <span class="comment"> *</span> <a name="l00027"></a>00027 <span class="comment"> *</span> <a name="l00028"></a>00028 <span class="comment"> ******************************************************************************</span> <a name="l00029"></a>00029 <span class="comment"> */</span> <a name="l00030"></a>00030 <a name="l00031"></a>00031 <span class="preprocessor">#ifndef CVECTOR_HPP</span> <a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define CVECTOR_HPP</span> <a name="l00033"></a>00033 <span class="preprocessor"></span> <a name="l00034"></a>00034 <span class="preprocessor">#include <stdio.h></span> <a name="l00035"></a>00035 <span class="preprocessor">#include <math.h></span> <a name="l00036"></a>00036 <span class="preprocessor">#include "<a class="code" href="glue_8h.html">glue.h</a>"</span> <a name="l00037"></a>00037 <span class="preprocessor">#include "<a class="code" href="cuint_8h.html">cuint.h</a>"</span> <a name="l00038"></a>00038 <span class="preprocessor">#include "<a class="code" href="cdecl_8h.html">cdecl.h</a>"</span> <a name="l00039"></a>00039 <a name="l00040"></a>00040 <a name="l00058"></a><a class="code" href="classCVector.html">00058</a> <span class="keyword">class </span><a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a> <a name="l00059"></a>00059 { <a name="l00060"></a>00060 <span class="keyword">private</span>: <a name="l00061"></a>00061 <a class="code" href="classCUInt.html" title="Infinite precision unsigned arithmetic class Storage within object will be used whenever...">CUInt</a> aval; <a name="l00062"></a>00062 <a class="code" href="classCUInt.html" title="Infinite precision unsigned arithmetic class Storage within object will be used whenever...">CUInt</a> bval; <a name="l00063"></a>00063 <a class="code" href="classCUInt.html" title="Infinite precision unsigned arithmetic class Storage within object will be used whenever...">CUInt</a> hook; <a name="l00064"></a>00064 <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> width; <a name="l00065"></a>00065 <span class="keywordtype">int</span> sized; <a name="l00066"></a>00066 <a name="l00067"></a>00067 <span class="keywordtype">int</span> based; <a name="l00068"></a>00068 <a name="l00069"></a>00069 <span class="keywordtype">int</span> preferredBase; <a name="l00070"></a>00070 <a name="l00071"></a>00071 <span class="keywordtype">int</span> _signed; <a name="l00072"></a>00072 <span class="keywordtype">int</span> overflowed; <span class="comment">// set to 1 if string conversion overflowed</span> <a name="l00073"></a>00073 <a name="l00074"></a>00074 <span class="keyword">static</span> <span class="keywordtype">int</span> bufferSize; <a name="l00075"></a>00075 <span class="keyword">static</span> <span class="keywordtype">char</span>* buffer; <a name="l00076"></a>00076 <span class="keyword">public</span>: <a name="l00083"></a><a class="code" href="classCVector.html#381ec54a1446d581e81b3c4b65347915">00083</a> <span class="keyword">static</span> <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* <a class="code" href="classCVector.html#381ec54a1446d581e81b3c4b65347915" title="Create vector allocating all storage from given heap.">AllocFromHeap</a>( <a class="code" href="classCObstack.html" title="Bulk object allocation object.">CObstack</a>* aHeap, <span class="keywordtype">int</span> width ) { <a name="l00084"></a>00084 <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* v = <span class="keyword">new</span>(aHeap) <a class="code" href="classCVector.html#fe4fcdcc185b2b470e093c080605e148" title="Create bit vector of given width.">CVector</a>( width ); <a name="l00085"></a>00085 v->SetHeap( aHeap ); <a name="l00086"></a>00086 <span class="keywordflow">return</span> v; <a name="l00087"></a>00087 } <a name="l00088"></a>00088 <a name="l00093"></a>00093 <a class="code" href="classCVector.html#fe4fcdcc185b2b470e093c080605e148" title="Create bit vector of given width.">CVector</a>( <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> aWidth ); <a name="l00097"></a>00097 <a class="code" href="classCVector.html#29b5b40a40c27f7fbdd873fc0d5e47fa" title="Destroy vector freeing storage if possible.">~CVector</a>(); <a name="l00104"></a>00104 <span class="keywordtype">unsigned</span> <a class="code" href="classCVector.html#c21e997e811068f87e4714474cc85b16" title="Calculate a hash for vector value.">Hash</a>(); <a name="l00109"></a><a class="code" href="classCVector.html#831175d786bf756025296f278be3ab42">00109</a> <span class="keywordtype">int</span> <a class="code" href="classCVector.html#831175d786bf756025296f278be3ab42" title="Determine if any bit is either x or z.">HasXZ</a>() { <span class="keywordflow">return</span> bval != 0; } <a name="l00114"></a><a class="code" href="classCVector.html#4c922e3fc4059c41499ccaebe556c1dd">00114</a> <span class="keywordtype">int</span> <a class="code" href="classCVector.html#4c922e3fc4059c41499ccaebe556c1dd" title="Determine if any bit is a z.">HasZ</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> (~aval & bval) != 0; } <a name="l00119"></a><a class="code" href="classCVector.html#b11f23baf5e59a702c59ba1dcc5e10ab">00119</a> <span class="keywordtype">int</span> <a class="code" href="classCVector.html#b11f23baf5e59a702c59ba1dcc5e10ab" title="Determine if value is negative.">IsNegative</a>() <a name="l00120"></a>00120 { <span class="keywordflow">return</span> _signed && ((aval>>(width-1)) & 1) != 0 && !<a class="code" href="classCVector.html#831175d786bf756025296f278be3ab42" title="Determine if any bit is either x or z.">HasXZ</a>(); } <a name="l00125"></a><a class="code" href="classCVector.html#949419bc0ed97b6dec80742c9f0addd1">00125</a> <span class="keywordtype">void</span> <a class="code" href="classCVector.html#949419bc0ed97b6dec80742c9f0addd1" title="Set preferred base for printing value.">SetPreferredBase</a>( <span class="keywordtype">int</span> base ) { preferredBase = base; } <a name="l00130"></a><a class="code" href="classCVector.html#ea371ed98ce8941208c0704ecc1c1179">00130</a> <span class="keywordtype">int</span> <a class="code" href="classCVector.html#ea371ed98ce8941208c0704ecc1c1179" title="Get preferred base for printing value.">GetPreferredBase</a>() { <span class="keywordflow">return</span> preferredBase; } <a name="l00136"></a><a class="code" href="classCVector.html#a8cb2798f2245ab831b41907aaae4fa6">00136</a> <span class="keywordtype">int</span> <a class="code" href="classCVector.html#a8cb2798f2245ab831b41907aaae4fa6" title="Get sized attribute.">Sized</a>() { <span class="keywordflow">return</span> sized; } <a name="l00142"></a><a class="code" href="classCVector.html#638d4d7d60090d1132e46a58e1f76d82">00142</a> <span class="keywordtype">void</span> <a class="code" href="classCVector.html#a8cb2798f2245ab831b41907aaae4fa6" title="Get sized attribute.">Sized</a>( <span class="keywordtype">int</span> sized ) { this->sized = sized; } <a name="l00148"></a><a class="code" href="classCVector.html#19c69a84aebf15902cacff286ea2d591">00148</a> <span class="keywordtype">int</span> <a class="code" href="classCVector.html#19c69a84aebf15902cacff286ea2d591" title="Get based attribute.">Based</a>() { <span class="keywordflow">return</span> based; } <a name="l00154"></a><a class="code" href="classCVector.html#3e02a419a4334ef72ac6946a8d565815">00154</a> <span class="keywordtype">void</span> <a class="code" href="classCVector.html#19c69a84aebf15902cacff286ea2d591" title="Get based attribute.">Based</a>( <span class="keywordtype">int</span> based ) { this->based = based; } <a name="l00159"></a><a class="code" href="classCVector.html#b06adf2ea848fd8b026059bccf469d74">00159</a> <span class="keywordtype">int</span> <a class="code" href="classCVector.html#b06adf2ea848fd8b026059bccf469d74" title="Get signed attribute.">Signed</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> _signed; } <a name="l00164"></a><a class="code" href="classCVector.html#9e10e50c44c7cf2b898271a39c0b23f0">00164</a> <span class="keywordtype">void</span> <a class="code" href="classCVector.html#b06adf2ea848fd8b026059bccf469d74" title="Get signed attribute.">Signed</a>( <span class="keywordtype">int</span> _signed ) { this->_signed = _signed; } <a name="l00170"></a><a class="code" href="classCVector.html#effff70204bca27f0e1e9102c443fdcf">00170</a> <span class="keywordtype">int</span> <a class="code" href="classCVector.html#effff70204bca27f0e1e9102c443fdcf" title="Determine if conversion from ascii overflowed the give vector width.">Overflowed</a>() { <span class="keywordflow">return</span> overflowed; } <a name="l00175"></a>00175 <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> <a class="code" href="classCVector.html#ad5dd1c7f2d819694e4e59101f68b3b4" title="Get vector bit width.">GetWidth</a>( <span class="keywordtype">void</span> ); <a name="l00183"></a>00183 <span class="keywordtype">void</span> <a class="code" href="classCVector.html#cda2ab1fa28b2f5485a42eaec3f657a8" title="Set width of vector in bits.">SetWidth</a>( <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> newWidth ); <a name="l00187"></a>00187 <span class="keywordtype">void</span> <a class="code" href="classCVector.html#1d928360afa158f1b5d04ee8761a7612" title="Set vector value to X.">SetToX</a>(); <a name="l00192"></a>00192 <span class="keyword">const</span> <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>& <a class="code" href="classCVector.html#e61e64d168929df152f1335b4ea45d21" title="Assignment operator.">operator=</a>( <span class="keyword">const</span> <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>& v ); <a name="l00197"></a>00197 <a class="code" href="glue_8h.html#0b39d6d754cb24c708b0f2bdbe88130e" title="Short cut for unsigned 32 bit integer.">UINT32</a> <a class="code" href="classCVector.html#e61e64d168929df152f1335b4ea45d21" title="Assignment operator.">operator=</a>( <a class="code" href="glue_8h.html#0b39d6d754cb24c708b0f2bdbe88130e" title="Short cut for unsigned 32 bit integer.">UINT32</a> v ); <a name="l00202"></a>00202 <span class="keywordtype">int</span> <a class="code" href="classCVector.html#60380041e45118c3c17c257fdfc9493f" title="Load decimal value from string.">LoadDecimal</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">string</span> ); <a name="l00207"></a>00207 <span class="keywordtype">int</span> <a class="code" href="classCVector.html#94355d3ccc4768b66e474e3fa2bb326f" title="Load binary value from string.">LoadBinary</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">string</span> ); <a name="l00212"></a>00212 <span class="keywordtype">int</span> <a class="code" href="classCVector.html#ea1c8d2c9b03fd26245dd7e0778fb756" title="Load octal value from string.">LoadOctal</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">string</span> ); <a name="l00217"></a>00217 <span class="keywordtype">int</span> <a class="code" href="classCVector.html#2a50c7625cfe79ae307ce7f730148fac" title="Load hex value from string.">LoadHex</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">string</span> ); <a name="l00222"></a>00222 <span class="keywordtype">int</span> <a class="code" href="classCVector.html#917edd9dc234b92be36a5ecaadc340c3" title="Load string value from string.">LoadString</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">string</span> ); <a name="l00229"></a>00229 <span class="keywordtype">char</span>* <a class="code" href="classCVector.html#e7ea1d7eed2a9f2497a877cb8030ba4f" title="Convert vector to string using preferred base.">GetVString</a>( <span class="keywordtype">void</span> ); <a name="l00236"></a>00236 <span class="keywordtype">char</span>* <a class="code" href="classCVector.html#596a8507b71e0edb07bc823a13d57827" title="Convert vector to decimal string.">GetDecimal</a>( <span class="keywordtype">void</span> ); <a name="l00243"></a>00243 <span class="keywordtype">char</span>* <a class="code" href="classCVector.html#0307ca41072ea170648201ab17c82fe1" title="Convert vector to binary string.">GetBinary</a>( <span class="keywordtype">void</span> ); <a name="l00250"></a>00250 <span class="keywordtype">char</span>* <a class="code" href="classCVector.html#2d31eadf9fd14d23d4dd7d409b47e16b" title="Convert vector to octal string.">GetOctal</a>( <span class="keywordtype">void</span> ); <a name="l00257"></a>00257 <span class="keywordtype">char</span>* <a class="code" href="classCVector.html#1cfb9ccd43aed7a673c0f7159fcdf59e" title="Convert vector to hex string.">GetHex</a>( <span class="keywordtype">void</span> ); <a name="l00265"></a>00265 <span class="keywordtype">char</span>* <a class="code" href="classCVector.html#d71a0b09b4f109072b4adaf1a6acbc0b" title="Convert vector to ascii string.">GetString</a>( <span class="keywordtype">void</span> ); <a name="l00271"></a>00271 <span class="keywordtype">int</span> <a class="code" href="classCVector.html#7c45ce6b939eeb780a89191f677c147c" title="Equality operator.">operator==</a>( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>& v ); <a name="l00277"></a>00277 <span class="keywordtype">int</span> <a class="code" href="classCVector.html#7c45ce6b939eeb780a89191f677c147c" title="Equality operator.">operator==</a>( <a class="code" href="glue_8h.html#0b39d6d754cb24c708b0f2bdbe88130e" title="Short cut for unsigned 32 bit integer.">UINT32</a> i ); <a name="l00283"></a><a class="code" href="classCVector.html#856aa4ac2df0f390904cab66f262e137">00283</a> <span class="keywordtype">int</span> <a class="code" href="classCVector.html#856aa4ac2df0f390904cab66f262e137" title="Inequality operator.">operator!=</a>( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>& v ) { <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == v); } <a name="l00289"></a><a class="code" href="classCVector.html#e9de61e51ea92e8f6634a0c15345b033">00289</a> <span class="keywordtype">int</span> <a class="code" href="classCVector.html#856aa4ac2df0f390904cab66f262e137" title="Inequality operator.">operator!=</a>( <a class="code" href="glue_8h.html#0b39d6d754cb24c708b0f2bdbe88130e" title="Short cut for unsigned 32 bit integer.">UINT32</a> i ) { <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == i); } <a name="l00295"></a><a class="code" href="classCVector.html#be66eb9a26de91718229f9563106c27a">00295</a> <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> <a class="code" href="classCVector.html#be66eb9a26de91718229f9563106c27a" title="Get value as a 32 bit integer.">GetINT32</a>( <span class="keywordtype">void</span> ) <a name="l00296"></a>00296 { <a name="l00297"></a>00297 <span class="keywordflow">if</span>( <a class="code" href="classCVector.html#b11f23baf5e59a702c59ba1dcc5e10ab" title="Determine if value is negative.">IsNegative</a>() ) { <a name="l00298"></a>00298 <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a> n(<a class="code" href="classCVector.html#ad5dd1c7f2d819694e4e59101f68b3b4" title="Get vector bit width.">GetWidth</a>()); <a name="l00299"></a>00299 n.<a class="code" href="classCVector.html#b06adf2ea848fd8b026059bccf469d74" title="Get signed attribute.">Signed</a>(1); <a name="l00300"></a>00300 <a class="code" href="cnode_8h.html#8f34adc7b597143cb6cf8aed59dcd337">Neg</a>( &n, <span class="keyword">this</span> ); <a name="l00301"></a>00301 <span class="keywordflow">return</span> -(<a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a>)n.<a class="code" href="classCVector.html#88df882c67141b8bd86b7ff8cb5db8d3" title="aval part of vector">aval</a>.<a class="code" href="classCUInt.html#d95d4c9243babb4991f864ef26890906">GetUINT32</a>(); <a name="l00302"></a>00302 } <a name="l00303"></a>00303 <a name="l00304"></a>00304 <span class="keywordflow">return</span> aval.<a class="code" href="classCUInt.html#d95d4c9243babb4991f864ef26890906">GetUINT32</a>(); <a name="l00305"></a>00305 } <a name="l00311"></a><a class="code" href="classCVector.html#86fccf960e09e09d19cf02f3c299c849">00311</a> <a class="code" href="glue_8h.html#f16992cf571ce4103a92355761cc471e" title="Short cut for signed 64 bit integer.">INT64</a> <a class="code" href="classCVector.html#86fccf960e09e09d19cf02f3c299c849" title="Get value as a 64 bit integer.">GetINT64</a>( <span class="keywordtype">void</span> ) <a name="l00312"></a>00312 { <a name="l00313"></a>00313 <span class="keywordflow">if</span>( <a class="code" href="classCVector.html#b11f23baf5e59a702c59ba1dcc5e10ab" title="Determine if value is negative.">IsNegative</a>() ) { <a name="l00314"></a>00314 <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a> n(<a class="code" href="classCVector.html#ad5dd1c7f2d819694e4e59101f68b3b4" title="Get vector bit width.">GetWidth</a>()); <a name="l00315"></a>00315 n.<a class="code" href="classCVector.html#b06adf2ea848fd8b026059bccf469d74" title="Get signed attribute.">Signed</a>(1); <a name="l00316"></a>00316 <a class="code" href="cnode_8h.html#8f34adc7b597143cb6cf8aed59dcd337">Neg</a>( &n, <span class="keyword">this</span> ); <a name="l00317"></a>00317 <span class="keywordflow">return</span> -(<a class="code" href="glue_8h.html#f16992cf571ce4103a92355761cc471e" title="Short cut for signed 64 bit integer.">INT64</a>)n.<a class="code" href="classCVector.html#88df882c67141b8bd86b7ff8cb5db8d3" title="aval part of vector">aval</a>.<a class="code" href="classCUInt.html#d512e0339d84716cf16f5f128b168adb">GetUINT64</a>(); <a name="l00318"></a>00318 } <a name="l00319"></a>00319 <a name="l00320"></a>00320 <span class="keywordflow">return</span> aval.<a class="code" href="classCUInt.html#d512e0339d84716cf16f5f128b168adb">GetUINT64</a>(); <a name="l00321"></a>00321 } <a name="l00326"></a><a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242">00326</a> <span class="keywordtype">void</span> <a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242" title="Load vector with integer value.">LoadINT32</a>( <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> v ) <a name="l00327"></a>00327 { <a name="l00328"></a>00328 aval = (<span class="keywordtype">unsigned</span> int)v; <a name="l00329"></a>00329 bval = 0; <a name="l00330"></a>00330 } <a name="l00335"></a>00335 <span class="keywordtype">void</span> <a class="code" href="classCVector.html#ba265451c758d0eadff8adeb9a2f58b6" title="Load vector with integer part of real value.">LoadReal</a>( <span class="keywordtype">double</span> d ); <a name="l00340"></a>00340 <span class="keywordtype">double</span> <a class="code" href="classCVector.html#045121794642ab1acb2427b356b34657" title="Get vector value as a real.">GetReal</a>(); <a name="l00345"></a><a class="code" href="classCVector.html#c6773588634a1f2a32e3761c8987d2e3">00345</a> <span class="keywordtype">void</span> <a class="code" href="classCVector.html#c6773588634a1f2a32e3761c8987d2e3" title="Set vector to aval part of this vector.">GetAval</a>( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>& v ) { <a name="l00346"></a>00346 v.<a class="code" href="classCVector.html#88df882c67141b8bd86b7ff8cb5db8d3" title="aval part of vector">aval</a> = aval; <a name="l00347"></a>00347 bval = 0; <a name="l00348"></a>00348 } <a name="l00353"></a><a class="code" href="classCVector.html#230e2bf4793b61d2d1f74c69c3955cb6">00353</a> <span class="keywordtype">void</span> <a class="code" href="classCVector.html#230e2bf4793b61d2d1f74c69c3955cb6" title="Set vector to bval part of this vector.">GetBval</a>( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>& v ) { <a name="l00354"></a>00354 v.<a class="code" href="classCVector.html#88df882c67141b8bd86b7ff8cb5db8d3" title="aval part of vector">aval</a> = bval; <a name="l00355"></a>00355 bval = 0; <a name="l00356"></a>00356 } <a name="l00357"></a>00357 <a name="l00361"></a>00361 <span class="keyword">friend</span> <span class="keywordtype">void</span> <a class="code" href="cnode_8h.html#a36924ee5bc5b3102a9e0fefb9c910af">Add</a>( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00362"></a>00362 <span class="keyword">friend</span> <span class="keywordtype">void</span> <a class="code" href="cnode_8h.html#8b9b0f83482201fd71ae7d0a03277d0e">Sub</a>( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00363"></a>00363 <span class="keyword">friend</span> <span class="keywordtype">void</span> <a class="code" href="cnode_8h.html#775bed8a29aa227cd06e2444500621f7">Mul</a>( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00364"></a>00364 <span class="keyword">friend</span> <span class="keywordtype">void</span> <a class="code" href="cnode_8h.html#c7b57eaafd8f2e8712dd89fe61674c3b">Div</a>( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00365"></a>00365 <span class="keyword">friend</span> <span class="keywordtype">void</span> <a class="code" href="cnode_8h.html#8244e2d6ac60db51a301f972620c8e98">Pow</a>( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00366"></a>00366 <span class="keyword">friend</span> <span class="keywordtype">void</span> Lsha( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00367"></a>00367 <span class="keyword">friend</span> <span class="keywordtype">void</span> Rsha( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00368"></a>00368 <span class="keyword">friend</span> <span class="keywordtype">void</span> Lsh( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00369"></a>00369 <span class="keyword">friend</span> <span class="keywordtype">void</span> Rsh( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00370"></a>00370 <span class="keyword">friend</span> <span class="keywordtype">void</span> Cat( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00371"></a>00371 <span class="keyword">friend</span> <span class="keywordtype">void</span> Rep( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00372"></a>00372 <span class="keyword">friend</span> <span class="keywordtype">void</span> Mod( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00373"></a>00373 <span class="keyword">friend</span> <span class="keywordtype">void</span> And( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00374"></a>00374 <span class="keyword">friend</span> <span class="keywordtype">void</span> Or( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00375"></a>00375 <span class="keyword">friend</span> <span class="keywordtype">void</span> Xor( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00376"></a>00376 <span class="keyword">friend</span> <span class="keywordtype">void</span> Xnor( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00377"></a>00377 <span class="keyword">friend</span> <span class="keywordtype">void</span> Com( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a ); <a name="l00378"></a>00378 <span class="keyword">friend</span> <span class="keywordtype">void</span> <a class="code" href="cnode_8h.html#8f34adc7b597143cb6cf8aed59dcd337">Neg</a>( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a ); <a name="l00379"></a>00379 <span class="keyword">friend</span> <span class="keywordtype">void</span> Not( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a ); <a name="l00380"></a>00380 <span class="keyword">friend</span> <span class="keywordtype">void</span> Le( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00381"></a>00381 <span class="keyword">friend</span> <span class="keywordtype">void</span> Lt( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00382"></a>00382 <span class="keyword">friend</span> <span class="keywordtype">void</span> Ge( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00383"></a>00383 <span class="keyword">friend</span> <span class="keywordtype">void</span> Gt( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00384"></a>00384 <span class="keyword">friend</span> <span class="keywordtype">void</span> Eq( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00385"></a>00385 <span class="keyword">friend</span> <span class="keywordtype">void</span> Ne( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00386"></a>00386 <span class="keyword">friend</span> <span class="keywordtype">void</span> Ceq( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00387"></a>00387 <span class="keyword">friend</span> <span class="keywordtype">void</span> Cne( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00388"></a>00388 <span class="keyword">friend</span> <span class="keywordtype">void</span> Lor( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00389"></a>00389 <span class="keyword">friend</span> <span class="keywordtype">void</span> Land( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00390"></a>00390 <span class="keyword">friend</span> <span class="keywordtype">void</span> Rand( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a ); <a name="l00391"></a>00391 <span class="keyword">friend</span> <span class="keywordtype">void</span> Ror( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a ); <a name="l00392"></a>00392 <span class="keyword">friend</span> <span class="keywordtype">void</span> Rnand( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a ); <a name="l00393"></a>00393 <span class="keyword">friend</span> <span class="keywordtype">void</span> Rnor( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a ); <a name="l00394"></a>00394 <span class="keyword">friend</span> <span class="keywordtype">void</span> Rxor( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a ); <a name="l00395"></a>00395 <span class="keyword">friend</span> <span class="keywordtype">void</span> Rxnor( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a ); <a name="l00396"></a>00396 <span class="keyword">friend</span> <span class="keywordtype">void</span> Hook( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* <a class="code" href="vrq_8png.html#b47cadadd8fee029ccdf639a31c0c2d0">c</a>, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* b ); <a name="l00400"></a>00400 <span class="keywordtype">int</span> IsWidthConstant() { <span class="keywordflow">return</span> TRUE; } <a name="l00401"></a>00401 <span class="keywordtype">int</span> IsWidthVolatile() { <span class="keywordflow">return</span> FALSE; } <a name="l00402"></a>00402 <span class="keywordtype">int</span> IsWidthEvaluateable() { <span class="keywordflow">return</span> TRUE; } <a name="l00403"></a>00403 <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* GetWidthExp(); <a name="l00404"></a>00404 <span class="keyword">virtual</span> <a class="code" href="cdecl_8h.html#ff499c00c9873bf3fcf1c46bf2652790" title="Expression node type.">NodeType_t</a> GetNodeType( <span class="keywordtype">void</span> ); <a name="l00405"></a>00405 <span class="keyword">private</span>: <a name="l00406"></a>00406 <span class="keywordtype">void</span> Adjust( <span class="keywordtype">void</span> ); <a name="l00407"></a>00407 <span class="keywordtype">void</span> GrowBuffer( <span class="keywordtype">int</span> bytes ) <a name="l00408"></a>00408 { <a name="l00409"></a>00409 <span class="keywordflow">if</span>( bytes <= bufferSize ) { <a name="l00410"></a>00410 <span class="keywordflow">return</span>; <a name="l00411"></a>00411 } <a name="l00412"></a>00412 <span class="keywordflow">if</span>( buffer != NULL ) { <a name="l00413"></a>00413 <a class="code" href="main_8cc.html#75b14974d5279e0e072d3b157dc996a4">shell_xfree</a>( buffer, bufferSize ); <a name="l00414"></a>00414 } <a name="l00415"></a>00415 bufferSize = bytes * 2; <a name="l00416"></a>00416 buffer = (<span class="keywordtype">char</span>*) <a class="code" href="main_8cc.html#cec925771872e73156971d2a58a67a3f">shell_xmalloc</a>( bufferSize ); <a name="l00417"></a>00417 } <a name="l00418"></a>00418 <span class="keywordtype">void</span> SetHeap( <a class="code" href="classCObstack.html" title="Bulk object allocation object.">CObstack</a>* aHeap ) { <a name="l00419"></a>00419 aval.<a class="code" href="classCUInt.html#b083c4b8adab570a54e9930289435212" title="Set heap to be used for storage allocation.">SetHeap</a>( aHeap ); <a name="l00420"></a>00420 bval.<a class="code" href="classCUInt.html#b083c4b8adab570a54e9930289435212" title="Set heap to be used for storage allocation.">SetHeap</a>( aHeap ); <a name="l00421"></a>00421 } <a name="l00428"></a>00428 <span class="keywordtype">void</span>* operator new(<span class="keywordtype">size_t</span> size, <a class="code" href="classCObstack.html" title="Bulk object allocation object.">CObstack</a>* heap) { <a name="l00429"></a>00429 <span class="keywordflow">return</span> heap-><a class="code" href="classCObstack.html#5a34d5a2800a901ed15366c11bf269ef" title="Allocate block of storage with given size.">Alloc</a>( size ); <a name="l00430"></a>00430 } <a name="l00434"></a>00434 }; <a name="l00435"></a>00435 <a name="l00441"></a>00441 <span class="keyword">inline</span> <span class="keywordtype">void</span> Le( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <span class="keywordtype">double</span>* a, <span class="keywordtype">double</span>* b ) <a name="l00442"></a>00442 { <a name="l00443"></a>00443 r-><a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242" title="Load vector with integer value.">LoadINT32</a>( *a <= *b ); <a name="l00444"></a>00444 } <a name="l00445"></a>00445 <a name="l00446"></a>00446 <a name="l00447"></a>00447 <span class="keyword">inline</span> <span class="keywordtype">void</span> Le( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> a, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> b ) <a name="l00448"></a>00448 { <a name="l00449"></a>00449 r-><a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242" title="Load vector with integer value.">LoadINT32</a>( a <= b ); <a name="l00450"></a>00450 } <a name="l00451"></a>00451 <a name="l00452"></a>00452 <span class="keyword">inline</span> <span class="keywordtype">void</span> Lt( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <span class="keywordtype">double</span>* a, <span class="keywordtype">double</span>* b ) <a name="l00453"></a>00453 { <a name="l00454"></a>00454 r-><a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242" title="Load vector with integer value.">LoadINT32</a>( *a < *b ); <a name="l00455"></a>00455 } <a name="l00456"></a>00456 <a name="l00457"></a>00457 <a name="l00458"></a>00458 <span class="keyword">inline</span> <span class="keywordtype">void</span> Lt( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> a, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> b ) <a name="l00459"></a>00459 { <a name="l00460"></a>00460 r-><a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242" title="Load vector with integer value.">LoadINT32</a>( a < b ); <a name="l00461"></a>00461 } <a name="l00462"></a>00462 <a name="l00463"></a>00463 <span class="keyword">inline</span> <span class="keywordtype">void</span> Ge( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <span class="keywordtype">double</span>* a, <span class="keywordtype">double</span>* b ) <a name="l00464"></a>00464 { <a name="l00465"></a>00465 r-><a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242" title="Load vector with integer value.">LoadINT32</a>( *a >= *b ); <a name="l00466"></a>00466 } <a name="l00467"></a>00467 <a name="l00468"></a>00468 <a name="l00469"></a>00469 <span class="keyword">inline</span> <span class="keywordtype">void</span> Ge( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> a, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> b ) <a name="l00470"></a>00470 { <a name="l00471"></a>00471 r-><a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242" title="Load vector with integer value.">LoadINT32</a>( a >= b ); <a name="l00472"></a>00472 } <a name="l00473"></a>00473 <a name="l00474"></a>00474 <span class="keyword">inline</span> <span class="keywordtype">void</span> Gt( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <span class="keywordtype">double</span>* a, <span class="keywordtype">double</span>* b ) <a name="l00475"></a>00475 { <a name="l00476"></a>00476 r-><a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242" title="Load vector with integer value.">LoadINT32</a>( *a > *b ); <a name="l00477"></a>00477 } <a name="l00478"></a>00478 <a name="l00479"></a>00479 <a name="l00480"></a>00480 <span class="keyword">inline</span> <span class="keywordtype">void</span> Gt( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> a, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> b ) <a name="l00481"></a>00481 { <a name="l00482"></a>00482 r-><a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242" title="Load vector with integer value.">LoadINT32</a>( a > b ); <a name="l00483"></a>00483 } <a name="l00484"></a>00484 <a name="l00485"></a>00485 <a name="l00486"></a>00486 <span class="keyword">inline</span> <span class="keywordtype">void</span> Ne( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <span class="keywordtype">double</span>* a, <span class="keywordtype">double</span>* b ) <a name="l00487"></a>00487 { <a name="l00488"></a>00488 r-><a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242" title="Load vector with integer value.">LoadINT32</a>( *a != *b ); <a name="l00489"></a>00489 } <a name="l00490"></a>00490 <a name="l00491"></a>00491 <span class="keyword">inline</span> <span class="keywordtype">void</span> Ne( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> a, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> b ) <a name="l00492"></a>00492 { <a name="l00493"></a>00493 r-><a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242" title="Load vector with integer value.">LoadINT32</a>( a != b ); <a name="l00494"></a>00494 } <a name="l00495"></a>00495 <a name="l00496"></a>00496 <span class="keyword">inline</span> <span class="keywordtype">void</span> Eq( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <span class="keywordtype">double</span>* a, <span class="keywordtype">double</span>* b ) <a name="l00497"></a>00497 { <a name="l00498"></a>00498 r-><a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242" title="Load vector with integer value.">LoadINT32</a>( *a == *b ); <a name="l00499"></a>00499 } <a name="l00500"></a>00500 <a name="l00501"></a>00501 <span class="keyword">inline</span> <span class="keywordtype">void</span> Eq( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> a, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> b ) <a name="l00502"></a>00502 { <a name="l00503"></a>00503 r-><a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242" title="Load vector with integer value.">LoadINT32</a>( a == b ); <a name="l00504"></a>00504 } <a name="l00505"></a>00505 <a name="l00506"></a>00506 <span class="keyword">inline</span> <span class="keywordtype">void</span> Cne( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>*, <span class="keywordtype">double</span>*, <span class="keywordtype">double</span>* ) <a name="l00507"></a>00507 { <a name="l00508"></a>00508 <a class="code" href="glue_8h.html#306aa4bd4a150391a2cffc5c3c33bdef" title="This routine should not be used by plugins.">fatal</a>( NULL, <span class="stringliteral">"!== illegal for reals"</span> ); <a name="l00509"></a>00509 } <a name="l00510"></a>00510 <a name="l00511"></a>00511 <span class="keyword">inline</span> <span class="keywordtype">void</span> Cne( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> a, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> b ) <a name="l00512"></a>00512 { <a name="l00513"></a>00513 r-><a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242" title="Load vector with integer value.">LoadINT32</a>( a != b ); <a name="l00514"></a>00514 } <a name="l00515"></a>00515 <a name="l00516"></a>00516 <span class="keyword">inline</span> <span class="keywordtype">void</span> Ceq( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>*, <span class="keywordtype">double</span>*, <span class="keywordtype">double</span>* ) <a name="l00517"></a>00517 { <a name="l00518"></a>00518 <a class="code" href="glue_8h.html#306aa4bd4a150391a2cffc5c3c33bdef" title="This routine should not be used by plugins.">fatal</a>( NULL, <span class="stringliteral">"=== illegal for reals"</span> ); <a name="l00519"></a>00519 } <a name="l00520"></a>00520 <a name="l00521"></a>00521 <span class="keyword">inline</span> <span class="keywordtype">void</span> Ceq( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* r, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> a, <a class="code" href="glue_8h.html#0cb58e7e6f0bad369840a52e54a56ae0" title="Short cut for signed 32 bit integer.">INT32</a> b ) <a name="l00522"></a>00522 { <a name="l00523"></a>00523 r-><a class="code" href="classCVector.html#0150f6f81b70b30913b85b6013903242" title="Load vector with integer value.">LoadINT32</a>( a == b ); <a name="l00524"></a>00524 } <a name="l00525"></a>00525 <a name="l00529"></a>00529 <span class="keyword">inline</span> <span class="keywordtype">void</span> LogicalValue( <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* dst, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* a ) <a name="l00530"></a>00530 { <a name="l00531"></a>00531 <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a> zero(a-><a class="code" href="classCVector.html#ad5dd1c7f2d819694e4e59101f68b3b4" title="Get vector bit width.">GetWidth</a>()); <a name="l00532"></a>00532 Ne( dst, a, &zero ); <a name="l00533"></a>00533 } <a name="l00534"></a>00534 <a name="l00535"></a>00535 <span class="keyword">inline</span> <span class="keywordtype">void</span> Hook( <span class="keywordtype">double</span>* r, <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a>* <a class="code" href="vrq_8png.html#b47cadadd8fee029ccdf639a31c0c2d0">c</a>, <span class="keywordtype">double</span>* a, <span class="keywordtype">double</span>* b ) <a name="l00536"></a>00536 { <a name="l00537"></a>00537 <a class="code" href="classCVector.html" title="Bit vector class for implementing 4 state verilog signed and unsigned arithmetic...">CVector</a> cond(1); <a name="l00538"></a>00538 LogicalValue( &cond, c ); <a name="l00539"></a>00539 <span class="keywordflow">if</span>( cond.HasXZ() ) { <a name="l00540"></a>00540 *r = 0; <a name="l00541"></a>00541 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>( cond == 0) { <a name="l00542"></a>00542 *r = *b; <a name="l00543"></a>00543 } <span class="keywordflow">else</span> { <a name="l00544"></a>00544 *r = *a; <a name="l00545"></a>00545 } <a name="l00546"></a>00546 } <a name="l00547"></a>00547 <a name="l00548"></a>00548 <span class="keyword">inline</span> <span class="keywordtype">void</span> Cat( <span class="keywordtype">double</span>*, <span class="keywordtype">double</span>*, <span class="keywordtype">double</span>* ) <a name="l00549"></a>00549 { <a name="l00550"></a>00550 <a class="code" href="glue_8h.html#306aa4bd4a150391a2cffc5c3c33bdef" title="This routine should not be used by plugins.">fatal</a>( NULL, <span class="stringliteral">"=== illegal for reals"</span> ); <a name="l00551"></a>00551 } <a name="l00556"></a>00556 <span class="preprocessor">#endif // CVECTOR_HPP</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Oct 21 18:05:36 2009 for vrq by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> </body> </html>