Changeset 110 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit
- Timestamp:
- Feb 19, 2009, 5:31:47 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp
r108 r110 100 100 ALLOC1_SC_SIGNAL(out_PREDICT_ADDRESS_SRC ,"out_PREDICT_ADDRESS_SRC ",Tgeneral_data_t ,_param->_nb_inst_decod); 101 101 ALLOC1_SC_SIGNAL(out_PREDICT_ADDRESS_DEST ,"out_PREDICT_ADDRESS_DEST ",Tgeneral_data_t ,_param->_nb_inst_decod); 102 //ALLOC1_SC_SIGNAL( in_PREDICT_CAN_CONTINUE ," in_PREDICT_CAN_CONTINUE ",Tcontrol_t ,_param->_nb_inst_decod);102 ALLOC1_SC_SIGNAL( in_PREDICT_CAN_CONTINUE ," in_PREDICT_CAN_CONTINUE ",Tcontrol_t ,_param->_nb_inst_decod); 103 103 ALLOC1_SC_SIGNAL( in_CONTEXT_DECOD_ENABLE ," in_CONTEXT_DECOD_ENABLE ",Tcontrol_t ,_param->_nb_context); 104 104 ALLOC1_SC_SIGNAL( in_CONTEXT_DEPTH_VAL ," in_CONTEXT_DEPTH_VAL ",Tcontrol_t ,_param->_nb_context); … … 183 183 INSTANCE1_SC_SIGNAL(_Decod,out_PREDICT_ADDRESS_SRC ,_param->_nb_inst_decod); 184 184 INSTANCE1_SC_SIGNAL(_Decod,out_PREDICT_ADDRESS_DEST ,_param->_nb_inst_decod); 185 //INSTANCE1_SC_SIGNAL(_Decod, in_PREDICT_CAN_CONTINUE ,_param->_nb_inst_decod);185 INSTANCE1_SC_SIGNAL(_Decod, in_PREDICT_CAN_CONTINUE ,_param->_nb_inst_decod); 186 186 INSTANCE1_SC_SIGNAL(_Decod, in_CONTEXT_DECOD_ENABLE ,_param->_nb_context); 187 187 INSTANCE1_SC_SIGNAL(_Decod, in_CONTEXT_DEPTH_VAL ,_param->_nb_context); … … 306 306 307 307 in_PREDICT_ACK [i]->write((rand()%100)<percent_transaction_predict); 308 //in_PREDICT_CAN_CONTINUE [i]->write(0);308 in_PREDICT_CAN_CONTINUE [i]->write(0); 309 309 } 310 310 } … … 486 486 delete [] out_PREDICT_ADDRESS_SRC ; 487 487 delete [] out_PREDICT_ADDRESS_DEST ; 488 //delete [] in_PREDICT_CAN_CONTINUE ;488 delete [] in_PREDICT_CAN_CONTINUE ; 489 489 490 490 delete [] in_CONTEXT_DECOD_ENABLE ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h
r108 r110 119 119 public : SC_OUT(Tgeneral_data_t ) ** out_PREDICT_ADDRESS_SRC ;//[nb_inst_decod] 120 120 public : SC_OUT(Tgeneral_data_t ) ** out_PREDICT_ADDRESS_DEST ;//[nb_inst_decod] 121 //public : SC_IN (Tcontrol_t ) ** in_PREDICT_CAN_CONTINUE ;//[nb_inst_decod]121 public : SC_IN (Tcontrol_t ) ** in_PREDICT_CAN_CONTINUE ;//[nb_inst_decod] 122 122 123 123 // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_allocation.cpp
r108 r110 124 124 ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_SRC ,"address_src" ,Tgeneral_data_t ,_param->_size_instruction_address ); 125 125 ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_DEST ,"address_dest" ,Tgeneral_data_t ,_param->_size_instruction_address ); 126 //ALLOC1_SIGNAL_IN ( in_PREDICT_CAN_CONTINUE ,"can_continue" ,Tcontrol_t ,1 );126 ALLOC1_SIGNAL_IN ( in_PREDICT_CAN_CONTINUE ,"can_continue" ,Tcontrol_t ,1 ); 127 127 } 128 128 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_deallocation.cpp
r108 r110 79 79 DELETE1_SIGNAL(out_PREDICT_ADDRESS_SRC ,_param->_nb_inst_decod,_param->_size_instruction_address ); 80 80 DELETE1_SIGNAL(out_PREDICT_ADDRESS_DEST ,_param->_nb_inst_decod,_param->_size_instruction_address ); 81 //DELETE1_SIGNAL( in_PREDICT_CAN_CONTINUE ,_param->_nb_inst_decod,1 );81 DELETE1_SIGNAL( in_PREDICT_CAN_CONTINUE ,_param->_nb_inst_decod,1 ); 82 82 83 83 DELETE1_SIGNAL(in_CONTEXT_DECOD_ENABLE, _param->_nb_context,1); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp
r108 r110 43 43 44 44 Tcontrol_t can_continue [_param->_nb_context]; 45 // Tcontrol_t can_continue_next [_param->_nb_context]; 46 // Tcontrol_t have_decod_branch [_param->_nb_context]; 45 Tcontrol_t have_decod_branch [_param->_nb_context]; 47 46 48 47 for (uint32_t i=0; i<_param->_nb_context; i++) … … 53 52 54 53 can_continue [i] = PORT_READ(in_CONTEXT_DECOD_ENABLE [i]); 55 // can_continue_next [i] = PORT_READ(in_CONTEXT_DECOD_ENABLE [i]); 56 // have_decod_branch [i] = false; 54 have_decod_branch [i] = false; 57 55 } 58 56 … … 80 78 log_printf(TRACE,Decod,FUNCTION," * IFETCH [%d][%d]",x,y); 81 79 log_printf(TRACE,Decod,FUNCTION," * decod_ack [%d] : %d",i,PORT_READ(in_DECOD_ACK [i])); 82 83 // can_continue [x] = can_continue_next [x];84 80 85 81 decod_val [i] = true; // fetch_val and decod_enable … … 131 127 132 128 Ttype_t type = _decod_instruction->_type; 133 Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_CONTEXT_DEPTH [x]):0; // DEPTH_CURRENT 134 129 // Depth current. If have decod a branch and i can continue : depth = depth_next 130 Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_CONTEXT_DEPTH [x]):0; 131 132 if ((_param->_nb_branch_speculated[x] > 0) and have_decod_branch [x]) 133 depth = (depth+1)%_param->_nb_branch_speculated[x]; 134 135 135 if (_param->_have_port_context_id) 136 136 PORT_WRITE(out_DECOD_CONTEXT_ID [i], x); … … 179 179 log_printf(TRACE,Decod,FUNCTION," * address dest : %.8x (%.8x)",_decod_instruction->_address_next,_decod_instruction->_address_next<<2); 180 180 181 predict_val [i] = ifetch_ack [x][y] // and decod_val [i] 181 // test if have already decod an branch : one branch per context 182 predict_val [i] = not have_decod_branch [x] and ifetch_ack [x][y] // and decod_val [i] 182 183 ; 183 decod_val [i] &= PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable184 ifetch_ack [x][y] &= PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable and decod_ack184 decod_val [i] &= not have_decod_branch [x] and PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable 185 ifetch_ack [x][y] &= not have_decod_branch [x] and PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable and decod_ack 185 186 186 187 if (_param->_have_port_context_id) … … 196 197 PORT_WRITE(out_PREDICT_ADDRESS_DEST [i],_decod_instruction->_address_next ); 197 198 198 //can_continue_next [x] = PORT_READ(in_PREDICT_CAN_CONTINUE [i]); // can continue is set if direction is "not take" (also, continue is sequential order) 199 can_continue [x] = false; // one branch per context, the DS don't execute 200 // can_continue_next [x] = false; // one branch per context, the DS don't execute 201 // have_decod_branch [x] = true; 199 // can continue is set if direction is "not take" (also, continue is sequential order) 200 201 // can_continue [x] = false; // one branch per context, the DS don't execute 202 can_continue [x]&= PORT_READ(in_PREDICT_CAN_CONTINUE [i]); // one branch per context, the DS don't execute 203 have_decod_branch [x] = true; 202 204 } 203 205 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_statistics_allocation.cpp
r88 r110 33 33 _stat->create_expr_average_by_cycle ("average_nb_inst_decod","sum_inst_decod","","Average of decod instruction by cycle"); 34 34 _stat->create_expr_percent ("percent_nb_inst_decod","average_nb_inst_decod", toString(_param->_nb_inst_decod), "Percent of decod instruction by cycle"); 35 36 37 35 38 36 log_printf(FUNC,Decod,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Decod_queue.h
r108 r110 55 55 private : counter_t ** _stat_nb_inst; 56 56 private : counter_t * _stat_use_queue; 57 58 private : counter_t * _stat_sum_inst_enable; 59 private : counter_t * _stat_sum_transaction_decod_in; 60 private : counter_t * _stat_average_occupation_bundle; 57 61 #endif 58 62 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_statistics_allocation.cpp
r88 r110 29 29 param_statistics); 30 30 31 _stat_sum_transaction_decod_in = _stat->create_variable("sum_transaction_decod_in"); 32 _stat_sum_inst_enable = _stat->create_variable("sum_inst_enable"); 33 _stat_average_occupation_bundle= _stat->create_counter ("average_occupation_bundle", "", "Occupation average of instruction's bundle."); 34 35 _stat->create_expr ("average_occupation_bundle" ,"/ sum_inst_enable sum_transaction_decod_in"); 36 _stat->create_expr_percent ("percent_occupation_bundle" ,"average_occupation_bundle", toString(_param->_nb_inst_decod),"Percent of instruction's bundle occupation."); 37 31 38 _stat_use_queue = _stat->create_variable ("use_queue"); 32 39 _stat_nb_inst = new counter_t * [_param->_nb_context]; … … 39 46 40 47 _stat->create_expr_average_by_cycle("average_inst_"+toString(i), "nb_inst_"+toString(i), "", toString(_("Average instruction number in decod_queue by cycle (context %d)"),i)); 41 _stat->create_expr_percent ("percent_use_inst_"+toString(i) , "average_inst_"+toString(i), toString(_param->_ size_queue), toString(_("Percent decod_queue's occupation (context %d)"),i));48 _stat->create_expr_percent ("percent_use_inst_"+toString(i) , "average_inst_"+toString(i), toString(_param->_nb_instruction_in_queue), toString(_("Percent decod_queue's occupation (context %d)"),i)); 42 49 43 50 if (i == 0) … … 48 55 49 56 _stat->create_expr_average_by_cycle("average_inst", expr_average_inst, "", _("Average instruction number in decod_queue by cycle (all context)")); 50 _stat->create_expr_percent ("percent_use_inst" , "average_inst", toString(_param->_ size_queue), _("Percent decod_queue's occupation (all context)"));57 _stat->create_expr_percent ("percent_use_inst" , "average_inst", toString(_param->_nb_instruction_in_queue), _("Percent decod_queue's occupation (all context)")); 51 58 52 59 _stat->create_expr_average_by_cycle("average_use_queue", "use_queue", "", _("Average slot decod_queue occupation by cycle.")); 53 _stat->create_expr_percent ("percent_use_queue", "average_use_queue", toString(_param->_ size_queue), _("Percent slot decod_queue occupation."));60 _stat->create_expr_percent ("percent_use_queue", "average_use_queue", toString(_param->_nb_instruction_in_queue), _("Percent slot decod_queue occupation.")); 54 61 55 62 log_end(Decod_queue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_transition.cpp
r109 r110 51 51 entry = new decod_queue_entry_t (_param->_nb_inst_decod); 52 52 reg_QUEUE->push_back(entry); 53 54 #ifdef STATISTICS 55 if (usage_is_set(_usage,USE_STATISTICS)) 56 (*_stat_sum_transaction_decod_in) ++; 57 #endif 53 58 } 59 60 #ifdef STATISTICS 61 if (usage_is_set(_usage,USE_STATISTICS)) 62 (*_stat_sum_inst_enable) ++; 63 #endif 54 64 55 65 Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_DECOD_IN_CONTEXT_ID [i]):0; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/test.cpp
r108 r110 103 103 ALLOC1_SC_SIGNAL(out_PREDICT_ADDRESS_SRC ,"out_PREDICT_ADDRESS_SRC ",Tgeneral_data_t ,_param->_nb_inst_decod); 104 104 ALLOC1_SC_SIGNAL(out_PREDICT_ADDRESS_DEST ,"out_PREDICT_ADDRESS_DEST ",Tgeneral_data_t ,_param->_nb_inst_decod); 105 //ALLOC1_SC_SIGNAL( in_PREDICT_CAN_CONTINUE ," in_PREDICT_CAN_CONTINUE ",Tcontrol_t ,_param->_nb_inst_decod);105 ALLOC1_SC_SIGNAL( in_PREDICT_CAN_CONTINUE ," in_PREDICT_CAN_CONTINUE ",Tcontrol_t ,_param->_nb_inst_decod); 106 106 107 107 ALLOC1_SC_SIGNAL( in_DEPTH_MIN ," in_DEPTH_MIN ",Tdepth_t ,_param->_nb_context); … … 194 194 INSTANCE1_SC_SIGNAL(_Decod_unit,out_PREDICT_ADDRESS_SRC ,_param->_nb_inst_decod); 195 195 INSTANCE1_SC_SIGNAL(_Decod_unit,out_PREDICT_ADDRESS_DEST ,_param->_nb_inst_decod); 196 //INSTANCE1_SC_SIGNAL(_Decod_unit, in_PREDICT_CAN_CONTINUE ,_param->_nb_inst_decod);196 INSTANCE1_SC_SIGNAL(_Decod_unit, in_PREDICT_CAN_CONTINUE ,_param->_nb_inst_decod); 197 197 198 198 if (_param->_have_port_depth) … … 332 332 333 333 in_PREDICT_ACK [i]->write((rand()%100)<percent_transaction_predict); 334 //in_PREDICT_CAN_CONTINUE [i]->write(0);334 in_PREDICT_CAN_CONTINUE [i]->write(0); 335 335 } 336 336 } … … 526 526 DELETE1_SC_SIGNAL(out_PREDICT_ADDRESS_SRC ,_param->_nb_inst_decod); 527 527 DELETE1_SC_SIGNAL(out_PREDICT_ADDRESS_DEST ,_param->_nb_inst_decod); 528 //DELETE1_SC_SIGNAL( in_PREDICT_CAN_CONTINUE ,_param->_nb_inst_decod);528 DELETE1_SC_SIGNAL( in_PREDICT_CAN_CONTINUE ,_param->_nb_inst_decod); 529 529 530 530 DELETE1_SC_SIGNAL( in_DEPTH_MIN ,_param->_nb_context); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/include/Decod_unit.h
r108 r110 118 118 public : SC_OUT(Tgeneral_data_t ) ** out_PREDICT_ADDRESS_SRC ;//[nb_inst_decod] 119 119 public : SC_OUT(Tgeneral_data_t ) ** out_PREDICT_ADDRESS_DEST ;//[nb_inst_decod] 120 //public : SC_IN (Tcontrol_t ) ** in_PREDICT_CAN_CONTINUE ;//[nb_inst_decod]120 public : SC_IN (Tcontrol_t ) ** in_PREDICT_CAN_CONTINUE ;//[nb_inst_decod] 121 121 122 122 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_allocation.cpp
r108 r110 124 124 ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_SRC ,"address_src" ,Tgeneral_data_t ,_param->_size_instruction_address ); 125 125 ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_DEST ,"address_dest" ,Tgeneral_data_t ,_param->_size_instruction_address ); 126 //ALLOC1_SIGNAL_IN ( in_PREDICT_CAN_CONTINUE ,"can_continue" ,Tcontrol_t ,1 );126 ALLOC1_SIGNAL_IN ( in_PREDICT_CAN_CONTINUE ,"can_continue" ,Tcontrol_t ,1 ); 127 127 } 128 128 … … 365 365 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_ADDRESS_DEST" , 366 366 dest,"out_PREDICT_"+toString(i)+"_ADDRESS_DEST" ); 367 //PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_CAN_CONTINUE" ,368 //dest, "in_PREDICT_"+toString(i)+"_CAN_CONTINUE" );367 PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_CAN_CONTINUE" , 368 dest, "in_PREDICT_"+toString(i)+"_CAN_CONTINUE" ); 369 369 } 370 370 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_deallocation.cpp
r108 r110 78 78 DELETE1_SIGNAL(out_PREDICT_ADDRESS_SRC ,_param->_nb_inst_decod,_param->_size_instruction_address); 79 79 DELETE1_SIGNAL(out_PREDICT_ADDRESS_DEST ,_param->_nb_inst_decod,_param->_size_instruction_address); 80 //DELETE1_SIGNAL( in_PREDICT_CAN_CONTINUE ,_param->_nb_inst_decod,1 );80 DELETE1_SIGNAL( in_PREDICT_CAN_CONTINUE ,_param->_nb_inst_decod,1 ); 81 81 82 82 DELETE1_SIGNAL( in_DEPTH_MIN ,_param->_nb_context,_param->_size_depth);
Note: See TracChangeset
for help on using the changeset viewer.