[78] | 1 | /* |
---|
| 2 | * $Id: Ifetch_queue_deallocation.cpp 112 2009-03-18 22:36:26Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/include/Ifetch_queue.h" |
---|
[112] | 9 | #include "Behavioural/include/Allocation.h" |
---|
[78] | 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_front_end { |
---|
| 15 | namespace front_end { |
---|
| 16 | namespace ifetch_unit { |
---|
| 17 | namespace ifetch_queue { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Ifetch_queue::deallocation" |
---|
| 22 | void Ifetch_queue::deallocation (void) |
---|
| 23 | { |
---|
| 24 | log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin"); |
---|
| 25 | |
---|
[88] | 26 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
[78] | 27 | { |
---|
| 28 | delete in_CLOCK ; |
---|
| 29 | delete in_NRESET; |
---|
| 30 | |
---|
[112] | 31 | DELETE0_SIGNAL( in_ADDRESS_VAL ,1); |
---|
| 32 | DELETE0_SIGNAL(out_ADDRESS_ACK ,1); |
---|
| 33 | DELETE0_SIGNAL( in_ADDRESS_INSTRUCTION_ADDRESS ,_param->_size_instruction_address); |
---|
| 34 | DELETE0_SIGNAL( in_ADDRESS_INST_IFETCH_PTR ,_param->_size_inst_ifetch_ptr); |
---|
| 35 | DELETE0_SIGNAL( in_ADDRESS_BRANCH_STATE ,_param->_size_branch_state ); |
---|
| 36 | DELETE0_SIGNAL( in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID,_param->_size_depth ); |
---|
| 37 | DELETE0_SIGNAL(out_ADDRESS_IFETCH_QUEUE_ID ,_param->_size_ifetch_queue_ptr); |
---|
| 38 | DELETE1_SIGNAL( in_ADDRESS_INSTRUCTION_ENABLE ,1,_param->_nb_instruction); |
---|
| 39 | |
---|
| 40 | DELETE1_SIGNAL(out_DECOD_VAL ,1,_param->_nb_instruction); |
---|
| 41 | DELETE1_SIGNAL( in_DECOD_ACK ,1,_param->_nb_instruction); |
---|
| 42 | DELETE1_SIGNAL(out_DECOD_INSTRUCTION ,_param->_size_instruction,_param->_nb_instruction); |
---|
| 43 | DELETE0_SIGNAL(out_DECOD_ADDRESS ,_param->_size_instruction_address); |
---|
| 44 | DELETE0_SIGNAL(out_DECOD_INST_IFETCH_PTR ,_param->_size_inst_ifetch_ptr ); |
---|
| 45 | DELETE0_SIGNAL(out_DECOD_BRANCH_STATE ,_param->_size_branch_state ); |
---|
| 46 | DELETE0_SIGNAL(out_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_size_depth ); |
---|
| 47 | DELETE0_SIGNAL(out_DECOD_EXCEPTION ,_param->_size_exception_ifetch); |
---|
| 48 | |
---|
| 49 | DELETE0_SIGNAL( in_ICACHE_RSP_VAL ,1); |
---|
| 50 | DELETE0_SIGNAL(out_ICACHE_RSP_ACK ,1); |
---|
| 51 | DELETE0_SIGNAL( in_ICACHE_RSP_PACKET_ID ,_param->_size_ifetch_queue_ptr); |
---|
| 52 | DELETE0_SIGNAL( in_ICACHE_RSP_ERROR ,_param->_size_icache_error); |
---|
| 53 | DELETE1_SIGNAL( in_ICACHE_RSP_INSTRUCTION,_param->_size_instruction,_param->_nb_instruction); |
---|
| 54 | |
---|
| 55 | DELETE0_SIGNAL( in_EVENT_RESET_VAL,1); |
---|
| 56 | DELETE0_SIGNAL(out_EVENT_RESET_ACK,1); |
---|
[78] | 57 | } |
---|
[88] | 58 | |
---|
| 59 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 60 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
| 61 | { |
---|
[112] | 62 | DELETE1(internal_DECOD_VAL,_param->_nb_instruction); |
---|
| 63 | |
---|
| 64 | for (uint32_t i=0;i<_param->_size_queue; i++) |
---|
| 65 | delete _queue[i]; |
---|
[88] | 66 | delete [] _queue; |
---|
| 67 | } |
---|
| 68 | |
---|
[78] | 69 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 70 | delete _component; |
---|
| 71 | |
---|
| 72 | log_printf(FUNC,Ifetch_queue,FUNCTION,"End"); |
---|
| 73 | }; |
---|
| 74 | |
---|
| 75 | }; // end namespace ifetch_queue |
---|
| 76 | }; // end namespace ifetch_unit |
---|
| 77 | }; // end namespace front_end |
---|
| 78 | }; // end namespace multi_front_end |
---|
| 79 | }; // end namespace core |
---|
| 80 | |
---|
| 81 | }; // end namespace behavioural |
---|
| 82 | }; // end namespace morpheo |
---|