func_unit.h

Go to the documentation of this file.
00001 #ifndef __FUNC_UNIT_H__
00002 #define __FUNC_UNIT_H__
00003 
00004 /*
00005  Copyright (c) 2006-2010 Trevor Williams
00006 
00007  This program is free software; you can redistribute it and/or modify
00008  it under the terms of the GNU General Public License as published by the Free Software
00009  Foundation; either version 2 of the License, or (at your option) any later version.
00010 
00011  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
00012  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00013  See the GNU General Public License for more details.
00014 
00015  You should have received a copy of the GNU General Public License along with this program;
00016  if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 */
00018 
00026 #include <stdio.h>
00027 
00028 #include "defines.h"
00029 
00030 
00032 func_unit* funit_create();
00033 
00035 func_unit* funit_get_curr_module( func_unit* funit );
00036 
00038 const func_unit* funit_get_curr_module_safe( const func_unit* funit );
00039 
00041 func_unit* funit_get_curr_function( func_unit* funit );
00042 
00044 func_unit* funit_get_curr_task( func_unit* funit );
00045 
00047 int funit_get_port_count( func_unit* funit );
00048 
00050 mod_parm* funit_find_param( char* name, func_unit* funit );
00051 
00053 vsignal* funit_find_signal( char* name, func_unit* funit );
00054 
00056 void funit_remove_stmt_blks_calling_stmt( func_unit* funit, statement* stmt );
00057 
00059 char* funit_gen_task_function_namedblock_name( char* orig_name, func_unit* parent );
00060 
00062 void funit_size_elements( func_unit* funit, funit_inst* inst, bool gen_all, bool alloc_exprs );
00063 
00065 void funit_db_write(
00066   func_unit*  funit,
00067   char*       scope,
00068   bool        name_diff,
00069   FILE*       file,
00070   funit_inst* inst,
00071   bool        ids_issued
00072 );
00073 
00076 void funit_db_read(
00077             func_unit* funit,
00078   /*@out@*/ char*      scope,
00079   /*@out@*/ bool*      name_diff,
00080             char**     line
00081 );
00082 
00084 void funit_version_db_read(
00085   func_unit* funit,
00086   char**     line
00087 );
00088 
00090 void funit_db_inst_merge(
00091   func_unit* base,
00092   FILE*      file,
00093   bool       same
00094 );
00095 
00097 void funit_db_mod_merge(
00098                func_unit* base,
00099                FILE*      file,
00100   /*@unused@*/ bool       same
00101 );
00102 
00104 void funit_merge(
00105   func_unit* base,
00106   func_unit* other
00107 );
00108 
00110 void funit_db_merge(
00111   func_unit* base,
00112   FILE*      file,
00113   bool       same
00114 );
00115 
00117 /*@shared@*/ char* funit_flatten_name( func_unit* funit );
00118 
00120 func_unit* funit_find_by_id( int id );
00121 
00123 bool funit_is_top_module( func_unit* funit );
00124 
00126 bool funit_is_unnamed( func_unit* funit );
00127 
00129 bool funit_is_unnamed_child_of( func_unit* parent, func_unit* child );
00130 
00132 bool funit_is_child_of( func_unit* parent, func_unit* child );
00133 
00135 void funit_display_signals( func_unit* funit );
00136 
00138 void funit_display_expressions( func_unit* funit );
00139 
00141 void funit_add_thread(
00142   func_unit* funit,
00143   thread*    thr
00144 );
00145 
00147 void funit_push_threads(
00148   func_unit*       funit,
00149   const statement* stmt,
00150   const sim_time*  time
00151 );
00152 
00154 void funit_delete_thread(
00155   func_unit* funit,
00156   thread*    thr
00157 );
00158 
00160 void funit_output_dumpvars(
00161   FILE*       vfile,
00162   func_unit*  funit,
00163   const char* scope
00164 );
00165 
00167 bool funit_is_one_signal_assigned(
00168   func_unit* funit
00169 );
00170 
00172 void funit_dealloc( func_unit* funit );
00173 
00174 #endif
00175 
Generated on Sun Nov 21 00:55:35 2010 for Covered by  doxygen 1.6.3