00001 #ifndef __LINK_H__
00002 #define __LINK_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00026 #include "defines.h"
00027
00028
00030 str_link* str_link_add(
00031 char* str,
00032 str_link** head,
00033 str_link** tail
00034 );
00035
00037 stmt_link* stmt_link_add(
00038 statement* stmt,
00039 bool rm_stmt,
00040 stmt_link** head,
00041 stmt_link** tail
00042 );
00043
00045 void exp_link_add(
00046 expression* expr,
00047 exp_link** head,
00048 exp_link** tail
00049 );
00050
00052 void sig_link_add(
00053 vsignal* sig,
00054 sig_link** head,
00055 sig_link** tail
00056 );
00057
00059 void fsm_link_add(
00060 fsm* table,
00061 fsm_link** head,
00062 fsm_link** tail
00063 );
00064
00066 void funit_link_add(
00067 func_unit* funit,
00068 funit_link** head,
00069 funit_link** tail
00070 );
00071
00072 #ifndef VPI_ONLY
00073
00074 void gitem_link_add(
00075 gen_item* gi,
00076 gitem_link** head,
00077 gitem_link** tail
00078 );
00079 #endif
00080
00082 inst_link* inst_link_add(
00083 funit_inst* inst,
00084 inst_link** head,
00085 inst_link** tail
00086 );
00087
00088
00089
00091 void str_link_display(
00092 str_link* head
00093 );
00094
00096 void stmt_link_display(
00097 stmt_link* head
00098 );
00099
00101 void exp_link_display(
00102 exp_link* head
00103 );
00104
00106 void sig_link_display(
00107 sig_link* head
00108 );
00109
00111 void funit_link_display(
00112 funit_link* head
00113 );
00114
00115 #ifndef VPI_ONLY
00116
00117 void gitem_link_display(
00118 gitem_link* head
00119 );
00120 #endif
00121
00123 void inst_link_display(
00124 inst_link* head
00125 );
00126
00127
00128
00130 str_link* str_link_find(
00131 const char* value,
00132 str_link* head
00133 );
00134
00136 stmt_link* stmt_link_find(
00137 int id,
00138 stmt_link* head
00139 );
00140
00142 stmt_link* stmt_link_find_by_pos(
00143 unsigned int ppline,
00144 uint32 first_col,
00145 stmt_link* head
00146 );
00147
00149 exp_link* exp_link_find(
00150 int id,
00151 exp_link* head
00152 );
00153
00155 exp_link* exp_link_find_by_pos(
00156 exp_op_type op,
00157 int line,
00158 unsigned int col,
00159 exp_link* head
00160 );
00161
00163 sig_link* sig_link_find(
00164 const char* name,
00165 sig_link* head
00166 );
00167
00169 fsm_link* fsm_link_find(
00170 const char* name,
00171 fsm_link* head
00172 );
00173
00175 fsm_link* fsm_link_find_by_pos(
00176 int line,
00177 fsm_link* head
00178 );
00179
00181 funit_link* funit_link_find(
00182 const char* name,
00183 int type,
00184 funit_link* head
00185 );
00186
00187 #ifndef VPI_ONLY
00188
00189 gitem_link* gitem_link_find(
00190 gen_item* gi,
00191 gitem_link* head
00192 );
00193 #endif
00194
00196 funit_inst* inst_link_find_by_scope(
00197 char* scope,
00198 inst_link* head
00199 );
00200
00202 funit_inst* inst_link_find_by_funit(
00203 const func_unit* funit,
00204 inst_link* head,
00205 int* ignore
00206 );
00207
00208
00209
00211 void str_link_remove(
00212 char* str,
00213 str_link** head,
00214 str_link** tail
00215 );
00216
00218 void exp_link_remove(
00219 expression* exp,
00220 exp_link** head,
00221 exp_link** tail,
00222 bool recursive
00223 );
00224
00225 #ifndef VPI_ONLY
00226
00227 void gitem_link_remove(
00228 gen_item* gi,
00229 gitem_link** head,
00230 gitem_link** tail
00231 );
00232 #endif
00233
00235 void funit_link_remove(
00236 func_unit* funit,
00237 funit_link** head,
00238 funit_link** tail,
00239 bool rm_funit
00240 );
00241
00242
00243
00245 void str_link_delete_list(
00246 str_link* head
00247 );
00248
00250 void stmt_link_unlink(
00251 statement* stmt,
00252 stmt_link** head,
00253 stmt_link** tail
00254 );
00255
00257 void stmt_link_delete_list(
00258 stmt_link* head
00259 );
00260
00262 void exp_link_delete_list(
00263 exp_link* head,
00264 bool del_exp
00265 );
00266
00268 void sig_link_delete_list(
00269 sig_link* head,
00270 bool del_sig
00271 );
00272
00274 void fsm_link_delete_list(
00275 fsm_link* head
00276 );
00277
00279 void funit_link_delete_list(
00280 funit_link** head,
00281 funit_link** tail,
00282 bool rm_funit
00283 );
00284
00285 #ifndef VPI_ONLY
00286
00287 void gitem_link_delete_list(
00288 gitem_link* head,
00289 bool rm_elems
00290 );
00291 #endif
00292
00294 void inst_link_delete_list(
00295 inst_link* head
00296 );
00297
00298 #endif
00299