1 | /* |
---|
2 | * $Id$ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Prediction_unit_Glue.h" |
---|
9 | #include "Behavioural/include/Allocation.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | namespace multi_front_end { |
---|
15 | namespace front_end { |
---|
16 | namespace prediction_unit { |
---|
17 | namespace prediction_unit_glue { |
---|
18 | |
---|
19 | |
---|
20 | #undef FUNCTION |
---|
21 | #define FUNCTION "Prediction_unit_Glue::deallocation" |
---|
22 | void Prediction_unit_Glue::deallocation (void) |
---|
23 | { |
---|
24 | log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin"); |
---|
25 | |
---|
26 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
27 | { |
---|
28 | delete in_CLOCK ; |
---|
29 | delete in_NRESET; |
---|
30 | |
---|
31 | |
---|
32 | // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
33 | DELETE1_SIGNAL( in_PREDICT_VAL ,_param->_nb_context ,1); |
---|
34 | DELETE1_SIGNAL(out_PREDICT_ACK ,_param->_nb_context ,1); |
---|
35 | DELETE1_SIGNAL( in_PREDICT_PC_PREVIOUS ,_param->_nb_context ,_param->_size_instruction_address); |
---|
36 | DELETE1_SIGNAL( in_PREDICT_PC_CURRENT ,_param->_nb_context ,_param->_size_instruction_address); |
---|
37 | DELETE1_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE ,_param->_nb_context ,1); |
---|
38 | DELETE1_SIGNAL(out_PREDICT_PC_NEXT ,_param->_nb_context ,_param->_size_instruction_address); |
---|
39 | DELETE1_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE ,_param->_nb_context ,1); |
---|
40 | DELETE1_SIGNAL(out_PREDICT_INST_IFETCH_PTR ,_param->_nb_context ,_param->_size_inst_ifetch_ptr); |
---|
41 | DELETE1_SIGNAL(out_PREDICT_BRANCH_STATE ,_param->_nb_context ,_param->_size_branch_state); |
---|
42 | DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context ,_param->_size_depth); |
---|
43 | DELETE2_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE ,_param->_nb_context ,_param->_nb_instruction[it1],1); |
---|
44 | DELETE1_SIGNAL(out_PREDICT_BTB_VAL ,_param->_nb_inst_branch_predict,1); |
---|
45 | DELETE1_SIGNAL( in_PREDICT_BTB_ACK ,_param->_nb_inst_branch_predict,1); |
---|
46 | DELETE1_SIGNAL(out_PREDICT_BTB_CONTEXT_ID ,_param->_nb_inst_branch_predict,_param->_size_context_id); |
---|
47 | DELETE1_SIGNAL(out_PREDICT_BTB_ADDRESS ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
48 | DELETE1_SIGNAL( in_PREDICT_BTB_HIT ,_param->_nb_inst_branch_predict,1); |
---|
49 | DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
50 | DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
51 | DELETE1_SIGNAL( in_PREDICT_BTB_CONDITION ,_param->_nb_inst_branch_predict,_param->_size_branch_condition); |
---|
52 | // DELETE1_SIGNAL( in_PREDICT_BTB_LAST_TAKE ,_param->_nb_inst_branch_predict,1); |
---|
53 | DELETE1_SIGNAL( in_PREDICT_BTB_IS_ACCURATE ,_param->_nb_inst_branch_predict,1); |
---|
54 | DELETE1_SIGNAL(out_PREDICT_DIR_VAL ,_param->_nb_inst_branch_predict,1); |
---|
55 | DELETE1_SIGNAL( in_PREDICT_DIR_ACK ,_param->_nb_inst_branch_predict,1); |
---|
56 | DELETE1_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
57 | DELETE1_SIGNAL(out_PREDICT_DIR_STATIC ,_param->_nb_inst_branch_predict,1); |
---|
58 | // DELETE1_SIGNAL(out_PREDICT_DIR_LAST_TAKE ,_param->_nb_inst_branch_predict,1); |
---|
59 | // DELETE1_SIGNAL( in_PREDICT_DIR_HISTORY ,_param->_nb_inst_branch_predict,_param->_size_history); |
---|
60 | DELETE1_SIGNAL( in_PREDICT_DIR_DIRECTION ,_param->_nb_inst_branch_predict,1); |
---|
61 | DELETE1_SIGNAL(out_PREDICT_RAS_VAL ,_param->_nb_inst_branch_predict,1); |
---|
62 | DELETE1_SIGNAL( in_PREDICT_RAS_ACK ,_param->_nb_inst_branch_predict,1); |
---|
63 | DELETE1_SIGNAL(out_PREDICT_RAS_CONTEXT_ID ,_param->_nb_inst_branch_predict,_param->_size_context_id); |
---|
64 | DELETE1_SIGNAL( in_PREDICT_RAS_HIT ,_param->_nb_inst_branch_predict,1); |
---|
65 | DELETE1_SIGNAL(out_PREDICT_RAS_PUSH ,_param->_nb_inst_branch_predict,1); |
---|
66 | DELETE1_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
67 | DELETE1_SIGNAL( in_PREDICT_RAS_ADDRESS_POP ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
68 | // DELETE1_SIGNAL( in_PREDICT_RAS_INDEX ,_param->_nb_inst_branch_predict,_param->_size_ras_index); |
---|
69 | DELETE1_SIGNAL(out_PREDICT_UPT_VAL ,_param->_nb_inst_branch_predict,1); |
---|
70 | DELETE1_SIGNAL( in_PREDICT_UPT_ACK ,_param->_nb_inst_branch_predict,1); |
---|
71 | DELETE1_SIGNAL(out_PREDICT_UPT_CONTEXT_ID ,_param->_nb_inst_branch_predict,_param->_size_context_id); |
---|
72 | DELETE1_SIGNAL( in_PREDICT_UPT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_inst_branch_predict,_param->_size_depth); |
---|
73 | DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
74 | DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
75 | DELETE1_SIGNAL(out_PREDICT_UPT_BTB_CONDITION ,_param->_nb_inst_branch_predict,_param->_size_branch_condition); |
---|
76 | DELETE1_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE ,_param->_nb_inst_branch_predict,1); |
---|
77 | DELETE1_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE ,_param->_nb_inst_branch_predict,1); |
---|
78 | // DELETE1_SIGNAL(out_PREDICT_UPT_DIR_HISTORY ,_param->_nb_inst_branch_predict,_param->_size_history); |
---|
79 | DELETE1_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
80 | // DELETE1_SIGNAL(out_PREDICT_UPT_RAS_INDEX ,_param->_nb_inst_branch_predict,_param->_size_ras_index); |
---|
81 | |
---|
82 | // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
83 | DELETE2_SIGNAL( in_DECOD_VAL ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1); |
---|
84 | DELETE2_SIGNAL(out_DECOD_ACK ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1); |
---|
85 | DELETE2_SIGNAL( in_DECOD_CONTEXT_ID ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_context_id ); |
---|
86 | DELETE2_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1 ); |
---|
87 | DELETE2_SIGNAL( in_DECOD_BRANCH_STATE ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_branch_state ); |
---|
88 | DELETE2_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_depth ); |
---|
89 | DELETE2_SIGNAL( in_DECOD_BRANCH_CONDITION ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_branch_condition); |
---|
90 | DELETE2_SIGNAL( in_DECOD_BRANCH_DIRECTION ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1 ); |
---|
91 | DELETE2_SIGNAL( in_DECOD_ADDRESS_SRC ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_instruction_address ); |
---|
92 | DELETE2_SIGNAL( in_DECOD_ADDRESS_DEST ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_instruction_address ); |
---|
93 | DELETE2_SIGNAL(out_DECOD_CAN_CONTINUE ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1); |
---|
94 | |
---|
95 | DELETE1_SIGNAL(out_DECOD_BTB_VAL ,_param->_nb_inst_branch_decod,1); |
---|
96 | DELETE1_SIGNAL( in_DECOD_BTB_ACK ,_param->_nb_inst_branch_decod,1); |
---|
97 | DELETE1_SIGNAL(out_DECOD_BTB_CONTEXT_ID ,_param->_nb_inst_branch_decod,_param->_size_context_id); |
---|
98 | DELETE1_SIGNAL(out_DECOD_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_decod,_param->_size_instruction_address); |
---|
99 | DELETE1_SIGNAL(out_DECOD_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_decod,_param->_size_instruction_address); |
---|
100 | DELETE1_SIGNAL(out_DECOD_BTB_CONDITION ,_param->_nb_inst_branch_decod,_param->_size_branch_condition); |
---|
101 | DELETE1_SIGNAL(out_DECOD_BTB_LAST_TAKE ,_param->_nb_inst_branch_decod,1); |
---|
102 | DELETE1_SIGNAL(out_DECOD_BTB_MISS_PREDICTION,_param->_nb_inst_branch_decod,1); |
---|
103 | DELETE1_SIGNAL(out_DECOD_BTB_IS_ACCURATE ,_param->_nb_inst_branch_decod,1); |
---|
104 | |
---|
105 | DELETE1_SIGNAL(out_DECOD_RAS_VAL ,_param->_nb_inst_branch_decod,1); |
---|
106 | DELETE1_SIGNAL( in_DECOD_RAS_ACK ,_param->_nb_inst_branch_decod,1); |
---|
107 | DELETE1_SIGNAL(out_DECOD_RAS_CONTEXT_ID ,_param->_nb_inst_branch_decod,_param->_size_context_id); |
---|
108 | DELETE1_SIGNAL( in_DECOD_RAS_HIT ,_param->_nb_inst_branch_decod,1); |
---|
109 | DELETE1_SIGNAL(out_DECOD_RAS_PUSH ,_param->_nb_inst_branch_decod,1); |
---|
110 | DELETE1_SIGNAL(out_DECOD_RAS_ADDRESS_PUSH ,_param->_nb_inst_branch_decod,_param->_size_instruction_address); |
---|
111 | DELETE1_SIGNAL( in_DECOD_RAS_ADDRESS_POP ,_param->_nb_inst_branch_decod,_param->_size_instruction_address); |
---|
112 | // DELETE1_SIGNAL( in_DECOD_RAS_INDEX ,_param->_nb_inst_branch_decod,_param->_size_ras_index); |
---|
113 | DELETE1_SIGNAL(out_DECOD_RAS_MISS_PREDICTION,_param->_nb_inst_branch_decod,1); |
---|
114 | |
---|
115 | DELETE1_SIGNAL(out_DECOD_UPT_VAL ,_param->_nb_inst_branch_decod,1); |
---|
116 | DELETE1_SIGNAL( in_DECOD_UPT_ACK ,_param->_nb_inst_branch_decod,1); |
---|
117 | DELETE1_SIGNAL(out_DECOD_UPT_CONTEXT_ID ,_param->_nb_inst_branch_decod,_param->_size_context_id); |
---|
118 | DELETE1_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_decod,_param->_size_instruction_address); |
---|
119 | DELETE1_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_decod,_param->_size_instruction_address); |
---|
120 | DELETE1_SIGNAL(out_DECOD_UPT_BTB_CONDITION ,_param->_nb_inst_branch_decod,_param->_size_branch_condition); |
---|
121 | DELETE1_SIGNAL(out_DECOD_UPT_BTB_LAST_TAKE ,_param->_nb_inst_branch_decod,1); |
---|
122 | DELETE1_SIGNAL(out_DECOD_UPT_RAS_ADDRESS ,_param->_nb_inst_branch_decod,_param->_size_instruction_address); |
---|
123 | // DELETE1_SIGNAL(out_DECOD_UPT_RAS_INDEX ,_param->_nb_inst_branch_decod,_param->_size_ras_index); |
---|
124 | DELETE1_SIGNAL(out_DECOD_UPT_MISS_IFETCH ,_param->_nb_inst_branch_decod,1); |
---|
125 | DELETE1_SIGNAL(out_DECOD_UPT_MISS_DECOD ,_param->_nb_inst_branch_decod,1); |
---|
126 | DELETE1_SIGNAL(out_DECOD_UPT_UPDATE_PREDICTION_ID,_param->_nb_inst_branch_decod,_param->_size_depth); |
---|
127 | DELETE1_SIGNAL(out_DECOD_UPT_IS_ACCURATE ,_param->_nb_inst_branch_decod,1); |
---|
128 | DELETE1_SIGNAL( in_DECOD_UPT_CAN_CONTINUE ,_param->_nb_inst_branch_decod,1); |
---|
129 | |
---|
130 | // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
131 | DELETE1_SIGNAL(out_UPDATE_BTB_VAL ,_param->_nb_inst_branch_update,1); |
---|
132 | DELETE1_SIGNAL( in_UPDATE_BTB_ACK ,_param->_nb_inst_branch_update,1); |
---|
133 | // DELETE1_SIGNAL(out_UPDATE_BTB_CONTEXT_ID ,_param->_nb_inst_branch_update,_param->_size_context_id); |
---|
134 | // DELETE1_SIGNAL(out_UPDATE_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_update,_param->_size_instruction_address); |
---|
135 | // DELETE1_SIGNAL(out_UPDATE_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_update,_param->_size_instruction_address); |
---|
136 | // DELETE1_SIGNAL(out_UPDATE_BTB_CONDITION ,_param->_nb_inst_branch_update,_param->_size_branch_condition); |
---|
137 | // DELETE1_SIGNAL(out_UPDATE_BTB_LAST_TAKE ,_param->_nb_inst_branch_update,1); |
---|
138 | // DELETE1_SIGNAL(out_UPDATE_BTB_MISS_PREDICTION ,_param->_nb_inst_branch_update,1); |
---|
139 | |
---|
140 | DELETE1_SIGNAL(out_UPDATE_DIR_VAL ,_param->_nb_inst_branch_update,1); |
---|
141 | DELETE1_SIGNAL( in_UPDATE_DIR_ACK ,_param->_nb_inst_branch_update,1); |
---|
142 | // DELETE1_SIGNAL(out_UPDATE_DIR_ADDRESS ,_param->_nb_inst_branch_update,_param->_size_instruction_address); |
---|
143 | // DELETE1_SIGNAL(out_UPDATE_DIR_HISTORY ,_param->_nb_inst_branch_update,_param->_size_history); |
---|
144 | // DELETE1_SIGNAL(out_UPDATE_DIR_DIRECTION ,_param->_nb_inst_branch_update,1); |
---|
145 | |
---|
146 | DELETE1_SIGNAL(out_UPDATE_RAS_VAL ,_param->_nb_inst_branch_update,1); |
---|
147 | DELETE1_SIGNAL( in_UPDATE_RAS_ACK ,_param->_nb_inst_branch_update,1); |
---|
148 | // DELETE1_SIGNAL(out_UPDATE_RAS_CONTEXT_ID ,_param->_nb_inst_branch_update,_param->_size_context_id); |
---|
149 | // DELETE1_SIGNAL(out_UPDATE_RAS_PUSH ,_param->_nb_inst_branch_update,1); |
---|
150 | // DELETE1_SIGNAL(out_UPDATE_RAS_ADDRESS ,_param->_nb_inst_branch_update,_param->_size_instruction_address); |
---|
151 | // DELETE1_SIGNAL(out_UPDATE_RAS_INDEX ,_param->_nb_inst_branch_update,_param->_size_ras_index); |
---|
152 | // DELETE1_SIGNAL(out_UPDATE_RAS_MISS_PREDICTION ,_param->_nb_inst_branch_update,1); |
---|
153 | // DELETE1_SIGNAL(out_UPDATE_RAS_PREDICTION_IFETCH ,_param->_nb_inst_branch_update,1); |
---|
154 | |
---|
155 | DELETE1_SIGNAL( in_UPDATE_UPT_VAL ,_param->_nb_inst_branch_update,1); |
---|
156 | DELETE1_SIGNAL(out_UPDATE_UPT_ACK ,_param->_nb_inst_branch_update,1); |
---|
157 | // DELETE1_SIGNAL( in_UPDATE_UPT_CONTEXT_ID ,_param->_nb_inst_branch_update,_param->_size_context_id); |
---|
158 | // DELETE1_SIGNAL( in_UPDATE_UPT_MISS_PREDICTION ,_param->_nb_inst_branch_update,1); |
---|
159 | // DELETE1_SIGNAL( in_UPDATE_UPT_DIRECTION_GOOD ,_param->_nb_inst_branch_update,1); |
---|
160 | DELETE1_SIGNAL( in_UPDATE_UPT_BTB_VAL ,_param->_nb_inst_branch_update,1); |
---|
161 | // DELETE1_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_update,_param->_size_instruction_address); |
---|
162 | // DELETE1_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_update,_param->_size_instruction_address); |
---|
163 | // DELETE1_SIGNAL( in_UPDATE_UPT_BTB_CONDITION ,_param->_nb_inst_branch_update,_param->_size_branch_condition); |
---|
164 | DELETE1_SIGNAL( in_UPDATE_UPT_DIR_VAL ,_param->_nb_inst_branch_update,1); |
---|
165 | // DELETE1_SIGNAL( in_UPDATE_UPT_DIR_HISTORY ,_param->_nb_inst_branch_update,_param->_size_history); |
---|
166 | DELETE1_SIGNAL( in_UPDATE_UPT_RAS_VAL ,_param->_nb_inst_branch_update,1); |
---|
167 | // DELETE1_SIGNAL( in_UPDATE_UPT_RAS_PUSH ,_param->_nb_inst_branch_update,1); |
---|
168 | // DELETE1_SIGNAL( in_UPDATE_UPT_RAS_ADDRESS ,_param->_nb_inst_branch_update,_param->_size_instruction_address); |
---|
169 | // DELETE1_SIGNAL( in_UPDATE_UPT_RAS_INDEX ,_param->_nb_inst_branch_update,_param->_size_ras_index); |
---|
170 | // DELETE1_SIGNAL( in_UPDATE_UPT_RAS_PREDICTION_IFETCH,_param->_nb_inst_branch_update,1); |
---|
171 | |
---|
172 | // // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
173 | // DELETE1_SIGNAL( in_DEPTH_UPT_NB_BRANCH,_param->_nb_context,_param->_size_depth+1); |
---|
174 | // DELETE1_SIGNAL( in_DEPTH_UPT_TAIL ,_param->_nb_context,_param->_size_depth); |
---|
175 | // DELETE1_SIGNAL(out_DEPTH_NB_BRANCH ,_param->_nb_context,_param->_size_depth+1); |
---|
176 | // DELETE1_SIGNAL(out_DEPTH_TAIL ,_param->_nb_context,_param->_size_depth); |
---|
177 | } |
---|
178 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
179 | |
---|
180 | delete _component; |
---|
181 | |
---|
182 | log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End"); |
---|
183 | }; |
---|
184 | |
---|
185 | }; // end namespace prediction_unit_glue |
---|
186 | }; // end namespace prediction_unit |
---|
187 | }; // end namespace front_end |
---|
188 | }; // end namespace multi_front_end |
---|
189 | }; // end namespace core |
---|
190 | |
---|
191 | }; // end namespace behavioural |
---|
192 | }; // end namespace morpheo |
---|