00001 #include "../host.h" 00002 #include "../memory.h" 00003 #include "../stats.h" 00004 00005 00006 typedef enum mem_cmd fu_mcommand_t; 00007 typedef md_addr_t fu_address_t; 00008 typedef byte_t buffer_t; 00009 00010 /* io style */ 00011 typedef enum _fu_io_style_t { 00012 idirBuffer, /* in direction */ 00013 odirBuffer, /* out direction */ 00014 bidirBuffer /* in/out direction */ 00015 } fu_io_style_t; 00016 00017 00018 typedef struct _fu_lv1_cache_Ceff_t /* Ceff for cache like structures, read from option */ 00019 { 00020 double iCeff; 00021 double eCeff; 00022 } fu_lv1_cache_Ceff_t; 00023 00024 typedef struct _fu_lv1_io_opts_t /* Ceff for cache like structures, read from option */ 00025 { 00026 fu_io_style_t style; 00027 double iCeff; 00028 double eCeff; 00029 double svolt; 00030 unsigned buswidth; 00031 unsigned nacycles; 00032 unsigned nctcycles; 00033 unsigned bsize; 00034 } fu_lv1_io_opts_t; 00035 00036 /* power dissipation type */ 00037 typedef struct _fu_lv1_pdissipation_t { 00038 double external; /* external switching power dissipation */ 00039 double internal; /* internal switching power dissipation */ 00040 double pdissipation; 00041 #ifdef PA_TRANS_COUNT 00042 int aio_trans; 00043 int dio_trans; 00044 #endif 00045 } fu_lv1_pdissipation_t; 00046 00047 00048 typedef enum _pwr_frame_type {root,start} pwr_frame_type; 00049 00050 /* power dissipation window in a linked list design */ 00051 typedef struct _fu_lv1_pwrframe_t { 00052 pwr_frame_type type; /* root, start of frame,*/ 00053 int frame_size; 00054 tick_t frame_start; /* starting cycle for frame */ 00055 fu_lv1_pdissipation_t *frame_contents; 00056 struct _fu_lv1_pwr_frame_t * next; 00057 } fu_lv1_pwr_frame_t; 00058 00059 00060 typedef struct _fu_lv1_io_arg_t /* argument structure for message passing */ 00061 { 00062 fu_mcommand_t command; 00063 fu_address_t address; 00064 fu_lv1_pwr_frame_t *pwr_frame; 00065 buffer_t *buffer; 00066 unsigned bsize; 00067 tick_t now; 00068 unsigned lat; 00069 } fu_lv1_io_arg_t; 00070 00071 typedef struct _fu_lv1_uarch_arg_t /* argument structure for message passing */ 00072 { 00073 fu_lv1_pwr_frame_t * pwr_frame; 00074 tick_t now; 00075 } fu_lv1_uarch_arg_t; 00076 00077 typedef struct _fu_lv1_pa_trace_arg_t /* argument structure for message passing */ 00078 { 00079 double * window; 00080 char * miss_window; 00081 #ifdef PA_TRANS_COUNT 00082 int * aio_ham_window; 00083 int * dio_ham_window; 00084 #endif 00085 00086 FILE *fp; 00087 char cache_miss; 00088 tick_t now; 00089 } fu_lv1_pa_trace_arg_t; 00090 00091 00092 typedef struct _fu_lv1_Ceff_list_t /* list of Ceff for each component, read from option */ 00093 { 00094 double alu_Ceff; 00095 double fpu_Ceff; 00096 double mult_Ceff; 00097 double bpred_Ceff; 00098 double rf_Ceff; 00099 fu_lv1_cache_Ceff_t il1_Ceff; 00100 fu_lv1_cache_Ceff_t dl1_Ceff; 00101 fu_lv1_cache_Ceff_t il2_Ceff; 00102 fu_lv1_cache_Ceff_t dl2_Ceff; 00103 fu_lv1_cache_Ceff_t dtlb_Ceff; 00104 fu_lv1_cache_Ceff_t itlb_Ceff; 00105 } fu_lv1_Ceff_list_t;