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

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

00001 /*
00002 * cache_panalyzer.h - cache structure power analysis tools for 
00003 * il1, il2, dl1, dl2, itlb, dtlb.
00004 *
00005 * This file is a part of the PowerAnalyzer tool suite written by
00006 * Nam Sung Kim as a part of the PowerAnalyzer Project.
00007 *  
00008 * The tool suite is currently maintained by Nam Sung Kim.
00009 * 
00010 * Copyright (C) 2001 by Nam Sung Kim
00011 *
00012 * Revised by Taeho Kgil
00013 *
00014 * This source file is distributed "as is" in the hope that it will be
00015 * useful.  The tool set comes with no warranty, and no author or
00016 * distributor accepts any responsibility for the consequences of its
00017 * use. 
00018 * 
00019 * Everyone is granted permission to copy, modify and redistribute
00020 * this tool set under the following conditions:
00021 * 
00022 *    This source code is distributed for non-commercial use only. 
00023 *    Please contact the maintainer for restrictions applying to 
00024 *    commercial use.
00025 *
00026 *    Permission is granted to anyone to make or distribute copies
00027 *    of this source code, either as received or modified, in any
00028 *    medium, provided that all copyright notices, permission and
00029 *    nonwarranty notices are preserved, and that the distributor
00030 *    grants the recipient permission for further redistribution as
00031 *    permitted by this document.
00032 *
00033 *    Permission is granted to distribute this file in compiled
00034 *    or executable form under the same conditions that apply for
00035 *    source code, provided that either:
00036 *
00037 *    A. it is accompanied by the corresponding machine-readable
00038 *       source code,
00039 *    B. it is accompanied by a written offer, with no time limit,
00040 *       to give anyone a machine-readable copy of the corresponding
00041 *       source code in return for reimbursement of the cost of
00042 *       distribution.  This written offer must permit verbatim
00043 *       duplication by anyone, or
00044 *    C. it is distributed by someone who received only the
00045 *       executable form, and is accompanied by a copy of the
00046 *       written offer of source code that they received concurrently.
00047 *
00048 * In other words, you are welcome to use, share and improve this
00049 * source file.  You are forbidden to forbid anyone else to use, share
00050 * and improve what you give them.
00051 */
00052 
00053 #ifndef CACHE_PANALYZER_H 
00054 #define CACHE_PANALYZER_H
00055 
00056 #include "../cache.h"
00057 #include "../stats.h"
00058 //#include "lv1_panalyzer.h"
00059 /* #include "lv1_memory_panalyzer.h" */
00060 
00061 /* number of virtual address */
00062 #define NVA     40
00063 /* number of physicalo address */
00064 #define NPA 32
00065 
00066 /* cache power specification type:
00067  * contain all the info for analyzing cache pdissipation */
00068 typedef struct _fu_lv1_cache_pspec_t {
00069         char *name; /* name */
00070         double freq, volt; /* operating frequency/supply voltage */
00071         double iCeff,eCeff;
00072         unsigned long cache_access;
00073         double cache_total_power;
00074         double cache_power;
00075         double max_power;
00076 } fu_lv1_cache_pspec_t;
00077 
00078 /* create level 1 power model cache panalyzer database
00079  * return an allocated location pointer.
00080  * caution: please deallocate the cache space  */
00081 fu_lv1_cache_pspec_t *
00082 create_cache_panalyzer(
00083         char *name, /* cache name */
00084         int freq,double volt,
00085         double iCeff,double eCeff);
00086 
00087 /* level 1 power model cache panalyzer */
00088 void 
00089 lv1_cache_panalyzer(
00090         fu_lv1_cache_pspec_t *pspec, 
00091         fu_mcommand_t mcommand  /* cache command: Read/Write */
00092         );
00093 #endif /* CACHE_PANALYZER_H */

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