1 | #ifdef SYSTEMC |
---|
2 | /* |
---|
3 | * $Id: Core_Glue_genMealy_issue.cpp 118 2009-05-20 22:01:32Z rosiere $ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Core/Core_Glue/include/Core_Glue.h" |
---|
10 | #include "Common/include/Max.h" |
---|
11 | |
---|
12 | namespace morpheo { |
---|
13 | namespace behavioural { |
---|
14 | namespace core { |
---|
15 | namespace core_glue { |
---|
16 | |
---|
17 | /* |
---|
18 | OOO SLOT Execute Loop |
---|
19 | ---+ +----- |
---|
20 | | +-----+ +-----+ | |
---|
21 | -+->| | | |-+-> |
---|
22 | | | |-()->| | | |
---|
23 | -+->| _ _ | | |-+-> |
---|
24 | | | _X_ |-()->| | | |
---|
25 | -+->| | | | +----- |
---|
26 | | | |-()->| | |
---|
27 | -+->| | | | +----- |
---|
28 | | +-----+ | | | |
---|
29 | ---+ crossbar | _ _ |-+-> |
---|
30 | | _X_ | | |
---|
31 | ---+ | |-+-> |
---|
32 | | +-----+ | | | |
---|
33 | -+->| | | | +----- |
---|
34 | | | |-()->| | |
---|
35 | -+->| _ _ | | | +----- |
---|
36 | | | _X_ |-()->| | | |
---|
37 | -+->| | | |-+-> |
---|
38 | | | |-()->| | | |
---|
39 | -+->| | | |-+-> |
---|
40 | | +-----+ +-----+ | |
---|
41 | ---+ crossbar dispatch +----- |
---|
42 | */ |
---|
43 | |
---|
44 | |
---|
45 | // class num_read_unit_t |
---|
46 | // { |
---|
47 | // public : const uint32_t num_execute_loop; |
---|
48 | // public : const uint32_t num_read_unit; |
---|
49 | |
---|
50 | // public : num_read_unit_t (uint32_t num_execute_loop, |
---|
51 | // uint32_t num_read_unit) : |
---|
52 | // this->num_execute_loop (num_execute_loop), |
---|
53 | // this->num_read_unit (num_read_unit ) |
---|
54 | // {}; |
---|
55 | // } |
---|
56 | |
---|
57 | #undef FUNCTION |
---|
58 | #define FUNCTION "Core_Glue::genMealy_issue" |
---|
59 | void Core_Glue::genMealy_issue (void) |
---|
60 | { |
---|
61 | log_begin(Core_Glue,FUNCTION); |
---|
62 | log_function(Core_Glue,FUNCTION,_name.c_str()); |
---|
63 | |
---|
64 | Tcontrol_t ISSUE_OOO_ENGINE_ACK [_param->_nb_ooo_engine ][_param->_max_nb_inst_issue_queue]; |
---|
65 | Tcontrol_t ISSUE_EXECUTE_LOOP_VAL [_param->_nb_execute_loop][_param->_max_nb_read_unit]; |
---|
66 | Tcontrol_t READ_UNIT_ENABLE [_param->_nb_execute_loop][_param->_max_nb_read_unit]; |
---|
67 | Tcontrol_t SLOT_ENABLE [_param->_nb_ooo_engine ][_param->_max_nb_inst_issue_slot]; |
---|
68 | |
---|
69 | // Init -> all at 0 |
---|
70 | for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i) |
---|
71 | { |
---|
72 | for (uint32_t j=0; j<_param->_nb_inst_issue_queue[i]; ++j) |
---|
73 | ISSUE_OOO_ENGINE_ACK [i][j] = 0; |
---|
74 | for (uint32_t j=0; j<_param->_nb_inst_issue_slot[i]; ++j) |
---|
75 | SLOT_ENABLE [i][j] = 1; |
---|
76 | } |
---|
77 | |
---|
78 | for (uint32_t i=0; i<_param->_nb_execute_loop; ++i) |
---|
79 | for (uint32_t j=0; j<_param->_nb_read_unit[i]; ++j) |
---|
80 | { |
---|
81 | ISSUE_EXECUTE_LOOP_VAL [i][j] = 0; |
---|
82 | |
---|
83 | // Read unit is enable is signal ack is set |
---|
84 | READ_UNIT_ENABLE [i][j] = (PORT_READ(in_ISSUE_EXECUTE_LOOP_ACK [i][j]) == 1); |
---|
85 | log_printf(TRACE,Core_Glue,FUNCTION," * Read_unit [%d][%d].enable : %d",i,j,READ_UNIT_ENABLE[i][j]); |
---|
86 | } |
---|
87 | |
---|
88 | // std::list<num_read_unit_t> SLOT_TYPE [_param->_nb_ooo_engine][_param->_max_nb_inst_issue_slot][_param->_nb_type]; |
---|
89 | |
---|
90 | // // for each read_unit |
---|
91 | // for (uint32_t i=0; i<_param->_nb_execute_loop; ++i) |
---|
92 | // for (uint32_t j=0; j<_param->_nb_read_unit[i]; ++j) |
---|
93 | // // test if this read_unit can receive an instruction |
---|
94 | // if (PORT_READ(in_ISSUE_EXECUTE_LOOP_ACK [i][j]) == 1) |
---|
95 | // for (uint32_t x=0; x<_nb_ooo_engine; ++x) |
---|
96 | // for (uint32_t y=0; y<_nb_inst_issue_slot[y]; ++y) |
---|
97 | // // test if can dispatch |
---|
98 | // if (_param->_table_dispatch [x][y][i][j]) |
---|
99 | // for (uint32_t k=0;k<_param->_nb_type; ++k) |
---|
100 | // // Can receive this type |
---|
101 | // if (_param->_table_dispatch [i][j][k]) |
---|
102 | // SLOT_TYPE[x][y][k].push_back(num_read_unit_t(i,j)); |
---|
103 | |
---|
104 | // // Select an issue_slot of an ooo_engine |
---|
105 | // std::list<generic::priority::select_t> * select_ooo_engine = _priority_ooo_engine->select(); |
---|
106 | // for (std::list<generic::priority::select_t>::iterator it_ooo_engine=select_ooo_engine->begin(); |
---|
107 | // it_ooo_engine!=select_ooo_engine->end(); |
---|
108 | // ++it_ooo_engine) |
---|
109 | // { |
---|
110 | // // ... get id of the most priotary |
---|
111 | // const uint32_t num_ooo_engine = it_ooo_engine->grp; |
---|
112 | // const uint32_t num_inst_issue_slot = it_ooo_engine->elt; |
---|
113 | |
---|
114 | // // Test if this ooo_engine is enable (can be desable if issue in_order) |
---|
115 | // if (OOO_ENGINE_ENABLE[num_ooo_engine]) |
---|
116 | // { |
---|
117 | |
---|
118 | // } |
---|
119 | // } |
---|
120 | |
---|
121 | for (uint32_t num_ooo_engine=0; num_ooo_engine<_param->_nb_ooo_engine; ++num_ooo_engine) |
---|
122 | for (uint32_t num_inst_issue_queue=0; num_inst_issue_queue<_param->_nb_inst_issue_queue[num_ooo_engine]; ++num_inst_issue_queue) |
---|
123 | { |
---|
124 | bool find = false; |
---|
125 | |
---|
126 | Tcontrol_t val = PORT_READ(in_ISSUE_OOO_ENGINE_VAL [num_ooo_engine][num_inst_issue_queue]); |
---|
127 | Ttype_t type = PORT_READ(in_ISSUE_OOO_ENGINE_TYPE [num_ooo_engine][num_inst_issue_queue]); |
---|
128 | |
---|
129 | log_printf(TRACE,Core_Glue,FUNCTION," * num_ooo_engine : %d",num_ooo_engine ); |
---|
130 | log_printf(TRACE,Core_Glue,FUNCTION," * num_inst_issue_queue : %d",num_inst_issue_queue); |
---|
131 | log_printf(TRACE,Core_Glue,FUNCTION," * val : %d",val); |
---|
132 | log_printf(TRACE,Core_Glue,FUNCTION," * type : %d",type); |
---|
133 | |
---|
134 | if (val) |
---|
135 | for (uint32_t num_inst_issue_slot=0; num_inst_issue_slot<_param->_nb_inst_issue_slot[num_ooo_engine]; ++num_inst_issue_slot) |
---|
136 | { |
---|
137 | log_printf(TRACE,Core_Glue,FUNCTION," * num_inst_issue_slot : %d",num_inst_issue_slot); |
---|
138 | |
---|
139 | // scan all read_unit |
---|
140 | |
---|
141 | if (SLOT_ENABLE [num_ooo_engine][num_inst_issue_slot]) |
---|
142 | for (uint32_t num_execute_loop=0; num_execute_loop<_param->_nb_execute_loop; ++num_execute_loop) |
---|
143 | { |
---|
144 | for (uint32_t _num_read_unit=0; _num_read_unit<_param->_nb_read_unit[num_execute_loop]; ++_num_read_unit) |
---|
145 | { |
---|
146 | uint32_t num_read_unit = (_num_read_unit+reg_PRIORITY)%_param->_nb_read_unit[num_execute_loop]; |
---|
147 | Tcontrol_t ack = READ_UNIT_ENABLE [num_execute_loop][num_read_unit]; |
---|
148 | |
---|
149 | log_printf(TRACE,Core_Glue,FUNCTION," * num_execute_loop : %d",num_execute_loop); |
---|
150 | log_printf(TRACE,Core_Glue,FUNCTION," * num_read_unit : %d",num_read_unit ); |
---|
151 | log_printf(TRACE,Core_Glue,FUNCTION," * read_unit_enable : %d",ack ); |
---|
152 | |
---|
153 | // test if : |
---|
154 | // * read_unit can accept an instruction (valid and no previous instruction) |
---|
155 | // * slot can issue an instruction at this read_unit |
---|
156 | // * read_unit can accept this type |
---|
157 | if (ack and |
---|
158 | _param->_table_dispatch [num_ooo_engine][num_inst_issue_slot][num_execute_loop][num_read_unit] and |
---|
159 | _param->_table_issue_type [num_execute_loop][num_read_unit][type]) |
---|
160 | { |
---|
161 | log_printf(TRACE,Core_Glue,FUNCTION," * find !!!"); |
---|
162 | |
---|
163 | // find ! |
---|
164 | // Transaction |
---|
165 | READ_UNIT_ENABLE [num_execute_loop][num_read_unit] = false; // now, this read_unit is busy |
---|
166 | ISSUE_EXECUTE_LOOP_VAL [num_execute_loop][num_read_unit] = 1; // = val |
---|
167 | ISSUE_OOO_ENGINE_ACK [num_ooo_engine][num_inst_issue_queue] = 1; // = ack |
---|
168 | SLOT_ENABLE [num_ooo_engine][num_inst_issue_slot] = false; // now this slot is used |
---|
169 | |
---|
170 | if (_param->_have_port_context_id) |
---|
171 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_CONTEXT_ID [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_CONTEXT_ID [num_ooo_engine][num_inst_issue_queue])); |
---|
172 | if (_param->_have_port_front_end_id) |
---|
173 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_FRONT_END_ID [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_FRONT_END_ID [num_ooo_engine][num_inst_issue_queue])); |
---|
174 | if (_param->_have_port_ooo_engine_id) |
---|
175 | { |
---|
176 | Tcontext_t ooo_engine_id = 0; |
---|
177 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_OOO_ENGINE_ID [num_execute_loop][num_read_unit],ooo_engine_id); |
---|
178 | } |
---|
179 | if (_param->_have_port_rob_ptr) |
---|
180 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_PACKET_ID [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_PACKET_ID [num_ooo_engine][num_inst_issue_queue])); |
---|
181 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_OPERATION [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_OPERATION [num_ooo_engine][num_inst_issue_queue])); |
---|
182 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_TYPE [num_execute_loop][num_read_unit],type); |
---|
183 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE [num_ooo_engine][num_inst_issue_queue])); |
---|
184 | if (_param->_have_port_load_queue_ptr) |
---|
185 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE [num_ooo_engine][num_inst_issue_queue])); |
---|
186 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT [num_ooo_engine][num_inst_issue_queue])); |
---|
187 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_IMMEDIAT [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_IMMEDIAT [num_ooo_engine][num_inst_issue_queue])); |
---|
188 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RA [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RA [num_ooo_engine][num_inst_issue_queue])); |
---|
189 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RA [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RA [num_ooo_engine][num_inst_issue_queue])); |
---|
190 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RB [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RB [num_ooo_engine][num_inst_issue_queue])); |
---|
191 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RB [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RB [num_ooo_engine][num_inst_issue_queue])); |
---|
192 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RC [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RC [num_ooo_engine][num_inst_issue_queue])); |
---|
193 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RC [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RC [num_ooo_engine][num_inst_issue_queue])); |
---|
194 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_WRITE_RD [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_WRITE_RD [num_ooo_engine][num_inst_issue_queue])); |
---|
195 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RD [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RD [num_ooo_engine][num_inst_issue_queue])); |
---|
196 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_WRITE_RE [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_WRITE_RE [num_ooo_engine][num_inst_issue_queue])); |
---|
197 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RE [num_execute_loop][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RE [num_ooo_engine][num_inst_issue_queue])); |
---|
198 | |
---|
199 | |
---|
200 | find = true; |
---|
201 | break; |
---|
202 | } |
---|
203 | //if (find) |
---|
204 | // break; |
---|
205 | } |
---|
206 | if (find) |
---|
207 | break; |
---|
208 | } |
---|
209 | if (find) |
---|
210 | break; |
---|
211 | } |
---|
212 | |
---|
213 | if (_param->_issue_queue_in_order [num_ooo_engine] and |
---|
214 | not find and |
---|
215 | (num_inst_issue_queue >= _param->_nb_inst_reexecute [num_ooo_engine])) |
---|
216 | { |
---|
217 | log_printf(TRACE,Core_Glue,FUNCTION," * stop scan !!!"); |
---|
218 | |
---|
219 | break; // stop scan |
---|
220 | } |
---|
221 | } |
---|
222 | |
---|
223 | // Write output |
---|
224 | for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i) |
---|
225 | for (uint32_t j=0; j<_param->_nb_inst_issue_queue[i]; ++j) |
---|
226 | PORT_WRITE(out_ISSUE_OOO_ENGINE_ACK [i][j], ISSUE_OOO_ENGINE_ACK [i][j]); |
---|
227 | for (uint32_t i=0; i<_param->_nb_execute_loop; ++i) |
---|
228 | for (uint32_t j=0; j<_param->_nb_read_unit[i]; ++j) |
---|
229 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_VAL [i][j], ISSUE_EXECUTE_LOOP_VAL [i][j]); |
---|
230 | |
---|
231 | log_end(Core_Glue,FUNCTION); |
---|
232 | }; |
---|
233 | |
---|
234 | }; // end namespace core_glue |
---|
235 | }; // end namespace core |
---|
236 | |
---|
237 | }; // end namespace behavioural |
---|
238 | }; // end namespace morpheo |
---|
239 | #endif |
---|
240 | |
---|
241 | /* |
---|
242 | bool OOO_ENGINE_ENABLE [_param->_nb_ooo_engine ]; |
---|
243 | Tcontrol_t SLOT_ENABLE [_param->_nb_ooo_engine ][_param->_max_nb_inst_issue_slot]; |
---|
244 | bool READ_UNIT_ENABLE [_param->_nb_execute_loop][_param->_max_nb_read_unit]; |
---|
245 | |
---|
246 | // Init -> all at 0 |
---|
247 | for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i) |
---|
248 | { |
---|
249 | OOO_ENGINE_ENABLE [i] = true; |
---|
250 | |
---|
251 | for (uint32_t j=0; j<_param->_nb_inst_issue_slot[i]; ++j) |
---|
252 | SLOT_ENABLE [i][j] = 1; |
---|
253 | } |
---|
254 | |
---|
255 | for (uint32_t i=0; i<_param->_nb_execute_loop; ++i) |
---|
256 | for (uint32_t j=0; j<_param->_nb_read_unit[i]; ++j) |
---|
257 | { |
---|
258 | // Read unit is enable is signal ack is set |
---|
259 | READ_UNIT_ENABLE [i][j] = (PORT_READ(in_ISSUE_EXECUTE_LOOP_ACK [i][j]) == 1); |
---|
260 | log_printf(TRACE,Core_Glue,FUNCTION," * Read_unit [%d][%d].enable : %d",i,j,READ_UNIT_ENABLE[i][j]); |
---|
261 | } |
---|
262 | |
---|
263 | |
---|
264 | // for each execute_loop |
---|
265 | for (uint32_t i=0; i<_param->_nb_execute_loop; ++i) |
---|
266 | { |
---|
267 | // Scan all read_unit |
---|
268 | std::list<generic::priority::select_t> * select_read_unit = _priority_read_unit[i]->select(); |
---|
269 | for (std::list<generic::priority::select_t>::iterator it_read_unit=select_read_unit->begin(); |
---|
270 | it_read_unit!=select_read_unit->end(); |
---|
271 | ++it_read_unit) |
---|
272 | { |
---|
273 | // get the most priotary ... |
---|
274 | uint32_t num_read_unit = it_read_unit->grp; |
---|
275 | |
---|
276 | log_printf(TRACE,Core_Glue,FUNCTION," * read_unit [%d][%d]",i,num_read_unit); |
---|
277 | |
---|
278 | // ... and test if this read_unit is valid |
---|
279 | if (READ_UNIT_ENABLE [i][num_read_unit]) |
---|
280 | { |
---|
281 | bool find = false; |
---|
282 | |
---|
283 | // This read_unit is valid, now find an valid instruction |
---|
284 | // for each issue of each ooo_engine ... |
---|
285 | std::list<generic::priority::select_t> * select_ooo_engine = _priority_ooo_engine[i]->select(); |
---|
286 | for (std::list<generic::priority::select_t>::iterator it_ooo_engine=select_ooo_engine->begin(); |
---|
287 | it_ooo_engine!=select_ooo_engine->end(); |
---|
288 | ++it_ooo_engine) |
---|
289 | { |
---|
290 | // ... get id of the most priotary |
---|
291 | const uint32_t ooo_engine_id = it_ooo_engine->grp; |
---|
292 | const uint32_t num_ooo_engine = _param->_translate_execute_loop_num_ooo_engine [i][ooo_engine_id]; |
---|
293 | const uint32_t num_inst_issue_slot = it_ooo_engine->elt; |
---|
294 | |
---|
295 | log_printf(TRACE,Core_Glue,FUNCTION," * num_ooo_engine [%d (%d)][%d]",num_ooo_engine, ooo_engine_id,num_inst_issue_slot); |
---|
296 | |
---|
297 | if (OOO_ENGINE_ENABLE [num_ooo_engine] and SLOT_ENABLE [num_ooo_engine][num_inst_issue_slot]) |
---|
298 | { |
---|
299 | uint32_t num_inst_issue_queue = 0; |
---|
300 | for (; num_inst_issue_queue < _param->_nb_inst_issue_queue [num_ooo_engine]; num_inst_issue_queue ++) |
---|
301 | { |
---|
302 | // Test if this instruction is not previously send at a read_unit |
---|
303 | if (not ISSUE_OOO_ENGINE_ACK [num_ooo_engine][num_inst_issue_queue]) |
---|
304 | { |
---|
305 | Tcontrol_t ooo_engine_val = PORT_READ(in_ISSUE_OOO_ENGINE_VAL [num_ooo_engine][num_inst_issue_queue]); |
---|
306 | Ttype_t type = PORT_READ(in_ISSUE_OOO_ENGINE_TYPE [num_ooo_engine][num_inst_issue_queue]); |
---|
307 | // Test if have an link and read unit is enable |
---|
308 | bool can_dispatch = _param->_table_dispatch [num_ooo_engine][num_inst_issue_slot][i][num_read_unit]; |
---|
309 | bool can_issue_type = _param->_table_issue_type [i][num_read_unit][type]; |
---|
310 | |
---|
311 | log_printf(TRACE,Core_Glue,FUNCTION," * num_ooo_engine_queue : %d",num_inst_issue_queue); |
---|
312 | log_printf(TRACE,Core_Glue,FUNCTION," * type : %s",toString(type).c_str()); |
---|
313 | log_printf(TRACE,Core_Glue,FUNCTION," * ISSUE_OOO_ENGINE_VAL : %d",ooo_engine_val); |
---|
314 | log_printf(TRACE,Core_Glue,FUNCTION," * table_dispatch : %d",can_dispatch); |
---|
315 | log_printf(TRACE,Core_Glue,FUNCTION," * table_issue_type : %d",can_issue_type); |
---|
316 | |
---|
317 | |
---|
318 | // test if have a request ? |
---|
319 | // and test if have a link between the issue slot and read_unit |
---|
320 | // and if the read_unit accept this instruction's type |
---|
321 | if (ooo_engine_val and |
---|
322 | can_dispatch and |
---|
323 | can_issue_type) |
---|
324 | { |
---|
325 | // log_printf(TRACE,Core_Glue,FUNCTION," * find !!!"); |
---|
326 | |
---|
327 | // Transaction |
---|
328 | READ_UNIT_ENABLE [i][num_read_unit] = false; // now, this read_unit is busy |
---|
329 | ISSUE_EXECUTE_LOOP_VAL [i][num_read_unit] = ooo_engine_val; |
---|
330 | ISSUE_OOO_ENGINE_ACK [num_ooo_engine][num_inst_issue_queue] = 1; |
---|
331 | SLOT_ENABLE [num_ooo_engine][num_inst_issue_slot] = 0; // now this slot is used |
---|
332 | |
---|
333 | if (_param->_have_port_context_id) |
---|
334 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_CONTEXT_ID [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_CONTEXT_ID [num_ooo_engine][num_inst_issue_queue])); |
---|
335 | if (_param->_have_port_front_end_id) |
---|
336 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_FRONT_END_ID [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_FRONT_END_ID [num_ooo_engine][num_inst_issue_queue])); |
---|
337 | if (_param->_have_port_ooo_engine_id) |
---|
338 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_OOO_ENGINE_ID [i][num_read_unit],ooo_engine_id); |
---|
339 | if (_param->_have_port_rob_ptr) |
---|
340 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_PACKET_ID [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_PACKET_ID [num_ooo_engine][num_inst_issue_queue])); |
---|
341 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_OPERATION [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_OPERATION [num_ooo_engine][num_inst_issue_queue])); |
---|
342 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_TYPE [i][num_read_unit],type); |
---|
343 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE [num_ooo_engine][num_inst_issue_queue])); |
---|
344 | if (_param->_have_port_load_queue_ptr) |
---|
345 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE [num_ooo_engine][num_inst_issue_queue])); |
---|
346 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT [num_ooo_engine][num_inst_issue_queue])); |
---|
347 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_IMMEDIAT [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_IMMEDIAT [num_ooo_engine][num_inst_issue_queue])); |
---|
348 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RA [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RA [num_ooo_engine][num_inst_issue_queue])); |
---|
349 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RA [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RA [num_ooo_engine][num_inst_issue_queue])); |
---|
350 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RB [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RB [num_ooo_engine][num_inst_issue_queue])); |
---|
351 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RB [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RB [num_ooo_engine][num_inst_issue_queue])); |
---|
352 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RC [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RC [num_ooo_engine][num_inst_issue_queue])); |
---|
353 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RC [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RC [num_ooo_engine][num_inst_issue_queue])); |
---|
354 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_WRITE_RD [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_WRITE_RD [num_ooo_engine][num_inst_issue_queue])); |
---|
355 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RD [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RD [num_ooo_engine][num_inst_issue_queue])); |
---|
356 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_WRITE_RE [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_WRITE_RE [num_ooo_engine][num_inst_issue_queue])); |
---|
357 | PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RE [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RE [num_ooo_engine][num_inst_issue_queue])); |
---|
358 | |
---|
359 | find = true;// find : stop scan read_unit |
---|
360 | } |
---|
361 | } |
---|
362 | if (find) |
---|
363 | break; |
---|
364 | } |
---|
365 | |
---|
366 | if (find) |
---|
367 | { |
---|
368 | log_printf(TRACE,Core_Glue,FUNCTION," * find !!!"); |
---|
369 | break; |
---|
370 | } |
---|
371 | else |
---|
372 | { |
---|
373 | log_printf(TRACE,Core_Glue,FUNCTION," * not find !!!"); |
---|
374 | log_printf(TRACE,Core_Glue,FUNCTION," * issue_queue_in_order: %d",_param->_issue_queue_in_order [num_ooo_engine]); |
---|
375 | log_printf(TRACE,Core_Glue,FUNCTION," * num_inst_issue_queue: %d",num_inst_issue_queue); |
---|
376 | log_printf(TRACE,Core_Glue,FUNCTION," * nb_inst_reexecute : %d",_param->_nb_inst_reexecute [num_ooo_engine]); |
---|
377 | |
---|
378 | if (_param->_issue_queue_in_order [num_ooo_engine] and |
---|
379 | (num_inst_issue_queue >= _param->_nb_inst_reexecute [num_ooo_engine])) |
---|
380 | OOO_ENGINE_ENABLE [num_ooo_engine] = false; |
---|
381 | } |
---|
382 | } |
---|
383 | } |
---|
384 | } |
---|
385 | } |
---|
386 | } |
---|
387 | */ |
---|
388 | |
---|