110152Satgutier@umich.edu/*****************************************************************************
210152Satgutier@umich.edu *                                McPAT
310152Satgutier@umich.edu *                      SOFTWARE LICENSE AGREEMENT
410152Satgutier@umich.edu *            Copyright 2012 Hewlett-Packard Development Company, L.P.
510234Syasuko.eckert@amd.com *            Copyright (c) 2010-2013 Advanced Micro Devices, Inc.
610152Satgutier@umich.edu *                          All Rights Reserved
710152Satgutier@umich.edu *
810152Satgutier@umich.edu * Redistribution and use in source and binary forms, with or without
910152Satgutier@umich.edu * modification, are permitted provided that the following conditions are
1010152Satgutier@umich.edu * met: redistributions of source code must retain the above copyright
1110152Satgutier@umich.edu * notice, this list of conditions and the following disclaimer;
1210152Satgutier@umich.edu * redistributions in binary form must reproduce the above copyright
1310152Satgutier@umich.edu * notice, this list of conditions and the following disclaimer in the
1410152Satgutier@umich.edu * documentation and/or other materials provided with the distribution;
1510152Satgutier@umich.edu * neither the name of the copyright holders nor the names of its
1610152Satgutier@umich.edu * contributors may be used to endorse or promote products derived from
1710152Satgutier@umich.edu * this software without specific prior written permission.
1810152Satgutier@umich.edu
1910152Satgutier@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2010152Satgutier@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2110152Satgutier@umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2210152Satgutier@umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2310152Satgutier@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2410152Satgutier@umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2510152Satgutier@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2610152Satgutier@umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2710152Satgutier@umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2810152Satgutier@umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2910234Syasuko.eckert@amd.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3010152Satgutier@umich.edu *
3110152Satgutier@umich.edu ***************************************************************************/
3210152Satgutier@umich.edu
3310152Satgutier@umich.edu#ifndef MEMORYCTRL_H_
3410152Satgutier@umich.edu#define MEMORYCTRL_H_
3510152Satgutier@umich.edu
3610234Syasuko.eckert@amd.com#include "array.h"
3710234Syasuko.eckert@amd.com#include "basic_components.h"
3810234Syasuko.eckert@amd.com#include "cachearray.h"
3910152Satgutier@umich.edu#include "parameter.h"
4010152Satgutier@umich.edu
4110234Syasuko.eckert@amd.comclass MCBackend : public McPATComponent {
4210234Syasuko.eckert@amd.compublic:
4310152Satgutier@umich.edu    InputParameter l_ip;
4410152Satgutier@umich.edu    uca_org_t local_result;
4510234Syasuko.eckert@amd.com    MCParameters mcp;
4610234Syasuko.eckert@amd.com    MCStatistics mcs;
4710152Satgutier@umich.edu    statsDef stats_t;
4810234Syasuko.eckert@amd.com
4910234Syasuko.eckert@amd.com    MCBackend(XMLNode* _xml_data, InputParameter* interface_ip_,
5010234Syasuko.eckert@amd.com              const MCParameters & mcp_, const MCStatistics & mcs_);
5110234Syasuko.eckert@amd.com    void computeArea();
5210234Syasuko.eckert@amd.com    void computeEnergy();
5310234Syasuko.eckert@amd.com    ~MCBackend() {};
5410152Satgutier@umich.edu};
5510152Satgutier@umich.edu
5610234Syasuko.eckert@amd.comclass MCPHY : public McPATComponent {
5710234Syasuko.eckert@amd.compublic:
5810152Satgutier@umich.edu    InputParameter l_ip;
5910152Satgutier@umich.edu    uca_org_t local_result;
6010234Syasuko.eckert@amd.com    MCParameters mcp;
6110234Syasuko.eckert@amd.com    MCStatistics mcs;
6210234Syasuko.eckert@amd.com    statsDef stats_t;
6310234Syasuko.eckert@amd.com
6410234Syasuko.eckert@amd.com    MCPHY(XMLNode* _xml_data, InputParameter* interface_ip_,
6510234Syasuko.eckert@amd.com          const MCParameters & mcp_, const MCStatistics & mcs_);
6610234Syasuko.eckert@amd.com    void computeArea();
6710234Syasuko.eckert@amd.com    void computeEnergy();
6810234Syasuko.eckert@amd.com    ~MCPHY() {};
6910152Satgutier@umich.edu};
7010152Satgutier@umich.edu
7110234Syasuko.eckert@amd.comclass MCFrontEnd : public McPATComponent {
7210234Syasuko.eckert@amd.compublic:
7310234Syasuko.eckert@amd.com    CacheArray* frontendBuffer;
7410234Syasuko.eckert@amd.com    CacheArray* readBuffer;
7510234Syasuko.eckert@amd.com    CacheArray* writeBuffer;
7610234Syasuko.eckert@amd.com    selection_logic* MC_arb;
7710152Satgutier@umich.edu
7810234Syasuko.eckert@amd.com    InputParameter interface_ip;
7910234Syasuko.eckert@amd.com    MCParameters mcp;
8010234Syasuko.eckert@amd.com    MCStatistics mcs;
8110234Syasuko.eckert@amd.com
8210234Syasuko.eckert@amd.com    MCFrontEnd(XMLNode* _xml_data,
8310234Syasuko.eckert@amd.com               InputParameter* interface_ip_, const MCParameters & mcp_,
8410234Syasuko.eckert@amd.com               const MCStatistics & mcs_);
8510152Satgutier@umich.edu    ~MCFrontEnd();
8610152Satgutier@umich.edu};
8710152Satgutier@umich.edu
8810234Syasuko.eckert@amd.comclass MemoryController : public McPATComponent {
8910234Syasuko.eckert@amd.compublic:
9010234Syasuko.eckert@amd.com    InputParameter interface_ip;
9110234Syasuko.eckert@amd.com    MCParameters mcp;
9210234Syasuko.eckert@amd.com    MCStatistics mcs;
9310152Satgutier@umich.edu
9410234Syasuko.eckert@amd.com    MemoryController(XMLNode* _xml_data, InputParameter* interface_ip_);
9510234Syasuko.eckert@amd.com    void initialize_params();
9610152Satgutier@umich.edu    void set_mc_param();
9710152Satgutier@umich.edu    ~MemoryController();
9810152Satgutier@umich.edu};
9910234Syasuko.eckert@amd.com
10010152Satgutier@umich.edu#endif /* MEMORYCTRL_H_ */
101