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

sst/core/techModels/libMcPATbeta/memoryctrl.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 
00049 #ifndef MEMORYCTRL_H_
00050 #define MEMORYCTRL_H_
00051 
00052 #include "XML_Parse.h"
00053 #include "parameter.h"
00054 //#include "io.h"
00055 #include "array.h"
00056 //#include "Undifferentiated_Core_Area.h"
00057 #include <vector>
00058 #include "basic_components.h"
00059 
00060 class MCBackend : public McPATComponent {
00061   public:
00062     InputParameter l_ip;
00063     uca_org_t local_result;
00064     MCParam  mcp;
00065     statsDef tdp_stats;
00066     statsDef rtp_stats;
00067     statsDef stats_t;
00068     powerDef power_t;
00069     MCBackend(InputParameter* interface_ip_, const MCParam & mcp_);
00070     void compute();
00071         void computeEnergy(bool is_tdp=true);
00072     void displayEnergy(uint32_t indent = 0,int plevel = 100, bool is_tdp=true);
00073     ~MCBackend(){};
00074 
00075      //Added for SST
00076     void SSTcomputeEnergy(bool is_tdp=true, double mc_reads=0, double mc_writes=0);
00077 
00078 };
00079 
00080 class MCPHY : public McPATComponent {
00081   public:
00082     InputParameter l_ip;
00083     uca_org_t local_result;
00084     MCParam  mcp;
00085     statsDef       tdp_stats;
00086     statsDef       rtp_stats;
00087     statsDef       stats_t;
00088     powerDef       power_t;
00089     MCPHY(InputParameter* interface_ip_, const MCParam & mcp_);
00090     void compute();
00091         void computeEnergy(bool is_tdp=true);
00092     void displayEnergy(uint32_t indent = 0,int plevel = 100, bool is_tdp=true);
00093     ~MCPHY(){};
00094 
00095     //Added for SST
00096     void SSTcomputeEnergy(bool is_tdp=true, double mc_reads=0, double mc_writes=0);
00097 
00098 };
00099 
00100 class MCFrontEnd : public McPATComponent {
00101   public:
00102         ParseXML *XML;
00103         InputParameter interface_ip;
00104         MCParam  mcp;
00105         selection_logic * MC_arb;
00106         ArrayST  * frontendBuffer;
00107         ArrayST  * readBuffer;
00108         ArrayST  * writeBuffer;
00109 
00110     MCFrontEnd(ParseXML *XML_interface,InputParameter* interface_ip_, const MCParam & mcp_);
00111     void computeEnergy(bool is_tdp=true);
00112     void displayEnergy(uint32_t indent = 0,int plevel = 100, bool is_tdp=true);
00113     ~MCFrontEnd();
00114 
00115     //Added for SST
00116     void SSTcomputeEnergy(bool is_tdp=true, double mc_reads=0, double mc_writes=0);
00117 
00118 };
00119 
00120 class MemoryController : public McPATComponent {
00121   public:
00122         ParseXML *XML;
00123         InputParameter interface_ip;
00124     MCParam  mcp;
00125         MCFrontEnd * frontend;
00126     MCBackend * transecEngine;
00127     MCPHY        * PHY;
00128     Pipeline * pipeLogic;
00129 
00130     //clock_network clockNetwork;
00131     MemoryController(ParseXML *XML_interface,InputParameter* interface_ip_);
00132     void set_mc_param();
00133     void computeEnergy(bool is_tdp=true);
00134     void displayEnergy(uint32_t indent = 0,int plevel = 100, bool is_tdp=true);
00135     ~MemoryController();
00136 
00137     //Added for SST
00138     void SSTcomputeEnergy(bool is_tdp=true, double mc_reads=0, double mc_writes=0);
00139 
00140 };
00141 #endif /* MEMORYCTRL_H_ */

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