[59] | 1 | #undef FUNCTION |
---|
| 2 | #define FUNCTION "Load_store_unit::" |
---|
| 3 | |
---|
| 4 | #ifdef SYSTEMC |
---|
| 5 | /* |
---|
| 6 | * $Id: Load_store_unit_deallocation.cpp 138 2010-05-12 17:34:01Z rosiere $ |
---|
| 7 | * |
---|
[88] | 8 | * [ Description ] |
---|
[59] | 9 | * |
---|
| 10 | */ |
---|
| 11 | |
---|
| 12 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h" |
---|
[88] | 13 | #include "Behavioural/include/Allocation.h" |
---|
[59] | 14 | |
---|
| 15 | namespace morpheo { |
---|
| 16 | namespace behavioural { |
---|
| 17 | namespace core { |
---|
| 18 | namespace multi_execute_loop { |
---|
| 19 | namespace execute_loop { |
---|
| 20 | namespace multi_execute_unit { |
---|
| 21 | namespace execute_unit { |
---|
| 22 | namespace load_store_unit { |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | #undef FUNCTION |
---|
| 26 | #define FUNCTION "Load_store_unit::deallocation" |
---|
| 27 | void Load_store_unit::deallocation (void) |
---|
| 28 | { |
---|
| 29 | log_printf(FUNC,Load_store_unit,FUNCTION,"Begin"); |
---|
| 30 | |
---|
[88] | 31 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
| 32 | { |
---|
[59] | 33 | //#if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 34 | delete in_CLOCK ; |
---|
| 35 | //#endif |
---|
| 36 | delete in_NRESET; |
---|
| 37 | |
---|
[88] | 38 | DELETE1_SIGNAL( in_MEMORY_IN_VAL ,_param->_nb_inst_memory,1); |
---|
| 39 | DELETE1_SIGNAL(out_MEMORY_IN_ACK ,_param->_nb_inst_memory,1); |
---|
| 40 | DELETE1_SIGNAL( in_MEMORY_IN_CONTEXT_ID ,_param->_nb_inst_memory,_param->_size_context_id ); |
---|
| 41 | DELETE1_SIGNAL( in_MEMORY_IN_FRONT_END_ID ,_param->_nb_inst_memory,_param->_size_front_end_id ); |
---|
| 42 | DELETE1_SIGNAL( in_MEMORY_IN_OOO_ENGINE_ID ,_param->_nb_inst_memory,_param->_size_ooo_engine_id ); |
---|
| 43 | DELETE1_SIGNAL( in_MEMORY_IN_PACKET_ID ,_param->_nb_inst_memory,_param->_size_rob_ptr ); |
---|
| 44 | DELETE1_SIGNAL( in_MEMORY_IN_OPERATION ,_param->_nb_inst_memory,_param->_size_operation ); |
---|
| 45 | DELETE1_SIGNAL( in_MEMORY_IN_TYPE ,_param->_nb_inst_memory,_param->_size_type ); |
---|
[136] | 46 | DELETE1_SIGNAL( in_MEMORY_IN_CANCEL ,_param->_nb_inst_memory,1); |
---|
[88] | 47 | DELETE1_SIGNAL( in_MEMORY_IN_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_memory,_param->_size_store_queue_ptr ); |
---|
[122] | 48 | DELETE1_SIGNAL( in_MEMORY_IN_STORE_QUEUE_PTR_READ ,_param->_nb_inst_memory,_param->_size_store_queue_ptr ); |
---|
| 49 | DELETE1_SIGNAL( in_MEMORY_IN_STORE_QUEUE_EMPTY ,_param->_nb_inst_memory,1); |
---|
[88] | 50 | DELETE1_SIGNAL( in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_memory,_param->_size_load_queue_ptr ); |
---|
| 51 | DELETE1_SIGNAL( in_MEMORY_IN_HAS_IMMEDIAT ,_param->_nb_inst_memory,1 ); |
---|
| 52 | DELETE1_SIGNAL( in_MEMORY_IN_IMMEDIAT ,_param->_nb_inst_memory,_param->_size_general_data ); |
---|
| 53 | DELETE1_SIGNAL( in_MEMORY_IN_DATA_RA ,_param->_nb_inst_memory,_param->_size_general_data ); |
---|
| 54 | DELETE1_SIGNAL( in_MEMORY_IN_DATA_RB ,_param->_nb_inst_memory,_param->_size_general_data ); |
---|
| 55 | DELETE1_SIGNAL( in_MEMORY_IN_DATA_RC ,_param->_nb_inst_memory,_param->_size_special_data ); |
---|
| 56 | DELETE1_SIGNAL( in_MEMORY_IN_WRITE_RD ,_param->_nb_inst_memory,1 ); |
---|
| 57 | DELETE1_SIGNAL( in_MEMORY_IN_NUM_REG_RD ,_param->_nb_inst_memory,1 ); |
---|
| 58 | DELETE1_SIGNAL( in_MEMORY_IN_WRITE_RE ,_param->_nb_inst_memory,1 ); |
---|
| 59 | DELETE1_SIGNAL( in_MEMORY_IN_NUM_REG_RE ,_param->_nb_inst_memory,1 ); |
---|
| 60 | |
---|
| 61 | DELETE1_SIGNAL(out_MEMORY_OUT_VAL ,_param->_nb_inst_memory,1); |
---|
| 62 | DELETE1_SIGNAL( in_MEMORY_OUT_ACK ,_param->_nb_inst_memory,1); |
---|
| 63 | DELETE1_SIGNAL(out_MEMORY_OUT_CONTEXT_ID ,_param->_nb_inst_memory,_param->_size_context_id ); |
---|
| 64 | DELETE1_SIGNAL(out_MEMORY_OUT_FRONT_END_ID ,_param->_nb_inst_memory,_param->_size_front_end_id ); |
---|
| 65 | DELETE1_SIGNAL(out_MEMORY_OUT_OOO_ENGINE_ID,_param->_nb_inst_memory,_param->_size_ooo_engine_id ); |
---|
| 66 | DELETE1_SIGNAL(out_MEMORY_OUT_PACKET_ID ,_param->_nb_inst_memory,_param->_size_rob_ptr ); |
---|
| 67 | // DELETE1_SIGNAL(out_MEMORY_OUT_OPERATION ,_param->_nb_inst_memory,_param->_size_operation ); |
---|
[97] | 68 | // DELETE1_SIGNAL(out_MEMORY_OUT_TYPE ,_param->_nb_inst_memory,_param->_size_type ); |
---|
[136] | 69 | DELETE1_SIGNAL(out_MEMORY_OUT_CANCEL ,_param->_nb_inst_memory,1 ); |
---|
[88] | 70 | DELETE1_SIGNAL(out_MEMORY_OUT_WRITE_RD ,_param->_nb_inst_memory,1 ); |
---|
| 71 | DELETE1_SIGNAL(out_MEMORY_OUT_NUM_REG_RD ,_param->_nb_inst_memory,_param->_size_general_register ); |
---|
| 72 | DELETE1_SIGNAL(out_MEMORY_OUT_DATA_RD ,_param->_nb_inst_memory,_param->_size_general_data ); |
---|
| 73 | DELETE1_SIGNAL(out_MEMORY_OUT_WRITE_RE ,_param->_nb_inst_memory,1 ); |
---|
| 74 | DELETE1_SIGNAL(out_MEMORY_OUT_NUM_REG_RE ,_param->_nb_inst_memory,_param->_size_general_register ); |
---|
| 75 | DELETE1_SIGNAL(out_MEMORY_OUT_DATA_RE ,_param->_nb_inst_memory,_param->_size_general_data ); |
---|
| 76 | DELETE1_SIGNAL(out_MEMORY_OUT_EXCEPTION ,_param->_nb_inst_memory,_param->_size_exception ); |
---|
| 77 | DELETE1_SIGNAL(out_MEMORY_OUT_NO_SEQUENCE ,_param->_nb_inst_memory,1 ); |
---|
| 78 | DELETE1_SIGNAL(out_MEMORY_OUT_ADDRESS ,_param->_nb_inst_memory,_param->_size_general_data ); |
---|
| 79 | |
---|
| 80 | DELETE1_SIGNAL(out_DCACHE_REQ_VAL ,_param->_nb_cache_port,1); |
---|
| 81 | DELETE1_SIGNAL( in_DCACHE_REQ_ACK ,_param->_nb_cache_port,1); |
---|
| 82 | DELETE1_SIGNAL(out_DCACHE_REQ_CONTEXT_ID ,_param->_nb_cache_port,_param->_size_dcache_context_id ); |
---|
| 83 | DELETE1_SIGNAL(out_DCACHE_REQ_PACKET_ID ,_param->_nb_cache_port,_param->_size_dcache_packet_id ); |
---|
| 84 | DELETE1_SIGNAL(out_DCACHE_REQ_ADDRESS ,_param->_nb_cache_port,_param->_size_general_data); |
---|
| 85 | DELETE1_SIGNAL(out_DCACHE_REQ_TYPE ,_param->_nb_cache_port,_param->_size_dcache_type ); |
---|
| 86 | DELETE1_SIGNAL(out_DCACHE_REQ_WDATA ,_param->_nb_cache_port,_param->_size_general_data); |
---|
| 87 | |
---|
| 88 | DELETE1_SIGNAL( in_DCACHE_RSP_VAL ,_param->_nb_cache_port,1); |
---|
| 89 | DELETE1_SIGNAL(out_DCACHE_RSP_ACK ,_param->_nb_cache_port,1); |
---|
| 90 | DELETE1_SIGNAL( in_DCACHE_RSP_CONTEXT_ID ,_param->_nb_cache_port,_param->_size_dcache_context_id ); |
---|
| 91 | DELETE1_SIGNAL( in_DCACHE_RSP_PACKET_ID ,_param->_nb_cache_port,_param->_size_dcache_packet_id ); |
---|
| 92 | DELETE1_SIGNAL( in_DCACHE_RSP_RDATA ,_param->_nb_cache_port,_param->_size_general_data); |
---|
| 93 | DELETE1_SIGNAL( in_DCACHE_RSP_ERROR ,_param->_nb_cache_port,_param->_size_dcache_error); |
---|
| 94 | |
---|
| 95 | DELETE1_SIGNAL(out_BYPASS_MEMORY_VAL ,_param->_nb_bypass_memory,1); |
---|
| 96 | DELETE1_SIGNAL(out_BYPASS_MEMORY_OOO_ENGINE_ID ,_param->_nb_bypass_memory,_param->_size_ooo_engine_id ); |
---|
| 97 | DELETE1_SIGNAL(out_BYPASS_MEMORY_NUM_REG ,_param->_nb_bypass_memory,_param->_size_general_register); |
---|
| 98 | DELETE1_SIGNAL(out_BYPASS_MEMORY_DATA ,_param->_nb_bypass_memory,_param->_size_general_data ); |
---|
| 99 | |
---|
| 100 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[117] | 101 | delete _speculative_access_queue_control ; |
---|
[59] | 102 | |
---|
[117] | 103 | DELETE1(_store_queue ,_param->_size_store_queue); |
---|
| 104 | DELETE1(_load_queue ,_param->_size_load_queue); |
---|
| 105 | DELETE1(_speculative_access_queue,_param->_size_speculative_access_queue); |
---|
[59] | 106 | |
---|
[117] | 107 | DELETE1(reg_STORE_QUEUE_NB_CHECK ,_param->_size_store_queue); |
---|
[138] | 108 | // DELETE1(reg_STORE_QUEUE_INVALID ,_param->_size_store_queue); |
---|
[117] | 109 | |
---|
| 110 | // DELETE1(internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ,_param->_nb_cache_port); |
---|
| 111 | |
---|
| 112 | // DELETE1(internal_MEMORY_IN_ACK ,_param->_nb_inst_memory); |
---|
| 113 | // DELETE1(internal_MEMORY_OUT_VAL ,_param->_nb_inst_memory); |
---|
| 114 | // DELETE1(internal_MEMORY_OUT_SELECT_QUEUE ,_param->_nb_inst_memory); |
---|
| 115 | // DELETE1(internal_MEMORY_OUT_PTR ,_param->_nb_inst_memory); |
---|
| 116 | |
---|
| 117 | // DELETE1(internal_DCACHE_RSP_ACK ,_param->_nb_cache_port ); |
---|
| 118 | // DELETE1(internal_DCACHE_REQ_VAL ,_param->_nb_cache_port ); |
---|
| 119 | // DELETE1(internal_DCACHE_REQ_SELECT_QUEUE ,_param->_nb_cache_port ); |
---|
[88] | 120 | } |
---|
| 121 | |
---|
| 122 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 123 | |
---|
[59] | 124 | delete _component; |
---|
| 125 | |
---|
[124] | 126 | #if defined(DEBUG) and defined(DEBUG_Load_store_unit) and (DEBUG_Load_store_unit == true) |
---|
[134] | 127 | if (log_file_generate) |
---|
| 128 | { |
---|
| 129 | for (uint32_t i=0; i<_param->_nb_thread; ++i) |
---|
| 130 | if (_param->_num_thread_valid [i]) |
---|
| 131 | { |
---|
| 132 | memory_log_file [i].close(); |
---|
| 133 | } |
---|
| 134 | delete [] memory_log_file; |
---|
| 135 | } |
---|
[124] | 136 | #endif |
---|
[59] | 137 | |
---|
| 138 | log_printf(FUNC,Load_store_unit,FUNCTION,"End"); |
---|
| 139 | }; |
---|
| 140 | |
---|
| 141 | }; // end namespace load_store_unit |
---|
| 142 | }; // end namespace execute_unit |
---|
| 143 | }; // end namespace multi_execute_unit |
---|
| 144 | }; // end namespace execute_loop |
---|
| 145 | }; // end namespace multi_execute_loop |
---|
| 146 | }; // end namespace core |
---|
| 147 | |
---|
| 148 | }; // end namespace behavioural |
---|
| 149 | }; // end namespace morpheo |
---|
| 150 | #endif |
---|