Changeset 112 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue
- Timestamp:
- Mar 18, 2009, 11:36:26 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Types.h
r111 r112 10 10 11 11 #include "Behavioural/include/Types.h" 12 #include "Behavioural/include/Allocation.h" 12 13 13 14 namespace morpheo { … … 58 59 _nb_inst (nb_inst) 59 60 { 60 _val = new Tcontrol_t [_nb_inst];61 _context_id = new Tcontext_t [_nb_inst];62 _depth = new Tdepth_t [_nb_inst];63 _type = new Ttype_t [_nb_inst];64 _operation = new Toperation_t [_nb_inst];65 _no_execute = new Tcontrol_t [_nb_inst];66 _is_delay_slot = new Tcontrol_t [_nb_inst];61 ALLOC1(_val ,Tcontrol_t ,_nb_inst); 62 ALLOC1(_context_id ,Tcontext_t ,_nb_inst); 63 ALLOC1(_depth ,Tdepth_t ,_nb_inst); 64 ALLOC1(_type ,Ttype_t ,_nb_inst); 65 ALLOC1(_operation ,Toperation_t ,_nb_inst); 66 ALLOC1(_no_execute ,Tcontrol_t ,_nb_inst); 67 ALLOC1(_is_delay_slot ,Tcontrol_t ,_nb_inst); 67 68 #ifdef DEBUG 68 _address = new Tgeneral_data_t [_nb_inst];69 ALLOC1(_address ,Tgeneral_data_t ,_nb_inst); 69 70 #endif 70 _address_next = new Tgeneral_data_t [_nb_inst];71 _has_immediat = new Tcontrol_t [_nb_inst];72 _immediat = new Tgeneral_data_t [_nb_inst];73 _read_ra = new Tcontrol_t [_nb_inst];74 _num_reg_ra = new Tgeneral_address_t [_nb_inst];75 _read_rb = new Tcontrol_t [_nb_inst];76 _num_reg_rb = new Tgeneral_address_t [_nb_inst];77 _read_rc = new Tcontrol_t [_nb_inst];78 _num_reg_rc = new Tspecial_address_t [_nb_inst];79 _write_rd = new Tcontrol_t [_nb_inst];80 _num_reg_rd = new Tgeneral_address_t [_nb_inst];81 _write_re = new Tcontrol_t [_nb_inst];82 _num_reg_re = new Tspecial_address_t [_nb_inst];83 _exception_use = new Texception_t [_nb_inst];84 _exception = new Texception_t [_nb_inst];71 ALLOC1(_address_next ,Tgeneral_data_t ,_nb_inst); 72 ALLOC1(_has_immediat ,Tcontrol_t ,_nb_inst); 73 ALLOC1(_immediat ,Tgeneral_data_t ,_nb_inst); 74 ALLOC1(_read_ra ,Tcontrol_t ,_nb_inst); 75 ALLOC1(_num_reg_ra ,Tgeneral_address_t ,_nb_inst); 76 ALLOC1(_read_rb ,Tcontrol_t ,_nb_inst); 77 ALLOC1(_num_reg_rb ,Tgeneral_address_t ,_nb_inst); 78 ALLOC1(_read_rc ,Tcontrol_t ,_nb_inst); 79 ALLOC1(_num_reg_rc ,Tspecial_address_t ,_nb_inst); 80 ALLOC1(_write_rd ,Tcontrol_t ,_nb_inst); 81 ALLOC1(_num_reg_rd ,Tgeneral_address_t ,_nb_inst); 82 ALLOC1(_write_re ,Tcontrol_t ,_nb_inst); 83 ALLOC1(_num_reg_re ,Tspecial_address_t ,_nb_inst); 84 ALLOC1(_exception_use ,Texception_t ,_nb_inst); 85 ALLOC1(_exception ,Texception_t ,_nb_inst); 85 86 86 87 for (uint32_t i=0; i<_nb_inst; i++) … … 90 91 public : ~decod_queue_entry_t (void) 91 92 { 92 delete [] _val;93 delete [] _context_id;94 delete [] _depth;95 delete [] _type;96 delete [] _operation;97 delete [] _no_execute;98 delete [] _is_delay_slot;93 DELETE1(_val ,_nb_inst); 94 DELETE1(_context_id ,_nb_inst); 95 DELETE1(_depth ,_nb_inst); 96 DELETE1(_type ,_nb_inst); 97 DELETE1(_operation ,_nb_inst); 98 DELETE1(_no_execute ,_nb_inst); 99 DELETE1(_is_delay_slot ,_nb_inst); 99 100 #ifdef DEBUG 100 delete [] _address;101 DELETE1(_address ,_nb_inst); 101 102 #endif 102 delete [] _address_next;103 delete [] _has_immediat;104 delete [] _immediat;105 delete [] _read_ra;106 delete [] _num_reg_ra;107 delete [] _read_rb;108 delete [] _num_reg_rb;109 delete [] _read_rc;110 delete [] _num_reg_rc;111 delete [] _write_rd;112 delete [] _num_reg_rd;113 delete [] _write_re;114 delete [] _num_reg_re;115 delete [] _exception_use;116 delete [] _exception;103 DELETE1(_address_next ,_nb_inst); 104 DELETE1(_has_immediat ,_nb_inst); 105 DELETE1(_immediat ,_nb_inst); 106 DELETE1(_read_ra ,_nb_inst); 107 DELETE1(_num_reg_ra ,_nb_inst); 108 DELETE1(_read_rb ,_nb_inst); 109 DELETE1(_num_reg_rb ,_nb_inst); 110 DELETE1(_read_rc ,_nb_inst); 111 DELETE1(_num_reg_rc ,_nb_inst); 112 DELETE1(_write_rd ,_nb_inst); 113 DELETE1(_num_reg_rd ,_nb_inst); 114 DELETE1(_write_re ,_nb_inst); 115 DELETE1(_num_reg_re ,_nb_inst); 116 DELETE1(_exception_use ,_nb_inst); 117 DELETE1(_exception ,_nb_inst); 117 118 } 118 119 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_allocation.cpp
r111 r112 57 57 // ~~~~~[ Interface : "decod_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 58 58 { 59 ALLOC1_INTERFACE ("decod_in",IN ,WEST,"Input of decod_queue", _param->_nb_inst_decod);59 ALLOC1_INTERFACE_BEGIN("decod_in",IN ,WEST,_("Input of decod_queue"), _param->_nb_inst_decod); 60 60 61 61 ALLOC1_VALACK_IN ( in_DECOD_IN_VAL ,VAL); … … 85 85 ALLOC1_SIGNAL_IN ( in_DECOD_IN_EXCEPTION_USE ,"exception_use",Texception_t ,_param->_size_exception_use ); 86 86 ALLOC1_SIGNAL_IN ( in_DECOD_IN_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception_decod ); 87 88 ALLOC1_INTERFACE_END(_param->_nb_inst_decod); 87 89 } 88 90 89 91 // ~~~~~[ Interface : "decod_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 90 92 { 91 ALLOC1_INTERFACE ("decod_out",OUT,EAST,"Output of decod_queue", _param->_nb_inst_decod);93 ALLOC1_INTERFACE_BEGIN("decod_out",OUT,EAST,_("Output of decod_queue"), _param->_nb_inst_decod); 92 94 93 95 ALLOC1_VALACK_OUT(out_DECOD_OUT_VAL ,VAL); … … 117 119 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_EXCEPTION_USE ,"exception_use",Texception_t ,_param->_size_exception_use ); 118 120 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception_decod ); 121 122 ALLOC1_INTERFACE_END(_param->_nb_inst_decod); 119 123 } 120 124 121 125 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 122 126 { 123 ALLOC1_INTERFACE ("depth",IN ,NORTH,"Depth", _param->_nb_context);127 ALLOC1_INTERFACE_BEGIN("depth",IN ,NORTH,_("Depth"), _param->_nb_context); 124 128 125 129 ALLOC1_SIGNAL_IN ( in_DEPTH_MIN ,"min" ,Tdepth_t ,_param->_size_depth); 126 130 ALLOC1_SIGNAL_IN ( in_DEPTH_MAX ,"max" ,Tdepth_t ,_param->_size_depth); 127 131 ALLOC1_SIGNAL_IN ( in_DEPTH_FULL ,"full" ,Tcontrol_t ,1); 132 133 ALLOC1_INTERFACE_END(_param->_nb_context); 128 134 } 129 135 130 136 // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 131 137 { 132 ALLOC1_INTERFACE ("nb_inst",OUT,NORTH,"Instruction's number", _param->_nb_context);138 ALLOC1_INTERFACE_BEGIN("nb_inst",OUT,NORTH,_("Instruction's number"), _param->_nb_context); 133 139 134 140 ALLOC1_SIGNAL_OUT(out_NB_INST_ALL ,"all" ,Tcontext_t ,_param->_size_nb_inst_decod); 141 142 ALLOC1_INTERFACE_END(_param->_nb_context); 135 143 } 136 144 … … 140 148 switch (_param->_queue_scheme) 141 149 { 142 case DECOD_QUEUE_SCHEME_ONE_FIFO : reg_QUEUE = new std::list<decod_queue_entry_t*>; break;150 case DECOD_QUEUE_SCHEME_ONE_FIFO : ALLOC0(reg_QUEUE,std::list<decod_queue_entry_t*>); break; 143 151 case DECOD_QUEUE_SCHEME_MULTI_FIFO : ALLOC1(reg_QUEUE,std::list<decod_queue_entry_t*>,_param->_nb_bank); break; 144 152 } 145 reg_NB_INST = new uint32_t [_param->_nb_context]; 153 154 ALLOC1(reg_NB_INST,uint32_t,_param->_nb_context); 146 155 147 156 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 148 internal_DECOD_IN_ACK = new Tcontrol_t [_param->_nb_inst_decod];149 internal_DECOD_OUT_VAL = new Tcontrol_t [_param->_nb_inst_decod];150 internal_DECOD_OUT_ACK = new Tcontrol_t [_param->_nb_inst_decod];157 ALLOC1(internal_DECOD_IN_ACK ,Tcontrol_t,_param->_nb_inst_decod); 158 ALLOC1(internal_DECOD_OUT_VAL,Tcontrol_t,_param->_nb_inst_decod); 159 ALLOC1(internal_DECOD_OUT_ACK,Tcontrol_t,_param->_nb_inst_decod); 151 160 } 152 161 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_deallocation.cpp
r111 r112 92 92 switch (_param->_queue_scheme) 93 93 { 94 case DECOD_QUEUE_SCHEME_ONE_FIFO : delete reg_QUEUE; break; 95 case DECOD_QUEUE_SCHEME_MULTI_FIFO : DELETE1(reg_QUEUE,_param->_nb_bank); break; 96 } 97 delete [] reg_NB_INST; 94 case DECOD_QUEUE_SCHEME_ONE_FIFO : 95 { 96 while (not reg_QUEUE->empty()) 97 { 98 delete reg_QUEUE->front(); 99 reg_QUEUE->pop_front(); 100 } 101 102 DELETE0(reg_QUEUE); 103 break; 104 } 105 case DECOD_QUEUE_SCHEME_MULTI_FIFO : 106 { 107 for (uint32_t i=0; i<_param->_nb_bank; ++i) 108 while (not reg_QUEUE[i].empty()) 109 { 110 delete reg_QUEUE[i].front(); 111 reg_QUEUE[i].pop_front(); 112 } 113 114 DELETE1(reg_QUEUE,_param->_nb_bank); break; 115 } 116 } 117 118 DELETE1(reg_NB_INST ,_param->_nb_context); 98 119 99 120 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 100 delete [] internal_DECOD_IN_ACK;101 delete [] internal_DECOD_OUT_VAL;102 delete [] internal_DECOD_OUT_ACK;121 DELETE1(internal_DECOD_IN_ACK ,_param->_nb_inst_decod); 122 DELETE1(internal_DECOD_OUT_VAL,_param->_nb_inst_decod); 123 DELETE1(internal_DECOD_OUT_ACK,_param->_nb_inst_decod); 103 124 } 104 125 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_transition.cpp
r111 r112 28 28 { 29 29 for (uint32_t i=0; i<_param->_nb_bank; ++i) 30 reg_QUEUE[i].clear(); 30 while (not reg_QUEUE[i].empty()) 31 { 32 delete reg_QUEUE[i].front(); 33 reg_QUEUE[i].pop_front(); 34 } 31 35 32 36 for (uint32_t i=0; i<_param->_nb_context; i++) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_one_fifo_transition.cpp
r111 r112 27 27 if (PORT_READ(in_NRESET) == 0) 28 28 { 29 reg_QUEUE->clear(); 29 while (not reg_QUEUE->empty()) 30 { 31 delete reg_QUEUE->front(); 32 reg_QUEUE->pop_front(); 33 } 30 34 31 35 for (uint32_t i=0; i<_param->_nb_context; i++)
Note: See TracChangeset
for help on using the changeset viewer.