gem5  v21.1.0.2
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 namespace gem5
54 {
55 
56 namespace ruby
57 {
58 
59 class FaultModel : public SimObject
60 {
61  public:
62  using Params = FaultModelParams;
63  FaultModel(const Params &p);
64 
65  /************************************************************************/
66  /********** THE FAULT TYPES SUPPORTED BY THE FAULT MODEL ***************/
67  /************************************************************************/
68 
70  {
82  };
83 
84  /************************************************************************/
85  /******************** INTERFACE OF THE FAULT MODEL *********************/
86  /************************************************************************/
87 
89  {
95  };
96 
98  {
102  };
103 
104  struct system_conf
105  {
106  int vcs;
109  };
110 
111  int declare_router(int number_of_inputs,
112  int number_of_outputs,
113  int number_of_vcs_per_vnet,
114  int number_of_buff_per_data_vc,
115  int number_of_buff_per_ctrl_vc);
116 
117  std::string fault_type_to_string(int fault_type_index);
118 
119  // the following 2 functions are called at runtime, to get the probability
120  // of each fault type (fault_vector) or the aggregate fault probability
121  // (fault_prob). Note: the probability values are provided by reference
122  // (in the variables fault_vector[] & aggregate_fault_prob respectively).
123  // Both functions also return a success flag (which is always true if
124  // temperature ranges from 0C to 125C)
125 
126  bool fault_vector(int routerID,
127  int temperature,
128  float fault_vector[]);
129 
130  bool fault_prob(int routerID,
131  int temperature,
132  float *aggregate_fault_prob);
133 
134  // for debugging purposes
135 
136  void print(void);
137 
138  private:
142 };
143 
144 } // namespace ruby
145 } // namespace gem5
146 
147 #endif //__MEM_RUBY_NETWORK_FAULT_MODEL_FAULTMODEL_HH__
gem5::ruby::FaultModel::temperature_record_temp
@ temperature_record_temp
Definition: FaultModel.hh:99
gem5::ruby::FaultModel::fault_vector
bool fault_vector(int routerID, int temperature, float fault_vector[])
Definition: FaultModel.cc:177
gem5::ruby::FaultModel::conf_record_format
conf_record_format
Definition: FaultModel.hh:88
gem5::ruby::FaultModel::fault_type_to_string
std::string fault_type_to_string(int fault_type_index)
Definition: FaultModel.cc:105
gem5::ruby::FaultModel::credit_conservation__credit_generation
@ credit_conservation__credit_generation
Definition: FaultModel.hh:76
gem5::ruby::FaultModel::fields_per_conf_record
@ fields_per_conf_record
Definition: FaultModel.hh:94
gem5::ruby::FaultModel::FaultModel
FaultModel(const Params &p)
Definition: FaultModel.cc:56
gem5::ruby::FaultModel::conf_record_first_fault_type
@ conf_record_first_fault_type
Definition: FaultModel.hh:92
std::vector
STL vector class.
Definition: stl.hh:37
gem5::ruby::FaultModel::data_corruption__all_bits
@ data_corruption__all_bits
Definition: FaultModel.hh:72
gem5::ruby::FaultModel::data_corruption__few_bits
@ data_corruption__few_bits
Definition: FaultModel.hh:71
gem5::ruby::FaultModel::system_conf
Definition: FaultModel.hh:104
gem5::ruby::FaultModel::conf_record_vcs
@ conf_record_vcs
Definition: FaultModel.hh:91
gem5::ruby::FaultModel::flit_conservation__flit_duplication
@ flit_conservation__flit_duplication
Definition: FaultModel.hh:73
gem5::ruby::FaultModel::fault_prob
bool fault_prob(int routerID, int temperature, float *aggregate_fault_prob)
Definition: FaultModel.cc:212
gem5::ruby::FaultModel::erroneous_allocation__VC
@ erroneous_allocation__VC
Definition: FaultModel.hh:78
gem5::ruby::FaultModel::fault_type
fault_type
Definition: FaultModel.hh:69
gem5::ruby::FaultModel::temperature_record_weight
@ temperature_record_weight
Definition: FaultModel.hh:100
sim_object.hh
gem5::ruby::FaultModel::unfair_arbitration
@ unfair_arbitration
Definition: FaultModel.hh:80
gem5::ruby::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:136
gem5::MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:326
gem5::ruby::FaultModel::routers
std::vector< system_conf > routers
Definition: FaultModel.hh:140
gem5::ruby::FaultModel::conf_record_buff_per_vc
@ conf_record_buff_per_vc
Definition: FaultModel.hh:90
gem5::ruby::FaultModel::erroneous_allocation__switch
@ erroneous_allocation__switch
Definition: FaultModel.hh:79
gem5::ruby::FaultModel::print
void print(void)
Definition: FaultModel.cc:251
gem5::ruby::FaultModel::temperature_weights
std::vector< int > temperature_weights
Definition: FaultModel.hh:141
gem5::ruby::FaultModel::system_conf::vcs
int vcs
Definition: FaultModel.hh:106
gem5::SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:146
gem5::ruby::FaultModel::number_of_fault_types
@ number_of_fault_types
Definition: FaultModel.hh:81
gem5::ruby::FaultModel::fields_per_temperature_record
@ fields_per_temperature_record
Definition: FaultModel.hh:101
gem5::ruby::FaultModel::credit_conservation__credit_loss
@ credit_conservation__credit_loss
Definition: FaultModel.hh:77
gem5::ruby::FaultModel::temperature_record_format
temperature_record_format
Definition: FaultModel.hh:97
gem5::ruby::FaultModel::flit_conservation__flit_loss_or_split
@ flit_conservation__flit_loss_or_split
Definition: FaultModel.hh:74
gem5::ruby::FaultModel::configurations
std::vector< system_conf > configurations
Definition: FaultModel.hh:139
gem5::ruby::FaultModel::system_conf::buff_per_vc
int buff_per_vc
Definition: FaultModel.hh:107
gem5::ruby::FaultModel::misrouting
@ misrouting
Definition: FaultModel.hh:75
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::ruby::FaultModel
Definition: FaultModel.hh:59
gem5::ruby::FaultModel::conf_record_last_fault_type
@ conf_record_last_fault_type
Definition: FaultModel.hh:93
gem5::ruby::FaultModel::Params
FaultModelParams Params
Definition: FaultModel.hh:62

Generated on Tue Sep 21 2021 12:25:40 for gem5 by doxygen 1.8.17