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

sst/core/techModels/libORION/SIM_reg.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_REG_POWER_H
00035 #define _SIM_REG_POWER_H
00036 
00037 #include "SIM_parameter.h"
00038 
00039 #if ( PARM( POWER_STATS ))
00040 
00041 #include "SIM_array.h"
00042 
00043 #define P_DATA_T        int
00044 
00045 
00046 /*@
00047  * data type: register file port state
00048  * 
00049  *    row_addr       -- row address
00050  *    col_addr       -- column address
00051  *    tag_addr       -- unused placeholder
00052  *    tag_line       -- unused placeholder
00053  *    data_line_size -- register size in char
00054  *    data_line      -- value of data bitline
00055  *
00056  * NOTE:
00057  *   (1) data_line is only used by write port
00058  */
00059 typedef struct {
00060         LIB_Type_max_uint row_addr;
00061         LIB_Type_max_uint col_addr;
00062         LIB_Type_max_uint tag_addr;
00063         LIB_Type_max_uint tag_line;
00064         u_int data_line_size;
00065         P_DATA_T data_line;
00066 } SIM_reg_port_state_t;
00067 
00068 
00069 /* global variables */
00070 extern GLOBDEF( SIM_array_t, reg_power );
00071 extern GLOBDEF( SIM_array_info_t, reg_info );
00072 extern GLOBDEF( SIM_reg_port_state_t, reg_read_port )[PARM(read_port)];
00073 extern GLOBDEF( SIM_reg_port_state_t, reg_write_port )[PARM(write_port)];
00074 
00075 
00076 /* function prototypes */
00077 extern int FUNC(SIM_reg_power_init, SIM_array_info_t *info, SIM_array_t *arr, SIM_reg_port_state_t *read_port, SIM_reg_port_state_t *write_port);
00078 extern int FUNC(SIM_reg_power_report, SIM_array_info_t *info, SIM_array_t *arr);
00079 extern int FUNC(SIM_reg_avg_power, SIM_array_info_t *info, SIM_array_t *arr, int rw);
00080 /* wrapper functions */
00081 extern int FUNC( SIM_reg_power_dec, SIM_array_info_t *info, SIM_array_t *arr, u_int port, LIB_Type_max_uint row_addr, int rw );
00082 extern int FUNC( SIM_reg_power_data_read, SIM_array_info_t *info, SIM_array_t *arr, P_DATA_T data );
00083 extern int FUNC( SIM_reg_power_data_write, SIM_array_info_t *info, SIM_array_t *arr, u_int port, LIB_Type_max_uint old_data, LIB_Type_max_uint new_data );
00084 extern int FUNC( SIM_reg_power_output, SIM_array_info_t *info, SIM_array_t *arr, P_DATA_T data );
00085 
00086 #endif  /* PARM( POWER_STATS ) */
00087 
00088 #endif  /* _SIM_REG_POWER_H */

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