1 | #ifdef SYSTEMC |
---|
2 | /* |
---|
3 | * $Id: Issue_queue_function_in_order_genMoore.cpp 111 2009-02-27 18:37:40Z rosiere $ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | namespace multi_ooo_engine { |
---|
15 | namespace ooo_engine { |
---|
16 | namespace issue_queue { |
---|
17 | |
---|
18 | |
---|
19 | #undef FUNCTION |
---|
20 | #define FUNCTION "Issue_queue::function_in_order_genMoore" |
---|
21 | void Issue_queue::function_in_order_genMoore (void) |
---|
22 | { |
---|
23 | log_begin(Issue_queue,FUNCTION); |
---|
24 | log_function(Issue_queue,FUNCTION,_name.c_str()); |
---|
25 | |
---|
26 | // =================================================================== |
---|
27 | // =====[ REEXECUTE_UNIT ]============================================ |
---|
28 | // =================================================================== |
---|
29 | // Same implementation in in-order and out-of-order |
---|
30 | |
---|
31 | // =================================================================== |
---|
32 | // =====[ ISSUE_IN ]================================================== |
---|
33 | // =================================================================== |
---|
34 | { |
---|
35 | // init |
---|
36 | for (uint32_t i=0; i<_param->_nb_rename_unit; i++) |
---|
37 | for (uint32_t j=0; j<_param->_nb_inst_rename[i]; j++) |
---|
38 | internal_ISSUE_IN_ACK [i][j] = false; |
---|
39 | |
---|
40 | std::list<generic::priority::select_t> * select_in = _priority_in ->select(); // same select for all issue |
---|
41 | std::list<generic::priority::select_t>::iterator it=select_in ->begin(); |
---|
42 | |
---|
43 | uint32_t num_bank = reg_NUM_BANK_TAIL; |
---|
44 | uint32_t nb_insert = 0; |
---|
45 | while ((it!=select_in ->end()) and |
---|
46 | (_issue_queue[num_bank].size() != _param->_size_bank) and // test if can accept an data |
---|
47 | (nb_insert < _param->_nb_bank) |
---|
48 | ) |
---|
49 | { |
---|
50 | // Get num interface |
---|
51 | uint32_t num_rename_unit = it->grp; |
---|
52 | uint32_t num_inst_rename = it->elt; |
---|
53 | |
---|
54 | log_printf(TRACE,Issue_queue,FUNCTION," * ISSUE_IN [%d][%d]",num_rename_unit,num_inst_rename); |
---|
55 | |
---|
56 | // find |
---|
57 | internal_ISSUE_IN_ACK [num_rename_unit][num_inst_rename] = true; |
---|
58 | |
---|
59 | // update pointer |
---|
60 | ++it; |
---|
61 | num_bank = (num_bank+1)%_param->_nb_bank; |
---|
62 | nb_insert ++; |
---|
63 | } |
---|
64 | |
---|
65 | for (uint32_t i=0; i<_param->_nb_rename_unit; i++) |
---|
66 | for (uint32_t j=0; j<_param->_nb_inst_rename[i]; j++) |
---|
67 | PORT_WRITE(out_ISSUE_IN_ACK [i][j],internal_ISSUE_IN_ACK [i][j]); |
---|
68 | } |
---|
69 | |
---|
70 | log_end(Issue_queue,FUNCTION); |
---|
71 | }; |
---|
72 | |
---|
73 | }; // end namespace issue_queue |
---|
74 | }; // end namespace ooo_engine |
---|
75 | }; // end namespace multi_ooo_engine |
---|
76 | }; // end namespace core |
---|
77 | |
---|
78 | }; // end namespace behavioural |
---|
79 | }; // end namespace morpheo |
---|
80 | #endif |
---|