gem5  v20.1.0.0
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 
29 /*
30  * Official Tool Website: www.mit.edu/~kaisopos/FaultModel
31  *
32  * If you use our tool for academic research, we request that you cite:
33  * Konstantinos Aisopos, Chia-Hsin Owen Chen, and Li-Shiuan Peh. Enabling
34  * System-Level Modeling of Variation-Induced Faults in Networks-on-Chip.
35  * Proceedings of the 48th Design Automation Conference (DAC'11)
36  */
37 
38 #ifndef __MEM_RUBY_NETWORK_FAULT_MODEL_FAULTMODEL_HH__
39 #define __MEM_RUBY_NETWORK_FAULT_MODEL_FAULTMODEL_HH__
40 
41 // tool limitations and fixed inputs
42 #define MAX_VCs 40
43 #define MAX_BUFFERS_per_VC 5
44 #define BASELINE_TEMPERATURE_CELCIUS 71
45 
46 // C++ includes
47 #include <string>
48 
49 // GEM5 includes
50 #include "params/FaultModel.hh"
51 #include "sim/sim_object.hh"
52 
53 class FaultModel : public SimObject
54 {
55  public:
56  typedef FaultModelParams Params;
57  FaultModel(const Params *p);
58  const Params *params() const { return (const Params *)_params; }
59 
60  /************************************************************************/
61  /********** THE FAULT TYPES SUPPORTED BY THE FAULT MODEL ***************/
62  /************************************************************************/
63 
65  {
77  };
78 
79  /************************************************************************/
80  /******************** INTERFACE OF THE FAULT MODEL *********************/
81  /************************************************************************/
82 
84  {
90  };
91 
93  {
97  };
98 
99  struct system_conf
100  {
101  int vcs;
104  };
105 
106  int declare_router(int number_of_inputs,
107  int number_of_outputs,
108  int number_of_vcs_per_vnet,
109  int number_of_buff_per_data_vc,
110  int number_of_buff_per_ctrl_vc);
111 
112  std::string fault_type_to_string(int fault_type_index);
113 
114  // the following 2 functions are called at runtime, to get the probability
115  // of each fault type (fault_vector) or the aggregate fault probability
116  // (fault_prob). Note: the probability values are provided by reference
117  // (in the variables fault_vector[] & aggregate_fault_prob respectively).
118  // Both functions also return a success flag (which is always true if
119  // temperature ranges from 0C to 125C)
120 
121  bool fault_vector(int routerID,
122  int temperature,
123  float fault_vector[]);
124 
125  bool fault_prob(int routerID,
126  int temperature,
127  float *aggregate_fault_prob);
128 
129  // for debugging purposes
130 
131  void print(void);
132 
133  private:
137 };
138 
139 #endif //__MEM_RUBY_NETWORK_FAULT_MODEL_FAULTMODEL_HH__
FaultModel::conf_record_vcs
@ conf_record_vcs
Definition: FaultModel.hh:86
FaultModel::temperature_weights
std::vector< int > temperature_weights
Definition: FaultModel.hh:136
FaultModel::fields_per_conf_record
@ fields_per_conf_record
Definition: FaultModel.hh:89
FaultModel
Definition: FaultModel.hh:53
FaultModel::data_corruption__few_bits
@ data_corruption__few_bits
Definition: FaultModel.hh:66
FaultModel::number_of_fault_types
@ number_of_fault_types
Definition: FaultModel.hh:76
FaultModel::credit_conservation__credit_generation
@ credit_conservation__credit_generation
Definition: FaultModel.hh:71
FaultModel::flit_conservation__flit_loss_or_split
@ flit_conservation__flit_loss_or_split
Definition: FaultModel.hh:69
FaultModel::FaultModel
FaultModel(const Params *p)
Definition: FaultModel.cc:53
FaultModel::fault_vector
bool fault_vector(int routerID, int temperature, float fault_vector[])
Definition: FaultModel.cc:174
FaultModel::erroneous_allocation__VC
@ erroneous_allocation__VC
Definition: FaultModel.hh:73
std::vector
STL vector class.
Definition: stl.hh:37
FaultModel::fault_type
fault_type
Definition: FaultModel.hh:64
FaultModel::routers
std::vector< system_conf > routers
Definition: FaultModel.hh:135
FaultModel::temperature_record_temp
@ temperature_record_temp
Definition: FaultModel.hh:94
FaultModel::data_corruption__all_bits
@ data_corruption__all_bits
Definition: FaultModel.hh:67
FaultModel::misrouting
@ misrouting
Definition: FaultModel.hh:70
FaultModel::configurations
std::vector< system_conf > configurations
Definition: FaultModel.hh:134
FaultModel::temperature_record_weight
@ temperature_record_weight
Definition: FaultModel.hh:95
FaultModel::conf_record_last_fault_type
@ conf_record_last_fault_type
Definition: FaultModel.hh:88
sim_object.hh
FaultModel::params
const Params * params() const
Definition: FaultModel.hh:58
FaultModel::flit_conservation__flit_duplication
@ flit_conservation__flit_duplication
Definition: FaultModel.hh:68
FaultModel::unfair_arbitration
@ unfair_arbitration
Definition: FaultModel.hh:75
FaultModel::Params
FaultModelParams Params
Definition: FaultModel.hh:56
FaultModel::temperature_record_format
temperature_record_format
Definition: FaultModel.hh:92
FaultModel::system_conf
Definition: FaultModel.hh:99
FaultModel::declare_router
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:133
FaultModel::conf_record_first_fault_type
@ conf_record_first_fault_type
Definition: FaultModel.hh:87
FaultModel::fault_type_to_string
std::string fault_type_to_string(int fault_type_index)
Definition: FaultModel.cc:102
SimObject::_params
const SimObjectParams * _params
Cached copy of the object parameters.
Definition: sim_object.hh:110
FaultModel::system_conf::buff_per_vc
int buff_per_vc
Definition: FaultModel.hh:102
FaultModel::erroneous_allocation__switch
@ erroneous_allocation__switch
Definition: FaultModel.hh:74
FaultModel::print
void print(void)
Definition: FaultModel.cc:248
FaultModel::fault_prob
bool fault_prob(int routerID, int temperature, float *aggregate_fault_prob)
Definition: FaultModel.cc:209
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
FaultModel::conf_record_format
conf_record_format
Definition: FaultModel.hh:83
FaultModel::system_conf::vcs
int vcs
Definition: FaultModel.hh:101
FaultModel::conf_record_buff_per_vc
@ conf_record_buff_per_vc
Definition: FaultModel.hh:85
FaultModel::fields_per_temperature_record
@ fields_per_temperature_record
Definition: FaultModel.hh:96
FaultModel::credit_conservation__credit_loss
@ credit_conservation__credit_loss
Definition: FaultModel.hh:72
SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:92

Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17