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 "area.h" 00054 #include "decoder.h" 00055 #include "parameter.h" 00056 //#include "io.h" 00057 #include "array.h" 00058 #include "wires.h" 00059 #include "arbiter.h" 00060 //#include "Undifferentiated_Core_Area.h" 00061 #include <vector> 00062 #include "basic_components.h" 00063 00064 class MCBackend { 00065 public: 00066 int peakDataTransferRate,memAccesses, llcBlocksize; //e.g 800M for DDR2-800M 00067 int memDataWidth, memRank; 00068 double area; 00069 powerDef power,routinePower; 00070 InputParameter l_ip; 00071 final_results local_result; 00072 void initialize(const InputParameter *configure_interface); 00073 void compute(); 00074 }; 00075 00076 class MCPHY{ 00077 public: 00078 int peakDataTransferRate,memAccesses, llcBlocksize; //e.g 800M for DDR2-800M 00079 int memDataWidth; 00080 double area; 00081 powerDef power; 00082 InputParameter l_ip; 00083 final_results local_result; 00084 void initialize(const InputParameter *configure_interface); 00085 void compute(); 00086 }; 00087 00088 class MemoryController { 00089 public: 00090 ParseXML *XML; 00091 InputParameter interface_ip; 00092 selection_logic MC_arb; 00093 cache_processor frontendBuffer,readBuffer, writeBuffer; 00094 // double mcTEPowerperGhz; 00095 // double mcPHYperGbit; 00096 // double area; 00097 int llcBlockSize, dataBusWidth, addressBusWidth; 00098 pipeline pipeLogic; 00099 MCclock_network clockNetwork; 00100 MCBackend transecEngine; 00101 MCPHY PHY; 00102 double clockRate; 00103 double area, maxDynamicPower, runtimeDynamicPower, totalLeakage, totalPower,scktRatio, executionTime; 00104 double transecEngine_maxDynamicPower,PHY_dynamicPower, transecEngine_runtimeDynamicPower,PHY_runtimeDynamicPower; 00105 AreaPower frontEnd, backEnd, phy; 00106 void initialize(ParseXML *XML_interface,InputParameter* interface_ip_); 00107 void computeMaxPower(); 00108 void computeRuntimePower(); 00109 00110 /*Added for SST*/ 00111 cache_processor SSTreturnMCFRONTBUF(void){ return frontendBuffer; }; 00112 cache_processor SSTreturnMCREADBUF(void){ return readBuffer; }; 00113 cache_processor SSTreturnMCWRITEBUF(void){ return writeBuffer; }; 00114 selection_logic SSTreturnMCARB(void){ return MC_arb; }; 00115 MCBackend SSTreturnMCBACKEND(void){ return transecEngine; }; 00116 MCPHY SSTreturnMCPHY(void){ return PHY; }; 00117 pipeline SSTreturnMCPIPE(void){ return pipeLogic; }; 00118 MCclock_network SSTreturnMCCLOCKNETWORK(void){ return clockNetwork; }; 00119 00120 00121 }; 00122 #endif /* MEMORYCTRL_H_ */