gem5 v24.0.0.0
Loading...
Searching...
No Matches
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
53namespace gem5
54{
55
56namespace ruby
57{
58
59class 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
83
84 /************************************************************************/
85 /******************** INTERFACE OF THE FAULT MODEL *********************/
86 /************************************************************************/
87
96
103
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:
139 std::vector <system_conf> configurations;
140 std::vector <system_conf> routers;
141 std::vector <int> temperature_weights;
142};
143
144} // namespace ruby
145} // namespace gem5
146
147#endif //__MEM_RUBY_NETWORK_FAULT_MODEL_FAULTMODEL_HH__
Abstract superclass for simulation objects.
FaultModelParams Params
Definition FaultModel.hh:62
std::vector< system_conf > routers
std::string fault_type_to_string(int fault_type_index)
std::vector< int > temperature_weights
bool fault_prob(int routerID, int temperature, float *aggregate_fault_prob)
FaultModel(const Params &p)
Definition FaultModel.cc:56
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)
std::vector< system_conf > configurations
bool fault_vector(int routerID, int temperature, float fault_vector[])
Bitfield< 0 > p
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36

Generated on Tue Jun 18 2024 16:24:05 for gem5 by doxygen 1.11.0