Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

/Users/trevorw/projects/release/covered-0.7.4/src/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-2009 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        report_save,
00072   bool        ids_issued
00073 );
00074 
00077 void funit_db_read(
00078             func_unit* funit,
00079   /*@out@*/ char*      scope,
00080   /*@out@*/ bool*      name_diff,
00081             char**     line
00082 );
00083 
00085 void funit_version_db_read(
00086   func_unit* funit,
00087   char**     line
00088 );
00089 
00091 void funit_merge(
00092   func_unit* base,
00093   func_unit* other
00094 );
00095 
00097 void funit_db_merge(
00098   func_unit* base,
00099   FILE*      file,
00100   bool       same
00101 );
00102 
00104 /*@shared@*/ char* funit_flatten_name( func_unit* funit );
00105 
00107 func_unit* funit_find_by_id( int id );
00108 
00110 bool funit_is_top_module( func_unit* funit );
00111 
00113 bool funit_is_unnamed( func_unit* funit );
00114 
00116 bool funit_is_unnamed_child_of( func_unit* parent, func_unit* child );
00117 
00119 bool funit_is_child_of( func_unit* parent, func_unit* child );
00120 
00122 void funit_display_signals( func_unit* funit );
00123 
00125 void funit_display_expressions( func_unit* funit );
00126 
00128 void funit_add_thread(
00129   func_unit* funit,
00130   thread*    thr
00131 );
00132 
00134 void funit_push_threads(
00135   func_unit*       funit,
00136   const statement* stmt,
00137   const sim_time*  time
00138 );
00139 
00141 void funit_delete_thread(
00142   func_unit* funit,
00143   thread*    thr
00144 );
00145 
00147 void funit_output_dumpvars(
00148   FILE*       vfile,
00149   func_unit*  funit,
00150   const char* scope
00151 );
00152 
00154 void funit_dealloc( func_unit* funit );
00155 
00156 #endif
00157 

Generated on Wed Jun 17 22:19:20 2009 for Covered by doxygen 1.3.4