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_UTIL_H 00035 #define _SIM_UTIL_H 00036 00037 extern u_int SIM_Hamming(LIB_Type_max_uint old_val, LIB_Type_max_uint new_val, LIB_Type_max_uint mask); 00038 extern u_int SIM_Hamming_group(LIB_Type_max_uint d1_new, LIB_Type_max_uint d1_old, LIB_Type_max_uint d2_new, LIB_Type_max_uint d2_old, u_int width, u_int n_grp); 00039 00040 /* statistical functions */ 00041 extern int SIM_print_stat_energy(char *path, double Energy, int print_flag); 00042 extern u_int SIM_strlen(char *s); 00043 extern char *SIM_strcat(char *dest, const char *src); 00044 extern int SIM_res_path(char *path, u_int id); 00045 extern int SIM_dump_tech_para(void); 00046 00047 extern u_int SIM_logtwo(LIB_Type_max_uint x); 00048 00049 extern int SIM_squarify(int rows, int cols); 00050 extern double SIM_driver_size(double driving_cap, double desiredrisetime); 00051 00052 #endif /* _SIM_UTIL_H */ 00053