FaultModel.hh (8946:fb6c89334b86) FaultModel.hh (11320:42ecb523c64a)
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;

--- 17 unchanged lines hidden (view full) ---

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 *
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;

--- 17 unchanged lines hidden (view full) ---

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:
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

--- 15 unchanged lines hidden (view full) ---

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
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

--- 15 unchanged lines hidden (view full) ---

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
66 enum fault_type
66 enum fault_type
67 {
68 data_corruption__few_bits,
69 data_corruption__all_bits,
70 flit_conservation__flit_duplication,
71 flit_conservation__flit_loss_or_split,
72 misrouting,
73 credit_conservation__credit_generation,
74 credit_conservation__credit_loss,

--- 25 unchanged lines hidden (view full) ---

100
101 struct system_conf
102 {
103 int vcs;
104 int buff_per_vc;
105 float fault_type[number_of_fault_types];
106 };
107
67 {
68 data_corruption__few_bits,
69 data_corruption__all_bits,
70 flit_conservation__flit_duplication,
71 flit_conservation__flit_loss_or_split,
72 misrouting,
73 credit_conservation__credit_generation,
74 credit_conservation__credit_loss,

--- 25 unchanged lines hidden (view full) ---

100
101 struct system_conf
102 {
103 int vcs;
104 int buff_per_vc;
105 float fault_type[number_of_fault_types];
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,
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);
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
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).
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
120 // Both functions also return a success flag (which is always true if
121 // temperature ranges from 0C to 125C)
122
121 // temperature ranges from 0C to 125C)
122
123 bool fault_vector(int routerID,
124 int temperature,
123 bool fault_vector(int routerID,
124 int temperature,
125 float fault_vector[]);
126
127 bool fault_prob(int routerID,
125 float fault_vector[]);
126
127 bool fault_prob(int routerID,
128 int temperature,
128 int temperature,
129 float *aggregate_fault_prob);
130
131 // for debugging purposes
132
133 void print(void);
134
135 private:
136 std::vector <system_conf> configurations;
137 std::vector <system_conf> routers;
138 std::vector <int> temperature_weights;
139};
140
141#endif // __MEM_RUBY_NETWORK_FAULT_MODEL_HH__
129 float *aggregate_fault_prob);
130
131 // for debugging purposes
132
133 void print(void);
134
135 private:
136 std::vector <system_conf> configurations;
137 std::vector <system_conf> routers;
138 std::vector <int> temperature_weights;
139};
140
141#endif // __MEM_RUBY_NETWORK_FAULT_MODEL_HH__