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

sst/core/techModels/libsim-panalyzer/libpanalyzer/io_panalyzer.h

00001 /*
00002 * io_panalyzer.h - 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 *
00011 * This source file is distributed "as is" in the hope that it will be
00012 * useful.  The tool set comes with no warranty, and no author or
00013 * distributor accepts any responsibility for the consequences of its
00014 * use. 
00015 * 
00016 * Everyone is granted permission to copy, modify and redistribute
00017 * this tool set under the following conditions:
00018 * 
00019 *    This source code is distributed for non-commercial use only. 
00020 *    Please contact the maintainer for restrictions applying to 
00021 *    commercial use.
00022 *
00023 *    Permission is granted to anyone to make or distribute copies
00024 *    of this source code, either as received or modified, in any
00025 *    medium, provided that all copyright notices, permission and
00026 *    nonwarranty notices are preserved, and that the distributor
00027 *    grants the recipient permission for further redistribution as
00028 *    permitted by this document.
00029 *
00030 *    Permission is granted to distribute this file in compiled
00031 *    or executable form under the same conditions that apply for
00032 *    source code, provided that either:
00033 *
00034 *    A. it is accompanied by the corresponding machine-readable
00035 *       source code,
00036 *    B. it is accompanied by a written offer, with no time limit,
00037 *       to give anyone a machine-readable copy of the corresponding
00038 *       source code in return for reimbursement of the cost of
00039 *       distribution.  This written offer must permit verbatim
00040 *       duplication by anyone, or
00041 *    C. it is distributed by someone who received only the
00042 *       executable form, and is accompanied by a copy of the
00043 *       written offer of source code that they received concurrently.
00044 *
00045 * In other words, you are welcome to use, share and improve this
00046 * source file.  You are forbidden to forbid anyone else to use, share
00047 * and improve what you give them.
00048 */
00049 
00050 #ifndef IO_PANALYZER_H 
00051 #define IO_PANALYZER_H
00052 
00053 #include "stats.h"
00054 #include "technology.h"
00055 #include "panalyzer.h"
00056 
00057 /* io style */
00058 typedef enum _fu_io_style_t {
00059         idirBuffer, /* in direction */
00060         odirBuffer, /* out direction */
00061         bidirBuffer /* in/out direction */
00062 } fu_io_style_t;
00063 
00064 /* io power specification type: 
00065  * contain all the info for analyzing io pdissipation */
00066 typedef struct _fu_io_pspec_t {
00067         char *name;     /* name */
00068         fu_pmodel_mode_t pmodel; /* power model mode */
00069         double opfreq, svolt; /* operating frequency/supply voltage */
00070 
00071         fu_io_style_t style; /* io style */
00072         unsigned nbstages_opt; /* optimial number of io buffer stages */
00073         unsigned buswidth; /* io bus width */
00074         unsigned nacycles, nctcycles; /* io access/cycle time in cycles */
00075 
00076     buffer_t *bus; /* bus */
00077         unsigned bsize; /* bus size in bytes */
00078 
00079         fu_Ceffs_t *Ceffs;      /* effective pdissipation capacitances */
00080         fu_pdissipation_t *pdissipation; /* pdissipation statistics */  
00081         fu_pdissipation_t pmwindow[MaxPMWindows]; /* power monitoring window */
00082 } fu_io_pspec_t;
00083 
00084 /* create io panalyzer database
00085  * return an allocated location pointer.
00086  * caution: please deallocate the memory space  */
00087 fu_io_pspec_t *
00088 create_io_panalyzer(
00089         char *name, /* io name */
00090         fu_pmodel_mode_t pmodel, /* io power model mode */
00091         double opfreq, /* operating frequency */ 
00092         double iovolt,
00093         /* io specific parameters */
00094         fu_io_style_t style, /* io style */
00095         unsigned nbstages_opt, /* optimial number of io buffer stages */
00096         double strip_length, /* length of microstrip */
00097         unsigned buswidth, /* bus width */
00098         unsigned nacycles, unsigned nctcycles, /* io access/cycle time in cycles */
00099         
00100         unsigned bsize, /* bus size in bytes */
00101         /* switching/internal/lekage  effective capacitances */
00102         double sCeff, double iCeff, double lCeff);
00103 
00104 /* analyze aio pdissipation */
00105 void 
00106 aio_panalyzer(
00107         fu_io_pspec_t *pspec, 
00108         fu_mcommand_t mcommand, /* io command: Read/Write */
00109         fu_address_t address, /* io access starting address */
00110         buffer_t *buffer, /* commnication buffer between sim-outorder / panalyzer */
00111         unsigned bsize, /* io transaction size */
00112         tick_t now,     /* current cycle */
00113         unsigned lat /* access latency from sim-outorder */);
00114 
00115 /* analyze data io pdissipation */
00116 void 
00117 dio_panalyzer(
00118         fu_io_pspec_t *pspec, 
00119         fu_mcommand_t mcommand, /* io command: Read/Write */
00120         fu_address_t address, /* io access starting address */
00121         buffer_t *buffer, /* commnication buffer between sim-outorder / panalyzer */
00122         unsigned bsize, /* io transaction size */
00123         tick_t now,     /* current cycle */
00124         unsigned lat /* access latency from sim-outorder */);
00125 #endif /* IO_PANALYZER_H */

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