00001 #ifndef __FSM_H__
00002 #define __FSM_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00026 #include <stdio.h>
00027
00028 #include "defines.h"
00029
00031 fsm* fsm_create(
00032 expression* from_state,
00033 expression* to_state,
00034 int line,
00035 bool exclude
00036 );
00037
00039 void fsm_add_arc(
00040 fsm* table,
00041 expression* from_state,
00042 expression* to_state
00043 );
00044
00046 void fsm_create_tables(
00047 fsm* table
00048 );
00049
00051 void fsm_db_write(
00052 fsm* table,
00053 FILE* file,
00054 bool ids_issued
00055 );
00056
00058 void fsm_db_read(
00059 char** line,
00060 func_unit* funit
00061 );
00062
00064 void fsm_db_merge(
00065 fsm* base,
00066 char** line
00067 );
00068
00070 void fsm_merge(
00071 fsm* base,
00072 fsm* other
00073 );
00074
00076 void fsm_table_set(
00077 expression* expr,
00078 const sim_time* time
00079 );
00080
00082 void fsm_get_stats(
00083 fsm_link* table,
00084 int* state_hit,
00085 int* state_total,
00086 int* arc_hit,
00087 int* arc_total,
00088 int* arc_excluded
00089 );
00090
00092 void fsm_get_funit_summary(
00093 func_unit* funit,
00094 int* hit,
00095 int* excluded,
00096 int* total
00097 );
00098
00100 void fsm_get_inst_summary(
00101 funit_inst* inst,
00102 int* hit,
00103 int* excluded,
00104 int* total
00105 );
00106
00108 void fsm_collect(
00109 func_unit* funit,
00110 int cov,
00111 sig_link** sig_head,
00112 sig_link** sig_tail,
00113 int** expr_ids,
00114 int** excludes
00115 );
00116
00118 void fsm_get_coverage(
00119 func_unit* funit,
00120 int expr_id,
00121 char*** total_fr_states,
00122 unsigned int* total_fr_state_num,
00123 char*** total_to_states,
00124 unsigned int* total_to_state_num,
00125 char*** hit_fr_states,
00126 unsigned int* hit_fr_state_num,
00127 char*** hit_to_states,
00128 unsigned int* hit_to_state_num,
00129 char*** total_from_arcs,
00130 char*** total_to_arcs,
00131 int** total_ids,
00132 int** excludes,
00133 char*** reasons,
00134 int* total_arc_num,
00135 char*** hit_from_arcs,
00136 char*** hit_to_arcs,
00137 int* hit_arc_num,
00138 char*** input_state,
00139 unsigned int* input_size,
00140 char*** output_state,
00141 unsigned int* output_size
00142 );
00143
00145 void fsm_report(
00146 FILE* ofile,
00147 bool verbose
00148 );
00149
00151 void fsm_dealloc(
00152 fsm* table
00153 );
00154
00155 #endif
00156