noc.h revision 10152
110152Satgutier@umich.edu/***************************************************************************** 210152Satgutier@umich.edu * McPAT 310152Satgutier@umich.edu * SOFTWARE LICENSE AGREEMENT 410152Satgutier@umich.edu * Copyright 2012 Hewlett-Packard Development Company, L.P. 510152Satgutier@umich.edu * All Rights Reserved 610152Satgutier@umich.edu * 710152Satgutier@umich.edu * Redistribution and use in source and binary forms, with or without 810152Satgutier@umich.edu * modification, are permitted provided that the following conditions are 910152Satgutier@umich.edu * met: redistributions of source code must retain the above copyright 1010152Satgutier@umich.edu * notice, this list of conditions and the following disclaimer; 1110152Satgutier@umich.edu * redistributions in binary form must reproduce the above copyright 1210152Satgutier@umich.edu * notice, this list of conditions and the following disclaimer in the 1310152Satgutier@umich.edu * documentation and/or other materials provided with the distribution; 1410152Satgutier@umich.edu * neither the name of the copyright holders nor the names of its 1510152Satgutier@umich.edu * contributors may be used to endorse or promote products derived from 1610152Satgutier@umich.edu * this software without specific prior written permission. 1710152Satgutier@umich.edu 1810152Satgutier@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1910152Satgutier@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2010152Satgutier@umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2110152Satgutier@umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2210152Satgutier@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2310152Satgutier@umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2410152Satgutier@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2510152Satgutier@umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2610152Satgutier@umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2710152Satgutier@umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2810152Satgutier@umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.” 2910152Satgutier@umich.edu * 3010152Satgutier@umich.edu ***************************************************************************/ 3110152Satgutier@umich.edu 3210152Satgutier@umich.edu#ifndef NOC_H_ 3310152Satgutier@umich.edu#define NOC_H_ 3410152Satgutier@umich.edu#include "XML_Parse.h" 3510152Satgutier@umich.edu#include "array.h" 3610152Satgutier@umich.edu#include "basic_components.h" 3710152Satgutier@umich.edu#include "interconnect.h" 3810152Satgutier@umich.edu#include "logic.h" 3910152Satgutier@umich.edu#include "parameter.h" 4010152Satgutier@umich.edu#include "router.h" 4110152Satgutier@umich.edu 4210152Satgutier@umich.educlass NoC :public Component { 4310152Satgutier@umich.edu public: 4410152Satgutier@umich.edu 4510152Satgutier@umich.edu ParseXML *XML; 4610152Satgutier@umich.edu int ithNoC; 4710152Satgutier@umich.edu InputParameter interface_ip; 4810152Satgutier@umich.edu double link_len; 4910152Satgutier@umich.edu double executionTime; 5010152Satgutier@umich.edu double scktRatio, chip_PR_overhead, macro_PR_overhead; 5110152Satgutier@umich.edu Router * router; 5210152Satgutier@umich.edu interconnect * link_bus; 5310152Satgutier@umich.edu NoCParam nocdynp; 5410152Satgutier@umich.edu uca_org_t local_result; 5510152Satgutier@umich.edu statsDef tdp_stats; 5610152Satgutier@umich.edu statsDef rtp_stats; 5710152Satgutier@umich.edu statsDef stats_t; 5810152Satgutier@umich.edu powerDef power_t; 5910152Satgutier@umich.edu Component link_bus_tot_per_Router; 6010152Satgutier@umich.edu bool link_bus_exist; 6110152Satgutier@umich.edu bool router_exist; 6210152Satgutier@umich.edu string name, link_name; 6310152Satgutier@umich.edu double M_traffic_pattern; 6410152Satgutier@umich.edu NoC(ParseXML *XML_interface, int ithNoC_, InputParameter* interface_ip_, double M_traffic_pattern_ = 0.6,double link_len_=0); 6510152Satgutier@umich.edu void set_noc_param(); 6610152Satgutier@umich.edu void computeEnergy(bool is_tdp=true); 6710152Satgutier@umich.edu void displayEnergy(uint32_t indent = 0,int plevel = 100, bool is_tdp=true); 6810152Satgutier@umich.edu void init_link_bus(double link_len_); 6910152Satgutier@umich.edu void init_router(); 7010152Satgutier@umich.edu void computeEnergy_link_bus(bool is_tdp=true); 7110152Satgutier@umich.edu void displayEnergy_link_bus(uint32_t indent = 0,int plevel = 100, bool is_tdp=true); 7210152Satgutier@umich.edu ~NoC(); 7310152Satgutier@umich.edu}; 7410152Satgutier@umich.edu 7510152Satgutier@umich.edu#endif /* NOC_H_ */ 76