gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FaultModel.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011 Massachusetts Institute of Technology
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met: redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  *
28  * Authors: Konstantinos Aisopos
29  */
30 
31 /*
32  * Official Tool Website: www.mit.edu/~kaisopos/FaultModel
33  *
34  * If you use our tool for academic research, we request that you cite:
35  * Konstantinos Aisopos, Chia-Hsin Owen Chen, and Li-Shiuan Peh. Enabling
36  * System-Level Modeling of Variation-Induced Faults in Networks-on-Chip.
37  * Proceedings of the 48th Design Automation Conference (DAC'11)
38  */
39 
40 #ifndef __MEM_RUBY_NETWORK_FAULT_MODEL_HH__
41 #define __MEM_RUBY_NETWORK_FAULT_MODEL_HH__
42 
43 // tool limitations and fixed inputs
44 #define MAX_VCs 40
45 #define MAX_BUFFERS_per_VC 5
46 #define BASELINE_TEMPERATURE_CELCIUS 71
47 
48 // C++ includes
49 #include <string>
50 
51 // GEM5 includes
52 #include "params/FaultModel.hh"
53 #include "sim/sim_object.hh"
54 
55 class FaultModel : public SimObject
56 {
57  public:
58  typedef FaultModelParams Params;
59  FaultModel(const Params *p);
60  const Params *params() const { return (const Params *)_params; }
61 
62  /************************************************************************/
63  /********** THE FAULT TYPES SUPPORTED BY THE FAULT MODEL ***************/
64  /************************************************************************/
65 
67  {
79  };
80 
81  /************************************************************************/
82  /******************** INTERFACE OF THE FAULT MODEL *********************/
83  /************************************************************************/
84 
86  {
92  };
93 
95  {
99  };
100 
101  struct system_conf
102  {
103  int vcs;
106  };
107 
108  int declare_router(int number_of_inputs,
109  int number_of_outputs,
110  int number_of_vcs_per_vnet,
111  int number_of_buff_per_data_vc,
112  int number_of_buff_per_ctrl_vc);
113 
114  std::string fault_type_to_string(int fault_type_index);
115 
116  // the following 2 functions are called at runtime, to get the probability
117  // of each fault type (fault_vector) or the aggregate fault probability
118  // (fault_prob). Note: the probability values are provided by reference
119  // (in the variables fault_vector[] & aggregate_fault_prob respectively).
120  // Both functions also return a success flag (which is always true if
121  // temperature ranges from 0C to 125C)
122 
123  bool fault_vector(int routerID,
124  int temperature,
125  float fault_vector[]);
126 
127  bool fault_prob(int routerID,
128  int temperature,
129  float *aggregate_fault_prob);
130 
131  // for debugging purposes
132 
133  void print(void);
134 
135  private:
139 };
140 
141 #endif // __MEM_RUBY_NETWORK_FAULT_MODEL_HH__
int declare_router(int number_of_inputs, int number_of_outputs, int number_of_vcs_per_vnet, int number_of_buff_per_data_vc, int number_of_buff_per_ctrl_vc)
Definition: FaultModel.cc:135
temperature_record_format
Definition: FaultModel.hh:94
void print(void)
Definition: FaultModel.cc:250
STL vector class.
Definition: stl.hh:40
std::string fault_type_to_string(int fault_type_index)
Definition: FaultModel.cc:104
FaultModel(const Params *p)
Definition: FaultModel.cc:55
bool fault_prob(int routerID, int temperature, float *aggregate_fault_prob)
Definition: FaultModel.cc:211
std::vector< system_conf > routers
Definition: FaultModel.hh:137
std::vector< int > temperature_weights
Definition: FaultModel.hh:138
const SimObjectParams * _params
Cached copy of the object parameters.
Definition: sim_object.hh:107
bool fault_vector(int routerID, int temperature, float fault_vector[])
Definition: FaultModel.cc:176
std::vector< system_conf > configurations
Definition: FaultModel.hh:136
Bitfield< 0 > p
FaultModelParams Params
Definition: FaultModel.hh:58
Abstract superclass for simulation objects.
Definition: sim_object.hh:94
const Params * params() const
Definition: FaultModel.hh:60

Generated on Fri Jun 9 2017 13:03:49 for gem5 by doxygen 1.8.6