00001 /*------------------------------------------------------------------------- 00002 * ORION 2.0 00003 * 00004 * Copyright 2009 00005 * Princeton University, and Regents of the University of California 00006 * All Rights Reserved 00007 * 00008 * 00009 * ORION 2.0 was developed by Bin Li at Princeton University and Kambiz Samadi at 00010 * University of California, San Diego. ORION 2.0 was built on top of ORION 1.0. 00011 * ORION 1.0 was developed by Hangsheng Wang, Xinping Zhu and Xuning Chen at 00012 * Princeton University. 00013 * 00014 * If your use of this software contributes to a published paper, we 00015 * request that you cite our paper that appears on our website 00016 * http://www.princeton.edu/~peh/orion.html 00017 * 00018 * Permission to use, copy, and modify this software and its documentation is 00019 * granted only under the following terms and conditions. Both the 00020 * above copyright notice and this permission notice must appear in all copies 00021 * of the software, derivative works or modified versions, and any portions 00022 * thereof, and both notices must appear in supporting documentation. 00023 * 00024 * This software may be distributed (but not offered for sale or transferred 00025 * for compensation) to third parties, provided such third parties agree to 00026 * abide by the terms and conditions of this notice. 00027 * 00028 * This software is distributed in the hope that it will be useful to the 00029 * community, but WITHOUT ANY WARRANTY; without even the implied warranty of 00030 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00031 * 00032 *-----------------------------------------------------------------------*/ 00033 00034 #ifndef _SIM_CROSSBAR_H 00035 #define _SIM_CROSSBAR_H 00036 00037 #include "SIM_parameter.h" 00038 00039 typedef struct { 00040 int model; 00041 u_int n_in; 00042 u_int n_out; 00043 u_int in_seg; /* only used by segmented crossbar */ 00044 u_int out_seg; /* only used by segmented crossbar */ 00045 u_int data_width; 00046 u_int degree; /* only used by multree crossbar */ 00047 int connect_type; 00048 int trans_type; /* only used by transmission gate connection */ 00049 LIB_Type_max_uint n_chg_in; 00050 LIB_Type_max_uint n_chg_int; 00051 LIB_Type_max_uint n_chg_out; 00052 LIB_Type_max_uint n_chg_ctr; 00053 double e_chg_in; 00054 double e_chg_int; 00055 double e_chg_out; 00056 double e_chg_ctr; 00057 /* redundant field */ 00058 u_int depth; /* only used by multree crossbar */ 00059 LIB_Type_max_uint mask; 00060 double I_static; 00061 } SIM_crossbar_t; 00062 00063 00064 int SIM_crossbar_init(SIM_crossbar_t *crsbar, int model, u_int n_in, u_int n_out, u_int in_seg, u_int out_seg, u_int data_width, u_int degree, int connect_type, int trans_type, double in_len, double out_len, double *req_len); 00065 00066 int SIM_crossbar_record(SIM_crossbar_t *xb, int io, LIB_Type_max_uint new_data, LIB_Type_max_uint old_data, u_int new_port, u_int old_port); 00067 00068 double SIM_crossbar_report(SIM_crossbar_t *crsbar); 00069 00070 double SIM_crossbar_stat_energy(SIM_crossbar_t *crsbar, int print_depth, char *path, int max_avg, double n_data); 00071 00072 #endif /* _SIM_CROSSBAR_H */ 00073