4a5
> * Copyright (c) 2010-2013 Advanced Micro Devices, Inc.
28c29
< * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.”
---
> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34d34
< #include <cassert>
39d38
< #include "XML_Parse.h"
52c51
< class selection_logic : public Component{
---
> class selection_logic : public McPATComponent {
54,66c53,61
< selection_logic(bool _is_default, int win_entries_,
< int issue_width_, const InputParameter *configure_interface,
< enum Device_ty device_ty_=Core_device,
< enum Core_type core_ty_=Inorder);//, const ParseXML *_XML_interface);
< bool is_default;
< InputParameter l_ip;
< uca_org_t local_result;
< const ParseXML *XML_interface;
< int win_entries;
< int issue_width;
< int num_threads;
< enum Device_ty device_ty;
< enum Core_type core_ty;
---
> bool is_default;
> InputParameter l_ip;
> uca_org_t local_result;
> int win_entries;
> int issue_width;
> double accesses;
> int num_threads;
> enum Device_ty device_ty;
> enum Core_type core_ty;
68c63,70
< void selection_power();
---
> selection_logic(XMLNode* _xml_data, bool _is_default, int _win_entries,
> int issue_width_, const InputParameter* configure_interface,
> string _name, double _accesses,
> double clockRate_ = 0.0f,
> enum Device_ty device_ty_ = Core_device,
> enum Core_type core_ty_ = Inorder);
> void computeArea();
> void computeEnergy();
69a72
> // TODO: Add a deconstructor
72c75
< class dep_resource_conflict_check : public Component{
---
> class dep_resource_conflict_check : public McPATComponent {
74,84c77,83
< dep_resource_conflict_check(const InputParameter *configure_interface, const CoreDynParam & dyn_p_, int compare_bits_, bool _is_default=true);
< InputParameter l_ip;
< uca_org_t local_result;
< double WNORn, WNORp, Wevalinvp, Wevalinvn, Wcompn, Wcompp, Wcomppreequ;
< CoreDynParam coredynp;
< int compare_bits;
< bool is_default;
< statsDef tdp_stats;
< statsDef rtp_stats;
< statsDef stats_t;
< powerDef power_t;
---
> InputParameter l_ip;
> uca_org_t local_result;
> double WNORn, WNORp, Wevalinvp, Wevalinvn, Wcompn, Wcompp, Wcomppreequ;
> CoreParameters coredynp;
> int compare_bits;
> bool is_default;
> statsDef stats_t;
86,90c85,95
< void conflict_check_power();
< double compare_cap();
< ~dep_resource_conflict_check(){
< local_result.cleanup();
< }
---
> dep_resource_conflict_check(XMLNode* _xml_data, const string _name,
> const InputParameter *configure_interface,
> const CoreParameters & dyn_p_, int compare_bits_,
> double clockRate_ = 0.0f,
> bool _is_default = true);
> void conflict_check_power();
> double compare_cap();
> void computeEnergy() {};
> ~dep_resource_conflict_check() {
> local_result.cleanup();
> }
95c100
< class inst_decoder: public Component{
---
> class InstructionDecoder: public McPATComponent {
97,113c102,103
< inst_decoder(bool _is_default, const InputParameter *configure_interface,
< int opcode_length_,
< int num_decoders_,
< bool x86_,
< enum Device_ty device_ty_=Core_device,
< enum Core_type core_ty_=Inorder);
< inst_decoder();
< bool is_default;
< int opcode_length;
< int num_decoders;
< bool x86;
< int num_decoder_segments;
< int num_decoded_signals;
< InputParameter l_ip;
< uca_org_t local_result;
< enum Device_ty device_ty;
< enum Core_type core_ty;
---
> Decoder* final_dec;
> Predec* pre_dec;
115,116c105,115
< Decoder * final_dec;
< Predec * pre_dec;
---
> bool is_default;
> int opcode_length;
> int num_decoders;
> bool x86;
> int num_decoder_segments;
> int num_decoded_signals;
> InputParameter l_ip;
> uca_org_t local_result;
> enum Device_ty device_ty;
> enum Core_type core_ty;
> statsDef stats_t;
118,123c117,126
< statsDef tdp_stats;
< statsDef rtp_stats;
< statsDef stats_t;
< powerDef power_t;
< void inst_decoder_delay_power();
< ~inst_decoder();
---
> InstructionDecoder(XMLNode* _xml_data, const string _name, bool _is_default,
> const InputParameter *configure_interface,
> int opcode_length_, int num_decoders_, bool x86_,
> double clockRate_ = 0.0f,
> enum Device_ty device_ty_ = Core_device,
> enum Core_type core_ty_ = Inorder);
> InstructionDecoder();
> void computeEnergy() {};
> void inst_decoder_delay_power();
> ~InstructionDecoder();
126a130
> // TODO: This should be defined elsewhere? This isn't a true McPATComponent
129,145c133,147
< DFFCell(bool _is_dram, double _WdecNANDn, double _WdecNANDp,double _cell_load,
< const InputParameter *configure_interface);
< InputParameter l_ip;
< bool is_dram;
< double cell_load;
< double WdecNANDn;
< double WdecNANDp;
< double clock_cap;
< int model;
< int n_switch;
< int n_keep_1;
< int n_keep_0;
< int n_clock;
< powerDef e_switch;
< powerDef e_keep_1;
< powerDef e_keep_0;
< powerDef e_clock;
---
> InputParameter l_ip;
> bool is_dram;
> double cell_load;
> double WdecNANDn;
> double WdecNANDp;
> double clock_cap;
> int model;
> int n_switch;
> int n_keep_1;
> int n_keep_0;
> int n_clock;
> powerDef e_switch;
> powerDef e_keep_1;
> powerDef e_keep_0;
> powerDef e_clock;
147,149c149,154
< double fpfp_node_cap(unsigned int fan_in, unsigned int fan_out);
< void compute_DFF_cell(void);
< };
---
> DFFCell(bool _is_dram, double _WdecNANDn, double _WdecNANDp, double _cell_load,
> const InputParameter *configure_interface);
> double fpfp_node_cap(unsigned int fan_in, unsigned int fan_out);
> void compute_DFF_cell(void);
> ~DFFCell() {};
> };
151c156,157
< class Pipeline : public Component{
---
> // TODO: This is a very ambiguous component. Try to refactor it.
> class Pipeline : public McPATComponent {
153,174c159,168
< Pipeline(const InputParameter *configure_interface, const CoreDynParam & dyn_p_, enum Device_ty device_ty_=Core_device, bool _is_core_pipeline=true, bool _is_default=true);
< InputParameter l_ip;
< uca_org_t local_result;
< CoreDynParam coredynp;
< enum Device_ty device_ty;
< bool is_core_pipeline, is_default;
< double num_piperegs;
< // int pipeline_stages;
< // int tot_stage_vector, per_stage_vector;
< bool process_ind;
< double WNANDn ;
< double WNANDp;
< double load_per_pipeline_stage;
< // int Hthread, num_thread, fetchWidth, decodeWidth, issueWidth, commitWidth, instruction_length;
< // int PC_width, opcode_length, num_arch_reg_tag, data_width,num_phsical_reg_tag, address_width;
< // bool thread_clock_gated;
< // bool in_order, multithreaded;
< void compute_stage_vector();
< void compute();
< ~Pipeline(){
< local_result.cleanup();
< };
---
> InputParameter l_ip;
> uca_org_t local_result;
> CoreParameters coredynp;
> enum Device_ty device_ty;
> bool is_core_pipeline, is_default;
> double num_piperegs;
> bool process_ind;
> double WNANDn;
> double WNANDp;
> double load_per_pipeline_stage;
175a170,187
> Pipeline(XMLNode* _xml_data, const InputParameter *configure_interface,
> const CoreParameters & dyn_p_,
> enum Device_ty device_ty_ = Core_device,
> bool _is_core_pipeline = true, bool _is_default = true);
> void compute_stage_vector();
> /**
> * TODO: compute() completes work that should be completed in computeArea()
> * and computeEnergy() recursively. Consider shifting these calculations
> * around to be consistent with rest of hierarchy
> */
> void compute();
> void computeArea() {};
> // TODO: Move energy computation to this function to unify hierarchy
> void computeEnergy() {};
> ~Pipeline() {
> local_result.cleanup();
> };
>
178,189c190
< //class core_pipeline :public pipeline{
< //public:
< // int Hthread, num_thread, fetchWidth, decodeWidth, issueWidth, commitWidth, instruction_length;
< // int PC_width, opcode_length, num_arch_reg_tag, data_width,num_phsical_reg_tag, address_width;
< // bool thread_clock_gated;
< // bool in_order, multithreaded;
< // core_pipeline(bool _is_default, const InputParameter *configure_interface);
< // virtual void compute_stage_vector();
< //
< //};
<
< class FunctionalUnit :public Component{
---
> class FunctionalUnit : public McPATComponent {
191,204c192,202
< ParseXML *XML;
< int ithCore;
< InputParameter interface_ip;
< CoreDynParam coredynp;
< double FU_height;
< double clockRate,executionTime;
< double num_fu;
< double energy, base_energy,per_access_energy, leakage, gate_leakage;
< bool is_default;
< enum FU_type fu_type;
< statsDef tdp_stats;
< statsDef rtp_stats;
< statsDef stats_t;
< powerDef power_t;
---
> InputParameter interface_ip;
> CoreParameters core_params;
> CoreStatistics core_stats;
> double FU_height;
> double num_fu;
> double energy;
> double base_energy;
> double per_access_energy;
> bool is_default;
> enum FU_type fu_type;
> statsDef stats_t;
206,208c204,207
< FunctionalUnit(ParseXML *XML_interface, int ithCore_, InputParameter* interface_ip_,const CoreDynParam & dyn_p_, enum FU_type fu_type);
< void computeEnergy(bool is_tdp=true);
< void displayEnergy(uint32_t indent = 0,int plevel = 100, bool is_tdp=true);
---
> FunctionalUnit(XMLNode* _xml_data, InputParameter* interface_ip_,
> const CoreParameters & _core_params,
> const CoreStatistics & _core_stats, enum FU_type fu_type);
> void computeEnergy();
210c209
<
---
> ~FunctionalUnit() {};
213c212,213
< class UndiffCore :public Component{
---
> // TODO: This is a very ambiguous component. Try to refactor it.
> class UndiffCore : public McPATComponent {
215,225c215,227
< UndiffCore(ParseXML* XML_interface, int ithCore_, InputParameter* interface_ip_, const CoreDynParam & dyn_p_, bool exist_=true, bool embedded_=false);
< ParseXML *XML;
< int ithCore;
< InputParameter interface_ip;
< CoreDynParam coredynp;
< double clockRate,executionTime;
< double scktRatio, chip_PR_overhead, macro_PR_overhead;
< enum Core_type core_ty;
< bool opt_performance, embedded;
< double pipeline_stage,num_hthreads,issue_width;
< bool is_default;
---
> InputParameter interface_ip;
> CoreParameters coredynp;
> double scktRatio;
> double chip_PR_overhead;
> double macro_PR_overhead;
> enum Core_type core_ty;
> bool opt_performance;
> bool embedded;
> double pipeline_stage;
> double num_hthreads;
> double issue_width;
> bool is_default;
> bool exist;
227,231c229,235
< void displayEnergy(uint32_t indent = 0,int plevel = 100, bool is_tdp=true);
< ~UndiffCore(){};
< bool exist;
<
<
---
> UndiffCore(XMLNode* _xml_data, InputParameter* interface_ip_,
> const CoreParameters & dyn_p_,
> bool exist_ = true);
> void computeArea() {};
> // TODO: Move energy computation to this function to unify hierarchy
> void computeEnergy() {};
> ~UndiffCore() {};