Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136 #ifndef ti_bundle_INCLUDED
00137 #define ti_bundle_INCLUDED
00138
00139 #include "topcode.h"
00140
00141 #ifdef __cplusplus
00142 extern "C" {
00143 #endif
00144
00145 #ifdef _KEEP_RCS_ID
00146 #endif
00147
00148 #ifndef defs_INCLUDED
00149 #define defs_INCLUDED
00150 typedef signed int INT;
00151 typedef signed int INT32;
00152 typedef signed long long INT64;
00153 typedef signed char mINT8;
00154 typedef signed short mINT16;
00155 typedef signed int mINT32;
00156 typedef signed long long mINT64;
00157 typedef unsigned int UINT;
00158 typedef unsigned int UINT32;
00159 typedef unsigned long long UINT64;
00160 typedef unsigned char mUINT8;
00161 typedef unsigned short mUINT16;
00162 typedef unsigned int mUINT32;
00163 typedef unsigned long long mUINT64;
00164 typedef int BOOL;
00165 typedef unsigned char mBOOL;
00166 #ifndef TRUE
00167 #define TRUE ((BOOL) 1)
00168 #endif
00169 #ifndef FALSE
00170 #define FALSE ((BOOL) 0)
00171 #endif
00172 #if defined(_LANGUAGE_C) && !defined(inline)
00173 #define inline static __inline
00174 #endif
00175 #endif
00176
00177 typedef struct ti_bundle {
00178 ISA_BUNDLE_INFO *bundle_info;
00179 BOOL slot_filled[ISA_MAX_SLOTS];
00180 } TI_BUNDLE;
00181
00182
00183
00184
00185 #define TI_BUNDLE_bundle_info(t) ((t)->bundle_info)
00186 #define TI_BUNDLE_slot_count(t) ((t)->bundle_info->slot_count)
00187 #define TI_BUNDLE_exec_property(t,i) ((t)->bundle_info->slot[i])
00188 #define TI_BUNDLE_stop_bit(t,i) ((t)->bundle_info->stop[i])
00189 #define TI_BUNDLE_slot_filled(t,i) ((t)->slot_filled[i])
00190 #define TI_BUNDLE_slot_mask(t) ((t)->bundle_info->slot_mask)
00191 #define TI_BUNDLE_stop_mask(t) ((t)->bundle_info->stop_mask)
00192 #define TI_BUNDLE_pack_code(t) ((t)->bundle_info->pack_code)
00193
00194 #define Set_TI_BUNDLE_exec_property(t, i, value) ((t)->bundle_info->slot[i] = \
00195 (value))
00196 #define Set_TI_BUNDLE_slot_mask(t, i) ((t)->bundle_info->slot_mask = i)
00197 #define Set_TI_BUNDLE_stop_mask(t, i) ((t)->bundle_info->stop_mask = i)
00198 #define Set_TI_BUNDLE_slot_count(t, i) ((t)->bundle_info->slot_count = i)
00199 #define Set_TI_BUNDLE_stop_bit(t, i, value) ((t)->bundle_info->stop[i] = \
00200 (value))
00201 #define Set_TI_BUNDLE_pack_code(t, value) ((t)->bundle_info->pack_code = \
00202 (value))
00203
00204
00205
00206 #define FOR_ALL_SLOT_MEMBERS(bundle, i) \
00207 for (i = 0; i < TI_BUNDLE_slot_count(bundle); ++i)
00208
00209 inline BOOL
00210 TI_BUNDLE_Stop_Bit_Present(TI_BUNDLE *bundle) {
00211 INT i;
00212 for (i = 0; i < TI_BUNDLE_slot_count(bundle) - 1; ++i) {
00213 if (TI_BUNDLE_stop_bit(bundle, i)) return TRUE;
00214 }
00215 return FALSE;
00216 }
00217
00218 extern BOOL TI_BUNDLE_Has_Property(
00219 TI_BUNDLE *bundle,
00220 ISA_EXEC_UNIT_PROPERTY property,
00221 INT *error
00222 );
00223
00224 extern BOOL TI_BUNDLE_Is_Full(
00225 TI_BUNDLE *bundle,
00226 INT *error
00227 );
00228
00229 extern BOOL TI_BUNDLE_Is_Empty(
00230 TI_BUNDLE *bundle,
00231 INT *error
00232 );
00233
00234 extern INT TI_BUNDLE_Return_Template(
00235 TI_BUNDLE *bundle
00236 );
00237
00238 extern void TI_BUNDLE_Clear(
00239 TI_BUNDLE *bundle
00240 );
00241
00242 extern BOOL TI_BUNDLE_Slot_Available(
00243 TI_BUNDLE *bundle,
00244 ISA_EXEC_UNIT_PROPERTY property,
00245 INT slot
00246 );
00247
00248 extern BOOL TI_BUNDLE_Stop_Bit_Available(
00249 TI_BUNDLE *bundle,
00250 INT slot
00251 );
00252
00253 extern void TI_BUNDLE_Reserve_Slot(
00254 TI_BUNDLE *bundle,
00255 INT slot,
00256 ISA_EXEC_UNIT_PROPERTY property
00257 );
00258
00259 extern void TI_BUNDLE_Reserve_Stop_Bit(
00260 TI_BUNDLE *bundle,
00261 INT slot
00262 );
00263
00264 extern void TI_BUNDLE_Unreserve_Stop_Bit(
00265 TI_BUNDLE *bundle,
00266 INT slot
00267 );
00268
00269 #ifdef __cplusplus
00270 }
00271 #endif
00272 #endif
00273