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

sst/core/techModels/libsim-panalyzer/libpa_lv1/lv1_io_panalyzer.h

00001 /*
00002 * lv1_io_panalyzer.h - Level 1 I/O power analysis tools for address/data bus.
00003 *
00004 * This file is a part of the PowerAnalyzer tool suite written by
00005 * Nam Sung Kim as a part of the PowerAnalyzer Project.
00006 *  
00007 * The tool suite is currently maintained by Nam Sung Kim.
00008 * 
00009 * Copyright (C) 2001 by Nam Sung Kim
00010 * Revised by Taeho Kgil
00011 *
00012 * This source file is distributed "as is" in the hope that it will be
00013 * useful.  The tool set comes with no warranty, and no author or
00014 * distributor accepts any responsibility for the consequences of its
00015 * use. 
00016 * 
00017 * Everyone is granted permission to copy, modify and redistribute
00018 * this tool set under the following conditions:
00019 * 
00020 *    This source code is distributed for non-commercial use only. 
00021 *    Please contact the maintainer for restrictions applying to 
00022 *    commercial use.
00023 *
00024 *    Permission is granted to anyone to make or distribute copies
00025 *    of this source code, either as received or modified, in any
00026 *    medium, provided that all copyright notices, permission and
00027 *    nonwarranty notices are preserved, and that the distributor
00028 *    grants the recipient permission for further redistribution as
00029 *    permitted by this document.
00030 *
00031 *    Permission is granted to distribute this file in compiled
00032 *    or executable form under the same conditions that apply for
00033 *    source code, provided that either:
00034 *
00035 *    A. it is accompanied by the corresponding machine-readable
00036 *       source code,
00037 *    B. it is accompanied by a written offer, with no time limit,
00038 *       to give anyone a machine-readable copy of the corresponding
00039 *       source code in return for reimbursement of the cost of
00040 *       distribution.  This written offer must permit verbatim
00041 *       duplication by anyone, or
00042 *    C. it is distributed by someone who received only the
00043 *       executable form, and is accompanied by a copy of the
00044 *       written offer of source code that they received concurrently.
00045 *
00046 * In other words, you are welcome to use, share and improve this
00047 * source file.  You are forbidden to forbid anyone else to use, share
00048 * and improve what you give them.
00049 */
00050 
00051 #ifndef IO_PANALYZER_H 
00052 #define IO_PANALYZER_H
00053 
00054 #include "../stats.h"
00055 #include "technology.h"
00056 
00057 /* io power specification type: 
00058  * contain all the info for analyzing io pdissipation */
00059 typedef struct _fu_lv1_io_pspec_t {
00060         char *name;     /* name */
00061         double opfreq, svolt; /* operating frequency/supply voltage */
00062         
00063         double aio_total_power;
00064         double dio_total_power;
00065 
00066 #ifdef PA_TRANS_COUNT
00067         int aio_tran;
00068         int dio_tran;
00069 #endif  
00070         
00071         double max_aio_power;
00072         double max_dio_power;
00073 
00074         double aio_power;
00075         double dio_power;
00076         
00077         int io_access; 
00078 
00079         fu_io_style_t style; /* io style */
00080 
00081         unsigned buswidth; /* io bus width */
00082         unsigned nacycles, nctcycles; /* io access/cycle time in cycles */
00083 
00084     buffer_t *bus; /* bus */
00085         unsigned bsize; /* bus size in bytes */
00086         
00087         fu_lv1_Ceffs_t *Ceffs;  /* effective pdissipation capacitances */
00088         fu_lv1_pdissipation_t *pdissipation; /* pdissipation statistics */      
00089         fu_lv1_pdissipation_t pmwindow[MaxPMWindows]; /* power monitoring window */
00090 } fu_lv1_io_pspec_t;
00091 
00092 /* create io panalyzer database
00093  * return an allocated location pointer.
00094  * caution: please deallocate the memory space  */
00095 fu_lv1_io_pspec_t *
00096 lv1_create_io_panalyzer(
00097         char *name, /* io name */
00098         double opfreq, /* operating frequency */ 
00099         double svolt, /* IO voltage supply */
00100 
00101         /* io specific parameters */
00102         fu_io_style_t style, /* io style */
00103         
00104         unsigned buswidth, /* bus width */
00105         unsigned nacycles, unsigned nctcycles, /* io access/cycle time in cycles */
00106         
00107         unsigned bsize, /* bus size in bytes */
00108         /* internal / exteral  effective capacitances */
00109         double iCeff, double eCeff);
00110 
00111 /* analyze aio pdissipation */
00112 void 
00113 lv1_aio_panalyzer(
00114         fu_lv1_io_pspec_t *pspec, 
00115         fu_mcommand_t mcommand, /* io command: Read/Write */
00116         fu_address_t address, /* io access starting address */
00117         buffer_t *buffer, /* commnication buffer between sim-outorder / panalyzer */
00118         fu_lv1_pwr_frame_t * pwr_frame, /* power frame used to reconstruct memory transaction */
00119         unsigned bsize, /* io transaction size */
00120         tick_t now,     /* current cycle */
00121         unsigned lat /* access latency from sim-outorder */);
00122 
00123 /* analyze data io pdissipation */
00124 void 
00125 lv1_dio_panalyzer(
00126         fu_lv1_io_pspec_t *pspec, 
00127         fu_mcommand_t mcommand, /* io command: Read/Write */
00128         fu_address_t address, /* io access starting address */
00129         buffer_t *buffer, /* commnication buffer between sim-outorder / panalyzer */
00130         fu_lv1_pwr_frame_t * pwr_frame,  /* power frame used to reconstruct memory transaction */ 
00131         unsigned bsize, /* io transaction size */
00132         tick_t now,     /* current cycle */
00133         unsigned lat /* access latency from sim-outorder */);
00134 #endif /* IO_PANALYZER_H */

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