• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

sst/core/techModels/libMcPAT/logic.h

00001 /*****************************************************************************
00002  *                                McPAT
00003  *                      SOFTWARE LICENSE AGREEMENT
00004  *            Copyright 2009 Hewlett-Packard Development Company, L.P.
00005  *                          All Rights Reserved
00006  *
00007  * Permission to use, copy, and modify this software and its documentation is
00008  * hereby granted only under the following terms and conditions.  Both the
00009  * above copyright notice and this permission notice must appear in all copies
00010  * of the software, derivative works or modified versions, and any portions
00011  * thereof, and both notices must appear in supporting documentation.
00012  *
00013  * Any User of the software ("User"), by accessing and using it, agrees to the
00014  * terms and conditions set forth herein, and hereby grants back to Hewlett-
00015  * Packard Development Company, L.P. and its affiliated companies ("HP") a
00016  * non-exclusive, unrestricted, royalty-free right and license to copy,
00017  * modify, distribute copies, create derivate works and publicly display and
00018  * use, any changes, modifications, enhancements or extensions made to the
00019  * software by User, including but not limited to those affording
00020  * compatibility with other hardware or software, but excluding pre-existing
00021  * software applications that may incorporate the software.  User further
00022  * agrees to use its best efforts to inform HP of any such changes,
00023  * modifications, enhancements or extensions.
00024  *
00025  * Correspondence should be provided to HP at:
00026  *
00027  * Director of Intellectual Property Licensing
00028  * Office of Strategy and Technology
00029  * Hewlett-Packard Company
00030  * 1501 Page Mill Road
00031  * Palo Alto, California  94304
00032  *
00033  * The software may be further distributed by User (but not offered for
00034  * sale or transferred for compensation) to third parties, under the
00035  * condition that such third parties agree to abide by the terms and
00036  * conditions of this license.
00037  *
00038  * THE SOFTWARE IS PROVIDED "AS IS" WITH ANY AND ALL ERRORS AND DEFECTS
00039  * AND USER ACKNOWLEDGES THAT THE SOFTWARE MAY CONTAIN ERRORS AND DEFECTS.
00040  * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THE SOFTWARE, INCLUDING ALL
00041  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL
00042  * HP BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
00043  * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
00044  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ACTION, ARISING
00045  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE SOFTWARE.
00046  *
00047  ***************************************************************************/
00048 #ifndef LOGIC_H_
00049 #define LOGIC_H_
00050 
00051 #include "const.h"
00052 #include "cacti_interface.h"
00053 #include "parameter.h"
00054 #include "xmlParser.h"
00055 #include <string.h>
00056 #include "XML_Parse.h"
00057 
00058 using namespace std;
00059 
00060 class selection_logic{
00061 public:
00062         selection_logic();
00063         selection_logic(bool _is_default, const InputParameter *configure_interface, const ParseXML *_XML_interface);
00064         bool is_default;
00065         InputParameter l_ip;
00066         TechnologyParameter l_tp;
00067         final_results local_result;
00068         const ParseXML *XML_interface;
00069         int win_entries;
00070         int issue_width;
00071         int num_threads;
00072         powerDef power;
00073         void init_selection_logic(bool _is_default, const InputParameter *configure_interface);
00074         void selection_power();
00075 
00076 
00077 };
00078 
00079 class dep_resource_conflict_check{
00080 public:
00081         dep_resource_conflict_check();
00082         dep_resource_conflict_check(bool _is_default, const InputParameter *configure_interface,const ParseXML *_XML_interface);
00083         bool is_default;
00084         InputParameter l_ip;
00085         TechnologyParameter l_tp;
00086         final_results local_result;
00087         double WNORn, WNORp, Wevalinvp, Wevalinvn, Wcompn, Wcompp, Wcomppreequ;
00088         const ParseXML *XML_interface;
00089         unsigned int compare_bits;
00090         unsigned int decode_width;
00091         powerDef power;
00092         void init_dep_resource_conflict_check(bool _is_default, const InputParameter *configure_interface);
00093         void conflict_check_power();
00094         double compare_cap();
00095 
00096 };
00097 
00098 class pipeline{
00099 public:
00100         pipeline();
00101         //void init_pipeline(bool _is_default, const InputParameter *configure_interface,const ParseXML *_XML_interface);
00102         void init_pipeline(bool _is_default, const InputParameter *configure_interface);
00103         bool is_default;
00104         InputParameter l_ip;
00105         TechnologyParameter l_tp;
00106         final_results local_result;
00107         ParseXML *XML_interface;
00108         int pipeline_stages;
00109         int tot_stage_vector, per_stage_vector;
00110         bool process_ind;
00111         double WNANDn ;
00112         double WNANDp;
00113         double load_per_pipeline_stage;
00114         powerDef power;
00115         void compute_pipeline();
00116         virtual void compute_stage_vector();
00117         virtual ~pipeline(){};
00118 
00119 };
00120 
00121 class core_pipeline :public pipeline{
00122 public:
00123         int  Hthread,  num_thread, fetchWidth, decodeWidth, issueWidth, commitWidth, instruction_length;
00124         int  PC_width, opcode_length, num_arch_reg_tag, data_width,num_phsical_reg_tag, address_width;
00125         bool thread_clock_gated;
00126         bool in_order, multithreaded;
00127         virtual void compute_stage_vector();
00128 
00129 };
00130 #endif /* LOGIC_H_ */

Generated on Fri Oct 22 2010 11:02:16 for SST by  doxygen 1.7.1