Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > ffa1e6f5ad04360808fe8840fe3ba036 > files > 65

vrq-devel-1.0.88-1.fc14.i686.rpm

<!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/cblock.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.7.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>/net/fileserver/nas/home/mdh/vrq/src/cblock.h</h1>  </div>
</div>
<div class="contents">
<a href="cblock_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"> *         cblock.hpp</span>
<a name="l00025"></a>00025 <span class="comment"> *              - class definition of blocks </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 
<a name="l00030"></a>00030 <span class="preprocessor">#ifndef CBLOCK_HPP</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define CBLOCK_HPP</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &quot;<a class="code" href="glue_8h.html">glue.h</a>&quot;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &quot;<a class="code" href="cdecl_8h.html">cdecl.h</a>&quot;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &quot;<a class="code" href="csymtab_8h.html">csymtab.h</a>&quot;</span>
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 <span class="keyword">class </span><a class="code" href="classCParam.html" title="Declaration object for parameters.">CParam</a>;
<a name="l00040"></a>00040 <span class="keyword">class </span><a class="code" href="classCVar.html" title="Declaration object for variables.">CVar</a>;
<a name="l00041"></a>00041 <span class="keyword">class </span><a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>;
<a name="l00042"></a>00042 <span class="keyword">class </span><a class="code" href="classCNet.html" title="Declaration object for nets.">CNet</a>;
<a name="l00043"></a>00043 <span class="keyword">class </span><a class="code" href="classCFref.html" title="Forward reference declaration.">CFref</a>;
<a name="l00044"></a>00044 <span class="keyword">class </span><a class="code" href="classCInstance.html" title="Declaration object for module and gate instances.">CInstance</a>;
<a name="l00045"></a>00045 <span class="keyword">class </span><a class="code" href="classCGenvar.html" title="Declaration object for genvars.">CGenvar</a>;
<a name="l00046"></a>00046 <span class="keyword">class </span><a class="code" href="classCPortDir.html" title="Declaration object for input/output/inout statements.">CPortDir</a>;
<a name="l00047"></a>00047 
<a name="l00048"></a>00048 
<a name="l00052"></a><a class="code" href="classCBlock.html">00052</a> <span class="keyword">class </span><a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>: <span class="keyword">public</span> <a class="code" href="classCDecl.html" title="Base class for describing declaration objects.">CDecl</a>
<a name="l00053"></a>00053 {
<a name="l00054"></a>00054 <span class="keyword">protected</span>:
<a name="l00055"></a><a class="code" href="classCBlock.html#a87dcd3110454cac2d4d5d9208cfe1ef5">00055</a>         vector&lt;CParam*&gt;   <a class="code" href="classCBlock.html#a87dcd3110454cac2d4d5d9208cfe1ef5">paramList</a>;
<a name="l00056"></a><a class="code" href="classCBlock.html#a68b3a161169f4984e41ab7d0b647be05">00056</a>         vector&lt;CVar*&gt;     <a class="code" href="classCBlock.html#a68b3a161169f4984e41ab7d0b647be05">varList</a>;
<a name="l00057"></a><a class="code" href="classCBlock.html#a08d48576743d4da3bf39b3863cca81ab">00057</a>         vector&lt;CGenvar*&gt;  <a class="code" href="classCBlock.html#a08d48576743d4da3bf39b3863cca81ab">genvarList</a>;
<a name="l00058"></a><a class="code" href="classCBlock.html#a7ab505f0ec937c1bef72fe9458e36ed1">00058</a>         vector&lt;CFref*&gt;    <a class="code" href="classCBlock.html#a7ab505f0ec937c1bef72fe9458e36ed1">frefList</a>;
<a name="l00059"></a><a class="code" href="classCBlock.html#a80b4c4efaa0ac82e84377b666ef780ec">00059</a>         vector&lt;CNet*&gt;     <a class="code" href="classCBlock.html#a80b4c4efaa0ac82e84377b666ef780ec">netList</a>;
<a name="l00060"></a><a class="code" href="classCBlock.html#ace74e9fcf42750c02327a5ceab686ff8">00060</a>         <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>*           <a class="code" href="classCBlock.html#ace74e9fcf42750c02327a5ceab686ff8">parent</a>;
<a name="l00061"></a><a class="code" href="classCBlock.html#a5d3f9c58a7728195954f3252a42a535a">00061</a>         vector&lt;CBlock*&gt;   <a class="code" href="classCBlock.html#a5d3f9c58a7728195954f3252a42a535a">children</a>;
<a name="l00062"></a><a class="code" href="classCBlock.html#ae3e5968ce31846451f6e2babcdaa868b">00062</a>         <a class="code" href="classCSymtab.html">CSymtab&lt;CDecl&gt;</a>    <a class="code" href="classCBlock.html#ae3e5968ce31846451f6e2babcdaa868b">symtab</a>; 
<a name="l00063"></a>00063 <span class="keyword">private</span>:
<a name="l00064"></a>00064         <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>*            codeList;
<a name="l00065"></a>00065         <span class="keywordtype">int</span>               rebalance;
<a name="l00066"></a>00066 <span class="keyword">public</span>:
<a name="l00072"></a>00072         <a class="code" href="classCBlock.html#a7cb0efb333d8def4b6b0e0c189b06bc2" title="Constructor for BLOCK declarations.">CBlock</a>( <a class="code" href="classCSymbol.html" title="Holder for character strings.">CSymbol</a>* name, <a class="code" href="structCoord__t.html" title="Structure to hold file coordinates.">Coord_t</a>* aLoc );
<a name="l00079"></a>00079         <a class="code" href="classCBlock.html#a7cb0efb333d8def4b6b0e0c189b06bc2" title="Constructor for BLOCK declarations.">CBlock</a>( <a class="code" href="classCSymbol.html" title="Holder for character strings.">CSymbol</a>* name, <a class="code" href="structCoord__t.html" title="Structure to hold file coordinates.">Coord_t</a>* aLoc, <a class="code" href="cdecl_8h.html#a2079c5562904beb3c6648c13117153a0" title="Declaration types.">Decl_t</a> dtype );
<a name="l00083"></a><a class="code" href="classCBlock.html#a072ddbd4b88ddc5bb4e0e698582be765">00083</a>         <span class="keyword">virtual</span> <a class="code" href="classCBlock.html#a072ddbd4b88ddc5bb4e0e698582be765" title="Object destructor.">~CBlock</a>() {}
<a name="l00089"></a><a class="code" href="classCBlock.html#a7fc71343dd524faed35dcf9f036d8898">00089</a>         <span class="keyword">virtual</span> <a class="code" href="classCDecl.html" title="Base class for describing declaration objects.">CDecl</a>* <a class="code" href="classCBlock.html#a7fc71343dd524faed35dcf9f036d8898" title="Create a clone of this declaration.">Clone</a>( <a class="code" href="classCObstack.html" title="Bulk object allocation object.">CObstack</a>* heap ) { MASSERT(FALSE); }
<a name="l00098"></a>00098         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCBlock.html#a28d0319a58da46b4255f3534f895a211">Add</a>( <a class="code" href="classCInstance.html" title="Declaration object for module and gate instances.">CInstance</a>* instance );
<a name="l00107"></a>00107         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCBlock.html#a28d0319a58da46b4255f3534f895a211">Add</a>( <a class="code" href="classCParam.html" title="Declaration object for parameters.">CParam</a>* param );
<a name="l00116"></a>00116         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCBlock.html#a28d0319a58da46b4255f3534f895a211">Add</a>( <a class="code" href="classCNet.html" title="Declaration object for nets.">CNet</a>* net );
<a name="l00125"></a>00125         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCBlock.html#a28d0319a58da46b4255f3534f895a211">Add</a>( <a class="code" href="classCVar.html" title="Declaration object for variables.">CVar</a>* var );
<a name="l00134"></a>00134         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCBlock.html#a28d0319a58da46b4255f3534f895a211">Add</a>( <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>* child );
<a name="l00143"></a>00143         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCBlock.html#a28d0319a58da46b4255f3534f895a211">Add</a>( <a class="code" href="classCFref.html" title="Forward reference declaration.">CFref</a>* fref );
<a name="l00152"></a>00152         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCBlock.html#a28d0319a58da46b4255f3534f895a211">Add</a>( <a class="code" href="classCGenvar.html" title="Declaration object for genvars.">CGenvar</a>* genvar );
<a name="l00157"></a>00157         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCBlock.html#a28d0319a58da46b4255f3534f895a211">Add</a>( <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* code  );
<a name="l00162"></a>00162         <span class="keywordtype">void</span>    <a class="code" href="classCBlock.html#a347f0f6d7491b95340d38b7757e5b927" title="Set this block&amp;#39;s parent block.">SetParent</a>( <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>* <a class="code" href="classCBlock.html#ace74e9fcf42750c02327a5ceab686ff8">parent</a> );
<a name="l00167"></a>00167         <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>* <a class="code" href="classCBlock.html#abb1d93afd9bc0949ee8d6389cf60dba5" title="Get this block&amp;#39;s parent block.">GetParent</a>( <span class="keywordtype">void</span> );
<a name="l00172"></a>00172         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCBlock.html#a06c61b6d755889abb23a7de8e18a80c3" title="Dump information about block to a file.">Dump</a>( FILE* f );
<a name="l00177"></a>00177         vector&lt;CNet*&gt;*  <a class="code" href="classCBlock.html#a514fa63d65eb792e2c835170a98d2254" title="Get list of object&amp;#39;s nets.">GetNetList</a>();
<a name="l00182"></a>00182         vector&lt;CVar*&gt;*  <a class="code" href="classCBlock.html#af1b1d06170c576cb0880b15454a71de4" title="Get list of object&amp;#39;s registers.">GetVarList</a>();
<a name="l00187"></a>00187         vector&lt;CParam*&gt;* <a class="code" href="classCBlock.html#abd58778b6d540ee8dec30e3088bbec79" title="Get list of object&amp;#39;s parameters.">GetParamList</a>();
<a name="l00192"></a>00192         vector&lt;CGenvar*&gt;* <a class="code" href="classCBlock.html#a179b208bf543a24b81f21dc218362ce5" title="Get list of object&amp;#39;s genvars.">GetGenvarList</a>();
<a name="l00197"></a>00197         <span class="keyword">virtual</span> <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>*  <a class="code" href="classCBlock.html#a609154b76dfad784e4d53d8cd03f232f" title="Get blocks parse tree.">GetCodeList</a>();
<a name="l00202"></a>00202         <span class="keyword">virtual</span> <span class="keywordtype">void</span>    <a class="code" href="classCBlock.html#a1384c2c58407756956aeb073865eac62" title="Set block&amp;#39;s parse tree.">SetCodeList</a>( <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* list );
<a name="l00207"></a>00207         vector&lt;CBlock*&gt;* <a class="code" href="classCBlock.html#ae9ba7423fbda625ed443792a59d3d87c" title="Get list of block&amp;#39;s child blocks.">GetChildList</a>();
<a name="l00212"></a><a class="code" href="classCBlock.html#a6793d204098d1dbfd7d7acae2d44a150">00212</a>         <span class="keyword">virtual</span> vector&lt;CPortDir*&gt;*  <a class="code" href="classCBlock.html#a6793d204098d1dbfd7d7acae2d44a150" title="Get list of block&amp;#39;s port declarations.">GetPortDirList</a>() 
<a name="l00213"></a>00213                 { <span class="keyword">static</span> vector&lt;CPortDir*&gt; nullList; <span class="keywordflow">return</span> &amp;nullList;}
<a name="l00218"></a>00218         <span class="keyword">virtual</span> <span class="keywordtype">void</span>    <a class="code" href="classCBlock.html#aebf3a390fea8f2748d9d253a7bc936e7" title="Set block&amp;#39;s symbol table.">SetSymtab</a>( <a class="code" href="classCSymtab.html">CSymtab&lt;CDecl&gt;</a>&amp; <a class="code" href="classCBlock.html#ae3e5968ce31846451f6e2babcdaa868b">symtab</a> );
<a name="l00223"></a><a class="code" href="classCBlock.html#ab3c8fb804aebc1f5f418f769bd079ae0">00223</a>         <span class="keyword">virtual</span> <a class="code" href="classCSymtab.html">CSymtab&lt;CDecl&gt;</a>&amp; <a class="code" href="classCBlock.html#ab3c8fb804aebc1f5f418f769bd079ae0" title="Get block&amp;#39;s symbol table.">GetSymtab</a>() { <span class="keywordflow">return</span> <a class="code" href="classCBlock.html#ae3e5968ce31846451f6e2babcdaa868b">symtab</a>; }
<a name="l00228"></a>00228         <span class="keywordtype">void</span>    <a class="code" href="classCDecl.html#aa5ecfff625616b81a4de3fce4e6d0cb3">PreVisit1</a>( <span class="keywordtype">int</span> (*func)(<a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>*,<span class="keywordtype">void</span>*), <span class="keywordtype">void</span>* data );
<a name="l00229"></a>00229         <span class="keywordtype">void</span>    <a class="code" href="classCDecl.html#ae71ba72ce0fc7e32db9cd38d6f738a44">PostVisit1</a>( <span class="keywordtype">void</span> (*func)(<a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>*, <span class="keywordtype">void</span>*), <span class="keywordtype">void</span>* data );
<a name="l00230"></a>00230         <span class="keywordtype">void</span>    <a class="code" href="classCDecl.html#ae6e0d93143738a4d226cca8314a92cfe">PostSubVisit1</a>( <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>* (*func)(<a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a>*, <span class="keywordtype">void</span>*), <span class="keywordtype">void</span>* data );
<a name="l00231"></a>00231 <span class="keyword">protected</span>:
<a name="l00232"></a>00232         <span class="keyword">static</span> <span class="keywordtype">void</span> Reconnect( <a class="code" href="classCNode.html" title="Primary data structure representing parse tree nodes.">CNode</a> *n );
<a name="l00233"></a>00233         <span class="keywordtype">void</span> RedeclarePorts();
<a name="l00234"></a>00234         <span class="keywordtype">void</span> LinkFrefs( <a class="code" href="classCSymtab.html">CSymtab&lt;CDecl&gt;</a>&amp; <a class="code" href="main_8cc.html#a51c09f837941ecd89bb076d0dea4dd31">portSymtab</a>,
<a name="l00235"></a>00235                         <a class="code" href="classCSymtab.html">CSymtab&lt;CDecl&gt;</a>&amp; moduleSymtab,
<a name="l00236"></a>00236                         vector&lt;CFref*&gt;&amp; <a class="code" href="classCBlock.html#a7ab505f0ec937c1bef72fe9458e36ed1">frefList</a>, 
<a name="l00237"></a>00237                         <span class="keywordtype">int</span> <a class="code" href="main_8cc.html#a3deee65292b7f2ddfe674f4f63fcb3f9">inferVectors</a> );
<a name="l00238"></a>00238         <span class="keyword">virtual</span> <span class="keywordtype">void</span> CodeListChanged() {}
<a name="l00239"></a>00239 <span class="keyword">private</span>:
<a name="l00240"></a>00240         <span class="keywordtype">void</span> LinkPortFref( <a class="code" href="classCSymtab.html">CSymtab&lt;CDecl&gt;</a>* symtab1,
<a name="l00241"></a>00241                        <a class="code" href="classCSymtab.html">CSymtab&lt;CDecl&gt;</a>* symtab2,
<a name="l00242"></a>00242                        <a class="code" href="classCFref.html" title="Forward reference declaration.">CFref</a>* fref  );
<a name="l00243"></a>00243         <span class="keywordtype">void</span> InferFref( <a class="code" href="classCSymtab.html">CSymtab&lt;CDecl&gt;</a>* symtab1,
<a name="l00244"></a>00244                        <a class="code" href="classCFref.html" title="Forward reference declaration.">CFref</a>* fref,
<a name="l00245"></a>00245                        <span class="keywordtype">int</span> inferVector );
<a name="l00246"></a>00246         <span class="keywordtype">void</span> LinkFref( <a class="code" href="classCSymtab.html">CSymtab&lt;CDecl&gt;</a>* <a class="code" href="classCBlock.html#ae3e5968ce31846451f6e2babcdaa868b">symtab</a>,
<a name="l00247"></a>00247                        <a class="code" href="classCFref.html" title="Forward reference declaration.">CFref</a>* fref, <span class="keywordtype">int</span> inferVector );
<a name="l00248"></a>00248         <a class="code" href="classCBlock.html#a7cb0efb333d8def4b6b0e0c189b06bc2" title="Constructor for BLOCK declarations.">CBlock</a>( <span class="keyword">const</span> <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a>&amp; );
<a name="l00252"></a>00252 };
<a name="l00253"></a>00253 
<a name="l00257"></a><a class="code" href="cblock_8h.html#af00e3e29d8be8504da4d630b6f2be86a">00257</a> <span class="keyword">typedef</span> <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CBlock</a> <a class="code" href="classCBlock.html" title="Declaration class for block constructs.">CScope</a>;
<a name="l00258"></a>00258 
<a name="l00259"></a>00259 
<a name="l00260"></a>00260 <span class="preprocessor">#endif // CBLOCK_HPP</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>