noc.h revision 10234
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 NOC_H_ 3410152Satgutier@umich.edu#define NOC_H_ 3510234Syasuko.eckert@amd.com 3610152Satgutier@umich.edu#include "array.h" 3710152Satgutier@umich.edu#include "basic_components.h" 3810152Satgutier@umich.edu#include "interconnect.h" 3910152Satgutier@umich.edu#include "logic.h" 4010152Satgutier@umich.edu#include "parameter.h" 4110152Satgutier@umich.edu#include "router.h" 4210152Satgutier@umich.edu 4310234Syasuko.eckert@amd.comclass OnChipNetworkParameters { 4410234Syasuko.eckert@amd.compublic: 4510234Syasuko.eckert@amd.com double clockRate; 4610234Syasuko.eckert@amd.com int flit_size; 4710234Syasuko.eckert@amd.com int input_ports; 4810234Syasuko.eckert@amd.com int output_ports; 4910234Syasuko.eckert@amd.com int min_ports; 5010234Syasuko.eckert@amd.com int global_linked_ports; 5110234Syasuko.eckert@amd.com int virtual_channel_per_port; 5210234Syasuko.eckert@amd.com int input_buffer_entries_per_vc; 5310234Syasuko.eckert@amd.com int horizontal_nodes; 5410234Syasuko.eckert@amd.com int vertical_nodes; 5510234Syasuko.eckert@amd.com int total_nodes; 5610234Syasuko.eckert@amd.com double link_throughput; 5710234Syasuko.eckert@amd.com double link_latency; 5810234Syasuko.eckert@amd.com double chip_coverage; 5910234Syasuko.eckert@amd.com double route_over_perc; 6010234Syasuko.eckert@amd.com bool has_global_link; 6110234Syasuko.eckert@amd.com bool type; 6210234Syasuko.eckert@amd.com double M_traffic_pattern; 6310234Syasuko.eckert@amd.com double link_base_width; 6410234Syasuko.eckert@amd.com double link_base_height; 6510234Syasuko.eckert@amd.com int link_start_wiring_level; 6610234Syasuko.eckert@amd.com}; 6710152Satgutier@umich.edu 6810234Syasuko.eckert@amd.comclass OnChipNetworkStatistics { 6910234Syasuko.eckert@amd.compublic: 7010234Syasuko.eckert@amd.com double duty_cycle; 7110234Syasuko.eckert@amd.com double total_access; 7210234Syasuko.eckert@amd.com}; 7310234Syasuko.eckert@amd.com 7410234Syasuko.eckert@amd.comclass OnChipNetwork : public McPATComponent { 7510234Syasuko.eckert@amd.compublic: 7610234Syasuko.eckert@amd.com Router* router; 7710234Syasuko.eckert@amd.com Interconnect* link_bus; 7810234Syasuko.eckert@amd.com Component link_bus_tot_per_Router; 7910234Syasuko.eckert@amd.com 8010234Syasuko.eckert@amd.com int ithNoC; 8110234Syasuko.eckert@amd.com InputParameter interface_ip; 8210234Syasuko.eckert@amd.com double link_len; 8310234Syasuko.eckert@amd.com double scktRatio, chip_PR_overhead, macro_PR_overhead; 8410234Syasuko.eckert@amd.com OnChipNetworkParameters noc_params; 8510234Syasuko.eckert@amd.com OnChipNetworkStatistics noc_stats; 8610234Syasuko.eckert@amd.com uca_org_t local_result; 8710234Syasuko.eckert@amd.com statsDef stats_t; 8810234Syasuko.eckert@amd.com bool link_bus_exist; 8910234Syasuko.eckert@amd.com bool router_exist; 9010234Syasuko.eckert@amd.com string link_name; 9110234Syasuko.eckert@amd.com 9210234Syasuko.eckert@amd.com OnChipNetwork(XMLNode* _xml_data, int ithNoC_, 9310234Syasuko.eckert@amd.com InputParameter* interface_ip_); 9410234Syasuko.eckert@amd.com void set_param_stats(); 9510234Syasuko.eckert@amd.com void computeEnergy(); 9610234Syasuko.eckert@amd.com void init_link_bus(); 9710234Syasuko.eckert@amd.com void init_router(); 9810234Syasuko.eckert@amd.com ~OnChipNetwork(); 9910152Satgutier@umich.edu}; 10010152Satgutier@umich.edu 10110152Satgutier@umich.edu#endif /* NOC_H_ */ 102