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

sst/core/techModels/libORION/SIM_arbiter.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_ARBITER_H
00035 #define _SIM_ARBITER_H
00036 
00037 #include "SIM_parameter.h"
00038 #include "SIM_array.h"
00039 #include "SIM_misc.h"
00040 
00041 /* carry_in is the internal carry transition node */
00042 typedef struct {
00043         int model;
00044         u_int req_width;
00045         LIB_Type_max_uint n_chg_req;
00046         LIB_Type_max_uint n_chg_grant;
00047         /* internal node of round robin arbiter */
00048         LIB_Type_max_uint n_chg_carry;
00049         LIB_Type_max_uint n_chg_carry_in;
00050         /* internal node of matrix arbiter */
00051         LIB_Type_max_uint n_chg_mint;
00052         double e_chg_req;
00053         double e_chg_grant;
00054         double e_chg_carry;
00055         double e_chg_carry_in;
00056         double e_chg_mint;
00057         /* priority flip flop */
00058         SIM_ff_t pri_ff;
00059         /* request queue */
00060         SIM_array_t queue;
00061         /* redundant field */
00062         LIB_Type_max_uint mask;
00063         double I_static;
00064 } SIM_arbiter_t;
00065 
00066 int SIM_arbiter_init(SIM_arbiter_t *arb, int arbiter_model, int ff_model, u_int req_width, double length, SIM_array_info_t *info);
00067 
00068 int SIM_arbiter_record(SIM_arbiter_t *arb, LIB_Type_max_uint new_req, LIB_Type_max_uint old_req, u_int new_grant, u_int old_grant);
00069 
00070 double SIM_arbiter_report(SIM_arbiter_t *arb);
00071     
00072 double SIM_arbiter_stat_energy(SIM_arbiter_t *arb, SIM_array_info_t *info, double n_req, int print_depth, char *path, int max_avg);
00073 
00074 #endif /* _SIM_ARBITER_H */
00075 

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