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 #ifndef LOGIC_H_
00049 #define LOGIC_H_
00050
00051 #include "const.h"
00052 #include "McPATcomponent.h"
00053 #include "basic_components.h"
00054 #include "cacti_interface.h"
00055 #include "parameter.h"
00056 #include "xmlParser.h"
00057 #include <string.h>
00058 #include "XML_Parse.h"
00059
00060 using namespace std;
00061
00062 class selection_logic : public McPATComponent{
00063 public:
00064 selection_logic(bool _is_default, int win_entries_,
00065 int issue_width_, const InputParameter *configure_interface);
00066 bool is_default;
00067 InputParameter l_ip;
00068 uca_org_t local_result;
00069 const ParseXML *XML_interface;
00070 int win_entries;
00071 int issue_width;
00072 int num_threads;
00073
00074 void selection_power();
00075 };
00076
00077 class dep_resource_conflict_check : public McPATComponent{
00078 public:
00079 dep_resource_conflict_check(const InputParameter *configure_interface, const CoreDynParam & dyn_p_, int compare_bits_, bool _is_default=true);
00080 InputParameter l_ip;
00081 uca_org_t local_result;
00082 double WNORn, WNORp, Wevalinvp, Wevalinvn, Wcompn, Wcompp, Wcomppreequ;
00083 CoreDynParam coredynp;
00084 int compare_bits;
00085 bool is_default;
00086 statsDef tdp_stats;
00087 statsDef rtp_stats;
00088 statsDef stats_t;
00089 powerDef power_t;
00090
00091 void conflict_check_power();
00092 double compare_cap();
00093
00094 };
00095
00096 class DFFCell : public McPATComponent {
00097 public:
00098 DFFCell(bool _is_dram, double _WdecNANDn, double _WdecNANDp,double _cell_load,
00099 const InputParameter *configure_interface);
00100 InputParameter l_ip;
00101 bool is_dram;
00102 double cell_load;
00103 double WdecNANDn;
00104 double WdecNANDp;
00105 double clock_cap;
00106 int model;
00107 int n_switch;
00108 int n_keep_1;
00109 int n_keep_0;
00110 int n_clock;
00111 powerDef e_switch;
00112 powerDef e_keep_1;
00113 powerDef e_keep_0;
00114 powerDef e_clock;
00115
00116 double fpfp_node_cap(unsigned int fan_in, unsigned int fan_out);
00117 void compute_DFF_cell(void);
00118 };
00119
00120 class Pipeline : public McPATComponent{
00121 public:
00122 Pipeline(const InputParameter *configure_interface, const CoreDynParam & dyn_p_, bool _is_core_pipeline=true, bool _is_default=true);
00123 InputParameter l_ip;
00124 uca_org_t local_result;
00125 CoreDynParam coredynp;
00126 bool is_core_pipeline, is_default;
00127 double num_piperegs;
00128
00129
00130 bool process_ind;
00131 double WNANDn ;
00132 double WNANDp;
00133 double load_per_pipeline_stage;
00134
00135
00136
00137
00138 void compute_stage_vector();
00139 void compute();
00140 ~Pipeline(){};
00141
00142 };
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155 class FunctionalUnit :public McPATComponent{
00156 public:
00157 FunctionalUnit(const InputParameter *configure_interface, enum FU_type fu_type, int n_fu, bool _is_default = true);
00158 InputParameter l_ip;
00159 uca_org_t local_result;
00160 const ParseXML *XML_interface;
00161 double num_fu, FU_height;
00162 bool is_default;
00163
00164 };
00165
00166 class UndiffCore :public McPATComponent{
00167 public:
00168 UndiffCore(const InputParameter *configure_interface, enum Core_type core_ty_, double pipeline_stage_,double num_hthreads_,double issue_width_, bool embedded_ = false, bool _is_default = true);
00169 InputParameter l_ip;
00170 const ParseXML *XML_interface;
00171 enum Core_type core_ty;
00172 double pipeline_stage,num_hthreads,issue_width;
00173 bool opt_performance, embedded;
00174 bool is_default;
00175 };
00176 #endif