[88] | 1 | /* |
---|
| 2 | * $Id: Issue_queue_deallocation.cpp 128 2009-06-26 08:43:23Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h" |
---|
| 9 | #include "Behavioural/include/Allocation.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::deallocation" |
---|
| 21 | void Issue_queue::deallocation (void) |
---|
| 22 | { |
---|
| 23 | log_begin(Issue_queue,FUNCTION); |
---|
| 24 | |
---|
| 25 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
| 26 | { |
---|
| 27 | delete in_CLOCK ; |
---|
| 28 | delete in_NRESET; |
---|
| 29 | |
---|
| 30 | DELETE2_SIGNAL( in_ISSUE_IN_VAL ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],1 ); |
---|
| 31 | DELETE2_SIGNAL(out_ISSUE_IN_ACK ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],1 ); |
---|
| 32 | DELETE2_SIGNAL( in_ISSUE_IN_CONTEXT_ID ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_context_id ); |
---|
| 33 | DELETE2_SIGNAL( in_ISSUE_IN_FRONT_END_ID ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_front_end_id ); |
---|
| 34 | DELETE2_SIGNAL( in_ISSUE_IN_PACKET_ID ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_rob_ptr ); |
---|
| 35 | DELETE2_SIGNAL( in_ISSUE_IN_OPERATION ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_operation ); |
---|
| 36 | DELETE2_SIGNAL( in_ISSUE_IN_TYPE ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_type ); |
---|
| 37 | DELETE2_SIGNAL( in_ISSUE_IN_STORE_QUEUE_PTR_WRITE,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_store_queue_ptr ); |
---|
[122] | 38 | DELETE2_SIGNAL( in_ISSUE_IN_STORE_QUEUE_PTR_READ ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_store_queue_ptr ); |
---|
| 39 | DELETE2_SIGNAL( in_ISSUE_IN_STORE_QUEUE_EMPTY ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],1); |
---|
[88] | 40 | DELETE2_SIGNAL( in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_load_queue_ptr ); |
---|
| 41 | DELETE2_SIGNAL( in_ISSUE_IN_HAS_IMMEDIAT ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],1 ); |
---|
| 42 | DELETE2_SIGNAL( in_ISSUE_IN_IMMEDIAT ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_general_data ); |
---|
| 43 | DELETE2_SIGNAL( in_ISSUE_IN_READ_RA ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],1 ); |
---|
| 44 | DELETE2_SIGNAL( in_ISSUE_IN_NUM_REG_RA ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_general_register); |
---|
| 45 | DELETE2_SIGNAL( in_ISSUE_IN_READ_RB ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],1 ); |
---|
| 46 | DELETE2_SIGNAL( in_ISSUE_IN_NUM_REG_RB ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_general_register); |
---|
| 47 | DELETE2_SIGNAL( in_ISSUE_IN_READ_RC ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],1 ); |
---|
| 48 | DELETE2_SIGNAL( in_ISSUE_IN_NUM_REG_RC ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_special_register); |
---|
| 49 | DELETE2_SIGNAL( in_ISSUE_IN_WRITE_RD ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],1 ); |
---|
| 50 | DELETE2_SIGNAL( in_ISSUE_IN_NUM_REG_RD ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_general_register); |
---|
| 51 | DELETE2_SIGNAL( in_ISSUE_IN_WRITE_RE ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],1 ); |
---|
| 52 | DELETE2_SIGNAL( in_ISSUE_IN_NUM_REG_RE ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_special_register); |
---|
| 53 | |
---|
| 54 | DELETE1_SIGNAL( in_REEXECUTE_VAL ,_param->_nb_inst_reexecute,1 ); |
---|
| 55 | DELETE1_SIGNAL(out_REEXECUTE_ACK ,_param->_nb_inst_reexecute,1 ); |
---|
| 56 | DELETE1_SIGNAL( in_REEXECUTE_CONTEXT_ID ,_param->_nb_inst_reexecute,_param->_size_context_id ); |
---|
| 57 | DELETE1_SIGNAL( in_REEXECUTE_FRONT_END_ID ,_param->_nb_inst_reexecute,_param->_size_front_end_id ); |
---|
| 58 | DELETE1_SIGNAL( in_REEXECUTE_PACKET_ID ,_param->_nb_inst_reexecute,_param->_size_rob_ptr ); |
---|
| 59 | DELETE1_SIGNAL( in_REEXECUTE_OPERATION ,_param->_nb_inst_reexecute,_param->_size_operation ); |
---|
| 60 | DELETE1_SIGNAL( in_REEXECUTE_TYPE ,_param->_nb_inst_reexecute,_param->_size_type ); |
---|
| 61 | DELETE1_SIGNAL( in_REEXECUTE_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_reexecute,_param->_size_store_queue_ptr ); |
---|
[122] | 62 | DELETE1_SIGNAL( in_REEXECUTE_STORE_QUEUE_PTR_READ ,_param->_nb_inst_reexecute,_param->_size_store_queue_ptr ); |
---|
| 63 | DELETE1_SIGNAL( in_REEXECUTE_STORE_QUEUE_EMPTY ,_param->_nb_inst_reexecute,1); |
---|
[88] | 64 | DELETE1_SIGNAL( in_REEXECUTE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_reexecute,_param->_size_load_queue_ptr ); |
---|
| 65 | DELETE1_SIGNAL( in_REEXECUTE_HAS_IMMEDIAT ,_param->_nb_inst_reexecute,1 ); |
---|
| 66 | DELETE1_SIGNAL( in_REEXECUTE_IMMEDIAT ,_param->_nb_inst_reexecute,_param->_size_general_data ); |
---|
| 67 | DELETE1_SIGNAL( in_REEXECUTE_READ_RA ,_param->_nb_inst_reexecute,1 ); |
---|
| 68 | DELETE1_SIGNAL( in_REEXECUTE_NUM_REG_RA ,_param->_nb_inst_reexecute,_param->_size_general_register); |
---|
| 69 | DELETE1_SIGNAL( in_REEXECUTE_READ_RB ,_param->_nb_inst_reexecute,1 ); |
---|
| 70 | DELETE1_SIGNAL( in_REEXECUTE_NUM_REG_RB ,_param->_nb_inst_reexecute,_param->_size_general_register); |
---|
| 71 | DELETE1_SIGNAL( in_REEXECUTE_READ_RC ,_param->_nb_inst_reexecute,1 ); |
---|
| 72 | DELETE1_SIGNAL( in_REEXECUTE_NUM_REG_RC ,_param->_nb_inst_reexecute,_param->_size_special_register); |
---|
| 73 | DELETE1_SIGNAL( in_REEXECUTE_WRITE_RD ,_param->_nb_inst_reexecute,1 ); |
---|
| 74 | DELETE1_SIGNAL( in_REEXECUTE_NUM_REG_RD ,_param->_nb_inst_reexecute,_param->_size_general_register); |
---|
| 75 | DELETE1_SIGNAL( in_REEXECUTE_WRITE_RE ,_param->_nb_inst_reexecute,1 ); |
---|
| 76 | DELETE1_SIGNAL( in_REEXECUTE_NUM_REG_RE ,_param->_nb_inst_reexecute,_param->_size_special_register); |
---|
| 77 | |
---|
| 78 | DELETE1_SIGNAL(out_ISSUE_OUT_VAL ,_param->_nb_inst_issue,1 ); |
---|
| 79 | DELETE1_SIGNAL( in_ISSUE_OUT_ACK ,_param->_nb_inst_issue,1 ); |
---|
| 80 | DELETE1_SIGNAL(out_ISSUE_OUT_CONTEXT_ID ,_param->_nb_inst_issue,_param->_size_context_id ); |
---|
| 81 | DELETE1_SIGNAL(out_ISSUE_OUT_FRONT_END_ID ,_param->_nb_inst_issue,_param->_size_front_end_id ); |
---|
| 82 | DELETE1_SIGNAL(out_ISSUE_OUT_PACKET_ID ,_param->_nb_inst_issue,_param->_size_rob_ptr ); |
---|
| 83 | DELETE1_SIGNAL(out_ISSUE_OUT_OPERATION ,_param->_nb_inst_issue,_param->_size_operation ); |
---|
| 84 | DELETE1_SIGNAL(out_ISSUE_OUT_TYPE ,_param->_nb_inst_issue,_param->_size_type ); |
---|
| 85 | DELETE1_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_issue,_param->_size_store_queue_ptr ); |
---|
[122] | 86 | DELETE1_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_PTR_READ ,_param->_nb_inst_issue,_param->_size_store_queue_ptr ); |
---|
| 87 | DELETE1_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_EMPTY ,_param->_nb_inst_issue,1); |
---|
[88] | 88 | DELETE1_SIGNAL(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_issue,_param->_size_load_queue_ptr ); |
---|
| 89 | DELETE1_SIGNAL(out_ISSUE_OUT_HAS_IMMEDIAT ,_param->_nb_inst_issue,1 ); |
---|
| 90 | DELETE1_SIGNAL(out_ISSUE_OUT_IMMEDIAT ,_param->_nb_inst_issue,_param->_size_general_data ); |
---|
| 91 | DELETE1_SIGNAL(out_ISSUE_OUT_READ_RA ,_param->_nb_inst_issue,1 ); |
---|
| 92 | DELETE1_SIGNAL(out_ISSUE_OUT_NUM_REG_RA ,_param->_nb_inst_issue,_param->_size_general_register); |
---|
| 93 | DELETE1_SIGNAL(out_ISSUE_OUT_READ_RB ,_param->_nb_inst_issue,1 ); |
---|
| 94 | DELETE1_SIGNAL(out_ISSUE_OUT_NUM_REG_RB ,_param->_nb_inst_issue,_param->_size_general_register); |
---|
| 95 | DELETE1_SIGNAL(out_ISSUE_OUT_READ_RC ,_param->_nb_inst_issue,1 ); |
---|
| 96 | DELETE1_SIGNAL(out_ISSUE_OUT_NUM_REG_RC ,_param->_nb_inst_issue,_param->_size_special_register); |
---|
| 97 | DELETE1_SIGNAL(out_ISSUE_OUT_WRITE_RD ,_param->_nb_inst_issue,1 ); |
---|
| 98 | DELETE1_SIGNAL(out_ISSUE_OUT_NUM_REG_RD ,_param->_nb_inst_issue,_param->_size_general_register); |
---|
| 99 | DELETE1_SIGNAL(out_ISSUE_OUT_WRITE_RE ,_param->_nb_inst_issue,1 ); |
---|
| 100 | DELETE1_SIGNAL(out_ISSUE_OUT_NUM_REG_RE ,_param->_nb_inst_issue,_param->_size_special_register); |
---|
| 101 | |
---|
| 102 | // ~~~~~[ Registers ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[128] | 103 | while (not _reexecute_queue.empty()) |
---|
| 104 | { |
---|
| 105 | delete _reexecute_queue.front(); |
---|
| 106 | _reexecute_queue.pop_front(); |
---|
| 107 | } |
---|
| 108 | |
---|
[112] | 109 | DELETE1(_issue_queue ,_param->_nb_bank); |
---|
[88] | 110 | |
---|
| 111 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[110] | 112 | DELETE1(internal_ISSUE_OUT_VAL ,_param->_nb_inst_issue); |
---|
| 113 | DELETE1(internal_ISSUE_OUT_FROM_REEXECUTE,_param->_nb_inst_issue); |
---|
| 114 | DELETE1(internal_ISSUE_OUT_NUM_BANK ,_param->_nb_inst_issue); |
---|
| 115 | DELETE1(internal_ISSUE_OUT_ENTRY ,_param->_nb_inst_issue); |
---|
| 116 | |
---|
| 117 | DELETE1(internal_REEXECUTE_ACK ,_param->_nb_inst_reexecute); |
---|
[111] | 118 | |
---|
| 119 | if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_OUT_OF_ORDER) |
---|
| 120 | { |
---|
| 121 | DELETE1(internal_BANK_IN_ACK ,_param->_nb_bank); |
---|
| 122 | DELETE1(internal_BANK_IN_NUM_RENAME_UNIT ,_param->_nb_bank); |
---|
| 123 | DELETE1(internal_BANK_IN_NUM_INST ,_param->_nb_bank); |
---|
| 124 | } |
---|
| 125 | if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_IN_ORDER) |
---|
| 126 | { |
---|
| 127 | DELETE2(internal_ISSUE_IN_ACK ,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]); |
---|
| 128 | } |
---|
[88] | 129 | } |
---|
| 130 | |
---|
| 131 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 132 | |
---|
| 133 | delete _priority_in ; |
---|
[111] | 134 | if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_OUT_OF_ORDER) |
---|
| 135 | { |
---|
| 136 | delete _priority_out; |
---|
| 137 | delete _priority_reg; |
---|
| 138 | } |
---|
[88] | 139 | delete _component; |
---|
| 140 | |
---|
| 141 | log_end(Issue_queue,FUNCTION); |
---|
| 142 | }; |
---|
| 143 | |
---|
| 144 | }; // end namespace issue_queue |
---|
| 145 | }; // end namespace ooo_engine |
---|
| 146 | }; // end namespace multi_ooo_engine |
---|
| 147 | }; // end namespace core |
---|
| 148 | |
---|
| 149 | }; // end namespace behavioural |
---|
| 150 | }; // end namespace morpheo |
---|