• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

sst/core/techModels/libORION/SIM_ALU.h

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_POWER_ALU_H
00035 #define _SIM_POWER_ALU_H
00036 
00037 #include "SIM_parameter.h"
00038 
00039 /* PLX ALU transistor size */
00040 #define WaluNOTp        (2 * Lamda)
00041 #define WaluNOTn        (1 * Lamda)
00042 #define Walu2NANDp      (2 * Lamda)
00043 #define Walu2NANDn      (2 * Lamda)
00044 #define Walu3NANDp      (3 * Lamda)
00045 #define Walu3NANDn      (2 * Lamda)
00046 #define Walu4NANDp      (4 * Lamda)
00047 #define Walu4NANDn      (2 * Lamda)
00048 #define Walu2NORp       (4 * Lamda)
00049 #define Walu2NORn       (1 * Lamda)
00050 #define Walu3NORp       (6 * Lamda)
00051 #define Walu3NORn       (1 * Lamda)
00052 #define Walu4NORp       (8 * Lamda)
00053 #define Walu4NORn       (1 * Lamda)
00054 #define WaluXORp        (8 * Lamda)
00055 #define WaluXORn        (2 * Lamda)
00056 #define WaluPASSp       (3 * Lamda)
00057 #define WaluPASSn       (3 * Lamda)
00058 
00059 typedef struct {
00060         int model;
00061         u_int data_width;
00062         LIB_Type_max_uint n_chg_blk[PLX_BLK];
00063         double e_blk[PLX_BLK];
00064         /* state */
00065         LIB_Type_max_uint a_d1;
00066         LIB_Type_max_uint a_d2;
00067         LIB_Type_max_uint l_d1;
00068         LIB_Type_max_uint l_d2;
00069         u_int type;
00070 } SIM_ALU_t;
00071 
00072 extern int SIM_ALU_init(SIM_ALU_t *alu, int model, u_int data_width);
00073 extern int SIM_ALU_record(SIM_ALU_t *alu, LIB_Type_max_uint d1, LIB_Type_max_uint d2, u_int type);
00074 extern double SIM_ALU_report(SIM_ALU_t *alu);
00075 extern double SIM_ALU_stat_energy(SIM_ALU_t *alu, int max);
00076 
00077 #endif  /* _SIM_POWER_ALU_H */

Generated on Fri Oct 22 2010 11:02:18 for SST by  doxygen 1.7.1