Changeset 111 for trunk/IPs/systemC/processor/Morpheo/Behavioural
- Timestamp:
- Feb 27, 2009, 7:37:40 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural
- Files:
-
- 22 added
- 146 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/include/Parameters.h
r97 r111 35 35 public : uint32_t _nb_decod_bloc ; 36 36 public : uint32_t * _size_decod_queue ;//[nb_decod_bloc] 37 public : morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t 38 * _decod_queue_scheme ;//[nb_decod_bloc] 37 39 public : uint32_t * _nb_inst_decod ;//[nb_decod_bloc] 38 40 public : uint32_t * _nb_context_select ;//[nb_decod_bloc] … … 72 74 public : uint32_t * _nb_port_check ;//[nb_load_store_unit] 73 75 public : core::multi_execute_loop::execute_loop::Tspeculative_load_t 74 76 * _speculative_load ;//[nb_load_store_unit] 75 77 public : uint32_t * _nb_bypass_memory ;//[nb_load_store_unit] 76 78 public : uint32_t * _nb_cache_port ;//[nb_load_store_unit] … … 81 83 public : uint32_t * _nb_inst_functionnal_unit ;//[nb_functionnal_unit] 82 84 public : core::multi_execute_loop::execute_loop::execute_timing_t 83 *** _timing 85 *** _timing ;//[nb_functionnal_unit][nb_type][nb_operation] 84 86 85 87 // Icache_port … … 127 129 public : Tload_balancing_t * _commit_load_balancing ;//[nb_ooo_engine] 128 130 public : uint32_t * _size_issue_queue ;//[nb_ooo_engine] 131 public : morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Tissue_queue_scheme_t 132 * _issue_queue_scheme ;//[nb_ooo_engine] 129 133 public : uint32_t * _nb_issue_queue_bank ;//[nb_ooo_engine] 130 134 public : Tpriority_t * _issue_priority ;//[nb_ooo_engine] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Instance.cpp
r97 r111 104 104 DELETE1(_param->_issue_priority ,_param->_nb_ooo_engine); 105 105 DELETE1(_param->_nb_issue_queue_bank ,_param->_nb_ooo_engine); 106 DELETE1(_param->_issue_queue_scheme ,_param->_nb_ooo_engine); 106 107 DELETE1(_param->_size_issue_queue ,_param->_nb_ooo_engine); 107 108 DELETE1(_param->_commit_load_balancing ,_param->_nb_ooo_engine); … … 163 164 DELETE1(_param->_nb_context_select ,_param->_nb_decod_bloc); 164 165 DELETE1(_param->_nb_inst_decod ,_param->_nb_decod_bloc); 166 DELETE1(_param->_decod_queue_scheme ,_param->_nb_decod_bloc); 165 167 DELETE1(_param->_size_decod_queue ,_param->_nb_decod_bloc); 166 168 DELETE1(_param->_ufpt_size_queue ,_param->_nb_thread); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Instance_fromInternalStructure.cpp
r109 r111 80 80 81 81 ALLOC1(_param->_size_decod_queue ,uint32_t ,_param->_nb_decod_bloc); 82 ALLOC1(_param->_decod_queue_scheme ,morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t 83 ,_param->_nb_decod_bloc); 82 84 ALLOC1(_param->_nb_inst_decod ,uint32_t ,_param->_nb_decod_bloc); 83 85 ALLOC1(_param->_nb_context_select ,uint32_t ,_param->_nb_decod_bloc); … … 90 92 91 93 _param->_size_decod_queue [i] = fromString<uint32_t > (getParam("size_decod_queue" , "decod_bloc",toString(i).c_str(),"")); 94 _param->_decod_queue_scheme [i] = fromString<morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t> 95 (getParam("decod_queue_scheme" , "decod_bloc",toString(i).c_str(),"")); 92 96 _param->_nb_inst_decod [i] = fromString<uint32_t > (getParam("nb_inst_decod" , "decod_bloc",toString(i).c_str(),"")); 93 97 _param->_nb_context_select [i] = fromString<uint32_t > (getParam("nb_context_select" , "decod_bloc",toString(i).c_str(),"")); … … 338 342 ALLOC1(_param->_commit_load_balancing ,Tload_balancing_t,_param->_nb_ooo_engine); 339 343 ALLOC1(_param->_size_issue_queue ,uint32_t ,_param->_nb_ooo_engine); 344 ALLOC1(_param->_issue_queue_scheme ,morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Tissue_queue_scheme_t 345 ,_param->_nb_ooo_engine); 340 346 ALLOC1(_param->_nb_issue_queue_bank ,uint32_t ,_param->_nb_ooo_engine); 341 347 ALLOC1(_param->_issue_priority ,Tpriority_t ,_param->_nb_ooo_engine); … … 361 367 _param->_commit_load_balancing [i] = fromString<Tload_balancing_t>(getParam("commit_load_balancing" ,"ooo_engine",toString(i).c_str(), "")); 362 368 _param->_size_issue_queue [i] = fromString<uint32_t >(getParam("size_issue_queue" ,"ooo_engine",toString(i).c_str(), "")); 369 _param->_issue_queue_scheme [i] = fromString<morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Tissue_queue_scheme_t> 370 (getParam("issue_queue_scheme" ,"ooo_engine",toString(i).c_str(), "")); 363 371 _param->_nb_issue_queue_bank [i] = fromString<uint32_t >(getParam("nb_issue_queue_bank" ,"ooo_engine",toString(i).c_str(), "")); 364 372 _param->_issue_priority [i] = fromString<Tpriority_t >(getParam("issue_priority" ,"ooo_engine",toString(i).c_str(), "")); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/include/Core_Glue.h
r105 r111 204 204 205 205 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 206 private : generic::priority::Priority ** _priority; //[nb_execute_loop] 206 private : generic::priority::Priority ** _priority_ooo_engine; //[nb_execute_loop] 207 private : generic::priority::Priority ** _priority_read_unit ; //[nb_execute_loop] 207 208 208 209 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_allocation.cpp
r105 r111 234 234 235 235 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 236 _priority = new generic::priority::Priority * [_param->_nb_execute_loop]; 236 _priority_ooo_engine = new generic::priority::Priority * [_param->_nb_execute_loop]; 237 _priority_read_unit = new generic::priority::Priority * [_param->_nb_execute_loop]; 237 238 238 239 for (uint32_t i=0; i<_param->_nb_execute_loop; ++i) 239 _priority [i] = new generic::priority::Priority (_name+"_priority_"+toString(i), 240 _param->_dispatch_priority , 241 _param->_dispatch_load_balancing, 242 _param->_execute_loop_nb_ooo_engine [i], 243 _param->_execute_loop_nb_inst_issue [i], 244 _param->_execute_loop_nb_ooo_engine [i] 245 ); 240 { 241 _priority_ooo_engine [i] = new generic::priority::Priority (_name+"_priority_ooo_engine_"+toString(i), 242 _param->_dispatch_priority , 243 _param->_dispatch_load_balancing, 244 _param->_execute_loop_nb_ooo_engine [i], 245 _param->_execute_loop_nb_inst_issue [i], 246 _param->_execute_loop_nb_ooo_engine [i] 247 ); 248 249 _priority_read_unit [i] = new generic::priority::Priority (_name+"_priority_read_unit_"+toString(i), 250 // PRIORITY_STATIC, 251 PRIORITY_ROUND_ROBIN, 252 _param->_nb_read_unit [i], 253 _param->_nb_read_unit [i] 254 ); 255 } 256 246 257 247 258 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_deallocation.cpp
r105 r111 159 159 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 160 160 for (uint32_t i=0; i<_param->_nb_execute_loop; ++i) 161 delete _priority [i]; 162 delete [] _priority; 161 { 162 delete _priority_ooo_engine [i]; 163 delete _priority_read_unit [i]; 164 } 165 delete [] _priority_ooo_engine; 166 delete [] _priority_read_unit ; 163 167 164 168 delete _component; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_genMealy_issue.cpp
r88 r111 42 42 log_printf(TRACE,Core_Glue,FUNCTION," * execute_loop [%d]",i); 43 43 44 std::list<generic::priority::select_t> * select = _priority[i]->select();45 for (std::list<generic::priority::select_t>::iterator it =select->begin();46 it !=select->end();47 ++it )44 std::list<generic::priority::select_t> * select_ooo_engine = _priority_ooo_engine[i]->select(); 45 for (std::list<generic::priority::select_t>::iterator it_ooo_engine=select_ooo_engine->begin(); 46 it_ooo_engine!=select_ooo_engine->end(); 47 ++it_ooo_engine) 48 48 { 49 const uint32_t ooo_engine_id = it ->grp;49 const uint32_t ooo_engine_id = it_ooo_engine->grp; 50 50 const uint32_t num_ooo_engine = _param->_translate_execute_loop_num_ooo_engine [i][ooo_engine_id]; 51 const uint32_t num_inst_issue = it ->elt;51 const uint32_t num_inst_issue = it_ooo_engine->elt; 52 52 53 53 log_printf(TRACE,Core_Glue,FUNCTION," * num_ooo_engine [%d] (id : %d)",num_ooo_engine, ooo_engine_id); … … 56 56 57 57 // have request ? 58 if (PORT_READ(in_ISSUE_OOO_ENGINE_VAL [num_ooo_engine][num_inst_issue])) 58 Tcontrol_t ooo_engine_val = PORT_READ(in_ISSUE_OOO_ENGINE_VAL [num_ooo_engine][num_inst_issue]); 59 60 // if (ooo_engine_val) 59 61 { 60 62 // // If ooo_engine can issue instruction on multiple execute_loop 61 63 // if (not ISSUE_OOO_ENGINE_ACK [num_ooo_engine][num_inst_issue]) 62 for (uint32_t j=0; j<_param->_nb_read_unit[i]; ++j) 64 65 std::list<generic::priority::select_t> * select_read_unit = _priority_read_unit[i]->select(); 66 for (std::list<generic::priority::select_t>::iterator it_read_unit=select_read_unit->begin(); 67 it_read_unit!=select_read_unit->end(); 68 ++it_read_unit) 69 { 70 uint32_t num_read_unit = it_read_unit->grp; 71 63 72 // Test if have an link and read unit is enable 64 { 65 log_printf(TRACE,Core_Glue,FUNCTION," * read_unit : %d",j); 66 log_printf(TRACE,Core_Glue,FUNCTION," * READ_UNIT_ENABLE : %d",READ_UNIT_ENABLE [i][j]); 67 log_printf(TRACE,Core_Glue,FUNCTION," * table_dispatch : %d",_param->_table_dispatch [num_ooo_engine][num_inst_issue][i][j]); 73 log_printf(TRACE,Core_Glue,FUNCTION," * read_unit : %d",num_read_unit); 74 log_printf(TRACE,Core_Glue,FUNCTION," * READ_UNIT_ENABLE : %d",READ_UNIT_ENABLE [i][num_read_unit]); 75 log_printf(TRACE,Core_Glue,FUNCTION," * table_dispatch : %d",_param->_table_dispatch [num_ooo_engine][num_inst_issue][i][num_read_unit]); 68 76 69 if (READ_UNIT_ENABLE [i][j] and 70 _param->_table_dispatch [num_ooo_engine][num_inst_issue][i][j]) 77 Tcontrol_t read_unit_enable = READ_UNIT_ENABLE [i][num_read_unit]; 78 if (read_unit_enable and 79 _param->_table_dispatch [num_ooo_engine][num_inst_issue][i][num_read_unit]) 71 80 { 72 81 // Transaction 73 ISSUE_EXECUTE_LOOP_VAL [i][ j] = 1;74 ISSUE_OOO_ENGINE_ACK [num_ooo_engine][num_inst_issue] = 1;75 READ_UNIT_ENABLE [i][ j] = false; // now, this read_unit is busy82 ISSUE_EXECUTE_LOOP_VAL [i][num_read_unit] = ooo_engine_val; 83 ISSUE_OOO_ENGINE_ACK [num_ooo_engine][num_inst_issue] = read_unit_enable; // = 1 84 READ_UNIT_ENABLE [i][num_read_unit] = false; // now, this read_unit is busy 76 85 77 86 if (_param->_have_port_context_id) 78 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_CONTEXT_ID [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_CONTEXT_ID [num_ooo_engine][num_inst_issue]));87 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_CONTEXT_ID [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_CONTEXT_ID [num_ooo_engine][num_inst_issue])); 79 88 if (_param->_have_port_front_end_id) 80 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_FRONT_END_ID [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_FRONT_END_ID [num_ooo_engine][num_inst_issue]));89 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_FRONT_END_ID [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_FRONT_END_ID [num_ooo_engine][num_inst_issue])); 81 90 if (_param->_have_port_ooo_engine_id) 82 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_OOO_ENGINE_ID [i][ j],ooo_engine_id);91 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_OOO_ENGINE_ID [i][num_read_unit],ooo_engine_id); 83 92 if (_param->_have_port_rob_ptr) 84 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_PACKET_ID [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_PACKET_ID [num_ooo_engine][num_inst_issue]));85 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_OPERATION [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_OPERATION [num_ooo_engine][num_inst_issue]));86 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_TYPE [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_TYPE [num_ooo_engine][num_inst_issue]));87 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE [num_ooo_engine][num_inst_issue]));93 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_PACKET_ID [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_PACKET_ID [num_ooo_engine][num_inst_issue])); 94 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_OPERATION [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_OPERATION [num_ooo_engine][num_inst_issue])); 95 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_TYPE [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_TYPE [num_ooo_engine][num_inst_issue])); 96 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE [num_ooo_engine][num_inst_issue])); 88 97 if (_param->_have_port_load_queue_ptr) 89 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE [num_ooo_engine][num_inst_issue]));90 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT [num_ooo_engine][num_inst_issue]));91 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_IMMEDIAT [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_IMMEDIAT [num_ooo_engine][num_inst_issue]));92 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RA [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RA [num_ooo_engine][num_inst_issue]));93 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RA [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RA [num_ooo_engine][num_inst_issue]));94 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RB [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RB [num_ooo_engine][num_inst_issue]));95 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RB [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RB [num_ooo_engine][num_inst_issue]));96 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RC [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RC [num_ooo_engine][num_inst_issue]));97 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RC [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RC [num_ooo_engine][num_inst_issue]));98 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_WRITE_RD [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_WRITE_RD [num_ooo_engine][num_inst_issue]));99 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RD [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RD [num_ooo_engine][num_inst_issue]));100 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_WRITE_RE [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_WRITE_RE [num_ooo_engine][num_inst_issue]));101 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RE [i][ j],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RE [num_ooo_engine][num_inst_issue]));98 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE [num_ooo_engine][num_inst_issue])); 99 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT [num_ooo_engine][num_inst_issue])); 100 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_IMMEDIAT [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_IMMEDIAT [num_ooo_engine][num_inst_issue])); 101 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RA [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RA [num_ooo_engine][num_inst_issue])); 102 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RA [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RA [num_ooo_engine][num_inst_issue])); 103 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RB [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RB [num_ooo_engine][num_inst_issue])); 104 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RB [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RB [num_ooo_engine][num_inst_issue])); 105 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_READ_RC [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_READ_RC [num_ooo_engine][num_inst_issue])); 106 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RC [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RC [num_ooo_engine][num_inst_issue])); 107 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_WRITE_RD [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_WRITE_RD [num_ooo_engine][num_inst_issue])); 108 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RD [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RD [num_ooo_engine][num_inst_issue])); 109 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_WRITE_RE [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_WRITE_RE [num_ooo_engine][num_inst_issue])); 110 PORT_WRITE(out_ISSUE_EXECUTE_LOOP_NUM_REG_RE [i][num_read_unit],PORT_READ(in_ISSUE_OOO_ENGINE_NUM_REG_RE [num_ooo_engine][num_inst_issue])); 102 111 } 103 112 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_transition.cpp
r88 r111 24 24 { 25 25 for (uint32_t i=0; i<_param->_nb_execute_loop; ++i) 26 _priority [i]->reset(); 26 { 27 _priority_ooo_engine [i]->reset(); 28 _priority_read_unit [i]->reset(); 29 } 27 30 } 28 31 else … … 30 33 // next priority 31 34 for (uint32_t i=0; i<_param->_nb_execute_loop; ++i) 32 _priority [i]->transition(); 35 { 36 _priority_ooo_engine [i]->transition(); 37 _priority_read_unit [i]->transition(); 38 } 33 39 } 34 40 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Types.h
r104 r111 217 217 template<> inline morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Tspeculative_load_t fromString<morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Tspeculative_load_t>(const std::string& x) 218 218 { 219 if ( (x.compare( "0")== 0) or219 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::NO_SPECULATIVE_LOAD ))) == 0) or 220 220 (x.compare("no_speculative_load") == 0)) 221 221 return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::NO_SPECULATIVE_LOAD; 222 if ( (x.compare( "1")== 0) or222 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_ACCESS))) == 0) or 223 223 (x.compare("speculative_load_access") == 0)) 224 224 return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_ACCESS; 225 if ( (x.compare( "2")== 0) or225 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT))) == 0) or 226 226 (x.compare("speculative_load_commit") == 0)) 227 227 return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT; 228 // if ( (x.compare( "3") == 0) or228 // if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_BYPASS)))) or 229 229 // (x.compare("speculative_load_bypass") == 0)) 230 230 // return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_BYPASS; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit.cpp
r110 r111 73 73 if (usage_is_set(_usage,USE_SYSTEMC)) 74 74 { 75 75 76 // Function pointer 76 77 77 switch (_param->_speculative_load) 78 78 { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_genMoore.cpp
r88 r111 25 25 log_function(Read_queue,FUNCTION,_name.c_str()); 26 26 27 bool not_full = not (_queue->size() == _param->_size_queue);27 bool not_full = _queue->size() < _param->_size_queue; 28 28 bool not_empty = not _queue->empty(); 29 29 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_transition.cpp
r98 r111 142 142 #if (DEBUG >= DEBUG_TRACE) and (DEBUG_Read_queue == true) 143 143 log_printf(TRACE,Read_queue,FUNCTION," * Dump Read_queue"); 144 log_printf(TRACE,Read_queue,FUNCTION," * size : %d ",(int)_queue->size());144 log_printf(TRACE,Read_queue,FUNCTION," * size : %d / %d",(int)_queue->size(),_param->_size_queue); 145 145 146 146 if (_queue->size()>0) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters.cpp
r98 r111 39 39 test(); 40 40 41 _size_internal_queue =42 (log2( nb_context ) +43 log2( nb_front_end ) +44 log2( nb_ooo_engine) +45 log2( nb_packet ) +46 // size_operation +47 // size_type +48 size_special_data +49 _size_exception +50 1 +51 size_general_data +52 size_general_data53 );54 55 41 if (is_toplevel) 56 42 { … … 71 57 copy(); 72 58 } 59 60 _size_internal_queue = 61 (_size_context_id + 62 _size_front_end_id + 63 _size_ooo_engine_id + 64 _size_rob_ptr + 65 // _size_operation + 66 // _size_type + 67 _size_special_data + 68 _size_exception + 69 1 + 70 _size_general_data + 71 _size_general_data 72 ); 73 73 74 74 log_printf(FUNC,Execute_queue,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/Makefile.deps
r83 r111 16 16 #-----[ Directory ]---------------------------------------- 17 17 18 Context_State_DIR 18 Context_State_DIR = $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Context_State 19 19 20 20 #-----[ Library ]------------------------------------------ … … 23 23 $(Behavioural_LIBRARY) 24 24 25 Context_State_DIR_LIBRARY 25 Context_State_DIR_LIBRARY = -L$(Context_State_DIR)/lib \ 26 26 $(Behavioural_DIR_LIBRARY) 27 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/src/test.cpp
r106 r111 83 83 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH ," in_BRANCH_COMPLETE_DEPTH ",Tdepth_t ,_param->_nb_inst_branch_complete); 84 84 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_MISS_PREDICTION," in_BRANCH_COMPLETE_MISS_PREDICTION",Tcontrol_t ,_param->_nb_inst_branch_complete); 85 86 87 85 //ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_TAKE ," in_BRANCH_COMPLETE_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 86 //ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS_SRC ," in_BRANCH_COMPLETE_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_complete); 87 //ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS_DEST ," in_BRANCH_COMPLETE_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_complete); 88 88 89 89 … … 168 168 INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 169 169 INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete); 170 171 172 170 //INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete); 171 //INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete); 172 //INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete); 173 173 174 174 INSTANCE1_SC_SIGNAL(_Context_State, in_NB_INST_DECOD_ALL ,_param->_nb_context ); … … 1340 1340 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 1341 1341 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete); 1342 1343 1344 1342 //DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete); 1343 //DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete); 1344 //DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete); 1345 1345 DELETE1_SC_SIGNAL( in_NB_INST_DECOD_ALL ,_param->_nb_context ); 1346 1346 DELETE1_SC_SIGNAL( in_NB_INST_COMMIT_ALL ,_param->_nb_context ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Context_State.h
r105 r111 68 68 //public : SC_IN (Tcontext_t ) ** in_BRANCH_EVENT_CONTEXT_ID ;//[nb_context] 69 69 public : SC_IN (Tdepth_t ) ** in_BRANCH_EVENT_DEPTH ;//[nb_context] 70 //public : SC_IN (Tcontrol_t ) ** in_BRANCH_EVENT_MISS_PREDICTION ;//[nb_context]// always70 public : SC_IN (Tcontrol_t ) ** in_BRANCH_EVENT_MISS_PREDICTION ;//[nb_context]// always 71 71 public : SC_IN (Taddress_t ) ** in_BRANCH_EVENT_ADDRESS_SRC ;//[nb_context] 72 72 public : SC_IN (Tcontrol_t ) ** in_BRANCH_EVENT_ADDRESS_DEST_VAL ;//[nb_context]// take or not … … 102 102 public : SC_IN (Tdepth_t ) ** in_BRANCH_COMPLETE_DEPTH ;//[nb_inst_branch_complete] 103 103 public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_MISS_PREDICTION ;//[nb_inst_branch_complete] 104 105 106 104 //public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_TAKE ;//[nb_inst_branch_complete] 105 //public : SC_IN (Taddress_t ) ** in_BRANCH_COMPLETE_ADDRESS_SRC ;//[nb_inst_branch_complete] 106 //public : SC_IN (Taddress_t ) ** in_BRANCH_COMPLETE_ADDRESS_DEST ;//[nb_inst_branch_complete] 107 107 108 108 // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Types.h
r108 r111 25 25 typedef enum 26 26 { 27 CONTEXT_STATE_OK , // none event 28 CONTEXT_STATE_KO_EXCEP , // wait end of event (exception) 29 CONTEXT_STATE_KO_EXCEP_ADDR , // update address manager 30 CONTEXT_STATE_KO_EXCEP_SPR , // update spr (epc, esr, sr[DSX]) 31 CONTEXT_STATE_KO_MISS_BRANCH_ADDR , // update address manager 32 CONTEXT_STATE_KO_MISS_BRANCH_WAITEND, // wait end of event (miss branch) 33 CONTEXT_STATE_KO_MISS_LOAD_ADDR , // update address manager 34 CONTEXT_STATE_KO_MISS_LOAD_WAITEND , // wait end of event (miss load)) 35 CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR , // update address manager 36 CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND, // wait end of event (miss branch) 37 // CONTEXT_STATE_KO_MSYNC , // wait completion of all memory operation 38 // CONTEXT_STATE_KO_MSYNC_ISSUE , // issue msync operation 39 CONTEXT_STATE_KO_MSYNC_EXEC , // wait completion of msync operation 40 // CONTEXT_STATE_KO_PSYNC , // wait completion of all operation and after flush pipeline 41 CONTEXT_STATE_KO_PSYNC_FLUSH , // wait completion of all 42 CONTEXT_STATE_KO_PSYNC_ADDR , // wait completion of all 43 // CONTEXT_STATE_KO_CSYNC , // wait completion of all operation and after flush pipeline and flush ALL units (MMU, cache ...) 44 CONTEXT_STATE_KO_CSYNC_FLUSH , 45 CONTEXT_STATE_KO_CSYNC_ADDR , 46 // CONTEXT_STATE_KO_SPR , // wait completion of all operation 47 // CONTEXT_STATE_KO_SPR_ISSUE , // issue spr's access 48 CONTEXT_STATE_KO_SPR_EXEC // wait completion of all operation (spr access) 27 CONTEXT_STATE_OK , // none event 28 CONTEXT_STATE_KO_EXCEP , // wait end of event (exception) 29 CONTEXT_STATE_KO_EXCEP_ADDR , // update address manager 30 CONTEXT_STATE_KO_EXCEP_SPR , // update spr (epc, esr, sr[DSX]) 31 CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE , // branch is complete, wait update by update_prediction_table 32 CONTEXT_STATE_KO_MISS_BRANCH_ADDR , // update address manager 33 CONTEXT_STATE_KO_MISS_BRANCH_WAITEND , // wait end of event (miss branch) 34 CONTEXT_STATE_KO_MISS_LOAD_ADDR , // update address manager 35 CONTEXT_STATE_KO_MISS_LOAD_WAITEND , // wait end of event (miss load)) 36 CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE, // branch is complete, wait update by update_prediction_table 37 CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR , // update address manager 38 CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND , // wait end of event (miss branch) 39 // CONTEXT_STATE_KO_MSYNC , // wait completion of all memory operation 40 // CONTEXT_STATE_KO_MSYNC_ISSUE , // issue msync operation 41 CONTEXT_STATE_KO_MSYNC_EXEC , // wait completion of msync operation 42 // CONTEXT_STATE_KO_PSYNC , // wait completion of all operation and after flush pipeline 43 CONTEXT_STATE_KO_PSYNC_FLUSH , // wait completion of all 44 CONTEXT_STATE_KO_PSYNC_ADDR , // wait completion of all 45 // CONTEXT_STATE_KO_CSYNC , // wait completion of all operation and after flush pipeline and flush ALL units (MMU, cache ...) 46 CONTEXT_STATE_KO_CSYNC_FLUSH , 47 CONTEXT_STATE_KO_CSYNC_ADDR , 48 // CONTEXT_STATE_KO_SPR , // wait completion of all operation 49 // CONTEXT_STATE_KO_SPR_ISSUE , // issue spr's access 50 CONTEXT_STATE_KO_SPR_EXEC // wait completion of all operation (spr access) 49 51 } context_state_t; 50 52 … … 60 62 switch (x) 61 63 { 62 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_OK : return "context_state_ok" ; break; 63 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP : return "context_state_ko_excep" ; break; 64 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP_ADDR : return "context_state_ko_excep_addr" ; break; 65 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP_SPR : return "context_state_ko_excep_spr" ; break; 66 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_ADDR : return "context_state_ko_miss_branch_addr" ; break; 67 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_WAITEND : return "context_state_ko_miss_branch_waitend"; break; 68 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR : return "context_state_ko_miss_branch_and_load_addr" ; break; 69 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND : return "context_state_ko_miss_branch_and_load_waitend"; break; 70 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_LOAD_ADDR : return "context_state_ko_miss_load_addr" ; break; 71 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_LOAD_WAITEND : return "context_state_ko_miss_load_waitend" ; break; 72 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC : return "context_state_ko_msync" ; break; 73 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC_ISSUE : return "context_state_ko_msync_issue" ; break; 74 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC_EXEC : return "context_state_ko_msync_exec" ; break; 75 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC : return "context_state_ko_psync" ; break; 76 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC_FLUSH : return "context_state_ko_psync_flush" ; break; 77 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC_ADDR : return "context_state_ko_psync_addr" ; break; 78 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC : return "context_state_ko_csync" ; break; 79 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC_FLUSH : return "context_state_ko_csync_flush" ; break; 80 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC_ADDR : return "context_state_ko_csync_addr" ; break; 81 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR : return "context_state_ko_spr" ; break; 82 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR_ISSUE : return "context_state_ko_spr_issue" ; break; 83 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR_EXEC : return "context_state_ko_spr_exec" ; break; 64 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_OK : return "context_state_ok" ; break; 65 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP : return "context_state_ko_excep" ; break; 66 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP_ADDR : return "context_state_ko_excep_addr" ; break; 67 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP_SPR : return "context_state_ko_excep_spr" ; break; 68 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE : return "context_state_ko_miss_branch_wait_update" ; break; 69 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_ADDR : return "context_state_ko_miss_branch_addr" ; break; 70 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_WAITEND : return "context_state_ko_miss_branch_waitend" ; break; 71 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE : return "context_state_ko_miss_load_and_branch_wait_update"; break; 72 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR : return "context_state_ko_miss_load_and_branch_addr" ; break; 73 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND : return "context_state_ko_miss_load_and_branch_waitend" ; break; 74 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_LOAD_ADDR : return "context_state_ko_miss_load_addr" ; break; 75 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_LOAD_WAITEND : return "context_state_ko_miss_load_waitend" ; break; 76 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC : return "context_state_ko_msync" ; break; 77 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC_ISSUE : return "context_state_ko_msync_issue" ; break; 78 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC_EXEC : return "context_state_ko_msync_exec" ; break; 79 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC : return "context_state_ko_psync" ; break; 80 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC_FLUSH : return "context_state_ko_psync_flush" ; break; 81 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC_ADDR : return "context_state_ko_psync_addr" ; break; 82 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC : return "context_state_ko_csync" ; break; 83 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC_FLUSH : return "context_state_ko_csync_flush" ; break; 84 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC_ADDR : return "context_state_ko_csync_addr" ; break; 85 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR : return "context_state_ko_spr" ; break; 86 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR_ISSUE : return "context_state_ko_spr_issue" ; break; 87 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR_EXEC : return "context_state_ko_spr_exec" ; break; 84 88 default : return "" ; break; 85 89 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_allocation.cpp
r105 r111 110 110 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth); 111 111 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_MISS_PREDICTION ,"miss_prediction",Tcontrol_t ,1); 112 113 114 112 // ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_TAKE ,"take" ,Tcontrol_t ,1); 113 // ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS_SRC ,"address_src" ,Taddress_t ,_param->_size_instruction_address); 114 // ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS_DEST ,"address_dest" ,Taddress_t ,_param->_size_instruction_address); 115 115 } 116 116 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_deallocation.cpp
r105 r111 63 63 DELETE1_SIGNAL( in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete,_param->_size_depth); 64 64 DELETE1_SIGNAL( in_BRANCH_COMPLETE_MISS_PREDICTION ,_param->_nb_inst_branch_complete,1); 65 DELETE1_SIGNAL( in_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete,1);66 DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete,_param->_size_instruction_address);67 DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete,_param->_size_instruction_address);65 // DELETE1_SIGNAL( in_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete,1); 66 // DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete,_param->_size_instruction_address); 67 // DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete,_param->_size_instruction_address); 68 68 69 69 DELETE1_SIGNAL( in_NB_INST_DECOD_ALL ,_param->_nb_context,_param->_size_nb_inst_decod); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMoore.cpp
r108 r111 33 33 Tcontrol_t val = ((state == CONTEXT_STATE_KO_EXCEP_ADDR ) or 34 34 (state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) or 35 (state == CONTEXT_STATE_KO_MISS_ BRANCH_AND_LOAD_ADDR) or35 (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR) or 36 36 (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR ) or 37 37 (state == CONTEXT_STATE_KO_PSYNC_ADDR ) or … … 54 54 { 55 55 case CONTEXT_STATE_KO_EXCEP_ADDR : (type = EVENT_TYPE_EXCEPTION ); break; 56 case CONTEXT_STATE_KO_MISS_ BRANCH_AND_LOAD_ADDR:56 case CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR: 57 57 case CONTEXT_STATE_KO_MISS_BRANCH_ADDR: (type = EVENT_TYPE_BRANCH_MISS_SPECULATION); break; 58 58 case CONTEXT_STATE_KO_MISS_LOAD_ADDR : (type = EVENT_TYPE_LOAD_MISS_SPECULATION ); break; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp
r108 r111 16 16 namespace context_state { 17 17 18 19 #define get_priority(x) \ 20 (((state == CONTEXT_STATE_KO_MISS_LOAD_ADDR ) or \ 21 (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR ) or \ 22 (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND ) or \ 23 (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND ) or \ 24 (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE))?3: \ 25 (((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR ) or \ 26 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND ) or \ 27 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE ))?2: \ 28 ((state == EVENT_TYPE_EXCEPTION)?1: \ 29 0))) 18 30 19 31 #undef FUNCTION … … 65 77 break; 66 78 } 79 case CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE : 80 { 81 // nothing : wait end of update upt 82 break; 83 } 67 84 case CONTEXT_STATE_KO_MISS_BRANCH_WAITEND : 68 85 { … … 82 99 break; 83 100 } 84 case CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND : 101 case CONTEXT_STATE_KO_EXCEP_SPR : 102 { 103 // nothing, wait the update of internal register (epcr, eear, sr, esr) 104 break; 105 } 106 case CONTEXT_STATE_KO_MISS_BRANCH_ADDR : 107 { 108 // nothing, wait the update of internal register (pc) 109 break; 110 } 111 case CONTEXT_STATE_KO_MISS_LOAD_ADDR : 112 { 113 // nothing, wait the update of internal register (pc) 114 break; 115 } 116 case CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE : 117 { 118 // nothing : wait end of update upt 119 break; 120 } 121 case CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR : 122 { 123 // nothing, wait the update of internal register (pc) 124 break; 125 } 126 case CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND : 85 127 { 86 128 // Wait end of all instruction … … 88 130 89 131 // state = CONTEXT_STATE_OK; // @@@ TODO : make MISS fast (miss decod) 90 state = CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR; 91 break; 92 } 93 case CONTEXT_STATE_KO_EXCEP_SPR : 94 { 95 // nothing, wait the update of internal register (epcr, eear, sr, esr) 96 break; 97 } 98 case CONTEXT_STATE_KO_MISS_BRANCH_ADDR : 99 { 100 // nothing, wait the update of internal register (pc) 101 break; 102 } 103 case CONTEXT_STATE_KO_MISS_LOAD_ADDR : 104 { 105 // nothing, wait the update of internal register (pc) 106 break; 107 } 108 case CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR : 109 { 110 // nothing, wait the update of internal register (pc) 132 state = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR; 111 133 break; 112 134 } … … 203 225 204 226 // ------------------------------------------------------------------- 227 // -----[ EVENT ]----------------------------------------------------- 228 // ------------------------------------------------------------------- 229 for (uint32_t i=0; i<_param->_nb_context; i++) 230 if (internal_EVENT_VAL [i] and PORT_READ(in_EVENT_ACK [i])) 231 { 232 log_printf(TRACE,Context_State,FUNCTION," * EVENT [%d]",i); 233 // Write pc 234 context_state_t state = reg_STATE [i]; 235 236 switch (state) 237 { 238 case CONTEXT_STATE_KO_EXCEP_ADDR : 239 { 240 reg_STATE [i] = CONTEXT_STATE_KO_EXCEP_SPR; 241 break; 242 } 243 case CONTEXT_STATE_KO_MISS_BRANCH_ADDR: 244 245 // { 246 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_WAITEND; //@@@ TODO : make MISS fast (miss decod) 247 // break; 248 // } 249 case CONTEXT_STATE_KO_MISS_LOAD_ADDR : 250 case CONTEXT_STATE_KO_PSYNC_ADDR : 251 case CONTEXT_STATE_KO_CSYNC_ADDR : 252 { 253 reg_STATE [i] = CONTEXT_STATE_OK; 254 break; 255 } 256 case CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR: 257 { 258 reg_STATE [i] = CONTEXT_STATE_KO_MISS_LOAD_ADDR; 259 break; 260 } 261 default : 262 { 263 #ifdef DEBUG_TEST 264 throw ERRORMORPHEO(FUNCTION,toString(_("SPR[%d], Invalid state : %s.\n"),i,toString(state).c_str())); 265 #endif 266 break; 267 } 268 } 269 } 270 271 // ------------------------------------------------------------------- 205 272 // -----[ BRANCH_EVENT ]---------------------------------------------- 206 273 // ------------------------------------------------------------------- … … 222 289 // Tdepth_t depth1 = (depth >=depth_min)?(depth ):((depth +depth_max)); 223 290 224 // priority : miss > excep > spr/sync 225 uint8_t priority0 = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR ) or 226 (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR ) or 227 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR ) or 228 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND ) or 229 (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND ) or 230 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND))?2:((state == EVENT_TYPE_EXCEPTION)?1:0); 291 // priority : miss_load > miss_branch > excep > spr/sync 292 uint8_t priority0 = get_priority(state); 231 293 uint8_t priority1 = 2; // miss 232 294 … … 235 297 // if context_state_ko : test the depth, and the priority of event 236 298 bool is_valid = ((state == CONTEXT_STATE_OK) or 299 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE) or 300 (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE) or 237 301 (depth1< depth0) or 238 302 ((depth1==depth0) and (priority1>=priority0))); // >= because another branch can be a miss prediction with same depth 303 304 #ifdef DEBUG_TEST 305 if ((state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE) and 306 (depth0 != depth1)) 307 throw ERRORMORPHEO(FUNCTION,toString(_("BRANCH_EVENT[%d] : Invalid state : %s.\n"),i,toString(state).c_str())); 308 #endif 239 309 240 310 log_printf(TRACE,Context_State,FUNCTION," * depth : %d",depth ); … … 250 320 if (is_valid) 251 321 { 252 Tcontrol_t dest_val = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST_VAL[i]);253 322 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_ADDR; 254 reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_WAITEND; //@@@ TODO : make MISS fast (miss decod) 255 reg_EVENT_ADDRESS [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_SRC [i])+1; // address delay slot 256 reg_EVENT_ADDRESS_EPCR [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST [i]); // address_next 257 reg_EVENT_ADDRESS_EPCR_VAL [i] = dest_val; 258 //reg_EVENT_ADDRESS_EEAR [i] = 0; 259 reg_EVENT_ADDRESS_EEAR_VAL [i] = 0; 260 reg_EVENT_IS_DELAY_SLOT [i] = 1; 261 reg_EVENT_IS_DS_TAKE [i] = dest_val; 323 324 if (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE) 325 { 326 reg_STATE [i] = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND; 327 } 328 else 329 { 330 reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_WAITEND; //@@@ TODO : make MISS fast (miss decod) 331 332 Tcontrol_t dest_val = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST_VAL[i]); 333 reg_EVENT_ADDRESS [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_SRC [i])+1; // address delay slot 334 reg_EVENT_ADDRESS_EPCR [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST [i]); // address_next 335 reg_EVENT_ADDRESS_EPCR_VAL [i] = dest_val; 336 //reg_EVENT_ADDRESS_EEAR [i] = 0; 337 reg_EVENT_ADDRESS_EEAR_VAL [i] = 0; 338 reg_EVENT_IS_DELAY_SLOT [i] = 1; 339 reg_EVENT_IS_DS_TAKE [i] = dest_val; 340 reg_EVENT_DEPTH [i] = depth; 341 } 342 } 343 } 344 345 // ------------------------------------------------------------------- 346 // -----[ BRANCH_COMPLETE ]---------------------------------------------- 347 // ------------------------------------------------------------------- 348 for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i) 349 if (PORT_READ(in_BRANCH_COMPLETE_VAL [i]) and internal_BRANCH_COMPLETE_ACK [i] 350 and PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i])) 351 { 352 log_printf(TRACE,Context_State,FUNCTION," * BRANCH_COMPLETE [%d]",i); 353 354 context_state_t state = reg_STATE [i]; 355 356 Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_BRANCH_COMPLETE_DEPTH [i]):0; 357 Tdepth_t depth_cur = reg_EVENT_DEPTH [i]; 358 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [i]):0; 359 Tdepth_t depth_max = _param->_nb_inst_branch_speculated [i]; 360 361 Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min)); 362 Tdepth_t depth1 = (depth >=depth_min)?(depth -depth_min):((depth +depth_max-depth_min)); 363 // Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max)); 364 // Tdepth_t depth1 = (depth >=depth_min)?(depth ):((depth +depth_max)); 365 366 // priority : miss_load > miss_branch > excep > spr/sync 367 uint8_t priority0 = get_priority(state); 368 uint8_t priority1 = 2; // miss 369 370 // is_valid = can modify local information 371 // if context_state_ok : yes 372 // if context_state_ko : test the depth, and the priority of event 373 bool is_valid = ((state == CONTEXT_STATE_OK) or 374 (depth1< depth0) or 375 ((depth1==depth0) and (priority1>=priority0))); // >= because another branch can be a miss prediction with same depth 376 377 log_printf(TRACE,Context_State,FUNCTION," * depth : %d",depth ); 378 log_printf(TRACE,Context_State,FUNCTION," * depth_cur : %d",depth_cur ); 379 log_printf(TRACE,Context_State,FUNCTION," * depth_min : %d",depth_min ); 380 log_printf(TRACE,Context_State,FUNCTION," * depth_max : %d",depth_max ); 381 log_printf(TRACE,Context_State,FUNCTION," * depth0 : %d",depth0 ); 382 log_printf(TRACE,Context_State,FUNCTION," * depth1 : %d",depth1 ); 383 log_printf(TRACE,Context_State,FUNCTION," * priority0 : %d",priority0 ); 384 log_printf(TRACE,Context_State,FUNCTION," * priority1 : %d",priority1 ); 385 log_printf(TRACE,Context_State,FUNCTION," * is_valid : %d",is_valid ); 386 387 if (is_valid) 388 { 389 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_ADDR; 390 reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE; 262 391 reg_EVENT_DEPTH [i] = depth; 263 392 } … … 287 416 Tevent_type_t type = PORT_READ(in_DECOD_EVENT_TYPE [i]); 288 417 289 // miss > excep > spr/sync 290 uint8_t priority0 = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR ) or 291 (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR ) or 292 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR ) or 293 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND ) or 294 (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND ) or 295 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0); 418 // miss_load > miss_branch > excep > spr/sync 419 uint8_t priority0 = get_priority(state); 296 420 uint8_t priority1 = (state == EVENT_TYPE_EXCEPTION)?1:0; 297 421 … … 410 534 Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_COMMIT_EVENT_CONTEXT_ID ):0; 411 535 Tdepth_t depth = (_param->_have_port_depth )?PORT_READ(in_COMMIT_EVENT_DEPTH ):0; 412 Tdepth_t depth_cur = reg_EVENT_DEPTH [context];413 Tdepth_t depth_min = (_param->_have_port_depth )?PORT_READ(in_DEPTH_MIN [context]):0;414 Tdepth_t depth_max = _param->_nb_inst_branch_speculated [context];536 // Tdepth_t depth_cur = reg_EVENT_DEPTH [context]; 537 // Tdepth_t depth_min = (_param->_have_port_depth )?PORT_READ(in_DEPTH_MIN [context]):0; 538 // Tdepth_t depth_max = _param->_nb_inst_branch_speculated [context]; 415 539 416 Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));417 Tdepth_t depth1 = (depth >=depth_min)?(depth -depth_min):((depth +depth_max-depth_min));418 // Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max));419 // Tdepth_t depth1 = (depth >=depth_min)?(depth ):((depth +depth_max));540 // Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min)); 541 // Tdepth_t depth1 = (depth >=depth_min)?(depth -depth_min):((depth +depth_max-depth_min)); 542 // // Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max)); 543 // // Tdepth_t depth1 = (depth >=depth_min)?(depth ):((depth +depth_max)); 420 544 421 545 context_state_t state = reg_STATE [context]; 422 546 Tevent_type_t type = PORT_READ(in_COMMIT_EVENT_TYPE ); 423 547 424 // miss > excep > spr/sync 425 uint8_t priority0 = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR ) or 426 (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR ) or 427 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR ) or 428 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND ) or 429 (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND ) or 430 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0); 431 uint8_t priority1 = (state == EVENT_TYPE_EXCEPTION)?1:2; // else load_miss_speculation (EVENT_TYPE_MISS_SPECULATION) 432 433 // is_valid = can modify local information 434 // if context_state_ok : yes 435 // if context_state_ko : test the depth, and the priority of envent 436 437 bool is_valid = ((state == CONTEXT_STATE_OK) or 438 (depth1< depth0) or 439 ((depth1==depth0) and (priority1>=priority0))); 548 // // miss > excep > spr/sync 549 // uint8_t priority0 = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR ) or 550 // (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR ) or 551 // (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR ) or 552 // (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND ) or 553 // (state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE ) or 554 // (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND ) or 555 // (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0); 556 // uint8_t priority1 = (state == EVENT_TYPE_EXCEPTION)?1:2; // else load_miss_speculation (EVENT_TYPE_MISS_SPECULATION) 557 558 // // is_valid = can modify local information 559 // // if context_state_ok : yes 560 // // if context_state_ko : test the depth, and the priority of envent 561 562 // bool is_valid = ((state == CONTEXT_STATE_OK) or 563 // (depth1< depth0) or 564 // ((depth1==depth0) and (priority1>=priority0))); 565 566 // if commit send an event, also they have not yet event previous this instruction 567 bool is_valid = true; 440 568 441 569 log_printf(TRACE,Context_State,FUNCTION," * depth : %d",depth ); 442 log_printf(TRACE,Context_State,FUNCTION," * depth_cur : %d",depth_cur );443 log_printf(TRACE,Context_State,FUNCTION," * depth_min : %d",depth_min );444 log_printf(TRACE,Context_State,FUNCTION," * depth_max : %d",depth_max );445 log_printf(TRACE,Context_State,FUNCTION," * depth0 : %d",depth0 );446 log_printf(TRACE,Context_State,FUNCTION," * depth1 : %d",depth1 );447 log_printf(TRACE,Context_State,FUNCTION," * priority0 : %d",priority0 );448 log_printf(TRACE,Context_State,FUNCTION," * priority1 : %d",priority1 );570 // log_printf(TRACE,Context_State,FUNCTION," * depth_cur : %d",depth_cur ); 571 // log_printf(TRACE,Context_State,FUNCTION," * depth_min : %d",depth_min ); 572 // log_printf(TRACE,Context_State,FUNCTION," * depth_max : %d",depth_max ); 573 // log_printf(TRACE,Context_State,FUNCTION," * depth0 : %d",depth0 ); 574 // log_printf(TRACE,Context_State,FUNCTION," * depth1 : %d",depth1 ); 575 // log_printf(TRACE,Context_State,FUNCTION," * priority0 : %d",priority0 ); 576 // log_printf(TRACE,Context_State,FUNCTION," * priority1 : %d",priority1 ); 449 577 log_printf(TRACE,Context_State,FUNCTION," * is_valid : %d",is_valid ); 450 578 … … 460 588 { 461 589 // Test if previous branch occure 462 if ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR ) or 463 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND ) or 464 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR ) or 465 (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND)) 466 state_next = CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND; 467 else 468 state_next = CONTEXT_STATE_KO_MISS_LOAD_WAITEND; 590 switch (state) 591 { 592 case CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE : 593 { 594 state_next = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE; 595 break; 596 } 597 case CONTEXT_STATE_KO_MISS_BRANCH_ADDR : 598 case CONTEXT_STATE_KO_MISS_BRANCH_WAITEND : 599 case CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR : 600 case CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND : 601 { 602 state_next = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND; 603 break; 604 } 605 default : 606 { 607 state_next = CONTEXT_STATE_KO_MISS_LOAD_WAITEND; 608 break; 609 } 610 } 469 611 break; 470 612 } … … 494 636 495 637 // ------------------------------------------------------------------- 496 // -----[ EVENT ]-----------------------------------------------------497 // -------------------------------------------------------------------498 for (uint32_t i=0; i<_param->_nb_context; i++)499 if (internal_EVENT_VAL [i] and PORT_READ(in_EVENT_ACK [i]))500 {501 log_printf(TRACE,Context_State,FUNCTION," * EVENT [%d]",i);502 // Write pc503 context_state_t state = reg_STATE [i];504 505 switch (state)506 {507 case CONTEXT_STATE_KO_EXCEP_ADDR :508 {509 reg_STATE [i] = CONTEXT_STATE_KO_EXCEP_SPR;510 break;511 }512 case CONTEXT_STATE_KO_MISS_BRANCH_ADDR:513 514 // {515 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_WAITEND; //@@@ TODO : make MISS fast (miss decod)516 // break;517 // }518 case CONTEXT_STATE_KO_MISS_LOAD_ADDR :519 case CONTEXT_STATE_KO_PSYNC_ADDR :520 case CONTEXT_STATE_KO_CSYNC_ADDR :521 {522 reg_STATE [i] = CONTEXT_STATE_OK;523 break;524 }525 case CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR:526 {527 reg_STATE [i] = CONTEXT_STATE_KO_MISS_LOAD_ADDR;528 break;529 }530 default :531 {532 #ifdef DEBUG_TEST533 throw ERRORMORPHEO(FUNCTION,toString(_("SPR[%d], Invalid state : %s.\n"),i,toString(state).c_str()));534 #endif535 break;536 }537 }538 }539 540 // -------------------------------------------------------------------541 638 // -----[ SPR_EVENT ]------------------------------------------------- 542 639 // ------------------------------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/config_min.cfg
r82 r111 3 3 1 1 *4 # nb_inst_decod 4 4 1 1 *4 # size_queue 5 0 1 +1 # queue_scheme 5 6 32 32 +1 # size_general_data 6 7 1 1 +1 # nb_branch_speculated [0] [nb_context] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/config_mono_context.cfg
r87 r111 3 3 1 8 *2 # nb_inst_decod 4 4 8 16 *2 # size_queue 5 0 1 +1 # queue_scheme 5 6 32 32 +1 # size_general_data 6 7 1 2 +1 # nb_branch_speculated [0] [nb_context] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/config_multi_context.cfg
r82 r111 3 3 4 4 *4 # nb_inst_decod 4 4 16 16 *4 # size_queue 5 0 1 +1 # queue_scheme 5 6 32 32 +1 # size_general_data 6 7 2 2 +1 # nb_branch_speculated [0] [nb_context] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/main.cpp
r88 r111 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/include/test.h" 9 9 10 #define NB_PARAMS 410 #define NB_PARAMS 5 11 11 12 12 void usage (int argc, char * argv[]) … … 14 14 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 15 15 err (_("list_params is :\n")); 16 err (_(" * nb_context (uint32_t)\n")); 17 err (_(" * nb_inst_decod (uint32_t)\n")); 18 err (_(" * size_queue (uint32_t)\n")); 19 err (_(" * size_general_data (uint32_t)\n")); 20 err (_(" * nb_branch_speculated [nb_context] (uint32_t)\n")); 16 err (_(" * nb_context (uint32_t )\n")); 17 err (_(" * nb_inst_decod (uint32_t )\n")); 18 err (_(" * size_queue (uint32_t )\n")); 19 err (_(" * queue_scheme (Tdecod_queue_scheme_t)\n")); 20 err (_(" * size_general_data (uint32_t )\n")); 21 err (_(" * nb_branch_speculated [nb_context] (uint32_t )\n")); 21 22 22 23 exit (1); … … 38 39 uint32_t _nb_inst_decod = fromString<uint32_t>(argv[x++]); 39 40 uint32_t _size_queue = fromString<uint32_t>(argv[x++]); 41 Tdecod_queue_scheme_t _queue_scheme = fromString<Tdecod_queue_scheme_t>(argv[x++]); 40 42 uint32_t _size_general_data = fromString<uint32_t>(argv[x++]); 41 43 … … 54 56 _nb_inst_decod , 55 57 _size_queue , 58 _queue_scheme , 56 59 _size_general_data, 57 60 _nb_branch_speculated, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/test.cpp
r108 r111 7 7 */ 8 8 9 #define NB_ITERATION 1289 #define NB_ITERATION 512 10 10 #define CYCLE_MAX (128*NB_ITERATION) 11 11 … … 20 20 21 21 #ifdef STATISTICS 22 morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5, 50);22 morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX); 23 23 #endif 24 24 … … 234 234 address_tmp [i] = address_src [i]; 235 235 236 uint32_t x = rand()%_param->_nb_inst_decod; 236 uint32_t x = rand()%_param->_nb_inst_decod; 237 237 238 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 238 239 { … … 242 243 in_DECOD_IN_CONTEXT_ID [i]->write(context); 243 244 in_DECOD_IN_DEPTH [i]->write(depth [context]); 245 #ifdef DEBUG 246 in_DECOD_IN_ADDRESS [i]->write(address_tmp [context]); 247 #endif 244 248 in_DECOD_IN_ADDRESS_NEXT [i]->write(address_tmp [context]); 245 249 … … 250 254 { 251 255 uint32_t x = rand()%_param->_nb_inst_decod; 256 252 257 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 253 258 { … … 270 275 nb_inst [context] ++; 271 276 address_src [context] ++; 277 278 LABEL(" * nb_inst : %d",nb_inst [context]); 272 279 } 273 280 } … … 284 291 TEST(Tdepth_t ,out_DECOD_OUT_DEPTH [i]->read(),depth [context]); 285 292 TEST(Taddress_t,out_DECOD_OUT_ADDRESS_NEXT [i]->read(),address_dest [context]); 286 293 #ifdef DEBUG 294 TEST(Taddress_t,out_DECOD_OUT_ADDRESS [i]->read(),address_dest [context]); 295 #endif 287 296 nb_inst [context] --; 288 297 address_dest [context] ++; 298 299 LABEL(" * nb_inst : %d",nb_inst [context]); 289 300 } 290 301 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Decod_queue.h
r110 r111 136 136 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 137 137 138 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 139 private : std::list<decod_queue_entry_t*>* reg_QUEUE ; 140 private : uint32_t * reg_NB_INST ;//[nb_context] 141 private : uint32_t reg_LAST_SLOT ; 138 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 139 140 // implementation : common 141 private : std::list<decod_queue_entry_t*> * reg_QUEUE ; 142 private : uint32_t * reg_NB_INST ;//[nb_context] 143 // implementation : one_fifo only 144 private : uint32_t reg_LAST_SLOT ; 145 // implementation : multi_fifo only 146 private : uint32_t reg_NUM_BANK_HEAD ; 147 private : uint32_t reg_NUM_BANK_TAIL ; 142 148 143 149 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 150 // implementation : common 144 151 private : Tcontrol_t * internal_DECOD_IN_ACK ;//[nb_inst_decod] 145 152 private : Tcontrol_t * internal_DECOD_OUT_VAL ;//[nb_inst_decod] 146 153 private : Tcontrol_t * internal_DECOD_OUT_ACK ;//[nb_inst_decod] 154 // implementation : one_fifo only 155 // implementation : multi_fifo only 156 157 // function pointer 158 public : void (morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Decod_queue::*function_transition ) (void); 159 public : void (morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Decod_queue::*function_genMoore ) (void); 160 public : void (morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Decod_queue::*function_genMealy_decod_out) (void); 147 161 #endif 148 162 … … 177 191 178 192 #ifdef SYSTEMC 179 public : void transition (void); 180 public : void genMoore (void); 181 public : void genMealy_decod_out (void); 193 public : void transition (void); 194 public : void genMoore (void); 195 public : void genMealy_decod_out (void); 196 197 public : void function_one_fifo_transition (void); 198 public : void function_one_fifo_genMoore (void); 199 public : void function_one_fifo_genMealy_decod_out (void); 200 201 public : void function_multi_fifo_transition (void); 202 public : void function_multi_fifo_genMoore (void); 203 public : void function_multi_fifo_genMealy_decod_out (void); 182 204 #endif 183 205 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Parameters.h
r109 r111 11 11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 #include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Types.h" 13 14 14 15 namespace morpheo { … … 24 25 { 25 26 //-----[ fields ]------------------------------------------------------------ 26 public : uint32_t _nb_context ; 27 public : uint32_t _nb_inst_decod ; 28 public : uint32_t _size_queue ; 29 //public : uint32_t _size_general_data ; 30 public : uint32_t * _nb_branch_speculated ; //[nb_context] 31 public : uint32_t _nb_instruction_in_queue; 27 public : uint32_t _nb_context ; 28 public : uint32_t _nb_inst_decod ; 29 public : uint32_t _size_queue ; 30 public : Tdecod_queue_scheme_t _queue_scheme ; 31 //public : uint32_t _size_general_data ; 32 public : uint32_t * _nb_branch_speculated ; //[nb_context] 33 public : uint32_t _nb_instruction_in_queue; 34 35 public : uint32_t _nb_bank; 32 36 33 37 //-----[ methods ]----------------------------------------------------------- 34 public : Parameters (uint32_t nb_context , 35 uint32_t nb_inst_decod , 36 uint32_t size_queue , 37 uint32_t size_general_data , 38 uint32_t * nb_branch_speculated, 39 bool is_toplevel=false ); 38 public : Parameters (uint32_t nb_context , 39 uint32_t nb_inst_decod , 40 uint32_t size_queue , 41 Tdecod_queue_scheme_t queue_scheme , 42 uint32_t size_general_data , 43 uint32_t * nb_branch_speculated, 44 bool is_toplevel=false ); 40 45 // public : Parameters (Parameters & param) ; 41 46 public : ~Parameters () ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Types.h
r108 r111 18 18 namespace decod_unit { 19 19 namespace decod_queue { 20 21 typedef enum 22 { 23 DECOD_QUEUE_SCHEME_ONE_FIFO // One fifo with a instruction bundle per slot ( internal fragmentation) 24 ,DECOD_QUEUE_SCHEME_MULTI_FIFO // One fifo per instruction. Rename in order (no internal fragmentation) 25 } Tdecod_queue_scheme_t; 20 26 21 27 class decod_queue_entry_t … … 117 123 }; // end namespace multi_front_end 118 124 }; // end namespace core 125 }; // end namespace behavioural 119 126 120 }; // end namespace behavioural 127 template<> inline std::string toString<morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t>(const morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t& x) 128 { 129 switch (x) 130 { 131 case morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::DECOD_QUEUE_SCHEME_ONE_FIFO : return "one_fifo" ; break; 132 case morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::DECOD_QUEUE_SCHEME_MULTI_FIFO : return "multi_fifo"; break; 133 default : return ""; break; 134 } 135 }; 136 137 template<> inline morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t fromString<morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t>(const std::string& x) 138 { 139 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::DECOD_QUEUE_SCHEME_ONE_FIFO ))) == 0) or 140 (x.compare("one_fifo") == 0)) 141 return morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::DECOD_QUEUE_SCHEME_ONE_FIFO; 142 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::DECOD_QUEUE_SCHEME_MULTI_FIFO))) == 0) or 143 (x.compare("multi_fifo") == 0)) 144 return morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::DECOD_QUEUE_SCHEME_MULTI_FIFO; 145 146 throw (ErrorMorpheo ("<fromString> : Unknow string : \""+x+"\"")); 147 }; 148 149 121 150 }; // end namespace morpheo 122 151 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue.cpp
r101 r111 76 76 if (usage_is_set(_usage,USE_SYSTEMC)) 77 77 { 78 // Function pointer 79 switch (_param->_queue_scheme) 80 { 81 case DECOD_QUEUE_SCHEME_ONE_FIFO : 82 { 83 function_transition = &morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Decod_queue::function_one_fifo_transition ; 84 function_genMoore = &morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Decod_queue::function_one_fifo_genMoore ; 85 function_genMealy_decod_out = &morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Decod_queue::function_one_fifo_genMealy_decod_out; 86 87 break; 88 } 89 case DECOD_QUEUE_SCHEME_MULTI_FIFO : 90 { 91 function_transition = &morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Decod_queue::function_multi_fifo_transition ; 92 function_genMoore = &morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Decod_queue::function_multi_fifo_genMoore ; 93 function_genMealy_decod_out = &morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod_queue::Decod_queue::function_multi_fifo_genMealy_decod_out; 94 95 break; 96 } 97 default : 98 { 99 break; 100 } 101 } 102 78 103 log_printf(INFO,Decod_queue,FUNCTION,_("Method - transition")); 79 104 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_allocation.cpp
r108 r111 138 138 { 139 139 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 140 reg_QUEUE = new std::list<decod_queue_entry_t*>; 140 switch (_param->_queue_scheme) 141 { 142 case DECOD_QUEUE_SCHEME_ONE_FIFO : reg_QUEUE = new std::list<decod_queue_entry_t*>; break; 143 case DECOD_QUEUE_SCHEME_MULTI_FIFO : ALLOC1(reg_QUEUE,std::list<decod_queue_entry_t*>,_param->_nb_bank); break; 144 } 141 145 reg_NB_INST = new uint32_t [_param->_nb_context]; 142 146 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_deallocation.cpp
r108 r111 90 90 91 91 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 92 delete reg_QUEUE; 92 switch (_param->_queue_scheme) 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 } 93 97 delete [] reg_NB_INST; 94 98 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp
r108 r111 25 25 log_function(Decod_queue,FUNCTION,_name.c_str()); 26 26 27 Tcontrol_t val [_param->_nb_inst_decod]; 28 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 29 { 30 val [i] = 0; 31 internal_DECOD_OUT_VAL [i] = 0; 32 internal_DECOD_OUT_ACK [i] = 0; 33 } 34 35 if (not reg_QUEUE->empty()) 36 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 37 { 38 uint32_t index = reg_LAST_SLOT + i; 39 40 // Stop 41 if (index >= _param->_nb_inst_decod) 42 break; 43 44 if (reg_QUEUE->front()->_val [index]) 45 { 46 log_printf(TRACE,Decod_queue,FUNCTION,_(" * Queue is not empty, slot [%d] is valid."),i); 47 48 Tcontext_t context = reg_QUEUE->front()->_context_id [index]; 49 Tdepth_t depth = reg_QUEUE->front()->_depth [index]; 50 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0; 51 Tdepth_t depth_max = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX [context]):0; 52 Tcontrol_t depth_full = PORT_READ(in_DEPTH_FULL[context]); 53 54 // is a valid instruction ? 55 // If DEPTH_CURRENT : 56 // equal at DEPTH_MIN -> not speculative 57 // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss 58 // include ]DEPTH_MIN:DEPTH_MAX] -> speculative 59 60 // All case 61 // ....... min ...X... max ....... OK 62 // ....... min ....... max ...X... KO 63 // ...X... min ....... max ....... KO 64 // ....... max ....... min ...X... OK 65 // ...X... max ....... min ....... OK 66 // ....... max ...X... min ....... KO 67 68 Tcontrol_t is_valid = ((depth == depth_min) or 69 depth_full or 70 ((depth_min <= depth_max)? 71 ((depth >= depth_min) and (depth <=depth_max)): 72 ((depth >= depth_min) or (depth <=depth_max)))); 73 //Tcontrol_t is_valid = ((depth == depth_min) or 74 // ((depth_min < depth_max)? 75 // (depth<=depth_max): 76 // ((depth > depth_min) or (depth <= depth_max)))); 77 //Tcontrol_t is_valid = depth <= depth_max; 78 79 log_printf(TRACE,Decod_queue,FUNCTION," * is_valid : %d",is_valid); 80 log_printf(TRACE,Decod_queue,FUNCTION," * context : %d",context); 81 log_printf(TRACE,Decod_queue,FUNCTION," * depth : %d",depth); 82 log_printf(TRACE,Decod_queue,FUNCTION," * depth_min : %d",depth_min); 83 log_printf(TRACE,Decod_queue,FUNCTION," * depth_max : %d",depth_max); 84 log_printf(TRACE,Decod_queue,FUNCTION," * depth_full : %d",depth_full); 85 #ifdef DEBUG 86 log_printf(TRACE,Decod_queue,FUNCTION," * address : 0x%x (0x%x)",reg_QUEUE->front()->_address [index],reg_QUEUE->front()->_address [index]<<2); 87 #endif 88 log_printf(TRACE,Decod_queue,FUNCTION," * address_next : 0x%x (0x%x)",reg_QUEUE->front()->_address_next[index],reg_QUEUE->front()->_address_next[index]<<2); 89 internal_DECOD_OUT_VAL [index] = 1; // in all case, val is set (entry is not empty, and instruction is valid) 90 if (is_valid) 91 { 92 val [i] = 1; 93 internal_DECOD_OUT_ACK [index] = PORT_READ(in_DECOD_OUT_ACK [i]); 94 } 95 else 96 { 97 // Consume the instruction (to erase) 98 internal_DECOD_OUT_ACK [index] = 1; 99 } 100 } 101 } 102 103 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 104 { 105 log_printf(TRACE,Decod_queue,FUNCTION," * DECOD_OUT_VAL : %d",val [i]); 106 107 PORT_WRITE(out_DECOD_OUT_VAL [i],val [i]); 108 } 27 (this->*function_genMealy_decod_out) (); 109 28 110 29 log_end(Decod_queue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMoore.cpp
r109 r111 25 25 log_function(Decod_queue,FUNCTION,_name.c_str()); 26 26 27 //-------------------------------------------------------------------- 28 //-----[ DECOD_IN ]--------------------------------------------------- 29 //-------------------------------------------------------------------- 30 { 31 Tcontrol_t ack = reg_QUEUE->size() < _param->_size_queue; 32 33 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 34 { 35 internal_DECOD_IN_ACK [i] = ack; 36 PORT_WRITE(out_DECOD_IN_ACK [i],ack); 37 } 38 } 39 40 //-------------------------------------------------------------------- 41 //-----[ DECOD_OUT ]-------------------------------------------------- 42 //-------------------------------------------------------------------- 43 if (not reg_QUEUE->empty()) 44 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 45 { 46 uint32_t index = reg_LAST_SLOT + i; 47 48 // Stop 49 if (index >= _param->_nb_inst_decod) 50 break; 51 52 if (_param->_have_port_context_id) 53 PORT_WRITE(out_DECOD_OUT_CONTEXT_ID [i],reg_QUEUE->front()->_context_id [index]); 54 if (_param->_have_port_depth) 55 PORT_WRITE(out_DECOD_OUT_DEPTH [i],reg_QUEUE->front()->_depth [index]); 56 PORT_WRITE(out_DECOD_OUT_TYPE [i],reg_QUEUE->front()->_type [index]); 57 PORT_WRITE(out_DECOD_OUT_OPERATION [i],reg_QUEUE->front()->_operation [index]); 58 PORT_WRITE(out_DECOD_OUT_NO_EXECUTE [i],reg_QUEUE->front()->_no_execute [index]); 59 PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE->front()->_is_delay_slot [index]); 60 #ifdef DEBUG 61 PORT_WRITE(out_DECOD_OUT_ADDRESS [i],reg_QUEUE->front()->_address [index]); 62 #endif 63 PORT_WRITE(out_DECOD_OUT_ADDRESS_NEXT [i],reg_QUEUE->front()->_address_next [index]); 64 PORT_WRITE(out_DECOD_OUT_HAS_IMMEDIAT [i],reg_QUEUE->front()->_has_immediat [index]); 65 PORT_WRITE(out_DECOD_OUT_IMMEDIAT [i],reg_QUEUE->front()->_immediat [index]); 66 PORT_WRITE(out_DECOD_OUT_READ_RA [i],reg_QUEUE->front()->_read_ra [index]); 67 PORT_WRITE(out_DECOD_OUT_NUM_REG_RA [i],reg_QUEUE->front()->_num_reg_ra [index]); 68 PORT_WRITE(out_DECOD_OUT_READ_RB [i],reg_QUEUE->front()->_read_rb [index]); 69 PORT_WRITE(out_DECOD_OUT_NUM_REG_RB [i],reg_QUEUE->front()->_num_reg_rb [index]); 70 PORT_WRITE(out_DECOD_OUT_READ_RC [i],reg_QUEUE->front()->_read_rc [index]); 71 PORT_WRITE(out_DECOD_OUT_NUM_REG_RC [i],reg_QUEUE->front()->_num_reg_rc [index]); 72 PORT_WRITE(out_DECOD_OUT_WRITE_RD [i],reg_QUEUE->front()->_write_rd [index]); 73 PORT_WRITE(out_DECOD_OUT_NUM_REG_RD [i],reg_QUEUE->front()->_num_reg_rd [index]); 74 PORT_WRITE(out_DECOD_OUT_WRITE_RE [i],reg_QUEUE->front()->_write_re [index]); 75 PORT_WRITE(out_DECOD_OUT_NUM_REG_RE [i],reg_QUEUE->front()->_num_reg_re [index]); 76 PORT_WRITE(out_DECOD_OUT_EXCEPTION_USE [i],reg_QUEUE->front()->_exception_use [index]); 77 PORT_WRITE(out_DECOD_OUT_EXCEPTION [i],reg_QUEUE->front()->_exception [index]); 78 } 79 80 //-------------------------------------------------------------------- 81 //-----[ NB_INST ]---------------------------------------------------- 82 //-------------------------------------------------------------------- 83 for (uint32_t i=0; i<_param->_nb_context; i++) 84 PORT_WRITE(out_NB_INST_ALL [i], reg_NB_INST [i]); 27 (this->*function_genMoore) (); 85 28 86 29 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
r110 r111 25 25 log_function(Decod_queue,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET) == 0) 28 { 29 reg_QUEUE->clear(); 30 31 for (uint32_t i=0; i<_param->_nb_context; i++) 32 reg_NB_INST [i]=0; 33 34 reg_LAST_SLOT = 0; 35 } 36 else 37 { 38 //-------------------------------------------------------------------- 39 //-----[ DECOD_IN ]--------------------------------------------------- 40 //-------------------------------------------------------------------- 41 decod_queue_entry_t * entry = NULL; 42 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 43 { 44 if (PORT_READ(in_DECOD_IN_VAL [i]) and internal_DECOD_IN_ACK[i]) 45 { 46 log_printf(TRACE,Decod_queue,FUNCTION,_(" * DECOD_IN [%d]"),i); 47 48 if (entry == NULL) 49 { 50 // Once creation and insert in queue 51 entry = new decod_queue_entry_t (_param->_nb_inst_decod); 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 58 } 59 60 #ifdef STATISTICS 61 if (usage_is_set(_usage,USE_STATISTICS)) 62 (*_stat_sum_inst_enable) ++; 63 #endif 64 65 Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_DECOD_IN_CONTEXT_ID [i]):0; 66 67 log_printf(TRACE,Decod_queue,FUNCTION,_(" * context : %d"),context); 68 69 entry->_val [i] = 1; 70 entry->_context_id [i] = context; 71 entry->_depth [i] = (_param->_have_port_depth)?PORT_READ(in_DECOD_IN_DEPTH [i]):0; 72 entry->_type [i] = PORT_READ(in_DECOD_IN_TYPE [i]); 73 entry->_operation [i] = PORT_READ(in_DECOD_IN_OPERATION [i]); 74 entry->_no_execute [i] = PORT_READ(in_DECOD_IN_NO_EXECUTE [i]); 75 entry->_is_delay_slot [i] = PORT_READ(in_DECOD_IN_IS_DELAY_SLOT [i]); 76 #ifdef DEBUG 77 entry->_address [i] = PORT_READ(in_DECOD_IN_ADDRESS [i]); 78 #endif 79 entry->_address_next [i] = PORT_READ(in_DECOD_IN_ADDRESS_NEXT [i]); 80 entry->_has_immediat [i] = PORT_READ(in_DECOD_IN_HAS_IMMEDIAT [i]); 81 entry->_immediat [i] = PORT_READ(in_DECOD_IN_IMMEDIAT [i]); 82 entry->_read_ra [i] = PORT_READ(in_DECOD_IN_READ_RA [i]); 83 entry->_num_reg_ra [i] = PORT_READ(in_DECOD_IN_NUM_REG_RA [i]); 84 entry->_read_rb [i] = PORT_READ(in_DECOD_IN_READ_RB [i]); 85 entry->_num_reg_rb [i] = PORT_READ(in_DECOD_IN_NUM_REG_RB [i]); 86 entry->_read_rc [i] = PORT_READ(in_DECOD_IN_READ_RC [i]); 87 entry->_num_reg_rc [i] = PORT_READ(in_DECOD_IN_NUM_REG_RC [i]); 88 entry->_write_rd [i] = PORT_READ(in_DECOD_IN_WRITE_RD [i]); 89 entry->_num_reg_rd [i] = PORT_READ(in_DECOD_IN_NUM_REG_RD [i]); 90 entry->_write_re [i] = PORT_READ(in_DECOD_IN_WRITE_RE [i]); 91 entry->_num_reg_re [i] = PORT_READ(in_DECOD_IN_NUM_REG_RE [i]); 92 entry->_exception_use [i] = PORT_READ(in_DECOD_IN_EXCEPTION_USE [i]); 93 entry->_exception [i] = PORT_READ(in_DECOD_IN_EXCEPTION [i]); 94 95 reg_NB_INST [context] ++; 96 97 log_printf(TRACE,Decod_queue,FUNCTION,_(" * nb_inst : %d"),reg_NB_INST [context]); 98 log_printf(TRACE,Decod_queue,FUNCTION,_(" * PUSH queue")); 99 } 100 } 101 102 //-------------------------------------------------------------------- 103 //-----[ DECOD_OUT ]-------------------------------------------------- 104 //-------------------------------------------------------------------- 105 if (not reg_QUEUE->empty()) 106 { 107 bool find = false; 108 109 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 110 { 111 // Test transaction : if ok then invalid slot 112 // In order by rename logic 113 if (internal_DECOD_OUT_VAL [i] and internal_DECOD_OUT_ACK[i]) 114 { 115 log_printf(TRACE,Decod_queue,FUNCTION,_(" * DECOD_OUT [%d]"),i); 116 117 #ifdef DEBUG_TEST 118 if (reg_LAST_SLOT != i) 119 throw ERRORMORPHEO(FUNCTION,toString(_("reg_LAST_SLOT (%d) is different at decod_out port (%d)."),reg_LAST_SLOT,i)); 120 #endif 121 reg_LAST_SLOT ++; 122 123 reg_QUEUE->front()->_val [i] = 0; 124 125 Tcontext_t context = reg_QUEUE->front()->_context_id [i]; 126 log_printf(TRACE,Decod_queue,FUNCTION,_(" * context : %d"),context); 127 128 reg_NB_INST [context] --; 129 log_printf(TRACE,Decod_queue,FUNCTION,_(" * nb_inst : %d"),reg_NB_INST [context]); 130 } 131 // Test if slot is (again) valid, if yes, then have less one instruction in the entry 132 find |= reg_QUEUE->front()->_val [i]; 133 } 134 135 // test if can free the entry : test if have consume all entry 136 if (not find) // no valid instruction in current slot 137 { 138 log_printf(TRACE,Decod_queue,FUNCTION,_(" * POP queue")); 139 140 // can pop the slot 141 delete reg_QUEUE->front(); 142 reg_QUEUE->pop_front(); 143 144 reg_LAST_SLOT = 0; 145 } 146 } 147 } 148 149 #if defined(DEBUG) and defined(DEBUG_Decod_queue) and (DEBUG >= DEBUG_TRACE) 150 log_printf(TRACE,Decod_queue,FUNCTION," * Dump decod_queue"); 151 log_printf(TRACE,Decod_queue,FUNCTION," * reg_LAST_SLOT : %d",reg_LAST_SLOT); 152 uint32_t x=0; 153 for (std::list<decod_queue_entry_t*>::iterator it=reg_QUEUE->begin(); 154 it!=reg_QUEUE->end(); 155 it++) 156 { 157 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 158 { 159 if ((*it)->_val [i]) 160 log_printf(TRACE,Decod_queue,FUNCTION," * [%.4d][%.4d] %.1d, %.3d %.2d, %.2d %.3d %.1d %.1d, 0x%.8x (0x%.8x), %.1d 0x%.8x, %.1d %.2d, %.1d %.2d, %.1d %.2d, %.1d %.2d, %.1d %.2d, %.1d %.2d" 161 ,x 162 ,i 163 ,(*it)->_val [i] 164 ,(*it)->_context_id [i] 165 ,(*it)->_depth [i] 166 ,(*it)->_type [i] 167 ,(*it)->_operation [i] 168 ,(*it)->_no_execute [i] 169 ,(*it)->_is_delay_slot [i] 170 ,(*it)->_address [i] 171 ,(*it)->_address [i]<<2 172 ,(*it)->_has_immediat [i] 173 ,(*it)->_immediat [i] 174 ,(*it)->_read_ra [i] 175 ,(*it)->_num_reg_ra [i] 176 ,(*it)->_read_rb [i] 177 ,(*it)->_num_reg_rb [i] 178 ,(*it)->_read_rc [i] 179 ,(*it)->_num_reg_rc [i] 180 ,(*it)->_write_rd [i] 181 ,(*it)->_num_reg_rd [i] 182 ,(*it)->_write_re [i] 183 ,(*it)->_num_reg_re [i] 184 ,(*it)->_exception_use [i] 185 ,(*it)->_exception [i] 186 ); 187 else 188 log_printf(TRACE,Decod_queue,FUNCTION," * [%.4d][%.4d] %d" 189 ,x 190 ,i 191 ,(*it)->_val [i] 192 ); 193 194 } 195 x++; 196 } 197 #endif 198 199 #ifdef STATISTICS 200 if (usage_is_set(_usage,USE_STATISTICS)) 201 { 202 *(_stat_use_queue) += reg_QUEUE->size(); 203 for (uint32_t i=0; i<_param->_nb_context; i++) 204 *(_stat_nb_inst [i]) += reg_NB_INST [i]; 205 } 206 #endif 27 (this->*function_transition) (); 207 28 208 29 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Parameters.cpp
r109 r111 20 20 #undef FUNCTION 21 21 #define FUNCTION "Decod_queue::Parameters" 22 Parameters::Parameters (uint32_t nb_context , 23 uint32_t nb_inst_decod , 24 uint32_t size_queue , 25 uint32_t size_general_data , 26 uint32_t * nb_branch_speculated, 27 bool is_toplevel ) 22 Parameters::Parameters (uint32_t nb_context , 23 uint32_t nb_inst_decod , 24 uint32_t size_queue , 25 Tdecod_queue_scheme_t queue_scheme , 26 uint32_t size_general_data , 27 uint32_t * nb_branch_speculated, 28 bool is_toplevel) 28 29 { 29 30 log_begin(Decod_queue,FUNCTION); … … 32 33 _nb_inst_decod = nb_inst_decod ; 33 34 _size_queue = size_queue/nb_inst_decod; 34 // _size_general_data = size_general_data ; 35 _nb_branch_speculated = nb_branch_speculated; 36 _nb_instruction_in_queue = size_queue; 37 35 _queue_scheme = queue_scheme ; 36 // _size_general_data = size_general_data ; 37 _nb_branch_speculated = nb_branch_speculated ; 38 _nb_instruction_in_queue = size_queue ; 39 40 _nb_bank = nb_inst_decod ; 41 38 42 test(); 39 43 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Parameters_msg_error.cpp
r109 r111 30 30 test.error("Size of decod queue must be a multiple of nb_instruction.\n"); 31 31 32 switch (_queue_scheme) 33 { 34 case DECOD_QUEUE_SCHEME_ONE_FIFO : 35 case DECOD_QUEUE_SCHEME_MULTI_FIFO : 36 { 37 break; 38 } 39 default : 40 { 41 test.error(toString(_("Decod queue scheme '%s' is not supported. Please wait a next revision.\n"),toString(_queue_scheme).c_str())); 42 break; 43 } 44 } 45 32 46 log_end(Decod_queue,FUNCTION); 33 47 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Parameters_print.cpp
r82 r111 30 30 xml.singleton_begin("nb_inst_decod "); xml.attribut("value",toString(_nb_inst_decod )); xml.singleton_end(); 31 31 xml.singleton_begin("size_queue "); xml.attribut("value",toString(_size_queue )); xml.singleton_end(); 32 xml.singleton_begin("queue_scheme "); xml.attribut("value",toString(_queue_scheme )); xml.singleton_end(); 32 33 xml.singleton_begin("size_general_data "); xml.attribut("value",toString(_size_general_data)); xml.singleton_end(); 33 34 for (uint32_t i=0;i<_nb_context; i++) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/config_min.cfg
r88 r111 4 4 1 1 +1 # nb_inst_decod 5 5 1 1 +1 # size_queue 6 0 1 +1 # queue_scheme 6 7 32 32 +1 # size_general_data 7 8 1 1 +1 # nb_branch_speculated [0][nb_context] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/config_mono_context.cfg
r88 r111 4 4 1 4 *4 # nb_inst_decod 5 5 4 16 *4 # size_queue 6 0 1 +1 # queue_scheme 6 7 32 32 +1 # size_general_data 7 8 1 1 *4 # nb_branch_speculated [0][nb_context] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/config_multi_context.cfg
r88 r111 7 7 1 8 *4 # nb_inst_decod 8 8 16 16 *4 # size_queue 9 0 1 +1 # queue_scheme 9 10 32 32 +1 # size_general_data 10 11 1 1 *4 # nb_branch_speculated [0][nb_context] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/main.cpp
r88 r111 9 9 #include "Behavioural/Custom/include/Custom_example.h" 10 10 11 #define NB_PARAMS 711 #define NB_PARAMS 8 12 12 13 13 void usage (int argc, char * argv[]) … … 15 15 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 16 16 err (_("list_params is :\n")); 17 err (_(" * nb_context (uint32_t )\n")); 18 err (_(" * nb_inst_fetch [nb_context] (uint32_t )\n")); 19 err (_(" * nb_inst_decod (uint32_t )\n")); 20 err (_(" * size_queue (uint32_t )\n")); 21 err (_(" * size_general_data (uint32_t )\n")); 22 err (_(" * nb_branch_speculated [nb_context] (uint32_t )\n")); 23 err (_(" * nb_context_select (uint32_t )\n")); 24 err (_(" * select_priority (Tpriority_t )\n")); 25 err (_(" * select_load_balancing (Tload_balancing_t)\n")); 17 err (_(" * nb_context (uint32_t )\n")); 18 err (_(" * nb_inst_fetch [nb_context] (uint32_t )\n")); 19 err (_(" * nb_inst_decod (uint32_t )\n")); 20 err (_(" * size_queue (uint32_t )\n")); 21 err (_(" * queue_scheme (Tdecod_queue_scheme_t)\n")); 22 err (_(" * size_general_data (uint32_t )\n")); 23 err (_(" * nb_branch_speculated [nb_context] (uint32_t )\n")); 24 err (_(" * nb_context_select (uint32_t )\n")); 25 err (_(" * select_priority (Tpriority_t )\n")); 26 err (_(" * select_load_balancing (Tload_balancing_t )\n")); 26 27 27 28 exit (1); … … 51 52 uint32_t _nb_inst_decod = fromString<uint32_t >(argv[x++]); 52 53 uint32_t _size_queue = fromString<uint32_t >(argv[x++]); 54 decod_queue::Tdecod_queue_scheme_t _queue_scheme = fromString<decod_queue::Tdecod_queue_scheme_t>(argv[x++]); 53 55 uint32_t _size_general_data = fromString<uint32_t >(argv[x++]); 54 56 uint32_t * _nb_branch_speculated = new uint32_t [_nb_context]; … … 77 79 _nb_inst_decod , 78 80 _size_queue , 81 _queue_scheme , 79 82 _size_general_data , 80 83 _nb_branch_speculated , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/include/Parameters.h
r88 r111 30 30 public : uint32_t _nb_inst_decod ; 31 31 public : uint32_t _size_queue ; 32 public : decod_queue::Tdecod_queue_scheme_t 33 _queue_scheme ; 32 34 //public : uint32_t _size_general_data ; 33 35 public : uint32_t * _nb_branch_speculated ; //[nb_context] … … 50 52 uint32_t nb_inst_decod , 51 53 uint32_t size_queue , 54 decod_queue::Tdecod_queue_scheme_t 55 queue_scheme , 52 56 uint32_t size_general_data , 53 57 uint32_t * nb_branch_speculated , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Parameters.cpp
r88 r111 23 23 uint32_t nb_inst_decod , 24 24 uint32_t size_queue , 25 decod_queue::Tdecod_queue_scheme_t 26 queue_scheme , 25 27 uint32_t size_general_data , 26 28 uint32_t * nb_branch_speculated , … … 40 42 _nb_inst_decod = nb_inst_decod ; 41 43 _size_queue = size_queue ; 44 _queue_scheme = queue_scheme ; 42 45 // _size_general_data = size_general_data ; 43 46 _nb_branch_speculated = nb_branch_speculated ; … … 71 74 _nb_inst_decod , 72 75 _size_queue , 76 _queue_scheme , 73 77 size_general_data , 74 78 _nb_branch_speculated); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Parameters_print.cpp
r88 r111 29 29 xml.singleton_begin("nb_inst_decod "); xml.attribut("value",toString(_nb_inst_decod )); xml.singleton_end(); 30 30 xml.singleton_begin("size_queue "); xml.attribut("value",toString(_size_queue )); xml.singleton_end(); 31 xml.singleton_begin("queue_scheme "); xml.attribut("value",toString(_queue_scheme )); xml.singleton_end(); 31 32 xml.singleton_begin("size_general_data "); xml.attribut("value",toString(_size_general_data )); xml.singleton_end(); 32 33 xml.singleton_begin("nb_context_select "); xml.attribut("value",toString(_nb_context_select )); xml.singleton_end(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_transition.cpp
r107 r111 53 53 if (PORT_READ(in_PREDICT_ACK) and internal_PREDICT_VAL) 54 54 { 55 log_printf(TRACE,Address_management,FUNCTION," * PREDICT"); 56 55 57 bool branch_is_current = reg_PC_NEXT_IS_DS_TAKE; 56 58 if (branch_is_current) … … 90 92 if (internal_ADDRESS_VAL and PORT_READ(in_ADDRESS_ACK)) 91 93 { 94 92 95 reg_PC_ACCESS_VAL = 0; 93 96 #ifdef STATISTICS … … 102 105 #endif 103 106 } 107 108 // ========================================= 109 // ===== Shift Register ==================== 110 // ========================================= 104 111 105 112 // Shift register 106 107 if (not reg_PC_ACCESS_VAL and reg_PC_CURRENT_VAL and reg_PC_NEXT_VAL and reg_PC_NEXT_NEXT_VAL) 108 { 113 if (reg_PC_NEXT_NEXT_VAL and reg_PC_NEXT_VAL and reg_PC_CURRENT_VAL and not reg_PC_ACCESS_VAL) 114 { 115 log_printf(TRACE,Address_management,FUNCTION," * New PC_ACCESS"); 116 109 117 reg_PC_ACCESS_VAL = 1; // new request 110 118 reg_PC_CURRENT_VAL = 0; // invalid current … … 120 128 } 121 129 122 if (not reg_PC_CURRENT_VAL) 123 { 124 bool val = reg_PC_NEXT_VAL; 125 reg_PC_CURRENT_VAL = val; // new PC_CURRENT if PC_NEXT is valid 126 reg_PC_NEXT_VAL = 0; // invalid next 127 128 if (val) 129 { 130 reg_PC_CURRENT = reg_PC_NEXT ; 131 reg_PC_CURRENT_IS_DS_TAKE = reg_PC_NEXT_IS_DS_TAKE ; 132 reg_PC_CURRENT_INST_IFETCH_PTR = reg_PC_NEXT_INST_IFETCH_PTR ; 133 reg_PC_CURRENT_BRANCH_STATE = reg_PC_NEXT_BRANCH_STATE ; 134 reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID = reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID; 135 136 for (uint32_t i=0; i<_param->_nb_instruction; i++) 137 reg_PC_CURRENT_INSTRUCTION_ENABLE [i] = reg_PC_NEXT_INSTRUCTION_ENABLE [i]; 138 } 139 } 140 141 if (not reg_PC_NEXT_VAL) 142 { 143 bool val = reg_PC_NEXT_NEXT_VAL; 144 reg_PC_NEXT_VAL = val; // new PC_NEXT if PC_NEXT_NEXT is valid 145 reg_PC_NEXT_NEXT_VAL = 0; // invalid next_next 146 147 if (val) 148 { 149 reg_PC_NEXT = reg_PC_NEXT_NEXT ; 150 reg_PC_NEXT_IS_DS_TAKE = reg_PC_NEXT_NEXT_IS_DS_TAKE ; 151 // reg_PC_NEXT_INST_IFETCH_PTR = reg_PC_NEXT_NEXT_INST_IFETCH_PTR ; 152 // reg_PC_NEXT_BRANCH_STATE = reg_PC_NEXT_NEXT_BRANCH_STATE ; 153 // reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID = reg_PC_NEXT_NEXT_BRANCH_UPDATE_PREDICTION_ID; 154 155 // for (uint32_t i=0; i<_param->_nb_instruction; i++) 156 // reg_PC_NEXT_INSTRUCTION_ENABLE [i] = reg_PC_NEXT_NEXT_INSTRUCTION_ENABLE [i]; 157 } 130 // if (not reg_PC_CURRENT_VAL and reg_PC_NEXT_VAL) 131 if (reg_PC_NEXT_NEXT_VAL and reg_PC_NEXT_VAL and not reg_PC_CURRENT_VAL) 132 { 133 log_printf(TRACE,Address_management,FUNCTION," * New PC_CURRENT"); 134 135 reg_PC_CURRENT_VAL = 1; // new PC_CURRENT if PC_NEXT is valid 136 reg_PC_NEXT_VAL = 0; // invalid next 137 138 reg_PC_CURRENT = reg_PC_NEXT ; 139 reg_PC_CURRENT_IS_DS_TAKE = reg_PC_NEXT_IS_DS_TAKE ; 140 reg_PC_CURRENT_INST_IFETCH_PTR = reg_PC_NEXT_INST_IFETCH_PTR ; 141 reg_PC_CURRENT_BRANCH_STATE = reg_PC_NEXT_BRANCH_STATE ; 142 reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID = reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID; 143 144 for (uint32_t i=0; i<_param->_nb_instruction; i++) 145 reg_PC_CURRENT_INSTRUCTION_ENABLE [i] = reg_PC_NEXT_INSTRUCTION_ENABLE [i]; 146 } 147 148 // if (not reg_PC_NEXT_VAL and reg_PC_NEXT_NEXT_VAL) 149 if (reg_PC_NEXT_NEXT_VAL and not reg_PC_NEXT_VAL) 150 { 151 log_printf(TRACE,Address_management,FUNCTION," * New PC_NEXT"); 152 153 reg_PC_NEXT_VAL = 1; // new PC_NEXT if PC_NEXT_NEXT is valid 154 reg_PC_NEXT_NEXT_VAL = 0; // invalid next_next 155 156 reg_PC_NEXT = reg_PC_NEXT_NEXT ; 157 reg_PC_NEXT_IS_DS_TAKE = reg_PC_NEXT_NEXT_IS_DS_TAKE ; 158 // reg_PC_NEXT_INST_IFETCH_PTR = reg_PC_NEXT_NEXT_INST_IFETCH_PTR ; 159 // reg_PC_NEXT_BRANCH_STATE = reg_PC_NEXT_NEXT_BRANCH_STATE ; 160 // reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID = reg_PC_NEXT_NEXT_BRANCH_UPDATE_PREDICTION_ID; 161 162 // for (uint32_t i=0; i<_param->_nb_instruction; i++) 163 // reg_PC_NEXT_INSTRUCTION_ENABLE [i] = reg_PC_NEXT_NEXT_INSTRUCTION_ENABLE [i]; 158 164 } 159 165 … … 161 167 // ===== EVENT ============================= 162 168 // ========================================= 169 170 // Event is after shift register : because, it's to write in pc_next and in not pc_current 171 163 172 if (PORT_READ(in_EVENT_VAL) and internal_EVENT_ACK) 164 173 { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/config_meta_predictor.cfg
r110 r111 1 1 Meta_Predictor_Glue 2 4 4 +1 # nb_inst_predict 3 4 4 +1 # nb_inst_update 4 3 3 +1 # nb_predictor 5 8 8 +1 # predictor_size_history [0] [nb_predictor] 6 17 17 +1 # predictor_size_history [1] [nb_predictor] 7 4 4 +1 # predictor_size_history [2] [nb_predictor] 8 1 1 +1 # predictor_update_on_prediction [0] [nb_predictor] 9 1 1 +1 # predictor_update_on_prediction [1] [nb_predictor] 10 0 0 +1 # predictor_update_on_prediction [2] [nb_predictor] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/src/main.cpp
r110 r111 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/include/test.h" 9 #include "Behavioural/include/Selftest.h" 9 10 10 #define NB_PARAMS 011 #define NB_PARAMS 3 11 12 12 13 void usage (int argc, char * argv[]) … … 14 15 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 15 16 err (_("list_params is :\n")); 16 err (_(" * ()\n")); 17 err (_(" * nb_inst_predict (uint32_t)\n")); 18 err (_(" * nb_inst_update (uint32_t)\n")); 19 err (_(" * nb_predictor (uint32_t)\n")); 20 err (_(" * predictor_size_history [nb_predictor] (uint32_t)\n")); 21 err (_(" * predictor_update_on_prediction [nb_predictor] (bool )\n")); 17 22 18 23 exit (1); … … 25 30 #endif 26 31 { 27 if (argc != static_cast<int>(2+NB_PARAMS))32 if (argc <= static_cast<int>(2+NB_PARAMS)) 28 33 usage (argc, argv); 29 34 … … 32 37 string name = argv[x++]; 33 38 39 uint32_t _nb_inst_predict ; 40 uint32_t _nb_inst_update ; 41 uint32_t _nb_predictor ; 42 uint32_t * _predictor_size_history ;//[nb_predictor] 43 bool * _predictor_update_on_prediction;//[nb_predictor] 44 45 SELFTEST0(_nb_inst_predict ,uint32_t,argv,x); 46 SELFTEST0(_nb_inst_update ,uint32_t,argv,x); 47 SELFTEST0(_nb_predictor ,uint32_t,argv,x); 48 49 if (argc != static_cast<int>(2+NB_PARAMS+2*_nb_predictor)) 50 usage (argc, argv); 51 52 SELFTEST1(_predictor_size_history ,uint32_t,argv,x,_nb_predictor); 53 SELFTEST1(_predictor_update_on_prediction,bool ,argv,x,_nb_predictor); 54 34 55 int _return = EXIT_SUCCESS; 35 56 try … … 37 58 morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters 38 59 ( 60 _nb_inst_predict , 61 _nb_inst_update , 62 _nb_predictor , 63 _predictor_size_history , 64 _predictor_update_on_prediction, 39 65 true //is_toplevel 40 66 ); … … 63 89 } 64 90 91 DELETE1(_predictor_update_on_prediction,_param->_nb_predictor); 92 DELETE1(_predictor_size_history ,_param->_nb_predictor); 93 65 94 return (_return); 66 95 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/src/test.cpp
r110 r111 51 51 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 52 52 53 ALLOC1_SC_SIGNAL( in_PREDICT_VAL ," in_PREDICT_VAL ",Tcontrol_t,_param->_nb_inst_predict); 54 ALLOC1_SC_SIGNAL(out_PREDICT_ACK ,"out_PREDICT_ACK ",Tcontrol_t,_param->_nb_inst_predict); 55 ALLOC1_SC_SIGNAL(out_PREDICT_HISTORY ,"out_PREDICT_HISTORY ",Thistory_t,_param->_nb_inst_predict); 56 ALLOC1_SC_SIGNAL(out_PREDICT_DIRECTION ,"out_PREDICT_DIRECTION ",Tcontrol_t,_param->_nb_inst_predict); 57 ALLOC2_SC_SIGNAL(out_PREDICT_PREDICTOR_VAL ,"out_PREDICT_PREDICTOR_VAL ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_predict); 58 ALLOC2_SC_SIGNAL( in_PREDICT_PREDICTOR_ACK ," in_PREDICT_PREDICTOR_ACK ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_predict); 59 ALLOC2_SC_SIGNAL( in_PREDICT_PREDICTOR_HISTORY ," in_PREDICT_PREDICTOR_HISTORY ",Thistory_t,_param->_nb_predictor,_param->_nb_inst_predict); 60 ALLOC2_SC_SIGNAL( in_PREDICT_PREDICTOR_DIRECTION ," in_PREDICT_PREDICTOR_DIRECTION ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_predict); 61 ALLOC2_SC_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION_VAL,"out_PREDICT_PREDICTOR_DIRECTION_VAL",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_predict); // if update_on_prediction 62 ALLOC2_SC_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION ,"out_PREDICT_PREDICTOR_DIRECTION ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_predict); // if update_on_prediction 63 ALLOC1_SC_SIGNAL( in_UPDATE_VAL ," in_UPDATE_VAL ",Tcontrol_t,_param->_nb_inst_update); 64 ALLOC1_SC_SIGNAL(out_UPDATE_ACK ,"out_UPDATE_ACK ",Tcontrol_t,_param->_nb_inst_update); 65 ALLOC1_SC_SIGNAL( in_UPDATE_HISTORY ," in_UPDATE_HISTORY ",Thistory_t,_param->_nb_inst_update); 66 ALLOC1_SC_SIGNAL( in_UPDATE_DIRECTION ," in_UPDATE_DIRECTION ",Tcontrol_t,_param->_nb_inst_update); 67 ALLOC2_SC_SIGNAL(out_UPDATE_PREDICTOR_VAL ,"out_UPDATE_PREDICTOR_VAL ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_update); 68 ALLOC2_SC_SIGNAL( in_UPDATE_PREDICTOR_ACK ," in_UPDATE_PREDICTOR_ACK ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_update); 69 ALLOC2_SC_SIGNAL(out_UPDATE_PREDICTOR_HISTORY ,"out_UPDATE_PREDICTOR_HISTORY ",Thistory_t,_param->_nb_predictor,_param->_nb_inst_update); 70 ALLOC2_SC_SIGNAL(out_UPDATE_PREDICTOR_DIRECTION ,"out_UPDATE_PREDICTOR_DIRECTION ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_update); 71 ALLOC2_SC_SIGNAL(out_UPDATE_PREDICTOR_MISS ,"out_UPDATE_PREDICTOR_MISS ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_update); 72 53 73 /******************************************************** 54 74 * Instanciation … … 60 80 (*(_Meta_Predictor_Glue->in_NRESET)) (*(in_NRESET)); 61 81 82 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue, in_PREDICT_VAL ,_param->_nb_inst_predict); 83 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_ACK ,_param->_nb_inst_predict); 84 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_HISTORY ,_param->_nb_inst_predict); 85 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_DIRECTION ,_param->_nb_inst_predict); 86 87 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_PREDICTOR_VAL ,_param->_nb_predictor,_param->_nb_inst_predict); 88 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue, in_PREDICT_PREDICTOR_ACK ,_param->_nb_predictor,_param->_nb_inst_predict); 89 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue, in_PREDICT_PREDICTOR_HISTORY ,_param->_nb_predictor,_param->_nb_inst_predict); 90 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue, in_PREDICT_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_predict); 91 92 for (uint32_t i=0; i<_param->_nb_predictor; ++i) 93 if (_param->_predictor_update_on_prediction [i]) 94 { 95 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_PREDICTOR_DIRECTION_VAL[i],_param->_nb_inst_predict); 96 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_PREDICTOR_DIRECTION [i],_param->_nb_inst_predict); 97 } 98 99 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue, in_UPDATE_VAL ,_param->_nb_inst_update); 100 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_UPDATE_ACK ,_param->_nb_inst_update); 101 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue, in_UPDATE_HISTORY ,_param->_nb_inst_update); 102 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue, in_UPDATE_DIRECTION ,_param->_nb_inst_update); 103 104 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue,out_UPDATE_PREDICTOR_VAL ,_param->_nb_predictor,_param->_nb_inst_update); 105 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue, in_UPDATE_PREDICTOR_ACK ,_param->_nb_predictor,_param->_nb_inst_update); 106 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue,out_UPDATE_PREDICTOR_HISTORY ,_param->_nb_predictor,_param->_nb_inst_update); 107 INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue,out_UPDATE_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_update); 108 for (uint32_t i=0; i<_param->_nb_predictor; ++i) 109 if (_param->_predictor_update_on_prediction [i]) 110 INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_UPDATE_PREDICTOR_MISS [i] ,_param->_nb_inst_update); 62 111 63 112 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); … … 104 153 delete in_CLOCK; 105 154 delete in_NRESET; 155 156 DELETE1_SC_SIGNAL( in_PREDICT_VAL ,_param->_nb_inst_predict); 157 DELETE1_SC_SIGNAL(out_PREDICT_ACK ,_param->_nb_inst_predict); 158 DELETE1_SC_SIGNAL(out_PREDICT_HISTORY ,_param->_nb_inst_predict); 159 DELETE1_SC_SIGNAL(out_PREDICT_DIRECTION ,_param->_nb_inst_predict); 160 161 DELETE2_SC_SIGNAL(out_PREDICT_PREDICTOR_VAL ,_param->_nb_predictor,_param->_nb_inst_predict); 162 DELETE2_SC_SIGNAL( in_PREDICT_PREDICTOR_ACK ,_param->_nb_predictor,_param->_nb_inst_predict); 163 DELETE2_SC_SIGNAL( in_PREDICT_PREDICTOR_HISTORY ,_param->_nb_predictor,_param->_nb_inst_predict); 164 DELETE2_SC_SIGNAL( in_PREDICT_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_predict); 165 DELETE2_SC_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION_VAL,_param->_nb_predictor,_param->_nb_inst_predict); 166 DELETE2_SC_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_predict); 167 168 DELETE1_SC_SIGNAL( in_UPDATE_VAL ,_param->_nb_inst_update); 169 DELETE1_SC_SIGNAL(out_UPDATE_ACK ,_param->_nb_inst_update); 170 DELETE1_SC_SIGNAL( in_UPDATE_HISTORY ,_param->_nb_inst_update); 171 DELETE1_SC_SIGNAL( in_UPDATE_DIRECTION ,_param->_nb_inst_update); 172 173 DELETE2_SC_SIGNAL(out_UPDATE_PREDICTOR_VAL ,_param->_nb_predictor,_param->_nb_inst_update); 174 DELETE2_SC_SIGNAL( in_UPDATE_PREDICTOR_ACK ,_param->_nb_predictor,_param->_nb_inst_update); 175 DELETE2_SC_SIGNAL(out_UPDATE_PREDICTOR_HISTORY ,_param->_nb_predictor,_param->_nb_inst_update); 176 DELETE2_SC_SIGNAL(out_UPDATE_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_update); 177 DELETE2_SC_SIGNAL(out_UPDATE_PREDICTOR_MISS ,_param->_nb_predictor,_param->_nb_inst_update); 106 178 } 107 179 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h
r110 r111 66 66 public : SC_IN (Tcontrol_t) * in_NRESET ; 67 67 68 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 69 public : SC_IN (Tcontrol_t) ** in_PREDICT_VAL ;// [nb_inst_predict] 70 public : SC_OUT(Tcontrol_t) ** out_PREDICT_ACK ;// [nb_inst_predict] 71 public : SC_OUT(Thistory_t) ** out_PREDICT_HISTORY ;// [nb_inst_predict] 72 public : SC_OUT(Tcontrol_t) ** out_PREDICT_DIRECTION ;// [nb_inst_predict] 73 74 public : SC_OUT(Tcontrol_t) *** out_PREDICT_PREDICTOR_VAL ;//[nb_predictor][nb_inst_predict] 75 public : SC_IN (Tcontrol_t) *** in_PREDICT_PREDICTOR_ACK ;//[nb_predictor][nb_inst_predict] 76 public : SC_IN (Thistory_t) *** in_PREDICT_PREDICTOR_HISTORY ;//[nb_predictor][nb_inst_predict] 77 public : SC_IN (Tcontrol_t) *** in_PREDICT_PREDICTOR_DIRECTION ;//[nb_predictor][nb_inst_predict] 78 public : SC_OUT(Tcontrol_t) *** out_PREDICT_PREDICTOR_DIRECTION_VAL;//[nb_predictor][nb_inst_predict] // if update_on_prediction 79 public : SC_OUT(Tcontrol_t) *** out_PREDICT_PREDICTOR_DIRECTION ;//[nb_predictor][nb_inst_predict] // if update_on_prediction 80 81 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 82 public : SC_IN (Tcontrol_t) ** in_UPDATE_VAL ;// [nb_inst_update] 83 public : SC_OUT(Tcontrol_t) ** out_UPDATE_ACK ;// [nb_inst_update] 84 public : SC_IN (Thistory_t) ** in_UPDATE_HISTORY ;// [nb_inst_update] 85 public : SC_IN (Tcontrol_t) ** in_UPDATE_DIRECTION ;// [nb_inst_update] 86 87 public : SC_OUT(Tcontrol_t) *** out_UPDATE_PREDICTOR_VAL ;//[nb_predictor][nb_inst_update] 88 public : SC_IN (Tcontrol_t) *** in_UPDATE_PREDICTOR_ACK ;//[nb_predictor][nb_inst_update] 89 public : SC_OUT(Thistory_t) *** out_UPDATE_PREDICTOR_HISTORY ;//[nb_predictor][nb_inst_update] 90 public : SC_OUT(Tcontrol_t) *** out_UPDATE_PREDICTOR_DIRECTION ;//[nb_predictor][nb_inst_update] 91 public : SC_OUT(Tcontrol_t) *** out_UPDATE_PREDICTOR_MISS ;//[nb_predictor][nb_inst_update] // if update_on_prediction 92 68 93 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 69 94 … … 105 130 public : void transition (void); 106 131 //public : void genMoore (void); 132 133 public : void genMealy_predict_valack (void); 134 public : void genMealy_predict (void); 135 136 public : void genMealy_update_valack (void); 137 public : void genMealy_update (void); 107 138 #endif 108 139 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h
r110 r111 11 11 #include "Behavioural/include/Parameters.h" 12 12 #include "Common/include/Debug.h" 13 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Types.h" 13 14 14 15 namespace morpheo { … … 26 27 { 27 28 //-----[ fields ]------------------------------------------------------------ 29 public : uint32_t _nb_inst_predict ; 30 public : uint32_t _nb_inst_update ; 31 public : uint32_t _nb_predictor ; 32 public : uint32_t * _predictor_size_history ;//[nb_predictor] 33 public : bool * _predictor_update_on_prediction;//[nb_predictor] 34 35 public : uint32_t _size_history ; 36 public : uint32_t * _predictor_history_shift ;//[nb_predictor] 37 public : uint32_t * _predictor_history_shift_msb ;//[nb_predictor] 38 public : Thistory_t * _predictor_history_mask ;//[nb_predictor] 39 28 40 29 41 //-----[ methods ]----------------------------------------------------------- 30 public : Parameters (bool is_toplevel=false); 42 public : Parameters (uint32_t nb_inst_predict , 43 uint32_t nb_inst_update , 44 uint32_t nb_predictor , 45 uint32_t * predictor_size_history ,//[nb_predictor] 46 bool * predictor_update_on_prediction,//[nb_predictor] 47 bool is_toplevel=false); 31 48 //public : Parameters (Parameters & param) ; 32 49 public : ~Parameters (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue.cpp
r110 r111 82 82 # endif 83 83 84 // log_printf(INFO,Meta_Predictor_Glue,FUNCTION,_("<%s> : Method - genMoore"),_name.c_str());84 log_printf(INFO,Meta_Predictor_Glue,FUNCTION,_("<%s> : Method - genMealy_update_valack"),_name.c_str()); 85 85 86 // SC_METHOD (genMoore); 87 // dont_initialize (); 88 // sensitive << (*(in_CLOCK)).neg(); // need internal register 89 90 // # ifdef SYSTEMCASS_SPECIFIC 91 // // List dependency information 92 // # endif 86 SC_METHOD (genMealy_update_valack); 87 dont_initialize (); 88 // sensitive << (*(in_CLOCK)).neg(); // don't need internal register 89 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 90 { 91 sensitive << (*(in_UPDATE_VAL [i])); 92 93 for (uint32_t j=0; j<_param->_nb_predictor; ++j) 94 sensitive << (*(in_UPDATE_PREDICTOR_ACK [j][i])); 95 } 96 97 log_printf(INFO,Meta_Predictor_Glue,FUNCTION,_("<%s> : Method - genMealy_update"),_name.c_str()); 98 99 SC_METHOD (genMealy_update); 100 dont_initialize (); 101 // sensitive << (*(in_CLOCK)).neg(); // don't need internal register 102 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 103 sensitive << (*(in_UPDATE_HISTORY [i])) 104 << (*(in_UPDATE_DIRECTION [i])); 105 106 # ifdef SYSTEMCASS_SPECIFIC 107 // List dependency information 108 # endif 109 110 log_printf(INFO,Meta_Predictor_Glue,FUNCTION,_("<%s> : Method - genMealy_predict_valack"),_name.c_str()); 111 112 SC_METHOD (genMealy_predict_valack); 113 dont_initialize (); 114 // sensitive << (*(in_CLOCK)).neg(); // don't need internal register 115 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 116 { 117 sensitive << (*(in_PREDICT_VAL [i])); 118 119 for (uint32_t j=0; j<_param->_nb_predictor; ++j) 120 sensitive << (*(in_PREDICT_PREDICTOR_ACK [j][i])); 121 } 122 123 # ifdef SYSTEMCASS_SPECIFIC 124 // List dependency information 125 # endif 126 127 log_printf(INFO,Meta_Predictor_Glue,FUNCTION,_("<%s> : Method - genMealy_predict"),_name.c_str()); 128 129 SC_METHOD (genMealy_predict); 130 dont_initialize (); 131 // sensitive << (*(in_CLOCK)).neg(); // don't need internal register 132 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 133 for (uint32_t j=0; j<_param->_nb_predictor; ++j) 134 sensitive << (*(in_PREDICT_PREDICTOR_HISTORY [j][i])) 135 << (*(in_PREDICT_PREDICTOR_DIRECTION [j][i])); 136 137 # ifdef SYSTEMCASS_SPECIFIC 138 // List dependency information 139 # endif 93 140 94 141 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_allocation.cpp
r110 r111 58 58 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); 59 59 } 60 61 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 62 { 63 ALLOC1_INTERFACE("predict",IN,NORTH,_("Predict next address"),_param->_nb_inst_predict); 64 65 ALLOC1_SIGNAL_IN ( in_PREDICT_VAL ,"VAL" ,Tcontrol_t,1); 66 ALLOC1_SIGNAL_OUT(out_PREDICT_ACK ,"ACK" ,Tcontrol_t,1); 67 ALLOC1_SIGNAL_OUT(out_PREDICT_HISTORY ,"HISTORY" ,Thistory_t,_param->_size_history); 68 ALLOC1_SIGNAL_OUT(out_PREDICT_DIRECTION ,"DIRECTION" ,Tcontrol_t,1); 69 } 70 71 { 72 ALLOC2_INTERFACE("predict_predictor",IN,NORTH,_("Predict next address"),_param->_nb_predictor,_param->_nb_inst_predict); 73 74 ALLOC2_SIGNAL_OUT(out_PREDICT_PREDICTOR_VAL ,"VAL" ,Tcontrol_t,1); 75 ALLOC2_SIGNAL_IN ( in_PREDICT_PREDICTOR_ACK ,"ACK" ,Tcontrol_t,1); 76 ALLOC2_SIGNAL_IN ( in_PREDICT_PREDICTOR_HISTORY ,"HISTORY" ,Thistory_t,_param->_predictor_size_history[it1]); 77 ALLOC2_SIGNAL_IN ( in_PREDICT_PREDICTOR_DIRECTION ,"DIRECTION" ,Tcontrol_t,1); 78 ALLOC2_SIGNAL_OUT(out_PREDICT_PREDICTOR_DIRECTION_VAL,"DIRECTION_VAL",Tcontrol_t,(_param->_predictor_update_on_prediction [it1])?1:0); 79 ALLOC2_SIGNAL_OUT(out_PREDICT_PREDICTOR_DIRECTION ,"DIRECTION" ,Tcontrol_t,(_param->_predictor_update_on_prediction [it1])?1:0); 80 } 81 82 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 83 { 84 ALLOC1_INTERFACE("update",IN,NORTH,_("Update predictor"),_param->_nb_inst_update); 85 86 ALLOC1_SIGNAL_IN ( in_UPDATE_VAL ,"VAL" ,Tcontrol_t,1); 87 ALLOC1_SIGNAL_OUT(out_UPDATE_ACK ,"ACK" ,Tcontrol_t,1); 88 ALLOC1_SIGNAL_IN ( in_UPDATE_HISTORY ,"HISTORY" ,Thistory_t,_param->_size_history); 89 ALLOC1_SIGNAL_IN ( in_UPDATE_DIRECTION ,"DIRECTION" ,Tcontrol_t,1); 90 } 91 { 92 ALLOC2_INTERFACE("update_predictor",IN,NORTH,_("Update predictor"),_param->_nb_predictor,_param->_nb_inst_update); 93 94 ALLOC2_SIGNAL_OUT(out_UPDATE_PREDICTOR_VAL ,"VAL" ,Tcontrol_t,1); 95 ALLOC2_SIGNAL_IN ( in_UPDATE_PREDICTOR_ACK ,"ACK" ,Tcontrol_t,1); 96 ALLOC2_SIGNAL_OUT(out_UPDATE_PREDICTOR_HISTORY ,"HISTORY" ,Thistory_t,_param->_predictor_size_history[it1]); 97 ALLOC2_SIGNAL_OUT(out_UPDATE_PREDICTOR_DIRECTION ,"DIRECTION" ,Tcontrol_t,1); 98 ALLOC2_SIGNAL_OUT(out_UPDATE_PREDICTOR_MISS ,"MISS" ,Tcontrol_t,(_param->_predictor_update_on_prediction [it1])?1:0); 99 } 100 60 101 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 61 102 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_deallocation.cpp
r110 r111 30 30 delete in_CLOCK ; 31 31 delete in_NRESET; 32 33 DELETE1_SIGNAL( in_PREDICT_VAL ,_param->_nb_inst_predict,1); 34 DELETE1_SIGNAL(out_PREDICT_ACK ,_param->_nb_inst_predict,1); 35 DELETE1_SIGNAL(out_PREDICT_HISTORY ,_param->_nb_inst_predict,_param->_size_history); 36 DELETE1_SIGNAL(out_PREDICT_DIRECTION ,_param->_nb_inst_predict,1); 37 38 DELETE2_SIGNAL(out_PREDICT_PREDICTOR_VAL ,_param->_nb_predictor,_param->_nb_inst_predict,1); 39 DELETE2_SIGNAL( in_PREDICT_PREDICTOR_ACK ,_param->_nb_predictor,_param->_nb_inst_predict,1); 40 DELETE2_SIGNAL( in_PREDICT_PREDICTOR_HISTORY ,_param->_nb_predictor,_param->_nb_inst_predict,_param->_predictor_size_history[it1]); 41 DELETE2_SIGNAL( in_PREDICT_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_predict,1); 42 DELETE2_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION_VAL,_param->_nb_predictor,_param->_nb_inst_predict,(_param->_predictor_update_on_prediction [it1])?1:0); 43 DELETE2_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_predict,(_param->_predictor_update_on_prediction [it1])?1:0); 44 45 DELETE1_SIGNAL( in_UPDATE_VAL ,_param->_nb_inst_update,1); 46 DELETE1_SIGNAL(out_UPDATE_ACK ,_param->_nb_inst_update,1); 47 DELETE1_SIGNAL( in_UPDATE_HISTORY ,_param->_nb_inst_update,_param->_size_history); 48 DELETE1_SIGNAL( in_UPDATE_DIRECTION ,_param->_nb_inst_update,1); 49 50 DELETE2_SIGNAL(out_UPDATE_PREDICTOR_VAL ,_param->_nb_predictor,_param->_nb_inst_update,1); 51 DELETE2_SIGNAL( in_UPDATE_PREDICTOR_ACK ,_param->_nb_predictor,_param->_nb_inst_update,1); 52 DELETE2_SIGNAL(out_UPDATE_PREDICTOR_HISTORY ,_param->_nb_predictor,_param->_nb_inst_update,_param->_predictor_size_history[it1]); 53 DELETE2_SIGNAL(out_UPDATE_PREDICTOR_DIRECTION ,_param->_nb_predictor,_param->_nb_inst_update,1); 54 DELETE2_SIGNAL(out_UPDATE_PREDICTOR_MISS ,_param->_nb_predictor,_param->_nb_inst_update,(_param->_predictor_update_on_prediction [it1])?1:0); 32 55 } 56 33 57 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34 58 35 59 delete _component; 36 60 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_transition.cpp
r110 r111 25 25 { 26 26 log_begin(Meta_Predictor_Glue,FUNCTION); 27 log_function(Meta_Predictor_Glue,FUNCTION,_name.c_str()); 27 28 28 29 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Parameters.cpp
r110 r111 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h" 9 #include "Behavioural/include/Allocation.h" 10 #include "Common/include/BitManipulation.h" 9 11 10 12 namespace morpheo { … … 21 23 #undef FUNCTION 22 24 #define FUNCTION "Meta_Predictor_Glue::Parameters" 23 Parameters::Parameters (bool is_toplevel) 25 Parameters::Parameters (uint32_t nb_inst_predict , 26 uint32_t nb_inst_update , 27 uint32_t nb_predictor , 28 uint32_t * predictor_size_history ,//[nb_predictor] 29 bool * predictor_update_on_prediction,//[nb_predictor] 30 bool is_toplevel ) 24 31 { 25 32 log_begin(Meta_Predictor_Glue,FUNCTION); 26 33 34 _nb_inst_predict = nb_inst_predict ; 35 _nb_inst_update = nb_inst_update ; 36 _nb_predictor = nb_predictor ; 37 _predictor_size_history = predictor_size_history ; 38 _predictor_update_on_prediction = predictor_update_on_prediction; 39 40 _size_history = 0; 41 for (uint32_t i=0; i<_nb_predictor; ++i) 42 _size_history += _predictor_size_history [i]; 43 27 44 test(); 45 46 ALLOC1(_predictor_history_shift ,uint32_t ,_nb_predictor); 47 ALLOC1(_predictor_history_shift_msb,uint32_t ,_nb_predictor); 48 ALLOC1(_predictor_history_mask ,Thistory_t,_nb_predictor); 49 50 uint32_t shift = 0; 51 for (uint32_t i=0; i<_nb_predictor; ++i) 52 { 53 _predictor_history_shift [i] = shift; 54 _predictor_history_shift_msb [i] = _predictor_size_history [i]-1; 55 _predictor_history_mask [i] = gen_mask<Thistory_t>(_predictor_size_history [i]); 56 57 shift += _predictor_size_history [i]; 58 } 28 59 29 60 if (is_toplevel) … … 57 88 { 58 89 log_begin(Meta_Predictor_Glue,FUNCTION); 90 91 DELETE1(_predictor_history_mask ,_nb_predictor); 92 DELETE1(_predictor_history_shift,_nb_predictor); 93 59 94 log_end(Meta_Predictor_Glue,FUNCTION); 60 95 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/SelfTest/config-alpha_21264.cfg
r110 r111 1 1 Meta_Predictor 2 1 1 +1 # nb_inst_predict 3 1 1 +1 # nb_inst_update 4 30 30 *2 # size_address 5 1 1 +1 # predictor_0_have_bht 6 10 10 +1 # predictor_0_bht_size_shifter 7 1024 1024 *2 # predictor_0_bht_nb_shifter 8 1 1 +1 # predictor_0_have_pht 9 3 3 +1 # predictor_0_pht_size_counter 10 1024 1024 *2 # predictor_0_pht_nb_counter 11 0 0 +1 # predictor_0_pht_size_address_share 12 1 1 +1 # predictor_1_have_bht 13 12 12 +1 # predictor_1_bht_size_shifter 14 2 2 *2 # predictor_1_bht_nb_shifter 15 1 1 +1 # predictor_1_have_pht 16 2 2 +1 # predictor_1_pht_size_counter 17 4096 4096 *2 # predictor_1_pht_nb_counter 18 0 0 +1 # predictor_1_pht_size_address_share 19 0 0 +1 # predictor_2_have_bht 20 4 4 +1 # predictor_2_bht_size_shifter 21 256 256 *2 # predictor_2_bht_nb_shifter 22 1 1 +1 # predictor_2_have_pht 23 2 2 +1 # predictor_2_pht_size_counter 24 4096 4096 *2 # predictor_2_pht_nb_counter 25 0 0 +1 # predictor_2_pht_size_address_share -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/SelfTest/src/main.cpp
r110 r111 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/SelfTest/include/test.h" 9 #include "Behavioural/include/Selftest.h" 9 10 10 #define NB_PARAMS 011 #define NB_PARAMS 3+7*3 11 12 12 13 void usage (int argc, char * argv[]) … … 14 15 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 15 16 err (_("list_params is :\n")); 16 err (_(" * ()\n")); 17 17 err (_(" * nb_inst_predict (uint32_t)\n")); 18 err (_(" * nb_inst_update (uint32_t)\n")); 19 err (_(" * size_address (uint32_t)\n")); 20 err (_(" * have_bht [3] (bool )\n")); 21 err (_(" * bht_size_shifter [3] (uint32_t)\n")); 22 err (_(" * bht_nb_shifter [3] (uint32_t)\n")); 23 err (_(" * have_pht [3] (bool )\n")); 24 err (_(" * pht_size_counter [3] (uint32_t)\n")); 25 err (_(" * pht_nb_counter [3] (uint32_t)\n")); 26 err (_(" * pht_size_address_share [3] (uint32_t)\n")); 18 27 exit (1); 19 28 } … … 31 40 32 41 string name = argv[x++]; 42 uint32_t _nb_inst_predict ; 43 uint32_t _nb_inst_update ; 44 uint32_t _size_address ; 45 bool _have_bht [3]; 46 uint32_t _bht_size_shifter [3]; 47 uint32_t _bht_nb_shifter [3]; 48 bool _have_pht [3]; 49 uint32_t _pht_size_counter [3]; 50 uint32_t _pht_nb_counter [3]; 51 uint32_t _pht_size_address_share [3]; 52 53 SELFTEST0(_nb_inst_predict ,uint32_t,argv,x); 54 SELFTEST0(_nb_inst_update ,uint32_t,argv,x); 55 SELFTEST0(_size_address ,uint32_t,argv,x); 56 57 for (uint32_t i=0; i<3; ++i) 58 { 59 SELFTEST0(_have_bht [i],bool ,argv,x); 60 SELFTEST0(_bht_size_shifter [i],uint32_t,argv,x); 61 SELFTEST0(_bht_nb_shifter [i],uint32_t,argv,x); 62 SELFTEST0(_have_pht [i],bool ,argv,x); 63 SELFTEST0(_pht_size_counter [i],uint32_t,argv,x); 64 SELFTEST0(_pht_nb_counter [i],uint32_t,argv,x); 65 SELFTEST0(_pht_size_address_share [i],uint32_t,argv,x); 66 } 33 67 34 68 int _return = EXIT_SUCCESS; … … 37 71 morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters 38 72 ( 73 _nb_inst_predict , 74 _nb_inst_update , 75 _size_address , 76 _have_bht , 77 _bht_size_shifter , 78 _bht_nb_shifter , 79 _have_pht , 80 _pht_size_counter , 81 _pht_nb_counter , 82 _pht_size_address_share, 39 83 true // is_toplevel 40 84 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/SelfTest/src/test.cpp
r110 r111 50 50 sc_clock * in_CLOCK = new sc_clock ("clock", 1.0, 0.5); 51 51 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 52 ALLOC1_SC_SIGNAL( in_PREDICT_VAL ," in_PREDICT_VAL ",Tcontrol_t,_param->_nb_inst_predict); 53 ALLOC1_SC_SIGNAL(out_PREDICT_ACK ,"out_PREDICT_ACK ",Tcontrol_t,_param->_nb_inst_predict); 54 ALLOC1_SC_SIGNAL( in_PREDICT_ADDRESS ," in_PREDICT_ADDRESS ",Taddress_t,_param->_nb_inst_predict); 55 ALLOC1_SC_SIGNAL(out_PREDICT_DIRECTION ,"out_PREDICT_DIRECTION ",Tcontrol_t,_param->_nb_inst_predict); 56 ALLOC1_SC_SIGNAL(out_PREDICT_HISTORY ,"out_PREDICT_HISTORY ",Thistory_t,_param->_nb_inst_predict); 57 58 ALLOC1_SC_SIGNAL( in_UPDATE_VAL ," in_UPDATE_VAL ",Tcontrol_t,_param->_nb_inst_update); 59 ALLOC1_SC_SIGNAL(out_UPDATE_ACK ,"out_UPDATE_ACK ",Tcontrol_t,_param->_nb_inst_update); 60 ALLOC1_SC_SIGNAL( in_UPDATE_ADDRESS ," in_UPDATE_ADDRESS ",Taddress_t,_param->_nb_inst_update); 61 ALLOC1_SC_SIGNAL( in_UPDATE_HISTORY ," in_UPDATE_HISTORY ",Thistory_t,_param->_nb_inst_update); 62 ALLOC1_SC_SIGNAL( in_UPDATE_DIRECTION ," in_UPDATE_DIRECTION ",Tcontrol_t,_param->_nb_inst_update); 52 63 53 64 /******************************************************** … … 60 71 (*(_Meta_Predictor->in_NRESET)) (*(in_NRESET)); 61 72 73 INSTANCE1_SC_SIGNAL(_Meta_Predictor, in_PREDICT_VAL ,_param->_nb_inst_predict); 74 INSTANCE1_SC_SIGNAL(_Meta_Predictor,out_PREDICT_ACK ,_param->_nb_inst_predict); 75 INSTANCE1_SC_SIGNAL(_Meta_Predictor, in_PREDICT_ADDRESS ,_param->_nb_inst_predict); 76 INSTANCE1_SC_SIGNAL(_Meta_Predictor,out_PREDICT_DIRECTION ,_param->_nb_inst_predict); 77 INSTANCE1_SC_SIGNAL(_Meta_Predictor,out_PREDICT_HISTORY ,_param->_nb_inst_predict); 78 79 INSTANCE1_SC_SIGNAL(_Meta_Predictor, in_UPDATE_VAL ,_param->_nb_inst_update); 80 INSTANCE1_SC_SIGNAL(_Meta_Predictor,out_UPDATE_ACK ,_param->_nb_inst_update); 81 INSTANCE1_SC_SIGNAL(_Meta_Predictor, in_UPDATE_ADDRESS ,_param->_nb_inst_update); 82 INSTANCE1_SC_SIGNAL(_Meta_Predictor, in_UPDATE_HISTORY ,_param->_nb_inst_update); 83 INSTANCE1_SC_SIGNAL(_Meta_Predictor, in_UPDATE_DIRECTION ,_param->_nb_inst_update); 62 84 63 85 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); … … 104 126 delete in_CLOCK; 105 127 delete in_NRESET; 128 129 DELETE1_SC_SIGNAL( in_PREDICT_VAL ,_param->_nb_inst_predict); 130 DELETE1_SC_SIGNAL(out_PREDICT_ACK ,_param->_nb_inst_predict); 131 DELETE1_SC_SIGNAL( in_PREDICT_ADDRESS ,_param->_nb_inst_predict); 132 DELETE1_SC_SIGNAL(out_PREDICT_DIRECTION ,_param->_nb_inst_predict); 133 DELETE1_SC_SIGNAL(out_PREDICT_HISTORY ,_param->_nb_inst_predict); 134 135 DELETE1_SC_SIGNAL( in_UPDATE_VAL ,_param->_nb_inst_update); 136 DELETE1_SC_SIGNAL(out_UPDATE_ACK ,_param->_nb_inst_update); 137 DELETE1_SC_SIGNAL( in_UPDATE_ADDRESS ,_param->_nb_inst_update); 138 DELETE1_SC_SIGNAL( in_UPDATE_HISTORY ,_param->_nb_inst_update); 139 DELETE1_SC_SIGNAL( in_UPDATE_DIRECTION ,_param->_nb_inst_update); 106 140 } 107 141 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/config_bht_only.cfg
r110 r111 1 1 Two_Level_Branch_Predictor 2 4 4 *2 # nb_inst_predict 3 4 4 *2 # nb_inst_update 4 30 30 *2 # size_address 5 1 1 +1 # have_bht 6 1 16 *4 # bht_size_shifter 7 1 16 *4 # bht_nb_shifter 8 0 0 +1 # have_pht 9 0 0 +1 # pht_size_counter 10 0 0 *2 # pht_nb_counter 11 0 0 +1 # pht_size_address_share 12 1 1 +1 # update_on_prediction -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/include/test.h
r110 r111 11 11 #endif 12 12 13 #define NB_ITERATION 1 13 #define NB_ITERATION 16 14 14 #define CYCLE_MAX (1024*NB_ITERATION) 15 15 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/src/main.cpp
r110 r111 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/include/test.h" 9 #include "Behavioural/include/Selftest.h" 9 10 10 #define NB_PARAMS 011 #define NB_PARAMS 11 11 12 12 13 void usage (int argc, char * argv[]) … … 14 15 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 15 16 err (_("list_params is :\n")); 16 err (_(" * ()\n")); 17 err (_(" * nb_inst_predict (uint32_t)\n")); 18 err (_(" * nb_inst_update (uint32_t)\n")); 19 err (_(" * size_address (uint32_t)\n")); 20 err (_(" * have_bht (bool )\n")); 21 err (_(" * bht_size_shifter (uint32_t)\n")); 22 err (_(" * bht_nb_shifter (uint32_t)\n")); 23 err (_(" * have_pht (bool )\n")); 24 err (_(" * pht_size_counter (uint32_t)\n")); 25 err (_(" * pht_nb_counter (uint32_t)\n")); 26 err (_(" * pht_size_address_share (uint32_t)\n")); 27 err (_(" * update_on_prediction (bool )\n")); 17 28 18 29 exit (1); … … 32 43 string name = argv[x++]; 33 44 45 uint32_t nb_inst_predict ; 46 uint32_t nb_inst_update ; 47 uint32_t size_address ; 48 bool have_bht ; 49 uint32_t bht_size_shifter ; 50 uint32_t bht_nb_shifter ; 51 bool have_pht ; 52 uint32_t pht_size_counter ; 53 uint32_t pht_nb_counter ; 54 uint32_t pht_size_address_share; 55 bool update_on_prediction ; 56 57 SELFTEST0(nb_inst_predict ,uint32_t,argv,x); 58 SELFTEST0(nb_inst_update ,uint32_t,argv,x); 59 SELFTEST0(size_address ,uint32_t,argv,x); 60 SELFTEST0(have_bht ,bool ,argv,x); 61 SELFTEST0(bht_size_shifter ,uint32_t,argv,x); 62 SELFTEST0(bht_nb_shifter ,uint32_t,argv,x); 63 SELFTEST0(have_pht ,bool ,argv,x); 64 SELFTEST0(pht_size_counter ,uint32_t,argv,x); 65 SELFTEST0(pht_nb_counter ,uint32_t,argv,x); 66 SELFTEST0(pht_size_address_share,uint32_t,argv,x); 67 SELFTEST0(update_on_prediction ,bool ,argv,x); 68 34 69 int _return = EXIT_SUCCESS; 35 70 try … … 37 72 morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters 38 73 ( 74 nb_inst_predict , 75 nb_inst_update , 76 size_address , 77 have_bht , 78 bht_size_shifter , 79 bht_nb_shifter , 80 have_pht , 81 pht_size_counter , 82 pht_nb_counter , 83 pht_size_address_share, 84 update_on_prediction , 39 85 true //is_toplevel 40 86 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/src/test.cpp
r110 r111 50 50 sc_clock * in_CLOCK = new sc_clock ("clock", 1.0, 0.5); 51 51 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 52 53 ALLOC1_SC_SIGNAL( in_PREDICT_VAL ," in_PREDICT_VAL ",Tcontrol_t,_param->_nb_inst_predict); 54 ALLOC1_SC_SIGNAL(out_PREDICT_ACK ,"out_PREDICT_ACK ",Tcontrol_t,_param->_nb_inst_predict); 55 ALLOC1_SC_SIGNAL( in_PREDICT_ADDRESS ," in_PREDICT_ADDRESS ",Taddress_t,_param->_nb_inst_predict); 56 ALLOC1_SC_SIGNAL(out_PREDICT_DIRECTION ,"out_PREDICT_DIRECTION ",Tcontrol_t,_param->_nb_inst_predict); 57 ALLOC1_SC_SIGNAL(out_PREDICT_HISTORY ,"out_PREDICT_HISTORY ",Thistory_t,_param->_nb_inst_predict); 58 ALLOC1_SC_SIGNAL( in_PREDICT_DIRECTION_VAL," in_PREDICT_DIRECTION_VAL",Tcontrol_t,_param->_nb_inst_predict); 59 ALLOC1_SC_SIGNAL( in_PREDICT_DIRECTION ," in_PREDICT_DIRECTION ",Tcontrol_t,_param->_nb_inst_predict); 60 61 ALLOC1_SC_SIGNAL( in_UPDATE_VAL ," in_UPDATE_VAL ",Tcontrol_t,_param->_nb_inst_update); 62 ALLOC1_SC_SIGNAL(out_UPDATE_ACK ,"out_UPDATE_ACK ",Tcontrol_t,_param->_nb_inst_update); 63 ALLOC1_SC_SIGNAL( in_UPDATE_ADDRESS ," in_UPDATE_ADDRESS ",Taddress_t,_param->_nb_inst_update); 64 ALLOC1_SC_SIGNAL( in_UPDATE_HISTORY ," in_UPDATE_HISTORY ",Thistory_t,_param->_nb_inst_update); 65 ALLOC1_SC_SIGNAL( in_UPDATE_DIRECTION ," in_UPDATE_DIRECTION ",Tcontrol_t,_param->_nb_inst_update); 66 ALLOC1_SC_SIGNAL( in_UPDATE_MISS ," in_UPDATE_MISS ",Tcontrol_t,_param->_nb_inst_update); 52 67 53 68 /******************************************************** … … 60 75 (*(_Two_Level_Branch_Predictor->in_NRESET)) (*(in_NRESET)); 61 76 77 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_PREDICT_VAL ,_param->_nb_inst_predict); 78 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor,out_PREDICT_ACK ,_param->_nb_inst_predict); 79 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_PREDICT_ADDRESS ,_param->_nb_inst_predict); 80 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor,out_PREDICT_DIRECTION ,_param->_nb_inst_predict); 81 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor,out_PREDICT_HISTORY ,_param->_nb_inst_predict); 82 if (_param->_update_on_prediction) 83 { 84 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_PREDICT_DIRECTION_VAL,_param->_nb_inst_predict); 85 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_PREDICT_DIRECTION ,_param->_nb_inst_predict); 86 } 87 88 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_UPDATE_VAL ,_param->_nb_inst_update); 89 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor,out_UPDATE_ACK ,_param->_nb_inst_update); 90 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_UPDATE_ADDRESS ,_param->_nb_inst_update); 91 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_UPDATE_HISTORY ,_param->_nb_inst_update); 92 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_UPDATE_DIRECTION ,_param->_nb_inst_update); 93 if (_param->_update_on_prediction) 94 INSTANCE1_SC_SIGNAL(_Two_Level_Branch_Predictor, in_UPDATE_MISS ,_param->_nb_inst_update); 62 95 63 96 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); … … 76 109 srand(seed); 77 110 111 const int32_t percent_transaction_predict = 75; 112 const int32_t percent_transaction_update = 75; 113 78 114 SC_START(0); 79 115 LABEL("Initialisation"); 116 117 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 118 in_PREDICT_VAL [i]->write(0); 119 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 120 in_UPDATE_VAL [i]->write(0); 80 121 81 122 LABEL("Reset"); … … 85 126 86 127 LABEL("Loop of Test"); 87 128 129 Thistory_t bht; 130 Thistory_t pht [_param->_pht_size_bank]; 131 88 132 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 89 133 { 90 134 LABEL("Iteration %d",iteration); 91 135 136 uint32_t bht_num_reg = (_param->_have_bht)?(rand()%_param->_bht_nb_shifter):0; 137 uint32_t pht_num_bank = (_param->_have_pht)?(rand()%_param->_pht_nb_bank ):0; 138 139 LABEL(" * bht_num_reg : %d",bht_num_reg ); 140 LABEL(" * pht_num_bank : %d",pht_num_bank); 141 142 { 143 LABEL("Init BHT and PHT"); 144 145 bht = 0; 146 for (uint32_t i=0; i<_param->_pht_size_bank; ++i) 147 pht [i] = 0; 148 149 uint32_t port = rand()%_param->_nb_inst_update; 150 151 if (_param->_have_bht) 152 { 153 bool find = false; 154 while (not find) 155 { 156 bool val = ((rand()%2)<percent_transaction_update); 157 in_UPDATE_VAL [port]->write(val); 158 in_UPDATE_DIRECTION [port]->write(0); 159 160 if (_param->_update_on_prediction) 161 in_UPDATE_MISS [port]->write(1); // miss 162 in_UPDATE_HISTORY [port]->write(0); 163 in_UPDATE_ADDRESS [port]->write(bht_num_reg); 164 165 SC_START(0); 166 167 if (val and out_UPDATE_ACK [port]->read()) 168 { 169 LABEL("UPDATE[%d] - Transaction accepted",port); 170 find = true; 171 } 172 173 SC_START(1); 174 } 175 in_UPDATE_VAL [port]->write(0); 176 } 177 178 if (_param->_have_pht) 179 { 180 for (uint32_t i=0; i<_param->_pht_size_bank; ++i) 181 { 182 bool find = false; 183 184 while (not find) 185 { 186 bool val = ((rand()%2)<percent_transaction_update); 187 in_UPDATE_VAL [port]->write(val); 188 in_UPDATE_DIRECTION [port]->write(0); 189 190 if (_param->_update_on_prediction) 191 in_UPDATE_MISS [port]->write(1); // miss 192 in_UPDATE_HISTORY [port]->write(i<<_param->_bht_history_rshift); 193 in_UPDATE_ADDRESS [port]->write(pht_num_bank<<_param->_pht_address_bank_rshift); 194 195 SC_START(0); 196 197 if (val and out_UPDATE_ACK [port]->read()) 198 { 199 LABEL("UPDATE[%d] - Transaction accepted",port); 200 find = true; 201 } 202 203 SC_START(1); 204 } 205 in_UPDATE_VAL [port]->write(0); 206 } 207 } 208 } 209 210 // if (1) 211 // { 212 // LABEL("Saturation all PHT"); 213 214 // } 215 92 216 SC_START(1); 93 217 } … … 104 228 delete in_CLOCK; 105 229 delete in_NRESET; 230 231 DELETE1_SC_SIGNAL( in_PREDICT_VAL ,_param->_nb_inst_predict); 232 DELETE1_SC_SIGNAL(out_PREDICT_ACK ,_param->_nb_inst_predict); 233 DELETE1_SC_SIGNAL( in_PREDICT_ADDRESS ,_param->_nb_inst_predict); 234 DELETE1_SC_SIGNAL(out_PREDICT_DIRECTION ,_param->_nb_inst_predict); 235 DELETE1_SC_SIGNAL(out_PREDICT_HISTORY ,_param->_nb_inst_predict); 236 DELETE1_SC_SIGNAL( in_PREDICT_DIRECTION_VAL,_param->_nb_inst_predict); 237 DELETE1_SC_SIGNAL( in_PREDICT_DIRECTION ,_param->_nb_inst_predict); 238 239 DELETE1_SC_SIGNAL( in_UPDATE_VAL ,_param->_nb_inst_update); 240 DELETE1_SC_SIGNAL(out_UPDATE_ACK ,_param->_nb_inst_update); 241 DELETE1_SC_SIGNAL( in_UPDATE_ADDRESS ,_param->_nb_inst_update); 242 DELETE1_SC_SIGNAL( in_UPDATE_HISTORY ,_param->_nb_inst_update); 243 DELETE1_SC_SIGNAL( in_UPDATE_DIRECTION ,_param->_nb_inst_update); 244 DELETE1_SC_SIGNAL( in_UPDATE_MISS ,_param->_nb_inst_update); 106 245 } 107 246 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h
r110 r111 9 9 */ 10 10 11 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Types.h" 11 12 #include "Behavioural/include/Parameters.h" 12 13 #include "Common/include/Debug.h" … … 26 27 { 27 28 //-----[ fields ]------------------------------------------------------------ 29 public : uint32_t _nb_inst_predict ; 30 public : uint32_t _nb_inst_update ; 31 public : uint32_t _size_address ; 32 public : bool _have_bht ; 33 public : uint32_t _bht_size_shifter ; 34 public : uint32_t _bht_nb_shifter ; 35 public : bool _have_pht ; 36 public : uint32_t _pht_size_counter ; 37 public : uint32_t _pht_nb_counter ; 38 public : uint32_t _pht_size_address_share ; 39 public : bool _update_on_prediction ; 40 41 public : Thistory_t _pht_counter_max ; 42 43 public : uint32_t _size_history ; 44 45 public : Thistory_t _bht_history_mask ; 46 public : Thistory_t _bht_history_rshift ; 47 public : Thistory_t _pht_history_mask ; 48 public : Thistory_t _pht_history_rshift ; 49 50 public : uint32_t _bht_size_address ; 51 public : uint32_t _pht_size_address ; 52 53 public : Taddress_t _bht_address_mask ; 54 public : uint32_t _pht_nb_bank ; 55 public : uint32_t _pht_size_bank ; 56 public : Taddress_t _pht_address_share_mask ; 57 public : Taddress_t _pht_address_share_lshift; 58 public : Taddress_t _pht_address_bank_mask ; 59 public : Taddress_t _pht_address_bank_rshift ; 28 60 29 61 //-----[ methods ]----------------------------------------------------------- 30 public : Parameters (bool is_toplevel=false); 62 public : Parameters (uint32_t nb_inst_predict , 63 uint32_t nb_inst_update , 64 uint32_t size_address , 65 bool have_bht , 66 uint32_t bht_size_shifter , 67 uint32_t bht_nb_shifter , 68 bool have_pht , 69 uint32_t pht_size_counter , 70 uint32_t pht_nb_counter , 71 uint32_t pht_size_address_share, 72 bool update_on_prediction , 73 bool is_toplevel=false); 31 74 //public : Parameters (Parameters & param) ; 32 75 public : ~Parameters (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h
r110 r111 66 66 public : SC_IN (Tcontrol_t) * in_NRESET ; 67 67 68 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 69 public : SC_IN (Tcontrol_t) ** in_PREDICT_VAL ;//[nb_inst_predict] 70 public : SC_OUT(Tcontrol_t) ** out_PREDICT_ACK ;//[nb_inst_predict] 71 public : SC_IN (Taddress_t) ** in_PREDICT_ADDRESS ;//[nb_inst_predict] 72 public : SC_OUT(Tcontrol_t) ** out_PREDICT_DIRECTION ;//[nb_inst_predict] // = MSB[history] 73 public : SC_OUT(Thistory_t) ** out_PREDICT_HISTORY ;//[nb_inst_predict] 74 public : SC_IN (Tcontrol_t) ** in_PREDICT_DIRECTION_VAL;//[nb_inst_predict] // if update_on_prediction 75 public : SC_IN (Tcontrol_t) ** in_PREDICT_DIRECTION ;//[nb_inst_predict] // if update_on_prediction 76 77 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 78 public : SC_IN (Tcontrol_t) ** in_UPDATE_VAL ;//[nb_inst_update] 79 public : SC_OUT(Tcontrol_t) ** out_UPDATE_ACK ;//[nb_inst_update] 80 public : SC_IN (Taddress_t) ** in_UPDATE_ADDRESS ;//[nb_inst_update] 81 public : SC_IN (Thistory_t) ** in_UPDATE_HISTORY ;//[nb_inst_update] 82 public : SC_IN (Tcontrol_t) ** in_UPDATE_DIRECTION ;//[nb_inst_update] 83 public : SC_IN (Tcontrol_t) ** in_UPDATE_MISS ;//[nb_inst_update] // if update_on_prediction 84 68 85 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 69 86 70 87 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 88 private : Thistory_t * reg_BHT ;//[bht_nb_shifter] 89 private : Thistory_t ** reg_PHT ;//[pht_nb_counter][pht_nb_bank] 71 90 72 91 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 92 private : Tcontrol_t * internal_PREDICT_ACK ;//[nb_inst_predict] 93 private : Thistory_t * internal_PREDICT_BHT_NUM_REG ;//[nb_inst_predict] // if update_on_prediction 94 private : Thistory_t * internal_PREDICT_PHT_NUM_BANK ;//[nb_inst_predict] // if update_on_prediction 95 private : Thistory_t * internal_PREDICT_PHT_NUM_REG ;//[nb_inst_predict] // if update_on_prediction 96 97 private : Tcontrol_t * internal_UPDATE_ACK ;//[nb_inst_update] 73 98 #endif 74 99 … … 104 129 #ifdef SYSTEMC 105 130 public : void transition (void); 106 //public : void genMoore(void);131 public : void genMealy_predict (void); 107 132 #endif 108 133 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Parameters.cpp
r110 r111 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h" 9 #include "Common/include/BitManipulation.h" 9 10 10 11 namespace morpheo { … … 21 22 #undef FUNCTION 22 23 #define FUNCTION "Two_Level_Branch_Predictor::Parameters" 23 Parameters::Parameters (bool is_toplevel) 24 Parameters::Parameters (uint32_t nb_inst_predict , 25 uint32_t nb_inst_update , 26 uint32_t size_address , 27 bool have_bht , 28 uint32_t bht_size_shifter , 29 uint32_t bht_nb_shifter , 30 bool have_pht , 31 uint32_t pht_size_counter , 32 uint32_t pht_nb_counter , 33 uint32_t pht_size_address_share, 34 bool update_on_prediction , 35 bool is_toplevel) 24 36 { 25 37 log_begin(Two_Level_Branch_Predictor,FUNCTION); 26 38 27 test(); 39 _nb_inst_predict = nb_inst_predict ; 40 _nb_inst_update = nb_inst_update ; 41 _size_address = size_address ; 42 _have_bht = have_bht ; 43 _bht_size_shifter = (have_bht)?(bht_size_shifter):0; 44 _bht_nb_shifter = (have_bht)?(bht_nb_shifter ):0; 45 _have_pht = have_pht ; 46 _pht_size_counter = (have_pht)?(pht_size_counter ):0; 47 _pht_nb_counter = (have_pht)?(pht_nb_counter ):0; 48 _pht_size_address_share = (have_bht and have_pht)?(pht_size_address_share):0; 49 _update_on_prediction = update_on_prediction ; 50 51 _bht_size_address = (_have_bht)?log2(_bht_nb_shifter):0; 52 _pht_size_address = (_have_pht)?log2(_pht_nb_counter):0; 53 54 test(); 55 56 _size_history = _bht_size_shifter + _pht_size_counter; 57 58 _bht_history_mask = gen_mask<Thistory_t>(_bht_size_shifter); 59 _bht_history_rshift = 0; 60 _pht_history_mask = gen_mask<Thistory_t>(_pht_size_counter); 61 _pht_history_rshift = _bht_size_shifter; 62 63 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _size_history : %d",_size_history ); 64 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_history_mask : 0x%x",_bht_history_mask ); 65 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_history_rshift : %d",_bht_history_rshift); 66 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_history_mask : 0x%x",_pht_history_mask ); 67 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_history_rshift : %d",_pht_history_rshift); 68 69 if (_have_bht) 70 { 71 _bht_address_mask = gen_mask<Taddress_t>(_bht_size_address); 72 73 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _bht_address_mask : 0x%x",_bht_address_mask ); 74 } 75 76 if (_have_pht) 77 { 78 _pht_counter_max = (1<<_pht_size_counter)-1; 79 80 _pht_nb_bank = (_pht_nb_counter - (1<<_bht_size_shifter))+1; 81 _pht_size_bank = _pht_nb_counter / _pht_nb_bank; 82 83 _pht_address_share_mask = gen_mask<Taddress_t>(_pht_size_address_share); 84 _pht_address_share_lshift= _bht_size_shifter-_pht_size_address_share; 85 _pht_address_bank_mask = gen_mask<Taddress_t>(log2(_pht_nb_bank)); 86 _pht_address_bank_rshift = _pht_size_address_share; 87 88 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_nb_bank : %d" ,_pht_nb_bank ); 89 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_size_bank : %d" ,_pht_size_bank ); 90 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_address_share_mask : 0x%x",_pht_address_share_mask ); 91 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_address_share_lshift : %d" ,_pht_address_share_lshift); 92 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_address_bank_mask : 0x%x",_pht_address_bank_mask ); 93 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * _pht_address_bank_rshift : %d" ,_pht_address_bank_rshift ); 94 } 28 95 29 96 if (is_toplevel) 30 { 31 copy(); 32 } 97 copy(); 33 98 34 99 log_end(Two_Level_Branch_Predictor,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Parameters_msg_error.cpp
r110 r111 29 29 Parameters_test test ("Two_Level_Branch_Predictor"); 30 30 31 if ((_have_bht or _have_pht) == false) 32 test.error(_("They have no Branch History Table and no Pattern History Table. You need a less of a BHT or a PHT\n")); 33 34 if ( _have_bht and (_size_address < _bht_size_address)) 35 test.error(_("The address's size must to large to the number of shifter in the Branch History Table.\n")); 36 37 if (_have_pht and (_size_address < _pht_size_address)) 38 test.error(_("The address's size must to large to the number of counter in the Pattern History Table.\n")); 39 40 if (_have_pht and _have_bht and (_bht_size_address > _pht_nb_counter)) 41 test.error (_("The size of shifter don't must too large that the number of counter in the Pattern History Table.\n")); 42 43 if (_have_pht and _have_bht and (_pht_size_address_share > _bht_size_shifter)) 44 test.error (_("The size of address share don't must too large that the size of shifter in the Branch History Table.\n")); 45 31 46 log_end(Two_Level_Branch_Predictor,FUNCTION); 32 47 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor.cpp
r110 r111 72 72 if (usage_is_set(_usage,USE_SYSTEMC)) 73 73 { 74 // Constants : 75 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 76 { 77 internal_PREDICT_ACK [i] = 1; 78 PORT_WRITE(out_PREDICT_ACK [i], internal_PREDICT_ACK [i]); 79 } 80 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 81 { 82 internal_UPDATE_ACK [i] = 1; 83 PORT_WRITE(out_UPDATE_ACK [i], internal_UPDATE_ACK [i]); 84 } 85 86 74 87 log_printf(INFO,Two_Level_Branch_Predictor,FUNCTION,_("<%s> : Method - transition"),_name.c_str()); 75 88 … … 82 95 # endif 83 96 84 // log_printf(INFO,Two_Level_Branch_Predictor,FUNCTION,_("<%s> : Method - genMoore"),_name.c_str());97 log_printf(INFO,Two_Level_Branch_Predictor,FUNCTION,_("<%s> : Method - genMealy_predict"),_name.c_str()); 85 98 86 // SC_METHOD (genMoore); 87 // dont_initialize (); 88 // sensitive << (*(in_CLOCK)).neg(); // need internal register 89 90 // # ifdef SYSTEMCASS_SPECIFIC 91 // // List dependency information 92 // # endif 99 SC_METHOD (genMealy_predict); 100 dont_initialize (); 101 sensitive << (*(in_CLOCK)).neg(); // need internal register 102 103 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 104 sensitive 105 // << (*(in_PREDICT_VAL [i])) 106 << (*(in_PREDICT_ADDRESS [i])); 107 108 # ifdef SYSTEMCASS_SPECIFIC 109 // List dependency information 110 # endif 93 111 94 112 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_allocation.cpp
r110 r111 19 19 namespace meta_predictor { 20 20 namespace two_level_branch_predictor { 21 22 23 21 24 22 #undef FUNCTION … … 58 56 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); 59 57 } 58 59 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 60 { 61 ALLOC1_INTERFACE("predict",IN,WEST,_("Predict direction interface"),_param->_nb_inst_predict); 62 63 ALLOC1_VALACK_IN ( in_PREDICT_VAL ,VAL); 64 ALLOC1_VALACK_OUT(out_PREDICT_ACK ,ACK); 65 ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS ,"ADDRESS" ,Taddress_t,_param->_size_address); 66 ALLOC1_SIGNAL_OUT(out_PREDICT_DIRECTION ,"DIRECTION" ,Tcontrol_t,1 ); 67 ALLOC1_SIGNAL_OUT(out_PREDICT_HISTORY ,"HISTORY" ,Thistory_t,_param->_size_history); 68 if (_param->_update_on_prediction) 69 { 70 ALLOC1_SIGNAL_IN ( in_PREDICT_DIRECTION_VAL,"DIRECTION_VAL",Tcontrol_t,1 ); 71 ALLOC1_SIGNAL_IN ( in_PREDICT_DIRECTION ,"DIRECTION" ,Tcontrol_t,1 ); 72 } 73 } 74 75 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 76 { 77 ALLOC1_INTERFACE("update",IN,WEST,_("Update direction interface"),_param->_nb_inst_update); 78 79 ALLOC1_VALACK_IN ( in_UPDATE_VAL ,VAL); 80 ALLOC1_VALACK_OUT(out_UPDATE_ACK ,ACK); 81 ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS ,"ADDRESS" ,Taddress_t,_param->_size_address); 82 ALLOC1_SIGNAL_IN ( in_UPDATE_HISTORY ,"HISTORY" ,Thistory_t,_param->_size_history); 83 ALLOC1_SIGNAL_IN ( in_UPDATE_DIRECTION ,"DIRECTION" ,Tcontrol_t,1 ); 84 if (_param->_update_on_prediction) 85 ALLOC1_SIGNAL_IN ( in_UPDATE_MISS ,"MISS" ,Tcontrol_t,1 ); 86 } 87 88 if (usage_is_set(_usage,USE_SYSTEMC)) 89 { 90 if (_param->_have_bht) 91 { 92 ALLOC1(reg_BHT ,Thistory_t,_param->_bht_nb_shifter); 93 94 for (uint32_t i=0; i<_param->_bht_nb_shifter; ++i) 95 reg_BHT [i] = 0; 96 } 97 98 if (_param->_have_pht) 99 { 100 ALLOC2(reg_PHT ,Thistory_t,_param->_pht_nb_bank,_param->_pht_size_bank); 101 102 for (uint32_t i=0; i<_param->_pht_nb_bank; ++i) 103 for (uint32_t j=0; j<_param->_pht_size_bank; ++j) 104 reg_PHT [i][j] = 0; 105 } 106 107 108 ALLOC1(internal_PREDICT_ACK ,Tcontrol_t,_param->_nb_inst_predict); 109 if (_param->_update_on_prediction) 110 { 111 if (_param->_have_bht) 112 ALLOC1(internal_PREDICT_BHT_NUM_REG ,Thistory_t,_param->_nb_inst_predict); 113 if (_param->_have_pht) 114 { 115 ALLOC1(internal_PREDICT_PHT_NUM_BANK ,Thistory_t,_param->_nb_inst_predict); 116 ALLOC1(internal_PREDICT_PHT_NUM_REG ,Thistory_t,_param->_nb_inst_predict); 117 } 118 } 119 ALLOC1(internal_UPDATE_ACK ,Tcontrol_t,_param->_nb_inst_update ); 120 } 121 60 122 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 61 62 123 #ifdef POSITION 63 124 if (usage_is_set(_usage,USE_POSITION)) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_deallocation.cpp
r110 r111 30 30 delete in_CLOCK ; 31 31 delete in_NRESET; 32 33 DELETE1_SIGNAL( in_PREDICT_VAL ,_param->_nb_inst_predict,1 ); 34 DELETE1_SIGNAL(out_PREDICT_ACK ,_param->_nb_inst_predict,1 ); 35 DELETE1_SIGNAL( in_PREDICT_ADDRESS ,_param->_nb_inst_predict,_param->_size_address); 36 DELETE1_SIGNAL(out_PREDICT_DIRECTION ,_param->_nb_inst_predict,1 ); 37 DELETE1_SIGNAL(out_PREDICT_HISTORY ,_param->_nb_inst_predict,_param->_size_history); 38 if (_param->_update_on_prediction) 39 { 40 DELETE1_SIGNAL( in_PREDICT_DIRECTION_VAL,_param->_nb_inst_predict,1 ); 41 DELETE1_SIGNAL( in_PREDICT_DIRECTION ,_param->_nb_inst_predict,1 ); 42 } 43 44 DELETE1_SIGNAL( in_UPDATE_VAL ,_param->_nb_inst_update,1 ); 45 DELETE1_SIGNAL(out_UPDATE_ACK ,_param->_nb_inst_update,1 ); 46 DELETE1_SIGNAL( in_UPDATE_ADDRESS ,_param->_nb_inst_update,_param->_size_address); 47 DELETE1_SIGNAL( in_UPDATE_HISTORY ,_param->_nb_inst_update,_param->_size_history); 48 DELETE1_SIGNAL( in_UPDATE_DIRECTION ,_param->_nb_inst_update,1 ); 49 if (_param->_update_on_prediction) 50 DELETE1_SIGNAL( in_UPDATE_MISS ,_param->_nb_inst_update,1 ); 51 52 if (_param->_have_bht) 53 DELETE1(reg_BHT ,_param->_bht_nb_shifter); 54 if (_param->_have_pht) 55 DELETE2(reg_PHT ,_param->_pht_nb_bank,_param->_pht_size_bank); 56 57 DELETE1(internal_PREDICT_ACK ,_param->_nb_inst_predict); 58 if (_param->_update_on_prediction) 59 { 60 if (_param->_have_bht) 61 DELETE1(internal_PREDICT_BHT_NUM_REG ,_param->_nb_inst_predict); 62 if (_param->_have_pht) 63 { 64 DELETE1(internal_PREDICT_PHT_NUM_BANK ,_param->_nb_inst_predict); 65 DELETE1(internal_PREDICT_PHT_NUM_REG ,_param->_nb_inst_predict); 66 } 67 } 68 DELETE1(internal_UPDATE_ACK ,_param->_nb_inst_update ); 32 69 } 33 70 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_transition.cpp
r110 r111 25 25 { 26 26 log_begin(Two_Level_Branch_Predictor,FUNCTION); 27 log_function(Two_Level_Branch_Predictor,FUNCTION,_name.c_str()); 28 29 if (PORT_READ(in_NRESET) == 0) 30 { 31 } 32 else 33 { 34 // =================================================================== 35 // =====[ PREDICT ]=================================================== 36 // =================================================================== 37 38 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 39 if (PORT_READ(in_PREDICT_VAL[i]) and internal_PREDICT_ACK[i]) 40 { 41 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * PREDICT [%d]",i); 42 43 // Predict if 44 // * update_on_prediction and direction is valid 45 if (_param->_update_on_prediction) 46 if (PORT_READ(in_PREDICT_DIRECTION_VAL [i])) 47 { 48 Tcontrol_t direction = PORT_READ(in_PREDICT_DIRECTION [i]); 49 50 if (_param->_have_bht) 51 { 52 Thistory_t bht_num_reg = internal_PREDICT_BHT_NUM_REG [i]; 53 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : %d",bht_num_reg); 54 55 Thistory_t bht_history = reg_BHT[bht_num_reg]; 56 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): %x",bht_history); 57 58 59 bht_history = ((bht_history<<1) | direction)&_param->_bht_history_mask ; 60 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (new): %x",bht_history); 61 reg_BHT [bht_num_reg] = bht_history; 62 } 63 64 if (_param->_have_pht) 65 { 66 Thistory_t pht_num_reg = internal_PREDICT_PHT_NUM_REG [i]; 67 Thistory_t pht_num_bank= internal_PREDICT_PHT_NUM_BANK [i]; 68 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : %d",pht_num_reg); 69 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : %d",pht_num_bank); 70 71 Thistory_t pht_history = reg_PHT [pht_num_bank][pht_num_reg]; 72 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (old): %x",pht_history); 73 74 // PHT : saturation counter 75 pht_history = (direction==1)?((pht_history<_param->_pht_counter_max)?(pht_history+1):(pht_history)):((pht_history>0)?(pht_history-1):(pht_history)); 76 77 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (new): %x",pht_history); 78 79 reg_PHT [pht_num_bank][pht_num_reg] = pht_history; 80 } 81 } 82 } 83 84 // =================================================================== 85 // =====[ UPDATE ]==================================================== 86 // =================================================================== 87 88 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 89 if (PORT_READ(in_UPDATE_VAL[i]) and internal_UPDATE_ACK[i]) 90 { 91 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * UPDATE [%d]",i); 92 93 // Update if 94 // * update_on_prediction and miss 95 // * not update_on_prediction 96 if (not _param->_update_on_prediction or (_param->_update_on_prediction and PORT_READ(in_UPDATE_MISS [i]))) 97 { 98 Taddress_t address = PORT_READ(in_UPDATE_ADDRESS [i]); 99 Thistory_t history = PORT_READ(in_UPDATE_HISTORY [i]); 100 Tcontrol_t direction = PORT_READ(in_UPDATE_DIRECTION [i])&1; 101 102 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * address : %.8x",address); 103 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * direction : %d",direction); 104 105 Thistory_t pht_bht_history = 0; 106 107 if (_param->_have_bht) 108 { 109 Thistory_t bht_history = (history>>_param->_bht_history_rshift)&_param->_bht_history_mask; 110 Thistory_t bht_num_reg = address & _param->_bht_address_mask; 111 112 pht_bht_history = bht_history; 113 114 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): %x",bht_history); 115 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_num_reg : %x",bht_num_reg); 116 117 // BHT : shift register 118 119 bht_history = ((bht_history<<1) | direction)&_param->_bht_history_mask ; 120 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (new): %x",bht_history); 121 reg_BHT [bht_num_reg] = bht_history; 122 } 123 124 if (_param->_have_pht) 125 { 126 Thistory_t pht_history = (history>>_param->_pht_history_rshift)&_param->_pht_history_mask; 127 Thistory_t pht_num_reg = pht_bht_history xor ((address&_param->_pht_address_share_mask)<<_param->_pht_address_share_lshift); 128 Thistory_t pht_num_bank= (address>>_param->_pht_address_bank_rshift)&_param->_pht_address_bank_mask; 129 130 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * bht_history (old): %x",pht_bht_history); 131 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (old): %x",pht_history); 132 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_reg : %x",pht_num_reg); 133 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_num_bank : %x",pht_num_bank); 134 135 // PHT : saturation counter 136 pht_history = (direction==1)?((pht_history<_param->_pht_counter_max)?(pht_history+1):(pht_history)):((pht_history>0)?(pht_history-1):(pht_history)); 137 138 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * pht_history (new): %x",pht_history); 139 140 reg_PHT [pht_num_bank][pht_num_reg] = pht_history; 141 } 142 } 143 } 144 } 145 146 #if defined(DEBUG) and DEBUG_Two_Level_Branch_Predictor and (DEBUG >= DEBUG_TRACE) 147 if (0) 148 { 149 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * Dump Two_Level_Branch_Predictor"); 150 151 if (_param->_have_bht) 152 { 153 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * Dump BHT"); 154 155 uint32_t limit = 4; 156 157 for (uint32_t i=0; i<_param->_bht_nb_shifter; i+=limit) 158 { 159 std::string str = ""; 160 161 for (uint32_t j=0; j<limit; j++) 162 { 163 uint32_t index = i+j; 164 if (index >= _param->_bht_nb_shifter) 165 break; 166 else 167 str+=toString("[%.4d] %.4x ",index,reg_BHT[index]); 168 } 169 170 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," %s",str.c_str()); 171 } 172 } 173 174 if (_param->_have_pht) 175 { 176 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," * Dump PHT"); 177 178 uint32_t limit = 4; 179 180 for (uint32_t num_bank=0; num_bank <_param->_pht_nb_bank; ++num_bank) 181 { 182 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," [%.4d]",num_bank); 183 184 for (uint32_t i=0; i<_param->_pht_size_bank; i+=limit) 185 { 186 std::string str = ""; 187 188 for (uint32_t j=0; j<limit; j++) 189 { 190 uint32_t index = i+j; 191 if (index >= _param->_pht_nb_counter) 192 break; 193 else 194 str+=toString("[%.4d] %.4x ",index,reg_PHT[num_bank][index]); 195 } 196 197 log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION," %s",str.c_str()); 198 } 199 } 200 } 201 } 202 #endif 27 203 28 204 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h
r110 r111 12 12 #include "systemc.h" 13 13 #endif 14 15 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h" 16 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h" 14 17 15 18 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h" … … 65 68 public : SC_IN (Tcontrol_t) * in_NRESET ; 66 69 70 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 71 public : SC_IN (Tcontrol_t) ** in_PREDICT_VAL ;//[nb_inst_predict] 72 public : SC_OUT(Tcontrol_t) ** out_PREDICT_ACK ;//[nb_inst_predict] 73 public : SC_IN (Taddress_t) ** in_PREDICT_ADDRESS ;//[nb_inst_predict] 74 public : SC_OUT(Tcontrol_t) ** out_PREDICT_DIRECTION ;//[nb_inst_predict] // = MSB[history] 75 public : SC_OUT(Thistory_t) ** out_PREDICT_HISTORY ;//[nb_inst_predict] 76 77 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 78 public : SC_IN (Tcontrol_t) ** in_UPDATE_VAL ;//[nb_inst_update] 79 public : SC_OUT(Tcontrol_t) ** out_UPDATE_ACK ;//[nb_inst_update] 80 public : SC_IN (Taddress_t) ** in_UPDATE_ADDRESS ;//[nb_inst_update] 81 public : SC_IN (Thistory_t) ** in_UPDATE_HISTORY ;//[nb_inst_update] 82 public : SC_IN (Tcontrol_t) ** in_UPDATE_DIRECTION ;//[nb_inst_update] 83 67 84 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 85 private : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Two_Level_Branch_Predictor ** _component_two_level_branch_predictor;//[nb_predictor] 86 private : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue ::Meta_Predictor_Glue * _component_glue; 68 87 69 88 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h
r110 r111 9 9 */ 10 10 11 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h" 12 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h" 13 11 14 #include "Behavioural/include/Parameters.h" 12 15 #include "Common/include/Debug.h" 16 13 17 14 18 namespace morpheo { … … 25 29 { 26 30 //-----[ fields ]------------------------------------------------------------ 31 public : uint32_t _nb_inst_predict ; 32 public : uint32_t _nb_inst_update ; 33 public : uint32_t _size_address ; 34 public : bool _have_bht [3]; 35 public : uint32_t _bht_size_shifter [3]; 36 public : uint32_t _bht_nb_shifter [3]; 37 public : bool _have_pht [3]; 38 public : uint32_t _pht_size_counter [3]; 39 public : uint32_t _pht_nb_counter [3]; 40 public : uint32_t _pht_size_address_share [3]; 41 42 public : bool _have_meta_predictor ; 43 public : uint32_t _nb_predictor ; 44 45 public : bool * _predictor_update_on_prediction;//[nb_predictor] 46 public : uint32_t * _predictor_size_history ;//[nb_predictor] 47 public : uint32_t _size_history ; 48 49 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters ** _param_two_level_branch_predictor;//[nb_predictor] 50 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue ::Parameters * _param_glue; 27 51 28 52 //-----[ methods ]----------------------------------------------------------- 29 public : Parameters (bool is_toplevel=false); 53 public : Parameters (uint32_t nb_inst_predict , 54 uint32_t nb_inst_update , 55 uint32_t size_address , 56 bool have_bht [3], 57 uint32_t bht_size_shifter [3], 58 uint32_t bht_nb_shifter [3], 59 bool have_pht [3], 60 uint32_t pht_size_counter [3], 61 uint32_t pht_nb_counter [3], 62 uint32_t pht_size_address_share [3], 63 bool is_toplevel=false); 30 64 //public : Parameters (Parameters & param) ; 31 65 public : ~Parameters (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Meta_Predictor_allocation.cpp
r110 r111 18 18 namespace meta_predictor { 19 19 20 21 22 20 #undef FUNCTION 23 21 #define FUNCTION "Meta_Predictor::allocation" … … 57 55 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); 58 56 } 57 58 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 59 { 60 ALLOC1_INTERFACE("predict",IN,WEST,_("Predict direction interface"),_param->_nb_inst_predict); 61 62 ALLOC1_VALACK_IN ( in_PREDICT_VAL ,VAL); 63 ALLOC1_VALACK_OUT(out_PREDICT_ACK ,ACK); 64 ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS ,"ADDRESS" ,Taddress_t,_param->_size_address); 65 ALLOC1_SIGNAL_OUT(out_PREDICT_DIRECTION ,"DIRECTION" ,Tcontrol_t,1 ); 66 ALLOC1_SIGNAL_OUT(out_PREDICT_HISTORY ,"HISTORY" ,Thistory_t,_param->_size_history); 67 } 68 69 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 70 { 71 ALLOC1_INTERFACE("update",IN,WEST,_("Update direction interface"),_param->_nb_inst_update); 72 73 ALLOC1_VALACK_IN ( in_UPDATE_VAL ,VAL); 74 ALLOC1_VALACK_OUT(out_UPDATE_ACK ,ACK); 75 ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS ,"ADDRESS" ,Taddress_t,_param->_size_address); 76 ALLOC1_SIGNAL_IN ( in_UPDATE_HISTORY ,"HISTORY" ,Thistory_t,_param->_size_history); 77 ALLOC1_SIGNAL_IN ( in_UPDATE_DIRECTION ,"DIRECTION" ,Tcontrol_t,1 ); 78 } 59 79 60 80 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 81 82 std::string name; 83 84 85 { 86 _component_two_level_branch_predictor = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Two_Level_Branch_Predictor * [_param->_nb_predictor]; 87 88 for (uint32_t i=0; i<_param->_nb_predictor; ++i) 89 { 90 name = _name+"_two_level_branch_predictor_"+toString(i); 91 log_printf(INFO,Meta_Predictor,FUNCTION,_("Create : %s"),name.c_str()); 92 93 _component_two_level_branch_predictor [i] = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Two_Level_Branch_Predictor 94 (name.c_str() 95 #ifdef STATISTICS 96 ,param_statistics 97 #endif 98 ,_param->_param_two_level_branch_predictor[i] 99 ,_usage); 100 101 _component->set_component (_component_two_level_branch_predictor[i]->_component 102 #ifdef POSITION 103 , 50, 50, 10, 10 104 #endif 105 ); 106 } 107 } 108 109 { 110 name = _name+"_glue"; 111 log_printf(INFO,Meta_Predictor,FUNCTION,_("Create : %s"),name.c_str()); 112 113 _component_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Meta_Predictor_Glue 114 (name.c_str() 115 #ifdef STATISTICS 116 ,param_statistics 117 #endif 118 ,_param->_param_glue 119 ,_usage); 120 121 _component->set_component (_component_glue->_component 122 #ifdef POSITION 123 , 50, 50, 10, 10 124 #endif 125 ); 126 } 61 127 62 128 // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 63 129 std::string src,dest; 130 131 // =================================================================== 132 // =====[ Two_Level_Branch_Predictor ]================================ 133 // =================================================================== 134 135 for (uint32_t i=0; i<_param->_nb_predictor; ++i) 136 { 137 src = _name+"_two_level_branch_predictor_"+toString(i); 138 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 139 140 { 141 dest = _name; 142 #ifdef POSITION 143 _component->interface_map (src ,"", 144 dest,""); 145 #endif 146 147 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 148 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 149 } 150 151 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 152 for (uint32_t j=0; j<_param->_nb_inst_predict; ++j) 153 { 154 dest = _name; 155 156 #ifdef POSITION 157 _component->interface_map (src ,"predict_"+toString(j), 158 dest,"predict_"+toString(j)); 159 #endif 160 161 PORT_MAP(_component,src , "in_PREDICT_"+toString(j)+"_ADDRESS" , 162 dest, "in_PREDICT_"+toString(j)+"_ADDRESS" ); 163 164 dest = _name+"_glue"; 165 166 #ifdef POSITION 167 _component->interface_map (src ,"predict_"+toString(j), 168 dest,"predict_predictor_"+toString(i)+"_"+toString(j)); 169 #endif 170 171 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(j)+"_VAL" , 172 dest,"out_PREDICT_PREDICTOR_"+toString(i)+"_"+toString(j)+"_VAL" ); 173 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(j)+"_ACK" , 174 dest, "in_PREDICT_PREDICTOR_"+toString(i)+"_"+toString(j)+"_ACK" ); 175 // COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(j)+"_ADDRESS" , 176 // dest,"out_PREDICT_PREDICTOR_"+toString(i)+"_"+toString(j)+"_ADDRESS" ); 177 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(j)+"_DIRECTION" , 178 dest, "in_PREDICT_PREDICTOR_"+toString(i)+"_"+toString(j)+"_DIRECTION" ); 179 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(j)+"_HISTORY" , 180 dest, "in_PREDICT_PREDICTOR_"+toString(i)+"_"+toString(j)+"_HISTORY" ); 181 if (_param->_predictor_update_on_prediction [i]) 182 { 183 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(j)+"_DIRECTION_VAL", 184 dest,"out_PREDICT_PREDICTOR_"+toString(i)+"_"+toString(j)+"_DIRECTION_VAL"); 185 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(j)+"_DIRECTION" , 186 dest,"out_PREDICT_PREDICTOR_"+toString(i)+"_"+toString(j)+"_DIRECTION" ); 187 } 188 } 189 190 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 191 for (uint32_t j=0; j<_param->_nb_inst_update; ++j) 192 { 193 dest = _name; 194 195 #ifdef POSITION 196 _component->interface_map (src ,"update_"+toString(j), 197 dest,"update_"+toString(j)); 198 #endif 199 200 PORT_MAP(_component,src , "in_UPDATE_"+toString(j)+"_ADDRESS" , 201 dest, "in_UPDATE_"+toString(j)+"_ADDRESS" ); 202 203 dest = _name+"_glue"; 204 205 #ifdef POSITION 206 _component->interface_map (src ,"update_"+toString(j), 207 dest,"update_predictor_"+toString(i)+"_"+toString(j)); 208 #endif 209 210 COMPONENT_MAP(_component,src , "in_UPDATE_" +toString(j)+"_VAL" , 211 dest,"out_UPDATE_PREDICTOR_"+toString(i)+"_"+toString(j)+"_VAL" ); 212 COMPONENT_MAP(_component,src ,"out_UPDATE_" +toString(j)+"_ACK" , 213 dest, "in_UPDATE_PREDICTOR_"+toString(i)+"_"+toString(j)+"_ACK" ); 214 // COMPONENT_MAP(_component,src , "in_UPDATE_" +toString(j)+"_ADDRESS" , 215 // dest,"out_UPDATE_PREDICTOR_"+toString(i)+"_"+toString(j)+"_ADDRESS" ); 216 COMPONENT_MAP(_component,src , "in_UPDATE_" +toString(j)+"_DIRECTION" , 217 dest,"out_UPDATE_PREDICTOR_"+toString(i)+"_"+toString(j)+"_DIRECTION" ); 218 COMPONENT_MAP(_component,src , "in_UPDATE_" +toString(j)+"_HISTORY" , 219 dest,"out_UPDATE_PREDICTOR_"+toString(i)+"_"+toString(j)+"_HISTORY" ); 220 if (_param->_predictor_update_on_prediction [i]) 221 COMPONENT_MAP(_component,src , "in_UPDATE_" +toString(j)+"_MISS" , 222 dest,"out_UPDATE_PREDICTOR_"+toString(i)+"_"+toString(j)+"_MISS" ); 223 } 224 // // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 225 // public : SC_IN (Tcontrol_t) ** in_UPDATE_VAL ;//[nb_inst_update] 226 // public : SC_OUT(Tcontrol_t) ** out_UPDATE_ACK ;//[nb_inst_update] 227 // public : SC_IN (Taddress_t) ** in_UPDATE_ADDRESS ;//[nb_inst_update] 228 // public : SC_IN (Thistory_t) ** in_UPDATE_HISTORY ;//[nb_inst_update] 229 // public : SC_IN (Tcontrol_t) ** in_UPDATE_DIRECTION ;//[nb_inst_update] 230 // public : SC_IN (Tcontrol_t) ** in_UPDATE_MISS ;//[nb_inst_update] // if update_on_prediction 231 232 } 233 234 // =================================================================== 235 // =====[ Glue ]====================================================== 236 // =================================================================== 237 238 { 239 src = _name+"_glue"; 240 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 241 242 { 243 dest = _name; 244 #ifdef POSITION 245 _component->interface_map (src ,"", 246 dest,""); 247 #endif 248 249 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 250 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 251 } 252 253 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 254 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 255 { 256 dest = _name; 257 #ifdef POSITION 258 _component->interface_map (src ,"predict_"+toString(i), 259 dest,"predict_"+toString(i)); 260 #endif 261 262 PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_VAL" , 263 dest, "in_PREDICT_"+toString(i)+"_VAL" ); 264 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_ACK" , 265 dest,"out_PREDICT_"+toString(i)+"_ACK" ); 266 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_HISTORY" , 267 dest,"out_PREDICT_"+toString(i)+"_HISTORY" ); 268 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_DIRECTION", 269 dest,"out_PREDICT_"+toString(i)+"_DIRECTION"); 270 } 271 272 // out_PREDICT_PREDICTOR_VAL -> two_level_branch_predictor. in_PREDICT_PREDICTOR_VAL 273 // in_PREDICT_PREDICTOR_ACK -> two_level_branch_predictor.out_PREDICT_PREDICTOR_ACK 274 // in_PREDICT_PREDICTOR_HISTORY -> two_level_branch_predictor.out_PREDICT_PREDICTOR_HISTORY 275 // in_PREDICT_PREDICTOR_DIRECTION -> two_level_branch_predictor.out_PREDICT_PREDICTOR_DIRECTION 276 // out_PREDICT_PREDICTOR_DIRECTION_VAL -> two_level_branch_predictor. in_PREDICT_PREDICTOR_DIRECTION_VAL 277 // out_PREDICT_PREDICTOR_DIRECTION -> two_level_branch_predictor. in_PREDICT_PREDICTOR_DIRECTION 278 279 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 280 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 281 { 282 dest = _name; 283 #ifdef POSITION 284 _component->interface_map (src ,"update_"+toString(i), 285 dest,"update_"+toString(i)); 286 #endif 287 288 PORT_MAP(_component,src , "in_UPDATE_"+toString(i)+"_VAL" , 289 dest, "in_UPDATE_"+toString(i)+"_VAL" ); 290 PORT_MAP(_component,src ,"out_UPDATE_"+toString(i)+"_ACK" , 291 dest,"out_UPDATE_"+toString(i)+"_ACK" ); 292 PORT_MAP(_component,src , "in_UPDATE_"+toString(i)+"_HISTORY" , 293 dest, "in_UPDATE_"+toString(i)+"_HISTORY" ); 294 PORT_MAP(_component,src , "in_UPDATE_"+toString(i)+"_DIRECTION", 295 dest, "in_UPDATE_"+toString(i)+"_DIRECTION"); 296 } 297 298 // out_UPDATE_PREDICTOR_VAL -> two_level_branch_predictor. in_UPDATE_PREDICTOR_VAL 299 // in_UPDATE_PREDICTOR_ACK -> two_level_branch_predictor.out_UPDATE_PREDICTOR_ACK 300 // out_UPDATE_PREDICTOR_HISTORY -> two_level_branch_predictor. in_UPDATE_PREDICTOR_HISTORY 301 // out_UPDATE_PREDICTOR_DIRECTION -> two_level_branch_predictor. in_UPDATE_PREDICTOR_DIRECTION 302 // out_UPDATE_PREDICTOR_MISS -> two_level_branch_predictor. in_UPDATE_PREDICTOR_MISS 303 304 } 64 305 65 306 // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Meta_Predictor_deallocation.cpp
r110 r111 29 29 delete in_CLOCK ; 30 30 delete in_NRESET; 31 32 DELETE1_SIGNAL( in_PREDICT_VAL ,_param->_nb_inst_predict,1 ); 33 DELETE1_SIGNAL(out_PREDICT_ACK ,_param->_nb_inst_predict,1 ); 34 DELETE1_SIGNAL( in_PREDICT_ADDRESS ,_param->_nb_inst_predict,_param->_size_address); 35 DELETE1_SIGNAL(out_PREDICT_DIRECTION ,_param->_nb_inst_predict,1 ); 36 DELETE1_SIGNAL(out_PREDICT_HISTORY ,_param->_nb_inst_predict,_param->_size_history); 37 38 DELETE1_SIGNAL( in_UPDATE_VAL ,_param->_nb_inst_update,1 ); 39 DELETE1_SIGNAL(out_UPDATE_ACK ,_param->_nb_inst_update,1 ); 40 DELETE1_SIGNAL( in_UPDATE_ADDRESS ,_param->_nb_inst_update,_param->_size_address); 41 DELETE1_SIGNAL( in_UPDATE_HISTORY ,_param->_nb_inst_update,_param->_size_history); 42 DELETE1_SIGNAL( in_UPDATE_DIRECTION ,_param->_nb_inst_update,1 ); 31 43 } 32 44 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 33 45 46 DELETE0(_component_glue); 47 DELETE1(_component_two_level_branch_predictor,_param->_nb_predictor); 48 34 49 delete _component; 50 35 51 36 52 log_end(Meta_Predictor,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Parameters.cpp
r110 r111 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo { … … 20 21 #undef FUNCTION 21 22 #define FUNCTION "Meta_Predictor::Parameters" 22 Parameters::Parameters (bool is_toplevel) 23 Parameters::Parameters (uint32_t nb_inst_predict , 24 uint32_t nb_inst_update , 25 uint32_t size_address , 26 bool have_bht [3], 27 uint32_t bht_size_shifter [3], 28 uint32_t bht_nb_shifter [3], 29 bool have_pht [3], 30 uint32_t pht_size_counter [3], 31 uint32_t pht_nb_counter [3], 32 uint32_t pht_size_address_share [3], 33 bool is_toplevel) 23 34 { 24 35 log_begin(Meta_Predictor,FUNCTION); 25 36 37 _nb_inst_predict = nb_inst_predict ; 38 _nb_inst_update = nb_inst_update ; 39 _size_address = size_address ; 40 for (uint32_t i=0; i<3; ++i) 41 { 42 _have_bht [i] = have_bht [i]; 43 _bht_size_shifter [i] = (_have_bht [i])?bht_size_shifter [i]:0; 44 _bht_nb_shifter [i] = (_have_bht [i])?bht_nb_shifter [i]:0; 45 _have_pht [i] = have_pht [i]; 46 _pht_size_counter [i] = (_have_pht [i])?pht_size_counter [i]:0; 47 _pht_nb_counter [i] = (_have_pht [i])?pht_nb_counter [i]:0; 48 _pht_size_address_share [i] = (_have_bht[i] and _have_pht [i])?pht_size_address_share [i]:0; 49 } 50 26 51 test(); 27 52 53 _have_meta_predictor = (_have_bht [2] or _have_pht [2]); 54 _nb_predictor = (_have_meta_predictor)?3:1; 55 56 ALLOC1(_predictor_update_on_prediction,bool , _nb_predictor); 57 ALLOC1(_predictor_size_history ,uint32_t, _nb_predictor); 58 59 // All predictor can update on prediction .... 60 for (uint32_t i=0; i<_nb_predictor; ++i) 61 _predictor_update_on_prediction [i] = true; 62 63 // ... But the selector prediction can't 64 if (_have_meta_predictor) 65 _predictor_update_on_prediction [_nb_predictor-1] = false; 66 67 _param_two_level_branch_predictor = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters * [_nb_predictor]; 68 for (uint32_t i=0; i<_nb_predictor; ++i) 69 { 70 _param_two_level_branch_predictor [i] = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters 71 (_nb_inst_predict , 72 _nb_inst_update , 73 _size_address , 74 _have_bht [i], 75 _bht_size_shifter [i], 76 _bht_nb_shifter [i], 77 _have_pht [i], 78 _pht_size_counter [i], 79 _pht_nb_counter [i], 80 _pht_size_address_share [i], 81 _predictor_update_on_prediction [i] 82 ); 83 84 _predictor_size_history [i] = _param_two_level_branch_predictor [i]->_size_history; 85 } 86 87 _param_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters 88 ( 89 _nb_inst_predict , 90 _nb_inst_update , 91 _nb_predictor , 92 _predictor_size_history , 93 _predictor_update_on_prediction 94 ); 95 _size_history = _param_glue->_size_history; 96 28 97 if (is_toplevel) 29 98 { … … 48 117 { 49 118 log_begin(Meta_Predictor,FUNCTION); 119 120 DELETE1(_param_two_level_branch_predictor, _nb_predictor); 121 122 DELETE1(_predictor_size_history , _nb_predictor); 123 DELETE1(_predictor_update_on_prediction , _nb_predictor); 124 50 125 log_end(Meta_Predictor,FUNCTION); 51 126 }; … … 56 131 { 57 132 log_begin(Meta_Predictor,FUNCTION); 133 134 COPY(_param_glue); 135 for (uint32_t i=0; i<_nb_predictor; ++i) 136 COPY(_param_two_level_branch_predictor [i]); 137 58 138 log_end(Meta_Predictor,FUNCTION); 59 139 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Direction.h
r82 r111 13 13 #endif 14 14 15 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Direction_Glue.h" 16 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h" 15 17 #include <iostream> 16 18 #include "Common/include/ToString.h" … … 27 29 #endif 28 30 #include "Behavioural/include/Usage.h" 29 30 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Direction_Glue.h"31 31 32 32 namespace morpheo { … … 79 79 80 80 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 81 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Meta_Predictor * _component_meta_predictor; 81 82 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Direction_Glue * _component_glue; 82 83 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Parameters.h
r88 r111 14 14 15 15 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Parameters.h" 16 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h" 16 17 17 18 namespace morpheo { … … 45 46 46 47 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Parameters * _param_glue; 48 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters * _param_meta_predictor; 47 49 48 50 //-----[ methods ]----------------------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_allocation.cpp
r88 r111 84 84 std::string name; 85 85 86 if (_param->_have_component_meta_predictor) 87 { 88 name = _name+"_meta_predictor"; 89 log_printf(INFO,Prediction_unit,FUNCTION,_("Create : %s"),name.c_str()); 90 91 _component_meta_predictor = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Meta_Predictor 92 (name.c_str() 93 #ifdef STATISTICS 94 ,param_statistics 95 #endif 96 ,_param->_param_meta_predictor 97 ,_usage); 98 99 _component->set_component (_component_meta_predictor->_component 100 #ifdef POSITION 101 , 50, 50, 10, 10 102 #endif 103 ); 104 } 105 86 106 { 87 107 name = _name+"_glue"; … … 105 125 // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 106 126 std::string src,dest; 127 128 // =================================================================== 129 // =====[ Meta_Predictor ]============================================ 130 // =================================================================== 131 if (_param->_have_component_meta_predictor) 132 { 133 src = _name+"_meta_predictor"; 134 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 135 136 { 137 dest = _name; 138 #ifdef POSITION 139 _component->interface_map (src ,"", 140 dest,""); 141 #endif 142 143 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 144 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 145 } 146 147 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 148 { 149 dest = _name+"_glue"; 150 #ifdef POSITION 151 _component->interface_map (src ,"predict_" +toString(i), 152 dest,"predict_predictor_"+toString(i)); 153 #endif 154 155 COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+ "_VAL" , 156 dest,"out_PREDICT_"+toString(i)+"_PREDICTOR_VAL" ); 157 COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(i)+ "_ACK" , 158 dest, "in_PREDICT_"+toString(i)+"_PREDICTOR_ACK" ); 159 COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+ "_ADDRESS" , 160 dest,"out_PREDICT_"+toString(i)+"_PREDICTOR_ADDRESS_SRC"); 161 COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(i)+ "_DIRECTION" , 162 dest, "in_PREDICT_"+toString(i)+"_PREDICTOR_DIRECTION" ); 163 COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(i)+ "_HISTORY" , 164 dest, "in_PREDICT_"+toString(i)+"_PREDICTOR_HISTORY" ); 165 } 166 167 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 168 { 169 dest = _name+"_glue"; 170 #ifdef POSITION 171 _component->interface_map (src ,"update_" +toString(i), 172 dest,"update_predictor_"+toString(i)); 173 #endif 174 175 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_VAL" , 176 dest,"out_UPDATE_"+toString(i)+"_PREDICTOR_VAL" ); 177 COMPONENT_MAP(_component,src ,"out_UPDATE_"+toString(i)+ "_ACK" , 178 dest, "in_UPDATE_"+toString(i)+"_PREDICTOR_ACK" ); 179 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_ADDRESS" , 180 dest,"out_UPDATE_"+toString(i)+"_PREDICTOR_ADDRESS" ); 181 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_DIRECTION" , 182 dest,"out_UPDATE_"+toString(i)+"_PREDICTOR_DIRECTION" ); 183 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_HISTORY" , 184 dest,"out_UPDATE_"+toString(i)+"_PREDICTOR_HISTORY" ); 185 } 186 } 107 187 188 // =================================================================== 189 // =====[ Glue ]====================================================== 190 // =================================================================== 108 191 { 109 192 src = _name+"_glue"; … … 179 262 } 180 263 // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 181 // _component->test_map(); 264 if (DEBUG_Direction == true) 265 _component->test_map(); 182 266 183 267 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_deallocation.cpp
r88 r111 45 45 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 46 46 delete _component_glue; 47 if (_param->_have_component_meta_predictor) 48 delete _component_meta_predictor; 47 49 delete _component; 48 50 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Parameters.cpp
r88 r111 134 134 } 135 135 136 _size_history = 0; 136 test(); 137 138 if (_have_component_meta_predictor) 139 _param_meta_predictor = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters 140 ( 141 _nb_inst_predict , 142 _nb_inst_update , 143 size_address , 144 _have_bht , 145 _bht_size_shifter , 146 _bht_nb_shifter , 147 _have_pht , 148 _pht_size_counter , 149 _pht_nb_counter , 150 _pht_size_address_share 151 ); 137 152 138 for (uint32_t i=0; i<3; i++) 139 _size_history += (((_have_bht [i])?_bht_size_shifter [i]:0) + 140 ((_have_pht [i])?_pht_size_counter [i]:0)); 141 142 _have_port_history = (_size_history > 0); 143 144 test(); 153 _size_history = (_have_component_meta_predictor)?_param_meta_predictor->_size_history:0; 154 155 log_printf(TRACE,Direction,FUNCTION," * size_history : %d",_size_history); 156 157 // _size_history = 0; 158 // for (uint32_t i=0; i<3; i++) 159 // _size_history += (((_have_bht [i])?_bht_size_shifter [i]:0) + 160 // ((_have_pht [i])?_pht_size_counter [i]:0)); 161 162 _have_port_history = (_size_history > 0); 145 163 146 164 _param_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Parameters … … 177 195 178 196 delete _param_glue; 197 if (_have_component_meta_predictor) 198 delete _param_meta_predictor; 199 179 200 log_printf(FUNC,Direction,FUNCTION,"End"); 180 201 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Parameters_msg_error.cpp
r81 r111 39 39 case PREDICTOR_STATIC : 40 40 case PREDICTOR_LAST_TAKE : 41 {42 break;43 }44 41 case PREDICTOR_COUNTER : 45 42 case PREDICTOR_LOCAL : … … 47 44 case PREDICTOR_META : 48 45 case PREDICTOR_CUSTOM : 46 { 47 break; 48 } 49 default : 49 50 { 50 51 test.error("Unimplemented predictor_scheme : \""+toString(_predictor_scheme)+"\". (Coming Soon)"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp
r107 r111 254 254 { 255 255 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * BRANCH_CONDITION_READ_STACK"); 256 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * ras_hit : %d",PORT_READ(in_PREDICT_RAS_HIT [i])); 256 257 use_upt = true; 257 258 use_ras = true; 258 259 push = false; 259 260 direction = true; 260 pc_next = PORT_READ(in_PREDICT_RAS_HIT [i])?PORT_READ(in_PREDICT_RAS_ADDRESS_POP [i]):address_dest; 261 address_dest = PORT_READ(in_PREDICT_RAS_HIT [i])?PORT_READ(in_PREDICT_RAS_ADDRESS_POP [i]):address_dest; 262 pc_next = address_dest; 261 263 branch_state = BRANCH_STATE_SPEC_TAKE; 262 264 is_accurate &= (PORT_READ(in_PREDICT_RAS_HIT [i]) or btb_is_accurate); // if miss - prediction is not accurate … … 273 275 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * direction : %d",direction); 274 276 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * branch_state : %d",branch_state); 275 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * pc_next : %.8x",pc_next);277 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * pc_next : 0x%.8x (0x%.8x)",pc_next,pc_next<<2); 276 278 277 279 if (use_dir) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_transition.cpp
r107 r111 76 76 if (push) 77 77 { 78 Taddress_t address = PORT_READ(in_PREDICT_ADDRESS_PUSH [i]); 79 78 80 log_printf(TRACE,Return_Address_Stack,FUNCTION," * push (call procedure)"); 81 log_printf(TRACE,Return_Address_Stack,FUNCTION," * address_push : 0x%.8x",address); 79 82 80 83 // push : increase the top (circular) … … 82 85 83 86 // Write new value in Queue 84 reg_stack [context][top_new]._address = PORT_READ(in_PREDICT_ADDRESS_PUSH [i]);87 reg_stack [context][top_new]._address = address; 85 88 86 89 // Test if full … … 150 153 if (push) 151 154 { 155 Taddress_t address = PORT_READ(in_DECOD_ADDRESS_PUSH [i]); 156 152 157 log_printf(TRACE,Return_Address_Stack,FUNCTION," * push (call procedure)"); 158 log_printf(TRACE,Return_Address_Stack,FUNCTION," * address_push : 0x%.8x",address); 153 159 154 160 // push : increase the top (circular) … … 156 162 157 163 // Write new value in Queue 158 reg_stack [context][top_new]._address = PORT_READ(in_DECOD_ADDRESS_PUSH [i]);164 reg_stack [context][top_new]._address = address; 159 165 160 166 // Test if full … … 201 207 // if decod miss : ifetch can have predict call and return branchement. Also, the head of decod can be false 202 208 203 // Tcontrol_t miss = PORT_READ(in_DECOD_MISS_PREDICTION [i]); 204 205 // if (miss) 206 // { 209 Tcontrol_t miss = PORT_READ(in_DECOD_MISS_PREDICTION [i]); 210 211 log_printf(TRACE,Return_Address_Stack,FUNCTION," * miss : %d",miss); 212 213 if (miss) 214 { 215 207 216 // reg_PREDICT_BOTTOM [context] = reg_BOTTOM [context]; 208 // reg_PREDICT_TOP [context] = reg_TOP [context]; 209 // reg_PREDICT_NB_ELT [context] = reg_NB_ELT [context]; 210 211 // // Scan full assoc !!! 212 // for (uint32_t j=0; j<_param->_size_queue [context]; j++) 213 // // Test if this slot is tagged with "predict" : if true, tagged as miss 214 // if (reg_stack [context][j]._predict) 215 // { 216 // reg_stack [context][j]._predict = false; 217 // reg_stack [context][j]._miss = true; 218 // } 219 // } 217 reg_PREDICT_TOP [context] = reg_TOP [context]; 218 reg_PREDICT_NB_ELT [context] = reg_NB_ELT [context]; 219 } 220 220 } 221 221 … … 252 252 { 253 253 // reinsert push value 254 reg_stack [context_id][0]._address = PORT_READ(in_UPDATE_ADDRESS [i]); 254 Taddress_t address = PORT_READ(in_UPDATE_ADDRESS [i]); 255 256 log_printf(TRACE,Return_Address_Stack,FUNCTION," * flush and push"); 257 log_printf(TRACE,Return_Address_Stack,FUNCTION," * address_push : 0x%.8x",address); 258 259 reg_stack [context_id][value]._address = address; 255 260 } 256 261 } … … 292 297 #endif 293 298 294 295 299 Tptr_t top_old = (prediction_ifetch)?reg_PREDICT_TOP [context_id]:reg_TOP [context_id]; 296 300 Tptr_t top_new = top_old; … … 320 324 if (push) 321 325 { 326 log_printf(TRACE,Return_Address_Stack,FUNCTION," * previous is push, now pop"); 327 322 328 // previous is push, now must be pop 323 329 … … 331 337 else 332 338 { 339 log_printf(TRACE,Return_Address_Stack,FUNCTION," * previous is pop, now push"); 340 333 341 // previous is pop, now must be push 334 342 Taddress_t address = PORT_READ(in_UPDATE_ADDRESS [i]); 343 344 log_printf(TRACE,Return_Address_Stack,FUNCTION," * address : 0x%.8x",address); 335 345 336 346 // push : increase the top (circular) … … 345 355 top_new = index; 346 356 347 reg_stack [context_id][ index]._address = address;357 reg_stack [context_id][top_new]._address = address; 348 358 } 349 359 … … 352 362 if (prediction_ifetch) 353 363 { 354 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_top : %d",top_new); 355 // log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_bottom : %d",bottom_new); 356 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_nb_elt : %d",nb_elt_new); 357 364 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_top : %d",reg_TOP [context_id]); 365 // log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_bottom : %d",reg_BOTTOM [context_id]); 366 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_nb_elt : %d",reg_NB_ELT [context_id]); 367 368 reg_PREDICT_TOP [context_id] = reg_TOP [context_id]; 369 // reg_PREDICT_BOTTOM [context_id] = reg_BOTTOM [context_id]; 370 reg_PREDICT_NB_ELT [context_id] = reg_NB_ELT [context_id]; 371 372 // log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_top : %d",top_new ); 373 // // log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_bottom : %d",bottom_new); 374 // log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_predict_nb_elt : %d",nb_elt_new); 375 376 // reg_PREDICT_TOP [context_id] = top_new ; 377 // // reg_PREDICT_BOTTOM [context_id] = bottom_new; 378 // reg_PREDICT_NB_ELT [context_id] = nb_elt_new; 379 380 } 381 else 382 { 383 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_top : %d",top_new); 384 // log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_bottom : %d",bottom_new); 385 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_nb_elt : %d",nb_elt_new); 386 387 reg_TOP [context_id] = top_new ; 388 // reg_BOTTOM [context_id] = bottom_new; 389 reg_NB_ELT [context_id] = nb_elt_new; 358 390 reg_PREDICT_TOP [context_id] = top_new ; 359 391 // reg_PREDICT_BOTTOM [context_id] = bottom_new; 360 392 reg_PREDICT_NB_ELT [context_id] = nb_elt_new; 361 }362 else363 {364 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_top : %d",top_new);365 // log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_bottom : %d",bottom_new);366 log_printf(TRACE,Return_Address_Stack,FUNCTION," * reg_nb_elt : %d",nb_elt_new);367 368 reg_TOP [context_id] = top_new ;369 // reg_BOTTOM [context_id] = bottom_new;370 reg_NB_ELT [context_id] = nb_elt_new;371 393 } 372 394 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/main.cpp
r95 r111 107 107 _ufpt_size_queue [i] = fromString<uint32_t >(argv[x++]); 108 108 109 uint32_t _nb_thread = _nb_context; 110 uint32_t * _translate_num_context_to_num_thread = new uint32_t [_nb_context]; 111 for (uint32_t i=0; i<_nb_context; i++) 112 _translate_num_context_to_num_thread [i] = i; 113 109 114 int _return = EXIT_SUCCESS; 110 115 try … … 135 140 _upt_size_queue , 136 141 _ufpt_size_queue , 142 _nb_thread , 143 _translate_num_context_to_num_thread, 137 144 true // is_toplevel 138 145 ); … … 158 165 delete [] _upt_size_queue ; 159 166 delete [] _ufpt_size_queue ; 167 delete [] _translate_num_context_to_num_thread; 160 168 161 169 return (_return); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/test.cpp
r110 r111 82 82 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE ," in_BRANCH_COMPLETE_NO_SEQUENCE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 83 83 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION ,"out_BRANCH_COMPLETE_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_inst_branch_complete); 84 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,"out_BRANCH_COMPLETE_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_complete);85 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,"out_BRANCH_COMPLETE_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_complete);86 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,"out_BRANCH_COMPLETE_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_complete);84 // ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,"out_BRANCH_COMPLETE_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 85 // ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,"out_BRANCH_COMPLETE_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_complete); 86 // ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,"out_BRANCH_COMPLETE_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_complete); 87 87 88 88 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_VAL ,"out_BRANCH_EVENT_VAL ",Tcontrol_t ,_param->_nb_context); … … 151 151 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete); 152 152 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_MISS_PREDICTION ,_param->_nb_inst_branch_complete); 153 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete);154 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete);155 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete);153 // INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete); 154 // INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete); 155 // INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete); 156 156 157 157 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_VAL ,_param->_nb_context); … … 361 361 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete); 362 362 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete); 363 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete);364 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete);365 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete);363 // DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete); 364 // DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete); 365 // DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete); 366 366 367 367 DELETE1_SC_SIGNAL(out_BRANCH_EVENT_VAL ,_param->_nb_context); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/main.cpp
r88 r111 62 62 _size_ras_index [i] = fromString<uint32_t>(argv[x++]); 63 63 64 uint32_t _nb_thread = _nb_context; 65 uint32_t * _translate_num_context_to_num_thread = new uint32_t [_nb_context]; 66 for (uint32_t i=0; i<_nb_context; i++) 67 _translate_num_context_to_num_thread [i] = i; 68 64 69 int _return = EXIT_SUCCESS; 65 70 try … … 76 81 _size_history , 77 82 _size_ras_index , 83 _nb_thread , 84 _translate_num_context_to_num_thread, 78 85 true //is_toplevel 79 86 ); … … 98 105 delete [] _size_ufpt_queue; 99 106 delete [] _size_upt_queue; 107 delete [] _translate_num_context_to_num_thread; 100 108 101 109 return (_return); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp
r110 r111 108 108 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE ," in_BRANCH_COMPLETE_NO_SEQUENCE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 109 109 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,"out_BRANCH_COMPLETE_MISS_PREDICTION",Tcontrol_t ,_param->_nb_inst_branch_complete); 110 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,"out_BRANCH_COMPLETE_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_complete);111 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,"out_BRANCH_COMPLETE_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_complete);112 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,"out_BRANCH_COMPLETE_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_complete);110 // ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,"out_BRANCH_COMPLETE_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 111 // ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,"out_BRANCH_COMPLETE_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_complete); 112 // ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,"out_BRANCH_COMPLETE_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_complete); 113 113 114 114 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_VAL ,"out_BRANCH_EVENT_VAL ",Tcontrol_t ,_param->_nb_context); … … 202 202 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete); 203 203 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete); 204 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete);205 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete);206 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete);204 // INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete); 205 // INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete); 206 // INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete); 207 207 208 208 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_VAL ,_param->_nb_context); … … 519 519 520 520 TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),it_upt->miss_commit ); 521 TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take_good );522 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src );523 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_good);521 // TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take_good ); 522 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src ); 523 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_good); 524 524 525 525 it_upt ++; … … 832 832 833 833 TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),it_upt->miss_commit ); 834 TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take_good );835 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src );836 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_good);834 // TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take_good ); 835 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src ); 836 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_good); 837 837 838 838 it_upt ++; … … 1200 1200 1201 1201 TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),it_upt->miss_commit ); 1202 TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take_good );1203 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src );1204 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_good);1202 // TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take_good ); 1203 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src ); 1204 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_good); 1205 1205 1206 1206 it_upt ++; … … 1745 1745 1746 1746 TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),it_event->miss_commit ); 1747 TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_event->take_good );1748 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_event->address_src );1749 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_event->address_good);1747 // TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_event->take_good ); 1748 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_event->address_src ); 1749 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_event->address_good); 1750 1750 1751 1751 upt_top_event [it_event->context] = upt_top [it_event->context]; … … 1809 1809 1810 1810 TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),it_upt->miss_commit ); 1811 TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take );1811 // TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take ); 1812 1812 it_upt->take_good = it_upt->take; 1813 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src );1814 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_dest);1813 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src ); 1814 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_dest); 1815 1815 1816 1816 it_upt++; … … 2464 2464 2465 2465 TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),it_upt->miss_commit ); 2466 TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take );2466 // TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE [port]->read(),it_upt->take ); 2467 2467 it_upt->take_good = it_upt->take; 2468 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src );2469 TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_dest);2468 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC [port]->read(),it_upt->address_src ); 2469 // TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST [port]->read(),it_upt->address_dest); 2470 2470 2471 2471 it_upt++; … … 2850 2850 delete [] in_BRANCH_COMPLETE_NO_SEQUENCE ; 2851 2851 delete [] out_BRANCH_COMPLETE_MISS_PREDICTION; 2852 delete [] out_BRANCH_COMPLETE_TAKE ;2853 delete [] out_BRANCH_COMPLETE_ADDRESS_SRC ;2854 delete [] out_BRANCH_COMPLETE_ADDRESS_DEST ;2852 // delete [] out_BRANCH_COMPLETE_TAKE ; 2853 // delete [] out_BRANCH_COMPLETE_ADDRESS_SRC ; 2854 // delete [] out_BRANCH_COMPLETE_ADDRESS_DEST ; 2855 2855 2856 2856 // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Parameters.h
r88 r111 35 35 public : uint32_t * _size_ras_index ; // [nb_context] 36 36 public : const bool _not_accurate_block_predict; 37 public : uint32_t _nb_thread ; 38 public : uint32_t * _translate_num_context_to_num_thread;//[nb_context] 37 39 38 40 //public : uint32_t _size_context_id ; … … 46 48 public : bool _have_port_history ; 47 49 50 public : bool * _have_thread ;//[nb_thread] 51 48 52 //-----[ methods ]----------------------------------------------------------- 49 53 public : Parameters (uint32_t nb_context , … … 57 61 uint32_t size_history , 58 62 uint32_t * size_ras_index , 63 uint32_t nb_thread , 64 uint32_t * translate_num_context_to_num_thread ,//[nb_context] 59 65 bool is_toplevel=false); 60 66 //public : Parameters (Parameters & param) ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h
r109 r111 87 87 public : Tptr_t _index_ras ; 88 88 public : Tcontrol_t _ifetch_prediction; // not in ufpt 89 90 public : bool _retire_ok ; 89 91 }; 90 92 … … 146 148 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT: return "event_flush_ufpt_and_upt"; break; 147 149 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_UPDATE_CONTEXT : return "update_context" ; break; 148 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_WAIT_END_EVENT : return "wait_ and_event" ; break;150 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_WAIT_END_EVENT : return "wait_end_event" ; break; 149 151 default : return ""; break; 150 152 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h
r110 r111 27 27 #endif 28 28 #include "Behavioural/include/Usage.h" 29 #include <fstream> 29 30 30 31 namespace morpheo { … … 109 110 public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_NO_SEQUENCE ; //[nb_inst_branch_complete] 110 111 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_MISS_PREDICTION; //[nb_inst_branch_complete] 111 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_TAKE ; //[nb_inst_branch_complete]112 public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_SRC ; //[nb_inst_branch_complete]113 public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_DEST ; //[nb_inst_branch_complete]112 // public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_TAKE ; //[nb_inst_branch_complete] 113 // public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_SRC ; //[nb_inst_branch_complete] 114 // public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_DEST ; //[nb_inst_branch_complete] 114 115 115 116 // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 209 210 private : Tcontrol_t * internal_EVENT_ACK ; //[nb_context] 210 211 212 #if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true) 213 private : std::ofstream * branchement_log_file; 214 #endif 215 211 216 #endif 212 217 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters.cpp
r88 r111 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Parameters.h" 9 #include "Behavioural/include/Allocation.h" 9 10 #include "Common/include/Max.h" 10 11 … … 30 31 uint32_t size_history , 31 32 uint32_t * size_ras_index , 33 uint32_t nb_thread , 34 uint32_t * translate_num_context_to_num_thread ,//[nb_context] 32 35 bool is_toplevel): 33 36 _not_accurate_block_predict (false) … … 45 48 _size_history = size_history ; 46 49 _size_ras_index = size_ras_index ; 50 _nb_thread = nb_thread ; 51 _translate_num_context_to_num_thread = translate_num_context_to_num_thread; 47 52 48 53 _max_size_ras_index = max<uint32_t>(_size_ras_index,nb_context); … … 51 56 52 57 test(); 58 59 ALLOC1(_have_thread,bool,_nb_thread); 60 for (uint32_t i=0; i<_nb_thread; i++) 61 _have_thread[i] = false; 62 for (uint32_t i=0; i<_nb_context; i++) 63 _have_thread[_translate_num_context_to_num_thread [i]] = true; 53 64 54 65 if (is_toplevel) … … 81 92 { 82 93 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin"); 94 DELETE1(_have_thread ,_nb_thread); 83 95 // delete [] _size_depth ; 84 96 // delete [] _have_port_depth; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp
r98 r111 166 166 167 167 # ifdef SYSTEMCASS_SPECIFIC 168 // List dependency information169 for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)170 {171 if (_param->_have_port_context_id)172 (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));173 if (_param->_have_port_depth)174 (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_DEPTH [i]));175 (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_NO_SEQUENCE[i]));176 (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_ADDRESS [i]));177 178 if (_param->_have_port_context_id)179 (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));180 if (_param->_have_port_depth)181 (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_DEPTH [i]));182 (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_NO_SEQUENCE[i]));183 184 if (_param->_have_port_context_id)185 (*(out_BRANCH_COMPLETE_ADDRESS_SRC [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));186 if (_param->_have_port_depth)187 (*(out_BRANCH_COMPLETE_ADDRESS_SRC [i])) (*(in_BRANCH_COMPLETE_DEPTH [i]));188 189 if (_param->_have_port_context_id)190 (*(out_BRANCH_COMPLETE_ADDRESS_DEST [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));191 if (_param->_have_port_depth)192 (*(out_BRANCH_COMPLETE_ADDRESS_DEST [i])) (*(in_BRANCH_COMPLETE_DEPTH [i]));193 (*(out_BRANCH_COMPLETE_ADDRESS_DEST [i])) (*(in_BRANCH_COMPLETE_ADDRESS [i]));194 }168 // // List dependency information 169 // for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++) 170 // { 171 // if (_param->_have_port_context_id) 172 // (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i])); 173 // if (_param->_have_port_depth) 174 // (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_DEPTH [i])); 175 // (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_NO_SEQUENCE[i])); 176 // (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_ADDRESS [i])); 177 178 // // if (_param->_have_port_context_id) 179 // // (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i])); 180 // // if (_param->_have_port_depth) 181 // // (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_DEPTH [i])); 182 // // (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_NO_SEQUENCE[i])); 183 184 // // if (_param->_have_port_context_id) 185 // // (*(out_BRANCH_COMPLETE_ADDRESS_SRC [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i])); 186 // // if (_param->_have_port_depth) 187 // // (*(out_BRANCH_COMPLETE_ADDRESS_SRC [i])) (*(in_BRANCH_COMPLETE_DEPTH [i])); 188 189 // // if (_param->_have_port_context_id) 190 // // (*(out_BRANCH_COMPLETE_ADDRESS_DEST [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i])); 191 // // if (_param->_have_port_depth) 192 // // (*(out_BRANCH_COMPLETE_ADDRESS_DEST [i])) (*(in_BRANCH_COMPLETE_DEPTH [i])); 193 // // (*(out_BRANCH_COMPLETE_ADDRESS_DEST [i])) (*(in_BRANCH_COMPLETE_ADDRESS [i])); 194 // } 195 195 # endif 196 196 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp
r110 r111 106 106 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_NO_SEQUENCE ,"no_sequence" ,Tcontrol_t,1); 107 107 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1); 108 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_TAKE ,"take" ,Tcontrol_t,1);109 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_instruction_address);110 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_DEST ,"address_dest" ,Taddress_t,_param->_size_instruction_address);108 // ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_TAKE ,"take" ,Tcontrol_t,1); 109 // ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_instruction_address); 110 // ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_DEST ,"address_dest" ,Taddress_t,_param->_size_instruction_address); 111 111 } 112 112 … … 225 225 #endif 226 226 227 #if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true) 228 branchement_log_file = new std::ofstream [_param->_nb_thread]; 229 for (uint32_t i=0; i<_param->_nb_thread; ++i) 230 if (_param->_have_thread [i]) 231 { 232 std::string filename = "Branchement_prediction-thread_" + toString(i) + ".log"; 233 234 branchement_log_file [i] .open(filename.c_str() ,std::ios::out | std::ios::trunc); 235 } 236 #endif 237 227 238 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End"); 228 239 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp
r110 r111 76 76 delete [] in_BRANCH_COMPLETE_NO_SEQUENCE ; 77 77 delete [] out_BRANCH_COMPLETE_MISS_PREDICTION; 78 delete [] out_BRANCH_COMPLETE_TAKE ;79 delete [] out_BRANCH_COMPLETE_ADDRESS_SRC ;80 delete [] out_BRANCH_COMPLETE_ADDRESS_DEST ;78 // delete [] out_BRANCH_COMPLETE_TAKE ; 79 // delete [] out_BRANCH_COMPLETE_ADDRESS_SRC ; 80 // delete [] out_BRANCH_COMPLETE_ADDRESS_DEST ; 81 81 82 82 // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 175 175 delete _component; 176 176 177 #if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true) 178 for (uint32_t i=0; i<_param->_nb_thread; ++i) 179 if (_param->_have_thread [i]) 180 { 181 branchement_log_file [i].close(); 182 } 183 #endif 184 177 185 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End"); 178 186 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_branch_complete.cpp
r98 r111 125 125 126 126 PORT_WRITE(out_BRANCH_COMPLETE_MISS_PREDICTION [i], internal_BRANCH_COMPLETE_MISS_PREDICTION [i]); 127 PORT_WRITE(out_BRANCH_COMPLETE_TAKE [i], internal_BRANCH_COMPLETE_TAKE [i]);128 PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS_SRC [i], reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src);129 PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS_DEST [i], internal_BRANCH_COMPLETE_ADDRESS_DEST [i]);127 // PORT_WRITE(out_BRANCH_COMPLETE_TAKE [i], internal_BRANCH_COMPLETE_TAKE [i]); 128 // PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS_SRC [i], reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src); 129 // PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS_DEST [i], internal_BRANCH_COMPLETE_ADDRESS_DEST [i]); 130 130 } 131 131 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp
r107 r111 139 139 dir_val = 0; // don't update btb (is update by the event branch (if conditionnal branch)) 140 140 // dir_history = ; 141 ras_val = update_ras(condition); // repop/ repush data -> don't corrupt ras 141 // repop/ repush data -> don't corrupt ras 142 ras_val = update_ras(condition); 142 143 ras_flush = 0; 143 144 ras_push = push_ras(condition); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
r109 r111 102 102 if (end) 103 103 { 104 #if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true) 105 if (reg_UPDATE_PREDICTION_TABLE [i][bottom]._retire_ok) 106 { 107 uint32_t num_thread = _param->_translate_num_context_to_num_thread [i]; 108 branchement_log_file [num_thread] 109 << std::hex 110 << "0x" << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_src << " " 111 << "0x" << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_dest << " " 112 << std::dec 113 << reg_UPDATE_PREDICTION_TABLE [i][bottom]._good_take << " " 114 << std::endl; 115 } 116 #endif 104 117 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * UPT [%d][%d]",i,bottom); 105 118 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * UPT [%d][%d]._state = UPDATE_PREDICTION_STATE_EMPTY",i,bottom); … … 180 193 // reg_UFPT_UPDATE [context] = reg_UFPT_TOP [context]; 181 194 if (need_update(condition)) 182 reg_UFPT_NB_NEED_UPDATE [context] ++; 195 { 196 reg_UFPT_NB_NEED_UPDATE [context] ++; 197 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UFPT_NB_NEED_UPDATE (after) : %d",reg_UFPT_NB_NEED_UPDATE [context]); 198 199 } 183 200 } 184 201 … … 293 310 { 294 311 reg_UFPT_NB_NEED_UPDATE [context] --; 312 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UFPT_NB_NEED_UPDATE (after) : %d",reg_UFPT_NB_NEED_UPDATE [context]); 313 295 314 } 296 315 } … … 305 324 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * UPT [%d][%d].state <- UPDATE_PREDICTION_STATE_WAIT_END (decod - hit)",context,upt_ptr_write); 306 325 reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._state = UPDATE_PREDICTION_STATE_WAIT_END; 307 326 reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._retire_ok = false; 327 308 328 // Write new accurate 309 329 #ifdef DEBUG_TEST … … 377 397 // Free a register that need update ? 378 398 if (need_update(reg_UPDATE_FETCH_PREDICTION_TABLE [context][depth]._condition)) 379 reg_UFPT_NB_NEED_UPDATE [context] --; 399 { 400 reg_UFPT_NB_NEED_UPDATE [context] --; 401 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UFPT_NB_NEED_UPDATE (after) : %d",reg_UFPT_NB_NEED_UPDATE [context]); 402 } 380 403 } 381 404 else … … 402 425 #ifdef STATISTICS 403 426 Tbranch_condition_t condition = reg_UPDATE_PREDICTION_TABLE [context][depth]._condition; 427 #endif 404 428 bool ok = (reg_UPDATE_PREDICTION_TABLE [context][depth]._state == UPDATE_PREDICTION_STATE_OK); 405 #endif406 429 bool ko = (reg_UPDATE_PREDICTION_TABLE [context][depth]._state == UPDATE_PREDICTION_STATE_KO); 430 431 if (ok or ko) 432 reg_UPDATE_PREDICTION_TABLE [context][depth]._retire_ok = true; 407 433 408 434 // Have an update, test the state to transiste to the good state … … 513 539 if (miss) 514 540 { 541 // Flush UPT 542 uint32_t top = reg_UPT_TOP [context]; 543 uint32_t new_update = ((top==0)?_param->_size_upt_queue[context]:top)-1; 544 545 Taddress_t address_src = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src; 546 event_state_t event_state = reg_EVENT_STATE [context]; 547 upt_state_t event_top = reg_UPDATE_PREDICTION_TABLE [context][top]._state; 548 bool previous_ufpt_event = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or 549 (event_state == EVENT_STATE_MISS_FLUSH_UFPT ) or 550 (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or 551 (event_state == EVENT_STATE_EVENT_FLUSH_UFPT )); 552 553 bool previous_upt_event = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or 554 (event_state == EVENT_STATE_MISS_FLUSH_UPT ) or 555 (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or 556 (event_state == EVENT_STATE_EVENT_FLUSH_UPT ) or 557 (event_top == UPDATE_PREDICTION_STATE_END_KO ) or 558 (event_top == UPDATE_PREDICTION_STATE_KO ) 559 // (event_state == EVENT_STATE_WAIT_END_EVENT ) or 560 // ((event_state == EVENT_STATE_UPDATE_CONTEXT ) and 561 // (reg_EVENT_SOURCE [context] == EVENT_SOURCE_UPT)) 562 ); 563 // bool update_ras = (new_update != depth); 564 565 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * top : %d",top); 566 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * new_update : %d",new_update); 567 // log_printf(TRACE,Update_Prediction_Table,FUNCTION," * update_ras : %d",update_ras); 568 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * previous_upt_event : %d",previous_upt_event); 569 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * previous_ufpt_event : %d",previous_ufpt_event); 570 515 571 // Have a miss !!! 516 572 // Flush UPFT 517 flush_UFPT [context] = true;573 flush_UFPT [context] = not previous_ufpt_event; 518 574 519 // Flush UPT520 uint32_t top = reg_UPT_TOP [context];521 uint32_t new_update = ((top==0)?_param->_size_upt_queue[context]:top)-1;522 523 Taddress_t address_src = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src;524 event_state_t event_state = reg_EVENT_STATE [context];525 bool previous_event = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or526 (event_state == EVENT_STATE_MISS_FLUSH_UPT ) or527 (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or528 (event_state == EVENT_STATE_EVENT_FLUSH_UPT ) or529 ((event_state == EVENT_STATE_UPDATE_CONTEXT ) and530 (reg_EVENT_SOURCE [context] == EVENT_SOURCE_UPT)));531 // bool update_ras = (new_update != depth);532 533 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * top : %d",top);534 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * new_update : %d",new_update);535 // log_printf(TRACE,Update_Prediction_Table,FUNCTION," * update_ras : %d",update_ras);536 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * previous_event : %d",previous_event);537 538 575 if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state == UPDATE_PREDICTION_STATE_WAIT_END) 539 576 { … … 541 578 j!=top; 542 579 j=(j+1)%_param->_size_upt_queue[context]) 543 reg_UPDATE_PREDICTION_TABLE [context][j]._state = UPDATE_PREDICTION_STATE_EVENT; 580 { 581 reg_UPDATE_PREDICTION_TABLE [context][j]._state = UPDATE_PREDICTION_STATE_EVENT; 582 reg_UPDATE_PREDICTION_TABLE [context][j]._retire_ok = false; 583 } 544 584 545 585 … … 548 588 // reg_UPT_TOP_EVENT [context] = top; 549 589 550 if (not previous_ event)590 if (not previous_upt_event) 551 591 { 552 592 reg_UPT_TOP_EVENT [context] = top; … … 556 596 { 557 597 // Have event. Top index this slot 558 559 switch (reg_UPDATE_PREDICTION_TABLE [context][top]._state) 598 reg_UPDATE_PREDICTION_TABLE [context][top]._retire_ok = false; 599 600 switch (event_top) 560 601 { 561 602 case UPDATE_PREDICTION_STATE_END_KO : … … 573 614 default : 574 615 { 616 // reg_UPDATE_PREDICTION_TABLE [context][top]._state = UPDATE_PREDICTION_STATE_EVENT; 617 // break; 618 575 619 #ifdef DEBUG_TEST 576 620 throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state.")); … … 585 629 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * UPT [%d][%d].state <- UPDATE_PREDICTION_STATE_KO (branch_complete, ifetch hit)",context,depth); 586 630 reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_KO; 587 588 if (reg_UFPT_NB_NEED_UPDATE [context] > 0) 631 632 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UFPT_NB_NEED_UPDATE [%d] : %d",context,reg_UFPT_NB_NEED_UPDATE [context]); 633 634 if ( (reg_UFPT_NB_NEED_UPDATE [context] > 0) or 635 (reg_UFPT_NB_UPDATE [context] > 0)) 589 636 { 590 637 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT (branch_complete - miss)",context); … … 736 783 uint32_t bottom = reg_UPT_BOTTOM [i]; 737 784 uint32_t new_update = ((top==0)?_param->_size_upt_queue[i]:top)-1; 738 bool full = ((depth == top) and (top == bottom) and not reg_UPT_EMPTY [i]);739 785 // bool empty = reg_UPT_EMPTY [i]; 740 786 … … 749 795 (event_state == EVENT_STATE_EVENT_FLUSH_UPT)); 750 796 751 bool find = false; // have slot to update ??? 797 bool find = false; // have slot to update ??? 798 Tdepth_t depth_new = depth; 752 799 753 800 // flush all slot after the event … … 760 807 find = true; 761 808 reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EVENT; 762 } 809 reg_UPDATE_PREDICTION_TABLE [i][j]._retire_ok = false; 810 } 811 else 812 if (not find) // while state == end or empty 813 depth_new ++; 763 814 764 815 if ((reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END) and … … 767 818 find = true; 768 819 reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_EVENT; 820 reg_UPDATE_PREDICTION_TABLE [i][depth]._retire_ok = false; 821 769 822 } 823 else 824 // while state == end or empty 825 depth = (depth_new+1)%_param->_size_upt_queue[i]; 770 826 771 827 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * find : %d",find); 828 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * depth_new : %d",depth_new); 772 829 773 830 // Test if have update slot 774 831 if (find) 775 832 { 776 // flush all slot after the event777 for (uint32_t j=(depth+1)%_param->_size_upt_queue[i];778 j!=top;779 j=(j+1)%_param->_size_upt_queue[i])780 reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EVENT;781 782 reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_EVENT;833 // // flush all slot after the event 834 // for (uint32_t j=(depth+1)%_param->_size_upt_queue[i]; 835 // j!=top; 836 // j=(j+1)%_param->_size_upt_queue[i]) 837 // reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EVENT; 838 839 // reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_EVENT; 783 840 784 841 // reg_UPT_BOTTOM [i]; … … 791 848 } 792 849 793 bool update_ras = find and ((top != depth) or full); 850 bool full = ((depth == top) and (top == bottom) and not reg_UPT_EMPTY [i]); 851 bool update_ras = find and ((top != depth) or full); 794 852 795 853 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * update_ras : %d",update_ras); … … 807 865 reg_EVENT_UPT_PTR [i] = depth; 808 866 809 if (reg_UFPT_NB_NEED_UPDATE [i] > 0) 867 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UFPT_NB_NEED_UPDATE : %d",reg_UFPT_NB_NEED_UPDATE [i]); 868 // if (reg_UFPT_NB_NEED_UPDATE [i] > 0) 869 if ( (reg_UFPT_NB_NEED_UPDATE [i] > 0) or 870 (reg_UFPT_NB_UPDATE [i] > 0)) 810 871 { 811 872 if (update_ras) … … 871 932 if (reg_UFPT_NB_NEED_UPDATE [i] == 0) 872 933 { 873 874 934 // No entry need prediction, flush all entry -> Reset 875 935 for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; ++j) … … 881 941 else 882 942 { 943 uint32_t bottom = reg_UFPT_BOTTOM [i]; 883 944 for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; ++j) 884 // EMPTY : no event 885 // END : already update 886 // EVENT : previous event 887 if (reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state == UPDATE_FETCH_PREDICTION_STATE_WAIT_DECOD) 888 { 889 reg_UFPT_NB_UPDATE [i] ++; 890 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state = UPDATE_FETCH_PREDICTION_STATE_EVENT; 891 } 892 893 // TOP is next write slot : last slot is TOP-1 894 uint32_t top = reg_UFPT_TOP [i]; 895 reg_UFPT_UPDATE [i] = ((top==0)?_param->_size_ufpt_queue[i]:top)-1; 945 { 946 uint32_t index = (bottom+j)%_param->_size_ufpt_queue[i]; 947 // EMPTY : no event 948 // END : already update 949 // EVENT : previous event 950 if (reg_UPDATE_FETCH_PREDICTION_TABLE [i][index]._state == UPDATE_FETCH_PREDICTION_STATE_WAIT_DECOD) 951 { 952 reg_UFPT_UPDATE [i] = index; 953 reg_UFPT_NB_UPDATE [i] ++; 954 reg_UPDATE_FETCH_PREDICTION_TABLE [i][index]._state = UPDATE_FETCH_PREDICTION_STATE_EVENT; 955 } 956 } 957 958 // // TOP is next write slot : last slot is TOP-1 959 // uint32_t top = reg_UFPT_TOP [i]; 960 // reg_UFPT_UPDATE [i] = ((top==0)?_param->_size_ufpt_queue[i]:top)-1; 896 961 897 962 // reg_UFPT_BOTTOM [i]; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Parameters.h
r95 r111 52 52 public : uint32_t * _upt_size_queue ;//[nb_context] 53 53 public : uint32_t * _ufpt_size_queue ;//[nb_context] 54 public : uint32_t _nb_thread ; 55 public : uint32_t * _translate_num_context_to_num_thread;//[nb_context] 56 57 54 58 55 59 //public : uint32_t _size_context_id ; … … 98 102 uint32_t * upt_size_queue ,//[nb_context] 99 103 uint32_t * ufpt_size_queue ,//[nb_context] 104 uint32_t nb_thread , 105 uint32_t * translate_num_context_to_num_thread ,//[nb_context] 100 106 bool is_toplevel=false 101 107 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Prediction_unit.h
r110 r111 101 101 public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_NO_SEQUENCE ; //[nb_inst_branch_complete] 102 102 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_MISS_PREDICTION ; //[nb_inst_branch_complete] 103 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_TAKE ; //[nb_inst_branch_complete]104 public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_SRC ; //[nb_inst_branch_complete]105 public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_DEST ; //[nb_inst_branch_complete]103 // public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_TAKE ; //[nb_inst_branch_complete] 104 // public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_SRC ; //[nb_inst_branch_complete] 105 // public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_DEST ; //[nb_inst_branch_complete] 106 106 107 107 // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters.cpp
r95 r111 43 43 uint32_t * upt_size_queue ,//[nb_context] 44 44 uint32_t * ufpt_size_queue ,//[nb_context] 45 uint32_t nb_thread , 46 uint32_t * translate_num_context_to_num_thread ,//[nb_context] 45 47 bool is_toplevel 46 48 ) … … 75 77 _upt_size_queue = upt_size_queue ; 76 78 _ufpt_size_queue = ufpt_size_queue ; 79 _nb_thread = nb_thread ; 80 _translate_num_context_to_num_thread = translate_num_context_to_num_thread; 77 81 78 82 _array_size_depth = new uint32_t [_nb_context]; … … 142 146 _nb_inst_branch_update , 143 147 _size_history , 144 _size_ras_index ); 148 _size_ras_index , 149 _nb_thread , 150 _translate_num_context_to_num_thread 151 ); 145 152 146 153 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_allocation.cpp
r110 r111 105 105 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_NO_SEQUENCE ,"no_sequence" ,Tcontrol_t,1); 106 106 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1); 107 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_TAKE ,"take" ,Tcontrol_t,1);108 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_address);109 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_DEST ,"address_dest" ,Taddress_t,_param->_size_address);107 // ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_TAKE ,"take" ,Tcontrol_t,1); 108 // ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_address); 109 // ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_DEST ,"address_dest" ,Taddress_t,_param->_size_address); 110 110 } 111 111 … … 395 395 if (_param->_have_port_history) 396 396 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_HISTORY" , 397 dest, "in_PREDICT_" +toString(i)+"_ HISTORY" );397 dest, "in_PREDICT_" +toString(i)+"_DIR_HISTORY" ); 398 398 //out_PREDICT_DIR_LAST_TAKE - component_map branch_target_buffer 399 399 } … … 684 684 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION", 685 685 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION"); 686 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE" ,687 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE" );688 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" ,689 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" );690 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST" ,691 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST" );686 // PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE" , 687 // dest,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE" ); 688 // PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" , 689 // dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" ); 690 // PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST" , 691 // dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST" ); 692 692 } 693 693 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp
r110 r111 59 59 DELETE1_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE ,_param->_nb_inst_branch_complete,1); 60 60 DELETE1_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete,1); 61 DELETE1_SIGNAL(out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete,1);62 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete,_param->_size_instruction_address);63 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete,_param->_size_instruction_address);61 // DELETE1_SIGNAL(out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete,1); 62 // DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete,_param->_size_instruction_address); 63 // DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete,_param->_size_instruction_address); 64 64 65 65 DELETE1_SIGNAL(out_BRANCH_EVENT_VAL ,_param->_nb_context,1); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/config-context_1-decod_unit_1-a.cfg
r95 r111 7 7 0 0 +1 # link_context_to_decod_unit [0] [nb_context] 8 8 4 4 +1 # size_decod_queue [0] [nb_decod_unit] 9 0 1 +1 # decod_queue_scheme [0] [nb_decod_unit] 9 10 4 4 +1 # nb_inst_decod [0] [nb_decod_unit] 10 11 1 1 +1 # nb_context_select [0] [nb_decod_unit] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/config-context_4-decod_unit_1-a.cfg
r95 r111 3 3 1 1 +1 # nb_decod_unit 4 4 32 32 +1 # size_general_data 5 4 4+1 # size_ifetch_queue [0] [nb_context]6 2 2+1 # size_ifetch_queue [1] [nb_context]7 1 1+1 # size_ifetch_queue [2] [nb_context]5 16 16 +1 # size_ifetch_queue [0] [nb_context] 6 4 4 +1 # size_ifetch_queue [1] [nb_context] 7 16 16 +1 # size_ifetch_queue [2] [nb_context] 8 8 8 8 +1 # size_ifetch_queue [3] [nb_context] 9 9 4 4 +1 # nb_inst_fetch [0] [nb_context] … … 16 16 0 0 +1 # link_context_to_decod_unit [3] [nb_context] 17 17 4 4 +1 # size_decod_queue [0] [nb_decod_unit] 18 0 1 +1 # decod_queue_scheme [0] [nb_decod_unit] 18 19 4 4 +1 # nb_inst_decod [0] [nb_decod_unit] 19 20 1 1 +1 # nb_context_select [0] [nb_decod_unit] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/config-context_4-decod_unit_2-a.cfg
r95 r111 3 3 2 2 +1 # nb_decod_unit 4 4 32 32 +1 # size_general_data 5 4 4+1 # size_ifetch_queue [0] [nb_context]6 2 2+1 # size_ifetch_queue [1] [nb_context]7 1 1+1 # size_ifetch_queue [2] [nb_context]5 8 8 +1 # size_ifetch_queue [0] [nb_context] 6 4 4 +1 # size_ifetch_queue [1] [nb_context] 7 16 16 +1 # size_ifetch_queue [2] [nb_context] 8 8 8 8 +1 # size_ifetch_queue [3] [nb_context] 9 9 4 4 +1 # nb_inst_fetch [0] [nb_context] … … 17 17 4 4 +1 # size_decod_queue [0] [nb_decod_unit] 18 18 12 12 +1 # size_decod_queue [1] [nb_decod_unit] 19 1 1 +1 # decod_queue_scheme [0] [nb_decod_unit] 20 0 0 +1 # decod_queue_scheme [1] [nb_decod_unit] 19 21 2 2 +1 # nb_inst_decod [0] [nb_decod_unit] 20 22 6 6 +1 # nb_inst_decod [1] [nb_decod_unit] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/config-context_4-decod_unit_2-b.cfg
r95 r111 4 4 32 32 +1 # size_general_data 5 5 4 4 +1 # size_ifetch_queue [0] [nb_context] 6 2 2+1 # size_ifetch_queue [1] [nb_context]7 1 1+1 # size_ifetch_queue [2] [nb_context]6 8 8 +1 # size_ifetch_queue [1] [nb_context] 7 32 32 +1 # size_ifetch_queue [2] [nb_context] 8 8 8 8 +1 # size_ifetch_queue [3] [nb_context] 9 9 4 4 +1 # nb_inst_fetch [0] [nb_context] … … 17 17 4 4 +1 # size_decod_queue [0] [nb_decod_unit] 18 18 12 12 +1 # size_decod_queue [1] [nb_decod_unit] 19 0 0 +1 # decod_queue_scheme [0] [nb_decod_unit] 20 1 1 +1 # decod_queue_scheme [1] [nb_decod_unit] 19 21 2 2 +1 # nb_inst_decod [0] [nb_decod_unit] 20 22 6 6 +1 # nb_inst_decod [1] [nb_decod_unit] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/config-min.cfg
r95 r111 7 7 0 0 +1 # link_context_to_decod_unit [0] [nb_context] 8 8 1 1 +1 # size_decod_queue [0] [nb_decod_unit] 9 0 1 +1 # decod_queue_scheme [0] [nb_decod_unit] 9 10 1 1 +1 # nb_inst_decod [0] [nb_decod_unit] 10 11 1 1 +1 # nb_context_select [0] [nb_decod_unit] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/src/main.cpp
r95 r111 15 15 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 16 16 err (_("list_params is :\n")); 17 err (_(" * nb_context (uint32_t )\n")); 18 err (_(" * nb_decod_unit (uint32_t )\n")); 19 err (_(" * size_general_data (uint32_t )\n")); 20 err (_(" * size_ifetch_queue [nb_context] (uint32_t )\n")); 21 err (_(" * nb_inst_fetch [nb_context] (uint32_t )\n")); 22 err (_(" * link_context_to_decod_unit [nb_context] (uint32_t )\n")); 23 err (_(" * size_decod_queue [nb_decod_unit] (uint32_t )\n")); 24 err (_(" * nb_inst_decod [nb_decod_unit] (uint32_t )\n")); 25 err (_(" * nb_context_select [nb_decod_unit] (uint32_t )\n")); 26 err (_(" * context_select_priority [nb_decod_unit] (Tpriority_t )\n")); 27 err (_(" * context_select_load_balancing [nb_decod_unit] (Tload_balancing_t)\n")); 28 err (_(" * nb_inst_branch_predict (uint32_t )\n")); 29 err (_(" * nb_inst_branch_decod (uint32_t )\n")); 30 err (_(" * nb_inst_branch_update (uint32_t )\n")); 31 err (_(" * nb_inst_branch_complete (uint32_t )\n")); 32 err (_(" * btb_size_queue (uint32_t )\n")); 33 err (_(" * btb_associativity (uint32_t )\n")); 34 err (_(" * btb_size_counter (uint32_t )\n")); 35 err (_(" * btb_victim_scheme (Tvictim_t )\n")); 36 err (_(" * dir_predictor_scheme (Tpredictor_t )\n")); 37 err (_(" * dir_have_bht [3] (bool )\n")); 38 err (_(" * dir_bht_size_shifter [3] (uint32_t )\n")); 39 err (_(" * dir_bht_nb_shifter [3] (uint32_t )\n")); 40 err (_(" * dir_have_pht [3] (bool )\n")); 41 err (_(" * dir_pht_size_counter [3] (uint32_t )\n")); 42 err (_(" * dir_pht_nb_counter [3] (uint32_t )\n")); 43 err (_(" * dir_pht_size_address_share [3] (uint32_t )\n")); 44 err (_(" * ras_size_queue [nb_context] (uint32_t )\n")); 45 err (_(" * upt_size_queue [nb_context] (uint32_t )\n")); 46 err (_(" * ufpt_size_queue [nb_context] (uint32_t )\n")); 47 err (_(" * size_inst_commit (uint32_t )\n")); 17 err (_(" * nb_context (uint32_t )\n")); 18 err (_(" * nb_decod_unit (uint32_t )\n")); 19 err (_(" * size_general_data (uint32_t )\n")); 20 err (_(" * size_ifetch_queue [nb_context] (uint32_t )\n")); 21 err (_(" * nb_inst_fetch [nb_context] (uint32_t )\n")); 22 err (_(" * link_context_to_decod_unit [nb_context] (uint32_t )\n")); 23 err (_(" * size_decod_queue [nb_decod_unit] (uint32_t )\n")); 24 err (_(" * decod_queue_scheme [nb_decod_unit] (Tdecod_queue_scheme_t)\n")); 25 err (_(" * nb_inst_decod [nb_decod_unit] (uint32_t )\n")); 26 err (_(" * nb_context_select [nb_decod_unit] (uint32_t )\n")); 27 err (_(" * context_select_priority [nb_decod_unit] (Tpriority_t )\n")); 28 err (_(" * context_select_load_balancing [nb_decod_unit] (Tload_balancing_t )\n")); 29 err (_(" * nb_inst_branch_predict (uint32_t )\n")); 30 err (_(" * nb_inst_branch_decod (uint32_t )\n")); 31 err (_(" * nb_inst_branch_update (uint32_t )\n")); 32 err (_(" * nb_inst_branch_complete (uint32_t )\n")); 33 err (_(" * btb_size_queue (uint32_t )\n")); 34 err (_(" * btb_associativity (uint32_t )\n")); 35 err (_(" * btb_size_counter (uint32_t )\n")); 36 err (_(" * btb_victim_scheme (Tvictim_t )\n")); 37 err (_(" * dir_predictor_scheme (Tpredictor_t )\n")); 38 err (_(" * dir_have_bht [3] (bool )\n")); 39 err (_(" * dir_bht_size_shifter [3] (uint32_t )\n")); 40 err (_(" * dir_bht_nb_shifter [3] (uint32_t )\n")); 41 err (_(" * dir_have_pht [3] (bool )\n")); 42 err (_(" * dir_pht_size_counter [3] (uint32_t )\n")); 43 err (_(" * dir_pht_nb_counter [3] (uint32_t )\n")); 44 err (_(" * dir_pht_size_address_share [3] (uint32_t )\n")); 45 err (_(" * ras_size_queue [nb_context] (uint32_t )\n")); 46 err (_(" * upt_size_queue [nb_context] (uint32_t )\n")); 47 err (_(" * ufpt_size_queue [nb_context] (uint32_t )\n")); 48 err (_(" * size_inst_commit (uint32_t )\n")); 48 49 49 50 exit (1); … … 70 71 uint32_t _nb_decod_unit = fromString<uint32_t >(argv[x++]); 71 72 72 if (argc != static_cast<int>(2+NB_PARAMS+6*_nb_context+ 5*_nb_decod_unit))73 if (argc != static_cast<int>(2+NB_PARAMS+6*_nb_context+6*_nb_decod_unit)) 73 74 { 74 75 msg("argc : %d\n",argc); 75 msg("all : %d\n",(2+NB_PARAMS+ 5*_nb_context+5*_nb_decod_unit));76 msg("all : %d\n",(2+NB_PARAMS+6*_nb_context+5*_nb_decod_unit)); 76 77 msg("_nb_context : %d\n",_nb_context); 77 78 msg("_nb_decod_unit : %d\n",_nb_decod_unit); … … 103 104 for (uint32_t i=0; i<_nb_decod_unit; ++i) 104 105 _size_decod_queue [i] = fromString<uint32_t>(argv[x++]); 106 107 decod_unit::decod_queue::Tdecod_queue_scheme_t * _decod_queue_scheme = new decod_unit::decod_queue::Tdecod_queue_scheme_t [_nb_decod_unit]; 108 for (uint32_t i=0; i<_nb_decod_unit; ++i) 109 _decod_queue_scheme [i] = fromString<decod_unit::decod_queue::Tdecod_queue_scheme_t>(argv[x++]); 105 110 106 111 uint32_t * _nb_inst_decod = new uint32_t [_nb_decod_unit]; … … 166 171 uint32_t _size_inst_commit = fromString<uint32_t>(argv[x++]); 167 172 173 uint32_t _nb_thread = _nb_context; 174 uint32_t * _translate_num_context_to_num_thread = new uint32_t [_nb_context]; 175 for (uint32_t i=0; i<_nb_context; ++i) 176 _translate_num_context_to_num_thread [i] = i; 177 168 178 int _return = EXIT_SUCCESS; 169 179 try … … 180 190 _link_context_to_decod_unit , 181 191 _size_decod_queue , 192 _decod_queue_scheme , 182 193 _nb_inst_decod , 183 194 _nb_context_select , … … 204 215 _ufpt_size_queue , 205 216 _size_inst_commit , 217 _nb_thread , 218 _translate_num_context_to_num_thread , 206 219 true // is_toplevel 207 220 ); … … 230 243 } 231 244 245 delete [] _translate_num_context_to_num_thread ; 232 246 delete [] _dir_have_bht ; 233 247 delete [] _dir_bht_size_shifter ; … … 244 258 delete [] _nb_context_select ; 245 259 delete [] _nb_inst_decod ; 260 delete [] _decod_queue_scheme ; 246 261 delete [] _size_decod_queue ; 247 262 delete [] _link_context_to_decod_unit ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/include/Parameters.h
r106 r111 35 35 //public : uint32_t _size_general_data ; 36 36 public : morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (void); 37 38 public : uint32_t _nb_thread ; 39 public : uint32_t * _translate_num_context_to_num_thread ;//[nb_context] 40 37 41 // ifetch_unit 38 42 public : uint32_t * _size_ifetch_queue ;//[nb_context] … … 42 46 // decod_unit 43 47 public : uint32_t * _size_decod_queue ;//[nb_decod_unit] 48 public : decod_unit::decod_queue::Tdecod_queue_scheme_t 49 * _decod_queue_scheme ;//[nb_decod_unit] 44 50 public : uint32_t * _nb_inst_decod ;//[nb_decod_unit] 45 51 public : uint32_t * _nb_context_select ;//[nb_decod_unit] … … 110 116 uint32_t * link_context_to_decod_unit , 111 117 // decod_unit 112 uint32_t * size_decod_queue , 113 uint32_t * nb_inst_decod , 114 uint32_t * nb_context_select , 115 Tpriority_t * context_select_priority , 116 Tload_balancing_t * context_select_load_balancing , 118 uint32_t * size_decod_queue ,//[nb_decod_unit] 119 decod_unit::decod_queue::Tdecod_queue_scheme_t 120 * decod_queue_scheme ,//[nb_decod_unit] 121 uint32_t * nb_inst_decod ,//[nb_decod_unit] 122 uint32_t * nb_context_select ,//[nb_decod_unit] 123 Tpriority_t * context_select_priority ,//[nb_decod_unit] 124 Tload_balancing_t * context_select_load_balancing ,//[nb_decod_unit] 117 125 // prediction_unit 118 126 uint32_t nb_inst_branch_predict , … … 137 145 // context_state 138 146 uint32_t size_nb_inst_commit , 147 148 uint32_t nb_thread , 149 uint32_t * translate_num_context_to_num_thread ,//[nb_context] 139 150 140 151 bool is_toplevel=false); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_allocation.cpp
r110 r111 547 547 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_NO_SEQUENCE"); 548 548 549 dest = _name+"_context_state";550 #ifdef POSITION551 _component->interface_map (src ,"branch_complete_"+toString(i),552 dest,"branch_complete_"+toString(i));553 #endif554 555 COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE" ,556 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_TAKE" );557 COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" ,558 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" );559 COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST",560 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST");549 // dest = _name+"_context_state"; 550 // #ifdef POSITION 551 // _component->interface_map (src ,"branch_complete_"+toString(i), 552 // dest,"branch_complete_"+toString(i)); 553 // #endif 554 555 // COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE" , 556 // dest, "in_BRANCH_COMPLETE_"+toString(i)+"_TAKE" ); 557 // COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" , 558 // dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" ); 559 // COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST", 560 // dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST"); 561 561 } 562 562 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Parameters.cpp
r108 r111 28 28 uint32_t * link_context_to_decod_unit , 29 29 // decod_unit 30 uint32_t * size_decod_queue , 31 uint32_t * nb_inst_decod , 32 uint32_t * nb_context_select , 33 Tpriority_t * context_select_priority , 34 Tload_balancing_t * context_select_load_balancing , 30 uint32_t * size_decod_queue ,//[nb_decod_unit] 31 decod_unit::decod_queue::Tdecod_queue_scheme_t 32 * decod_queue_scheme ,//[nb_decod_unit] 33 uint32_t * nb_inst_decod ,//[nb_decod_unit] 34 uint32_t * nb_context_select ,//[nb_decod_unit] 35 Tpriority_t * context_select_priority ,//[nb_decod_unit] 36 Tload_balancing_t * context_select_load_balancing ,//[nb_decod_unit] 35 37 // prediction_unit 36 38 uint32_t nb_inst_branch_predict , … … 55 57 // context_state 56 58 uint32_t size_nb_inst_commit , 59 60 uint32_t nb_thread , 61 uint32_t * translate_num_context_to_num_thread ,//[nb_context] 62 57 63 bool is_toplevel): 58 64 morpheo::behavioural::Parameters() … … 64 70 // _size_general_data = size_general_data ; 65 71 _get_custom_information = get_custom_information ; 72 _nb_thread = nb_thread ; 73 _translate_num_context_to_num_thread = translate_num_context_to_num_thread ; 66 74 _size_ifetch_queue = size_ifetch_queue ; 67 75 _nb_inst_fetch = nb_inst_fetch ; … … 69 77 _link_context_to_decod_unit = link_context_to_decod_unit ; 70 78 _size_decod_queue = size_decod_queue ; 79 _decod_queue_scheme = decod_queue_scheme ; 71 80 _nb_inst_decod = nb_inst_decod ; 72 81 _nb_context_select = nb_context_select ; … … 122 131 123 132 _param_prediction_unit = new behavioural::core::multi_front_end::front_end::prediction_unit::Parameters 124 (_nb_context , 125 _nb_decod_unit , 126 size_instruction_address , 127 _nb_inst_fetch , 128 _nb_inst_decod , 129 _nb_inst_branch_predict , 130 _nb_inst_branch_decod , 131 _nb_inst_branch_update , 132 _nb_inst_branch_complete , 133 _btb_size_queue , 134 _btb_associativity , 135 _btb_size_counter , 136 _btb_victim_scheme , 137 _dir_predictor_scheme , 138 _dir_have_bht , 139 _dir_bht_size_shifter , 140 _dir_bht_nb_shifter , 141 _dir_have_pht , 142 _dir_pht_size_counter , 143 _dir_pht_nb_counter , 144 _dir_pht_size_address_share , 145 _ras_size_queue , 146 _upt_size_queue , 147 _ufpt_size_queue ); 133 (_nb_context , 134 _nb_decod_unit , 135 size_instruction_address , 136 _nb_inst_fetch , 137 _nb_inst_decod , 138 _nb_inst_branch_predict , 139 _nb_inst_branch_decod , 140 _nb_inst_branch_update , 141 _nb_inst_branch_complete , 142 _btb_size_queue , 143 _btb_associativity , 144 _btb_size_counter , 145 _btb_victim_scheme , 146 _dir_predictor_scheme , 147 _dir_have_bht , 148 _dir_bht_size_shifter , 149 _dir_bht_nb_shifter , 150 _dir_have_pht , 151 _dir_pht_size_counter , 152 _dir_pht_nb_counter , 153 _dir_pht_size_address_share , 154 _ras_size_queue , 155 _upt_size_queue , 156 _ufpt_size_queue , 157 _nb_thread , 158 _translate_num_context_to_num_thread 159 ); 148 160 149 161 _translate_context_id_from_decod_unit= new std::vector<uint32_t> [_nb_decod_unit]; … … 209 221 _nb_inst_decod [i], 210 222 _size_decod_queue [i], 223 _decod_queue_scheme [i], 211 224 size_general_data , 212 225 _decod_unit_nb_branch_speculated [i], -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h
r110 r111 31 31 32 32 #include <iostream> 33 #include <fstream> 33 34 34 35 namespace morpheo { … … 275 276 #endif 276 277 278 #if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true) 279 private : std::ofstream * instruction_log_file; 280 #endif 281 277 282 // -----[ Methods ]--------------------------------------------------- 278 283 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h
r108 r111 96 96 #endif 97 97 public : Taddress_t address_next ; 98 #ifdef DEBUG 99 public : double cycle_rob_in ; 100 public : double cycle_commit ; 101 #endif 98 102 99 // public : entry_t (uint32_t ptr ,100 // Tcontext_t front_end_id ,101 // Tcontext_t context_id ,102 // Tcontext_t rename_unit_id ,103 // Tdepth_t depth ,104 // Ttype_t type ,105 // Toperation_t operation ,106 // Tcontrol_t is_delay_slot ,107 // Tgeneral_data_t address ,108 // Texception_t exception ,109 // Texception_t exception_use ,110 // Tlsq_ptr_t store_queue_ptr_write ,111 // Tlsq_ptr_t load_queue_ptr_write ,112 // Tcontrol_t read_ra ,113 // Tgeneral_address_t num_reg_ra_log ,114 // Tgeneral_address_t num_reg_ra_phy ,115 // Tcontrol_t read_rb ,116 // Tgeneral_address_t num_reg_rb_log ,117 // Tgeneral_address_t num_reg_rb_phy ,118 // Tcontrol_t read_rc ,119 // Tspecial_address_t num_reg_rc_log ,120 // Tspecial_address_t num_reg_rc_phy ,121 // Tcontrol_t write_rd ,122 // Tgeneral_address_t num_reg_rd_log ,123 // Tgeneral_address_t num_reg_rd_phy_old ,124 // Tgeneral_address_t num_reg_rd_phy_new ,125 // Tcontrol_t write_re ,126 // Tspecial_address_t num_reg_re_log ,127 // Tspecial_address_t num_reg_re_phy_old ,128 // Tspecial_address_t num_reg_re_phy_new )129 // {130 // this->ptr = ptr ;131 // this->front_end_id = front_end_id ;132 // this->context_id = context_id ;133 // this->rename_unit_id = rename_unit_id ;134 // this->depth = depth ;135 // this->type = type ;136 // this->operation = operation ;137 // this->is_delay_slot = is_delay_slot ;138 // this->address = address ;139 // this->exception = exception ;140 // this->exception_use = exception_use ;141 // this->store_queue_ptr_write = store_queue_ptr_write ;142 // this->load_queue_ptr_write = load_queue_ptr_write ;143 // this->read_ra = read_ra ;144 // this->num_reg_ra_log = num_reg_ra_log ;145 // this->num_reg_ra_phy = num_reg_ra_phy ;146 // this->read_rb = read_rb ;147 // this->num_reg_rb_log = num_reg_rb_log ;148 // this->num_reg_rb_phy = num_reg_rb_phy ;149 // this->read_rc = read_rc ;150 // this->num_reg_rc_log = num_reg_rc_log ;151 // this->num_reg_rc_phy = num_reg_rc_phy ;152 // this->write_rd = write_rd ;153 // this->num_reg_rd_log = num_reg_rd_log ;154 // this->num_reg_rd_phy_old = num_reg_rd_phy_old ;155 // this->num_reg_rd_phy_new = num_reg_rd_phy_new ;156 // this->write_re = write_re ;157 // this->num_reg_re_log = num_reg_re_log ;158 // this->num_reg_re_phy_old = num_reg_re_phy_old ;159 // this->num_reg_re_phy_new = num_reg_re_phy_new ;160 // }161 103 }; 162 104 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp
r109 r111 310 310 #endif 311 311 312 #if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true) 313 instruction_log_file = new std::ofstream [_param->_nb_thread]; 314 for (uint32_t i=0; i<_param->_nb_thread; ++i) 315 if (_param->_have_thread [i]) 316 { 317 std::string filename = "Instruction_flow-thread_" + toString(i) + ".log"; 318 319 instruction_log_file [i] .open(filename.c_str() ,std::ios::out | std::ios::trunc); 320 } 321 #endif 322 312 323 log_end(Commit_unit,FUNCTION); 313 324 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp
r109 r111 207 207 delete _component; 208 208 209 #if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true) 210 for (uint32_t i=0; i<_param->_nb_thread; ++i) 211 if (_param->_have_thread [i]) 212 { 213 instruction_log_file [i].close(); 214 } 215 #endif 216 209 217 log_end(Commit_unit,FUNCTION); 210 218 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp
r110 r111 59 59 std::string sum_nb_inst_retire_ok = "0"; 60 60 std::string sum_nb_inst_retire_ko = "0"; 61 61 std::string sum_average; 62 62 for (uint32_t i=0; i<_param->_nb_thread; i++) 63 63 if (_param->_have_thread [i]) … … 68 68 sum_nb_inst_retire_ok = "+ nb_inst_retire_ok_"+toString(i) + " " +sum_nb_inst_retire_ok; 69 69 sum_nb_inst_retire_ko = "+ nb_inst_retire_ko_"+toString(i) + " " +sum_nb_inst_retire_ko; 70 sum_average = "+ average_inst_retire_ok_"+toString(i)+" average_inst_retire_ko_"+toString(i); 71 72 _stat->create_expr_average_by_cycle("average_inst_retire_ok_"+toString(i),"nb_inst_retire_ok_"+toString(i), "", toString(_("Average instruction retire ok by cycle (thread %d)"),i)); 73 _stat->create_expr_average_by_cycle("average_inst_retire_ko_"+toString(i),"nb_inst_retire_ko_"+toString(i), "", toString(_("Average instruction retire ko (event, miss) by cycle (thread %d)"),i)); 70 74 71 _stat->create_expr_ average_by_cycle("average_inst_retire_ok_"+toString(i), sum_nb_inst_retire_ok, "", toString(_("Average instruction retire ok by cycle (IPC)(thread %d)"),i));72 _stat->create_expr_ average_by_cycle("average_inst_retire_ko_"+toString(i), sum_nb_inst_retire_ko, "", toString(_("Average instruction retire ko (event, miss)by cycle (thread %d)"),i));73 75 _stat->create_expr_percent ("percent_inst_retire_ok_"+toString(i),"average_inst_retire_ok_"+toString(i), sum_average, toString(_("Percent instruction retire ok by cycle (thread %d)"),i)); 76 _stat->create_expr_percent ("percent_inst_retire_ko_"+toString(i),"average_inst_retire_ko_"+toString(i), sum_average, toString(_("Percent instruction retire ko by cycle (thread %d)"),i)); 77 74 78 _stat->create_expr ("IPC_ok_"+toString(i) , "average_inst_retire_ok_"+toString(i), TYPE_COUNTER, "inst/cycle", toString("Instruction Per Cycle (Instruction Ok) (thread %d)",i)); 75 79 _stat->create_expr ("CPI_ok_"+toString(i) , "/ 1 IPC_ok_"+toString(i) , TYPE_COUNTER, "cycle/inst", toString("Cycle Per Instruction (Instruction Ok) (thread %d)",i)); … … 82 86 } 83 87 88 _stat->create_expr_average_by_cycle("average_inst_retire_ok", sum_nb_inst_retire_ok, "", _("Average instruction retire ok by cycle (all thread)")); 89 _stat->create_expr_average_by_cycle("average_inst_retire_ko", sum_nb_inst_retire_ko, "", _("Average instruction retire ko (event, miss) by cycle (all thread)")); 90 91 sum_average = "+ average_inst_retire_ok average_inst_retire_ko"; 92 93 _stat->create_expr_percent ("percent_inst_retire_ok","average_inst_retire_ok", sum_average, _("Percent instruction retire ok by cycle (all thread)")); 94 _stat->create_expr_percent ("percent_inst_retire_ko","average_inst_retire_ko", sum_average, _("Percent instruction retire ko by cycle (all thread)")); 95 84 96 _stat->create_expr ("IPC_ok" , "/ "+sum_nb_inst_retire_ok+" cycle", TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ok)"); 85 97 _stat->create_expr ("CPI_ok" , "/ 1 IPC_ok" , TYPE_COUNTER, "cycle/inst", "Cycle Per Instruction (Instruction Ok)"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
r110 r111 172 172 #endif 173 173 entry->address_next = PORT_READ(in_INSERT_ADDRESS_NEXT [x][y]); 174 #ifdef DEBUG 175 entry->cycle_rob_in = sc_simulation_time(); 176 entry->cycle_commit = sc_simulation_time(); 177 #endif 174 178 175 179 // Test if exception : … … 340 344 (entry->read_rb)) 341 345 entry->address_next = PORT_READ(in_COMMIT_ADDRESS [x]); 346 347 #ifdef DEBUG 348 entry->cycle_commit = sc_simulation_time(); 349 #endif 342 350 } 343 351 } … … 406 414 } 407 415 416 #if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true) 417 // log file 418 instruction_log_file [num_thread] 419 << "[" << sc_simulation_time() << "] " 420 << "{" << ((retire_ok)?" OK ":"!KO!") << "} " 421 << std::hex 422 << "0x" << entry->address << " (0x" << (entry->address<<2) << ") " 423 << std::dec 424 << "[" << entry->cycle_rob_in << ", " << entry->cycle_commit << "] " 425 << std::endl; 426 #endif 427 408 428 // Update nb_inst 409 429 reg_NB_INST_COMMIT_ALL [front_end_id][context_id] --; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/SelfTest/config_min.cfg
r88 r111 4 4 1 1 *2 # nb_rename_unit 5 5 1 1 *2 # size_queue 6 0 1 +1 # queue_scheme 6 7 1 1 *2 # nb_bank 7 8 0 0 *2 # size_packet -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/SelfTest/config_mono_rename_unit.cfg
r88 r111 4 4 1 1 *2 # nb_rename_unit 5 5 16 32 *2 # size_queue 6 0 1 +1 # queue_scheme 6 7 4 16 *2 # nb_bank 7 8 0 0 *2 # size_packet -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/SelfTest/config_multi_rename_unit.cfg
r88 r111 4 4 4 4 *2 # nb_rename_unit 5 5 64 64 *2 # size_queue 6 0 1 +1 # queue_scheme 6 7 4 16 *2 # nb_bank 7 8 0 0 *2 # size_packet -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/SelfTest/src/main.cpp
r88 r111 8 8 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/SelfTest/include/test.h" 9 9 10 #define NB_PARAMS 1 710 #define NB_PARAMS 18 11 11 12 12 void usage (int argc, char * argv[]) … … 14 14 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 15 15 err (_("list_params is :\n")); 16 err (_(" * nb_context (uint32_t )\n")); 17 err (_(" * nb_front_end (uint32_t )\n")); 18 err (_(" * nb_rename_unit (uint32_t )\n")); 19 err (_(" * size_queue (uint32_t )\n")); 20 err (_(" * nb_bank (uint32_t )\n")); 21 err (_(" * size_packet (uint32_t )\n")); 22 err (_(" * size_general_data (uint32_t )\n")); 23 err (_(" * size_special_data (uint32_t )\n")); 24 err (_(" * size_general_register (uint32_t )\n")); 25 err (_(" * size_special_register (uint32_t )\n")); 26 err (_(" * size_store_queue_ptr (uint32_t )\n")); 27 err (_(" * size_load_queue_ptr (uint32_t )\n")); 28 err (_(" * nb_inst_issue (uint32_t )\n")); 29 err (_(" * nb_inst_rename [nb_rename_unit] (uint32_t )\n")); 30 err (_(" * nb_inst_reexecute (uint32_t )\n")); 31 err (_(" * nb_rename_unit_select (uint32_t )\n")); 32 err (_(" * priority (Tpriority_t )\n")); 33 err (_(" * load_balancing (Tload_balancing_t)\n")); 34 err (_(" * table_routing [nb_rename_unit][nb_inst_issue] (bool )\n")); 35 err (_(" * table_routing [nb_inst_issue][nb_type] (bool )\n")); 16 err (_(" * nb_context (uint32_t )\n")); 17 err (_(" * nb_front_end (uint32_t )\n")); 18 err (_(" * nb_rename_unit (uint32_t )\n")); 19 err (_(" * size_queue (uint32_t )\n")); 20 err (_(" * queue_scheme (Tissue_queue_scheme_t)\n")); 21 err (_(" * nb_bank (uint32_t )\n")); 22 err (_(" * size_packet (uint32_t )\n")); 23 err (_(" * size_general_data (uint32_t )\n")); 24 err (_(" * size_special_data (uint32_t )\n")); 25 err (_(" * size_general_register (uint32_t )\n")); 26 err (_(" * size_special_register (uint32_t )\n")); 27 err (_(" * size_store_queue_ptr (uint32_t )\n")); 28 err (_(" * size_load_queue_ptr (uint32_t )\n")); 29 err (_(" * nb_inst_issue (uint32_t )\n")); 30 err (_(" * nb_inst_rename [nb_rename_unit] (uint32_t )\n")); 31 err (_(" * nb_inst_reexecute (uint32_t )\n")); 32 err (_(" * nb_rename_unit_select (uint32_t )\n")); 33 err (_(" * priority (Tpriority_t )\n")); 34 err (_(" * load_balancing (Tload_balancing_t )\n")); 35 err (_(" * table_routing [nb_rename_unit][nb_inst_issue] (bool )\n")); 36 err (_(" * table_routing [nb_inst_issue][nb_type] (bool )\n")); 36 37 err (_(" * TYPE_ALU \n")); 37 38 err (_(" * TYPE_SHIFT \n")); … … 71 72 72 73 uint32_t _size_queue = fromString<uint32_t >(argv[x++]); 74 Tissue_queue_scheme_t _queue_scheme = fromString<Tissue_queue_scheme_t>(argv[x++]); 73 75 uint32_t _nb_bank = fromString<uint32_t >(argv[x++]); 74 76 uint32_t _size_packet = fromString<uint32_t >(argv[x++]); … … 126 128 _nb_rename_unit , 127 129 _size_queue , 130 _queue_scheme , 128 131 _nb_bank , 129 132 _size_packet , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h
r110 r111 139 139 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 140 140 private : generic::priority::Priority * _priority_in ; 141 142 // in_order implementation only 143 // out_of_order implementation only 144 private : generic::priority::Priority * _priority_reg; 141 145 private : generic::priority::Priority * _priority_out; 142 private : generic::priority::Priority * _priority_reg;143 146 144 147 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 148 // common implementation 145 149 private : std::list<entry_t*> * _issue_queue; 146 150 private : std::list<entry_t*> _reexecute_queue; 151 152 // in_order implementation only 153 private : uint32_t reg_NUM_BANK_HEAD; 154 private : uint32_t reg_NUM_BANK_TAIL; 155 // out_of_order implementation only 147 156 148 157 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 149 private : Tcontrol_t * internal_BANK_IN_ACK ;//[nb_bank] 150 private : uint32_t * internal_BANK_IN_NUM_RENAME_UNIT ;//[nb_bank] 151 private : uint32_t * internal_BANK_IN_NUM_INST ;//[nb_bank] 152 158 // common implementation 153 159 private : Tcontrol_t * internal_ISSUE_OUT_VAL ;//[nb_inst_issue] 154 160 private : Tcontrol_t * internal_ISSUE_OUT_FROM_REEXECUTE ;//[nb_inst_issue] … … 157 163 158 164 private : Tcontrol_t * internal_REEXECUTE_ACK ;//[nb_inst_reexecute] 165 166 // in_order implementation only 167 private : Tcontrol_t * internal_BANK_IN_ACK ;//[nb_bank] 168 private : uint32_t * internal_BANK_IN_NUM_RENAME_UNIT ;//[nb_bank] 169 private : uint32_t * internal_BANK_IN_NUM_INST ;//[nb_bank] 170 // out_of_order implementation only 171 public : Tcontrol_t ** internal_ISSUE_IN_ACK ;//[nb_rename_unit][nb_inst_rename] 172 173 // function pointer 174 public : void (morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Issue_queue::*function_transition) (void); 175 public : void (morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Issue_queue::*function_genMoore ) (void); 176 public : void (morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Issue_queue::*function_genMealy_issue_in ) (void); 177 public : void (morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Issue_queue::*function_genMealy_issue_out) (void); 159 178 #endif 160 179 … … 189 208 190 209 #ifdef SYSTEMC 191 public : void transition (void); 192 public : void genMoore (void); 210 public : void transition (void); 211 public : void genMoore (void); 212 public : void genMealy_issue_in (void); 213 public : void genMealy_issue_out (void); 214 215 public : void function_in_order_transition (void); 216 public : void function_in_order_genMealy_issue_out(void); 217 public : void function_in_order_genMoore (void); 218 219 public : void function_out_of_order_transition (void); 220 public : void function_out_of_order_genMoore (void); 193 221 #endif 194 222 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Parameters.h
r110 r111 25 25 { 26 26 //-----[ fields ]------------------------------------------------------------ 27 public : uint32_t _nb_context ; 28 public : uint32_t _nb_front_end ; 29 public : uint32_t _nb_rename_unit ; 30 public : uint32_t _size_queue ; 31 public : uint32_t _nb_bank ; 32 //public : uint32_t _size_packet ; 33 //public : uint32_t _size_general_data ; 34 //public : uint32_t _size_special_data ; 35 //public : uint32_t _size_general_register ; 36 //public : uint32_t _size_special_register ; 37 //public : uint32_t _size_store_queue_ptr ; 38 //public : uint32_t _size_load_queue_ptr ; 39 public : uint32_t _nb_inst_issue ; 40 public : uint32_t * _nb_inst_rename ;//[nb_rename_unit] 41 public : uint32_t _nb_inst_reexecute ; 42 public : uint32_t _nb_rename_unit_select ; 43 public : Tpriority_t _priority ; 44 public : Tload_balancing_t _load_balancing ; 45 public : bool ** _table_routing ;//[nb_rename_unit][nb_inst_issue] 46 public : bool ** _table_issue_type ;//[nb_inst_issue][nb_type] 47 public : uint32_t _size_reexecute_queue ; 48 49 //public : uint32_t _nb_bank_select_out ; 50 public : uint32_t _max_nb_inst_rename ; 51 52 //public : uint32_t _size_context_id ; 53 //public : uint32_t _size_front_end_id ; 54 public : uint32_t _size_bank ; 55 56 //public : bool _have_port_context_id ; 57 //public : bool _have_port_front_end_id ; 58 //public : bool _have_port_packet_id ; 59 //public : bool _have_port_load_queue_ptr; 27 public : uint32_t _nb_context ; 28 public : uint32_t _nb_front_end ; 29 public : uint32_t _nb_rename_unit ; 30 public : uint32_t _size_queue ; 31 public : Tissue_queue_scheme_t _queue_scheme ; 32 public : uint32_t _nb_bank ; 33 //public : uint32_t _size_packet ; 34 //public : uint32_t _size_general_data ; 35 //public : uint32_t _size_special_data ; 36 //public : uint32_t _size_general_register ; 37 //public : uint32_t _size_special_register ; 38 //public : uint32_t _size_store_queue_ptr ; 39 //public : uint32_t _size_load_queue_ptr ; 40 public : uint32_t _nb_inst_issue ; 41 public : uint32_t * _nb_inst_rename ;//[nb_rename_unit] 42 public : uint32_t _nb_inst_reexecute ; 43 public : uint32_t _nb_rename_unit_select ; 44 public : Tpriority_t _priority ; 45 public : Tload_balancing_t _load_balancing ; 46 public : bool ** _table_routing ;//[nb_rename_unit][nb_inst_issue] 47 public : bool ** _table_issue_type ;//[nb_inst_issue][nb_type] 48 public : uint32_t _size_reexecute_queue ; 49 50 //public : uint32_t _nb_bank_select_out ; 51 public : uint32_t _max_nb_inst_rename ; 52 53 //public : uint32_t _size_context_id ; 54 //public : uint32_t _size_front_end_id ; 55 public : uint32_t _size_bank ; 56 57 //public : bool _have_port_context_id ; 58 //public : bool _have_port_front_end_id ; 59 //public : bool _have_port_packet_id ; 60 //public : bool _have_port_load_queue_ptr; 60 61 61 62 //-----[ methods ]----------------------------------------------------------- 62 public : Parameters (uint32_t nb_context , 63 uint32_t nb_front_end , 64 uint32_t nb_rename_unit , 65 uint32_t size_queue , 66 uint32_t nb_bank , 67 uint32_t size_packet , 68 uint32_t size_general_data , 69 uint32_t size_special_data , 70 uint32_t size_general_register , 71 uint32_t size_special_register , 72 uint32_t size_store_queue_ptr , 73 uint32_t size_load_queue_ptr , 74 uint32_t nb_inst_issue , 75 uint32_t * nb_inst_rename , 76 uint32_t nb_inst_reexecute , 77 uint32_t nb_rename_unit_select , 78 Tpriority_t priority , 79 Tload_balancing_t load_balancing , 80 bool ** table_routing , 81 bool ** table_issue_type , 82 bool is_toplevel=false); 63 public : Parameters (uint32_t nb_context , 64 uint32_t nb_front_end , 65 uint32_t nb_rename_unit , 66 uint32_t size_queue , 67 Tissue_queue_scheme_t queue_scheme , 68 uint32_t nb_bank , 69 uint32_t size_packet , 70 uint32_t size_general_data , 71 uint32_t size_special_data , 72 uint32_t size_general_register , 73 uint32_t size_special_register , 74 uint32_t size_store_queue_ptr , 75 uint32_t size_load_queue_ptr , 76 uint32_t nb_inst_issue , 77 uint32_t * nb_inst_rename , 78 uint32_t nb_inst_reexecute , 79 uint32_t nb_rename_unit_select , 80 Tpriority_t priority , 81 Tload_balancing_t load_balancing , 82 bool ** table_routing , 83 bool ** table_issue_type , 84 bool is_toplevel=false); 83 85 84 86 // public : Parameters (Parameters & param) ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Types.h
r88 r111 17 17 namespace ooo_engine { 18 18 namespace issue_queue { 19 20 typedef enum 21 { 22 ISSUE_QUEUE_SCHEME_IN_ORDER // Each instruction is issue in of order 23 // ,ISSUE_QUEUE_SCHEME_IN_BUNDLE_ORDER // Each bundle is issue in order. In bundle, an instruction is issue out of order 24 ,ISSUE_QUEUE_SCHEME_OUT_OF_ORDER // Each instruction is issue out of order 25 } Tissue_queue_scheme_t; 19 26 20 27 class entry_t … … 87 94 }; // end namespace core 88 95 }; // end namespace behavioural 96 97 template<> inline std::string toString<morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Tissue_queue_scheme_t>(const morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Tissue_queue_scheme_t& x) 98 { 99 switch (x) 100 { 101 case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::ISSUE_QUEUE_SCHEME_IN_ORDER : return "in_order" ; break; 102 // case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::ISSUE_QUEUE_SCHEME_IN_BUNDLE_ORDER : return "in_bundle_order"; break; 103 case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::ISSUE_QUEUE_SCHEME_OUT_OF_ORDER : return "out_of_order" ; break; 104 default : return ""; break; 105 } 106 }; 107 108 template<> inline morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Tissue_queue_scheme_t fromString<morpheo::behavioural::core::multi_ooo_engine 109 ::ooo_engine::issue_queue::Tissue_queue_scheme_t>(const std::string& x) 110 { 111 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::ISSUE_QUEUE_SCHEME_IN_ORDER))) == 0) or 112 (x.compare("in_order") == 0)) 113 return morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::ISSUE_QUEUE_SCHEME_IN_ORDER; 114 // if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::ISSUE_QUEUE_SCHEME_IN_BUNDLE_ORDER))) == 0) or 115 // (x.compare("in_bundle_order") == 0)) 116 // return morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::ISSUE_QUEUE_SCHEME_IN_BUNDLE_ORDER; 117 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::ISSUE_QUEUE_SCHEME_OUT_OF_ORDER))) == 0) or 118 (x.compare("out_of_order") == 0)) 119 return morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::ISSUE_QUEUE_SCHEME_OUT_OF_ORDER; 120 121 throw (ErrorMorpheo ("<fromString> : Unknow string : \""+x+"\"")); 122 }; 123 89 124 }; // end namespace morpheo 90 125 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue.cpp
r110 r111 75 75 if (usage_is_set(_usage,USE_SYSTEMC)) 76 76 { 77 log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Method - transition"),_name.c_str()); 77 // Function pointer 78 switch (_param->_queue_scheme) 79 { 80 case ISSUE_QUEUE_SCHEME_IN_ORDER : 81 { 82 function_transition = &morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Issue_queue::function_in_order_transition ; 83 function_genMoore = &morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Issue_queue::function_in_order_genMoore ; 84 function_genMealy_issue_in = NULL; 85 function_genMealy_issue_out = &morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Issue_queue::function_in_order_genMealy_issue_out; 86 87 break; 88 } 89 case ISSUE_QUEUE_SCHEME_OUT_OF_ORDER : 90 { 91 function_transition = &morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Issue_queue::function_out_of_order_transition ; 92 function_genMoore = &morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Issue_queue::function_out_of_order_genMoore ; 93 function_genMealy_issue_in = NULL; 94 function_genMealy_issue_out = NULL; 95 96 break; 97 } 98 default : 99 { 100 break; 101 } 102 } 78 103 79 SC_METHOD (transition); 80 dont_initialize (); 81 sensitive << (*(in_CLOCK)).pos(); 82 104 if (function_transition != NULL) 105 { 106 log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Method - transition"),_name.c_str()); 107 108 SC_METHOD (transition); 109 dont_initialize (); 110 sensitive << (*(in_CLOCK)).pos(); 111 83 112 # ifdef SYSTEMCASS_SPECIFIC 84 113 // List dependency information 85 114 # endif 115 } 86 116 87 log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Method - genMoore"),_name.c_str()); 117 if (function_genMoore != NULL) 118 { 119 log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Method - genMoore"),_name.c_str()); 120 121 SC_METHOD (genMoore); 122 dont_initialize (); 123 sensitive << (*(in_CLOCK)).neg(); // need internal register 124 125 # ifdef SYSTEMCASS_SPECIFIC 126 // List dependency information 127 # endif 128 } 88 129 89 SC_METHOD (genMoore); 90 dont_initialize (); 91 sensitive << (*(in_CLOCK)).neg(); // need internal register 92 130 if (function_genMealy_issue_in != NULL) 131 { 132 log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Method - genMealy_issue_in"),_name.c_str()); 133 134 SC_METHOD (genMealy_issue_in); 135 dont_initialize (); 136 sensitive << (*(in_CLOCK)).neg(); // need internal register 137 93 138 # ifdef SYSTEMCASS_SPECIFIC 94 139 // List dependency information 95 140 # endif 141 } 142 143 if (function_genMealy_issue_out != NULL) 144 { 145 log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Method - genMealy_issue_out"),_name.c_str()); 146 147 SC_METHOD (genMealy_issue_out); 148 dont_initialize (); 149 sensitive << (*(in_CLOCK)).neg(); // need internal register 150 151 if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_IN_ORDER) 152 { 153 for (uint32_t i=0; i<_param->_nb_inst_issue; ++i) 154 sensitive << (*(in_ISSUE_OUT_ACK [i])); 155 } 156 157 # ifdef SYSTEMCASS_SPECIFIC 158 // List dependency information 159 # endif 160 } 96 161 97 162 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_allocation.cpp
r110 r111 154 154 155 155 ALLOC1(internal_REEXECUTE_ACK ,Tcontrol_t,_param->_nb_inst_reexecute); 156 157 if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_OUT_OF_ORDER) 158 { 159 ALLOC1(internal_BANK_IN_ACK ,Tcontrol_t,_param->_nb_bank); 160 ALLOC1(internal_BANK_IN_NUM_RENAME_UNIT ,uint32_t ,_param->_nb_bank); 161 ALLOC1(internal_BANK_IN_NUM_INST ,uint32_t ,_param->_nb_bank); 162 } 163 if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_IN_ORDER) 164 { 165 ALLOC2(internal_ISSUE_IN_ACK ,Tcontrol_t,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]); 166 } 156 167 } 157 168 158 169 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 159 160 170 _priority_in = new generic::priority::Priority (_name+"_priority_in" , 161 171 _param->_priority , … … 165 175 _param->_nb_rename_unit_select); 166 176 177 if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_OUT_OF_ORDER) 178 { 167 179 _priority_out = new generic::priority::Priority (_name+"_priority_out" , 168 180 _param->_priority , … … 174 186 _param->_nb_bank, 175 187 _param->_nb_bank); 188 } 176 189 177 190 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_deallocation.cpp
r110 r111 98 98 99 99 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 100 DELETE1(internal_BANK_IN_ACK ,_param->_nb_bank);101 DELETE1(internal_BANK_IN_NUM_RENAME_UNIT ,_param->_nb_bank);102 DELETE1(internal_BANK_IN_NUM_INST ,_param->_nb_bank);103 104 100 DELETE1(internal_ISSUE_OUT_VAL ,_param->_nb_inst_issue); 105 101 DELETE1(internal_ISSUE_OUT_FROM_REEXECUTE,_param->_nb_inst_issue); … … 108 104 109 105 DELETE1(internal_REEXECUTE_ACK ,_param->_nb_inst_reexecute); 106 107 if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_OUT_OF_ORDER) 108 { 109 DELETE1(internal_BANK_IN_ACK ,_param->_nb_bank); 110 DELETE1(internal_BANK_IN_NUM_RENAME_UNIT ,_param->_nb_bank); 111 DELETE1(internal_BANK_IN_NUM_INST ,_param->_nb_bank); 112 } 113 if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_IN_ORDER) 114 { 115 DELETE2(internal_ISSUE_IN_ACK ,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]); 116 } 110 117 } 111 118 … … 113 120 114 121 delete _priority_in ; 115 delete _priority_out; 116 delete _priority_reg; 122 if (_param->_queue_scheme == ISSUE_QUEUE_SCHEME_OUT_OF_ORDER) 123 { 124 delete _priority_out; 125 delete _priority_reg; 126 } 117 127 delete _component; 118 128 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_genMoore.cpp
r110 r111 39 39 } 40 40 41 // =================================================================== 42 // =====[ ISSUE_IN ]================================================== 43 // =================================================================== 44 { 45 Tcontrol_t ack [_param->_nb_rename_unit][_param->_max_nb_inst_rename]; 46 47 // Initialisation 48 for (uint32_t i=0; i<_param->_nb_bank; i++) 49 internal_BANK_IN_ACK [i] = false; 50 51 for (uint32_t i=0; i<_param->_nb_rename_unit; i++) 52 for (uint32_t j=0; j<_param->_nb_inst_rename[i]; j++) 53 ack [i][j] = false; 54 55 std::list<generic::priority::select_t> * select_reg = _priority_reg->select(); // same select for all issue 56 57 // issue_in interface 58 std::list<generic::priority::select_t> * select_in = _priority_in ->select(); // same select for all issue 59 for (std::list<generic::priority::select_t>::iterator it=select_in ->begin(); 60 it!=select_in ->end(); 61 it++) 62 { 63 // Get num interface 64 uint32_t num_rename_unit = it->grp; 65 uint32_t num_inst_rename = it->elt; 66 67 log_printf(TRACE,Issue_queue,FUNCTION," * ISSUE_IN [%d][%d]",num_rename_unit,num_inst_rename); 68 69 // scan all bank 70 for (std::list<generic::priority::select_t>::iterator it=select_reg->begin(); 71 it!=select_reg->end(); 72 it++) 73 { 74 uint32_t num_bank = it->grp; 75 76 log_printf(TRACE,Issue_queue,FUNCTION," * BANK [%d]",num_bank); 77 78 // test if bank is not busy (full or previous access) 79 if (not internal_BANK_IN_ACK [num_bank] and (_issue_queue[num_bank].size() < _param->_size_bank)) 80 { 81 log_printf(TRACE,Issue_queue,FUNCTION," * find"); 82 83 // find 84 ack [num_rename_unit][num_inst_rename] = true; 85 internal_BANK_IN_ACK [num_bank] = true; 86 internal_BANK_IN_NUM_RENAME_UNIT [num_bank] = num_rename_unit; 87 internal_BANK_IN_NUM_INST [num_bank] = num_inst_rename; 88 89 break; // Stop scan 90 } 91 else 92 log_printf(TRACE,Issue_queue,FUNCTION," * not find"); 93 } 94 } 95 96 for (uint32_t i=0; i<_param->_nb_rename_unit; i++) 97 for (uint32_t j=0; j<_param->_nb_inst_rename[i]; j++) 98 PORT_WRITE(out_ISSUE_IN_ACK [i][j],ack [i][j]); 99 } 100 101 // =================================================================== 102 // =====[ ISSUE_OUT ]================================================= 103 // =================================================================== 104 { 105 Tcontrol_t val [_param->_nb_inst_issue]; 106 107 for (uint32_t i=0; i<_param->_nb_inst_issue; i++) 108 val [i] = 0; 109 110 // From Reexecute_queue 111 112 // uint32_t num_reexecute_entry = 0; 113 for (std::list<entry_t*>::iterator it=_reexecute_queue.begin(); 114 it!=_reexecute_queue.end(); 115 ++it) 116 { 117 entry_t* entry = (*it); 118 119 for (uint32_t i=0; i<_param->_nb_inst_issue; i++) 120 // test if no previous transaction and can accept this type 121 if ((val[i] == 0) and _param->_table_issue_type [i][entry->_type]) 122 { 123 // find a issue port 124 val [i] = 1; 125 126 if (_param->_have_port_context_id) 127 PORT_WRITE(out_ISSUE_OUT_CONTEXT_ID [i], entry->_context_id ); 128 if (_param->_have_port_front_end_id) 129 PORT_WRITE(out_ISSUE_OUT_FRONT_END_ID [i], entry->_front_end_id ); 130 if (_param->_have_port_rob_ptr ) 131 PORT_WRITE(out_ISSUE_OUT_PACKET_ID [i], entry->_packet_id ); 132 PORT_WRITE(out_ISSUE_OUT_OPERATION [i], entry->_operation ); 133 PORT_WRITE(out_ISSUE_OUT_TYPE [i], entry->_type ); 134 PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE [i], entry->_store_queue_ptr_write); 135 if (_param->_have_port_load_queue_ptr) 136 PORT_WRITE(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE [i], entry->_load_queue_ptr_write ); 137 PORT_WRITE(out_ISSUE_OUT_HAS_IMMEDIAT [i], entry->_has_immediat ); 138 PORT_WRITE(out_ISSUE_OUT_IMMEDIAT [i], entry->_immediat ); 139 PORT_WRITE(out_ISSUE_OUT_READ_RA [i], entry->_read_ra ); 140 PORT_WRITE(out_ISSUE_OUT_NUM_REG_RA [i], entry->_num_reg_ra ); 141 PORT_WRITE(out_ISSUE_OUT_READ_RB [i], entry->_read_rb ); 142 PORT_WRITE(out_ISSUE_OUT_NUM_REG_RB [i], entry->_num_reg_rb ); 143 PORT_WRITE(out_ISSUE_OUT_READ_RC [i], entry->_read_rc ); 144 PORT_WRITE(out_ISSUE_OUT_NUM_REG_RC [i], entry->_num_reg_rc ); 145 PORT_WRITE(out_ISSUE_OUT_WRITE_RD [i], entry->_write_rd ); 146 PORT_WRITE(out_ISSUE_OUT_NUM_REG_RD [i], entry->_num_reg_rd ); 147 PORT_WRITE(out_ISSUE_OUT_WRITE_RE [i], entry->_write_re ); 148 PORT_WRITE(out_ISSUE_OUT_NUM_REG_RE [i], entry->_num_reg_re ); 149 150 internal_ISSUE_OUT_FROM_REEXECUTE [i] = true; 151 // internal_ISSUE_OUT_NUM_BANK [i] = num_reexecute_entry; 152 internal_ISSUE_OUT_ENTRY [i] = entry; 153 154 break; // stop scan 155 } 156 // num_reexecute_entry ++; 157 } 158 159 // From Issue_queue 160 161 std::list<generic::priority::select_t> * select = _priority_out->select(); // same select for all issue 162 163 for (std::list<generic::priority::select_t>::iterator it=select->begin(); 164 it!=select->end(); 165 it++) 166 { 167 uint32_t num_bank=it->grp; 168 169 // log_printf(TRACE,Issue_queue,Issue_queue,FUNCTION," * Bank [%d]",num_bank); 170 171 // Have instruction ? 172 if (not _issue_queue [num_bank].empty()) 173 { 174 // log_printf(TRACE,Issue_queue,Issue_queue,FUNCTION," * Not Empty !!!"); 175 176 entry_t* entry = _issue_queue [num_bank].front(); 177 178 for (uint32_t i=0; i<_param->_nb_inst_issue; i++) 179 // test if no previous transaction and can accept this type 180 if ((val[i] == 0) and _param->_table_issue_type [i][entry->_type]) 181 { 182 // find a issue port 183 val [i] = 1; 184 185 if (_param->_have_port_context_id) 186 PORT_WRITE(out_ISSUE_OUT_CONTEXT_ID [i], entry->_context_id ); 187 if (_param->_have_port_front_end_id) 188 PORT_WRITE(out_ISSUE_OUT_FRONT_END_ID [i], entry->_front_end_id ); 189 if (_param->_have_port_rob_ptr ) 190 PORT_WRITE(out_ISSUE_OUT_PACKET_ID [i], entry->_packet_id ); 191 PORT_WRITE(out_ISSUE_OUT_OPERATION [i], entry->_operation ); 192 PORT_WRITE(out_ISSUE_OUT_TYPE [i], entry->_type ); 193 PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE [i], entry->_store_queue_ptr_write); 194 if (_param->_have_port_load_queue_ptr) 195 PORT_WRITE(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE [i], entry->_load_queue_ptr_write ); 196 PORT_WRITE(out_ISSUE_OUT_HAS_IMMEDIAT [i], entry->_has_immediat ); 197 PORT_WRITE(out_ISSUE_OUT_IMMEDIAT [i], entry->_immediat ); 198 PORT_WRITE(out_ISSUE_OUT_READ_RA [i], entry->_read_ra ); 199 PORT_WRITE(out_ISSUE_OUT_NUM_REG_RA [i], entry->_num_reg_ra ); 200 PORT_WRITE(out_ISSUE_OUT_READ_RB [i], entry->_read_rb ); 201 PORT_WRITE(out_ISSUE_OUT_NUM_REG_RB [i], entry->_num_reg_rb ); 202 PORT_WRITE(out_ISSUE_OUT_READ_RC [i], entry->_read_rc ); 203 PORT_WRITE(out_ISSUE_OUT_NUM_REG_RC [i], entry->_num_reg_rc ); 204 PORT_WRITE(out_ISSUE_OUT_WRITE_RD [i], entry->_write_rd ); 205 PORT_WRITE(out_ISSUE_OUT_NUM_REG_RD [i], entry->_num_reg_rd ); 206 PORT_WRITE(out_ISSUE_OUT_WRITE_RE [i], entry->_write_re ); 207 PORT_WRITE(out_ISSUE_OUT_NUM_REG_RE [i], entry->_num_reg_re ); 208 209 internal_ISSUE_OUT_FROM_REEXECUTE [i] = false; 210 internal_ISSUE_OUT_NUM_BANK [i] = num_bank; 211 internal_ISSUE_OUT_ENTRY [i] = entry; 212 213 break; // stop scan 214 } 215 } 216 } 217 218 for (uint32_t i=0; i<_param->_nb_inst_issue; i++) 219 { 220 internal_ISSUE_OUT_VAL [i] = val [i]; 221 PORT_WRITE(out_ISSUE_OUT_VAL [i], internal_ISSUE_OUT_VAL [i]); 222 } 223 } 41 (this->*function_genMoore) (); 224 42 225 43 log_end(Issue_queue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_transition.cpp
r110 r111 27 27 { 28 28 _priority_in ->reset(); 29 _priority_out->reset();30 _priority_reg->reset();31 32 for (uint32_t i=0; i<_param->_nb_bank; i++)33 _issue_queue [i].clear();34 29 _reexecute_queue.clear(); 35 30 } … … 37 32 { 38 33 _priority_in ->transition(); 39 _priority_out->transition();40 _priority_reg->transition();41 42 // ===================================================================43 // =====[ ISSUE_IN ]==================================================44 // ===================================================================45 46 for (uint32_t i=0; i<_param->_nb_bank; i++)47 if (internal_BANK_IN_ACK [i])48 {49 uint32_t x = internal_BANK_IN_NUM_RENAME_UNIT [i];50 uint32_t y = internal_BANK_IN_NUM_INST [i];51 52 if (PORT_READ(in_ISSUE_IN_VAL[x][y]))53 {54 log_printf(TRACE,Issue_queue,FUNCTION," * ISSUE_IN [%d] - Transaction with ISSUE_IN [%d][%d]",i,x,y);55 56 #ifdef STATISTICS57 if (usage_is_set(_usage,USE_STATISTICS))58 (*_stat_nb_inst_issue_in [x]) ++;59 #endif60 entry_t * entry = new entry_t61 (62 (_param->_have_port_context_id )?PORT_READ(in_ISSUE_IN_CONTEXT_ID [x][y]):0,63 (_param->_have_port_front_end_id )?PORT_READ(in_ISSUE_IN_FRONT_END_ID [x][y]):0,64 (_param->_have_port_rob_ptr )?PORT_READ(in_ISSUE_IN_PACKET_ID [x][y]):0,65 PORT_READ(in_ISSUE_IN_OPERATION [x][y]),66 PORT_READ(in_ISSUE_IN_TYPE [x][y]),67 PORT_READ(in_ISSUE_IN_STORE_QUEUE_PTR_WRITE [x][y]),68 (_param->_have_port_load_queue_ptr)?PORT_READ(in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE [x][y]):0,69 PORT_READ(in_ISSUE_IN_HAS_IMMEDIAT [x][y]),70 PORT_READ(in_ISSUE_IN_IMMEDIAT [x][y]),71 PORT_READ(in_ISSUE_IN_READ_RA [x][y]),72 PORT_READ(in_ISSUE_IN_NUM_REG_RA [x][y]),73 PORT_READ(in_ISSUE_IN_READ_RB [x][y]),74 PORT_READ(in_ISSUE_IN_NUM_REG_RB [x][y]),75 PORT_READ(in_ISSUE_IN_READ_RC [x][y]),76 PORT_READ(in_ISSUE_IN_NUM_REG_RC [x][y]),77 PORT_READ(in_ISSUE_IN_WRITE_RD [x][y]),78 PORT_READ(in_ISSUE_IN_NUM_REG_RD [x][y]),79 PORT_READ(in_ISSUE_IN_WRITE_RE [x][y]),80 PORT_READ(in_ISSUE_IN_NUM_REG_RE [x][y])81 );82 83 _issue_queue [i].push_back(entry);84 }85 }86 34 87 35 // =================================================================== … … 130 78 if (internal_ISSUE_OUT_VAL [i] and PORT_READ(in_ISSUE_OUT_ACK [i])) 131 79 { 132 entry_t * entry = internal_ISSUE_OUT_ENTRY [i]; 133 80 #ifdef STATISTICS 81 if (usage_is_set(_usage,USE_STATISTICS)) 82 (*_stat_nb_inst_issue_out ) ++; 83 #endif 134 84 if (internal_ISSUE_OUT_FROM_REEXECUTE [i]) 135 85 { 86 entry_t * entry = internal_ISSUE_OUT_ENTRY [i]; 87 136 88 log_printf(TRACE,Issue_queue,FUNCTION," * ISSUE_OUT [%d] - From Reexecute_queue",i); 137 89 138 90 _reexecute_queue.remove(entry); 91 92 delete entry; 139 93 } 140 else 141 { 142 // front ... 143 uint32_t num_bank = internal_ISSUE_OUT_NUM_BANK [i]; 144 145 log_printf(TRACE,Issue_queue,FUNCTION," * ISSUE_OUT [%d] - From issue_queue [%d]",i,num_bank); 146 147 _issue_queue [num_bank].remove(entry); 148 } 149 150 delete entry; 151 } 94 // else ... in function specific 95 } 152 96 } 153 97 154 #if defined(DEBUG) and defined(DEBUG_Issue_queue) and (DEBUG >= DEBUG_TRACE) 98 // specific implementation 99 (this->*function_transition) (); 100 101 // =================================================================== 102 // =====[ PRINT ]==================================================== 103 // =================================================================== 104 105 #if defined(DEBUG) and DEBUG_Issue_queue and (DEBUG >= DEBUG_TRACE) 155 106 log_printf(TRACE,Issue_queue,FUNCTION," * Dump Issue_queue"); 156 107 … … 245 196 #endif 246 197 198 199 247 200 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 248 201 end_cycle (); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Parameters.cpp
r110 r111 19 19 #undef FUNCTION 20 20 #define FUNCTION "Issue_queue::Parameters" 21 Parameters::Parameters (uint32_t nb_context , 22 uint32_t nb_front_end , 23 uint32_t nb_rename_unit , 24 uint32_t size_queue , 25 uint32_t nb_bank , 26 uint32_t size_packet , 27 uint32_t size_general_data , 28 uint32_t size_special_data , 29 uint32_t size_general_register , 30 uint32_t size_special_register , 31 uint32_t size_store_queue_ptr , 32 uint32_t size_load_queue_ptr , 33 uint32_t nb_inst_issue , 34 uint32_t * nb_inst_rename , 35 uint32_t nb_inst_reexecute , 36 uint32_t nb_rename_unit_select , 37 Tpriority_t priority , 38 Tload_balancing_t load_balancing , 39 bool ** table_routing , 40 bool ** table_issue_type , 41 bool is_toplevel ) 21 Parameters::Parameters (uint32_t nb_context , 22 uint32_t nb_front_end , 23 uint32_t nb_rename_unit , 24 uint32_t size_queue , 25 Tissue_queue_scheme_t queue_scheme , 26 uint32_t nb_bank , 27 uint32_t size_packet , 28 uint32_t size_general_data , 29 uint32_t size_special_data , 30 uint32_t size_general_register , 31 uint32_t size_special_register , 32 uint32_t size_store_queue_ptr , 33 uint32_t size_load_queue_ptr , 34 uint32_t nb_inst_issue , 35 uint32_t * nb_inst_rename , 36 uint32_t nb_inst_reexecute , 37 uint32_t nb_rename_unit_select , 38 Tpriority_t priority , 39 Tload_balancing_t load_balancing , 40 bool ** table_routing , 41 bool ** table_issue_type , 42 bool is_toplevel ) 42 43 { 43 44 log_begin(Issue_queue,FUNCTION); … … 47 48 _nb_rename_unit = nb_rename_unit ; 48 49 _size_queue = size_queue ; 50 _queue_scheme = queue_scheme ; 49 51 _nb_bank = nb_bank ; 50 52 _nb_inst_issue = nb_inst_issue ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Parameters_msg_error.cpp
r109 r111 25 25 26 26 Parameters_test test ("Issue_queue"); 27 28 switch (_queue_scheme) 29 { 30 case ISSUE_QUEUE_SCHEME_IN_ORDER : 31 case ISSUE_QUEUE_SCHEME_OUT_OF_ORDER : 32 { 33 // supported 34 break; 35 } 36 default : 37 { 38 test.error(toString(_("Issue queue scheme '%s' is not supported. Please wait a next revision.\n"),toString(_queue_scheme).c_str())); 39 break; 40 } 41 } 42 43 if (// (_queue_scheme == ISSUE_QUEUE_SCHEME_IN_BUNDLE_ORDER) or 44 (_queue_scheme == ISSUE_QUEUE_SCHEME_OUT_OF_ORDER )) 45 test.warning(toString(_("Can have deadlock with the queue scheme \"%s\".\n"),toString(_queue_scheme).c_str())); 27 46 28 47 if (not is_multiple(_size_queue, _nb_bank)) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select.cpp
r108 r111 123 123 } 124 124 125 //for (uint32_t i=0; i<_param->_nb_front_end; i++)126 //for (uint32_t j=0; j<_param->_nb_context [i]; j++)127 //sensitive << (*(in_RETIRE_EVENT_STATE [i][j]));125 for (uint32_t i=0; i<_param->_nb_front_end; i++) 126 for (uint32_t j=0; j<_param->_nb_context [i]; j++) 127 sensitive << (*(in_RETIRE_EVENT_STATE [i][j])); 128 128 129 129 for (uint32_t i=0; i<_param->_nb_inst_rename; i++) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_genMealy.cpp
r110 r111 69 69 70 70 Tcontrol_t no_execute = (PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y])); 71 Tcontrol_t read_ra = (PORT_READ(in_RENAME_IN_READ_RA [x][y]));72 Tcontrol_t read_rb = (PORT_READ(in_RENAME_IN_READ_RB [x][y]));73 Tcontrol_t read_rc = (PORT_READ(in_RENAME_IN_READ_RC [x][y]));74 Tcontrol_t write_rd = (PORT_READ(in_RENAME_IN_WRITE_RD [x][y]));75 Tcontrol_t write_re = (PORT_READ(in_RENAME_IN_WRITE_RE [x][y]));71 // Tcontrol_t read_ra = (PORT_READ(in_RENAME_IN_READ_RA [x][y])); 72 // Tcontrol_t read_rb = (PORT_READ(in_RENAME_IN_READ_RB [x][y])); 73 // Tcontrol_t read_rc = (PORT_READ(in_RENAME_IN_READ_RC [x][y])); 74 // Tcontrol_t write_rd = (PORT_READ(in_RENAME_IN_WRITE_RD [x][y])); 75 // Tcontrol_t write_re = (PORT_READ(in_RENAME_IN_WRITE_RE [x][y])); 76 76 77 // Attention, j'ai enlevé event_state de la liste de sensibilité 78 // Tevent_state_t event_state = PORT_READ(in_RETIRE_EVENT_STATE [front_end_id][context_id]); 77 // Test if ROB is Flushed 78 Tevent_state_t event_state = PORT_READ(in_RETIRE_EVENT_STATE [front_end_id][context_id]); 79 Tcontrol_t can_register_access = (event_state == EVENT_STATE_NO_EVENT); 79 80 80 // Tcontrol_t no_execute = (PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y]) or 81 // // ROB Flush 82 // ((event_state == EVENT_STATE_EVENT ) or 83 // (event_state == EVENT_STATE_WAITEND))); 84 85 // Tcontrol_t read_ra = (PORT_READ(in_RENAME_IN_READ_RA [x][y]) and not no_execute); 86 // Tcontrol_t read_rb = (PORT_READ(in_RENAME_IN_READ_RB [x][y]) and not no_execute); 87 // Tcontrol_t read_rc = (PORT_READ(in_RENAME_IN_READ_RC [x][y]) and not no_execute); 88 // Tcontrol_t write_rd = (PORT_READ(in_RENAME_IN_WRITE_RD [x][y]) and not no_execute); 89 // Tcontrol_t write_re = (PORT_READ(in_RENAME_IN_WRITE_RE [x][y]) and not no_execute); 81 Tcontrol_t read_ra = (PORT_READ(in_RENAME_IN_READ_RA [x][y]) and can_register_access); 82 Tcontrol_t read_rb = (PORT_READ(in_RENAME_IN_READ_RB [x][y]) and can_register_access); 83 Tcontrol_t read_rc = (PORT_READ(in_RENAME_IN_READ_RC [x][y]) and can_register_access); 84 Tcontrol_t write_rd = (PORT_READ(in_RENAME_IN_WRITE_RD [x][y]) and can_register_access); 85 Tcontrol_t write_re = (PORT_READ(in_RENAME_IN_WRITE_RE [x][y]) and can_register_access); 90 86 91 87 if (_param->_have_port_front_end_id) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/configuration.cfg
r110 r111 23 23 1 1 +1 # commit_priority 24 24 1 1 +1 # commit_load_balancing 25 1 1 +1 # size_issue_queue 25 1 1 +1 # size_issue_queue 26 0 1 +1 # issue_queue_scheme 26 27 1 1 +1 # nb_issue_queue_bank 27 28 1 1 +1 # issue_priority -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/src/main.cpp
r110 r111 9 9 #include "Behavioural/include/Allocation.h" 10 10 11 #define NB_PARAMS 2 311 #define NB_PARAMS 24 12 12 13 13 void usage (int argc, char * argv[]) … … 15 15 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 16 16 err (_("list_params is :\n")); 17 err (_(" * nb_front_end (uint32_t )\n")); 18 err (_(" * nb_context [nb_front_end] (uint32_t )\n")); 19 err (_(" * nb_rename_unit (uint32_t )\n")); 20 err (_(" * nb_execute_loop (uint32_t )\n")); 21 err (_(" * nb_inst_decod [nb_front_end] (uint32_t )\n")); 22 err (_(" * nb_inst_insert [nb_rename_unit] (uint32_t )\n")); 23 err (_(" * nb_inst_retire [nb_rename_unit] (uint32_t )\n")); 24 err (_(" * nb_inst_issue (uint32_t )\n")); 25 err (_(" * nb_inst_execute [nb_execute_loop] (uint32_t )\n")); 26 err (_(" * nb_inst_reexecute (uint32_t )\n")); 27 err (_(" * nb_inst_commit (uint32_t )\n")); 28 err (_(" * nb_inst_branch_complete (uint32_t )\n")); 29 err (_(" * nb_branch_speculated [nb_front_end][nb_context] (uint32_t )\n")); 30 err (_(" * size_nb_inst_decod (uint32_t )\n")); 31 err (_(" * nb_rename_unit_select (uint32_t )\n")); 32 err (_(" * nb_execute_loop_select (uint32_t )\n")); 33 err (_(" * size_general_data (uint32_t )\n")); 34 err (_(" * size_special_data (uint32_t )\n")); 35 err (_(" * link_rename_unit_with_front_end [nb_front_end] (uint32_t )\n")); 36 err (_(" * size_re_order_buffer (uint32_t )\n")); 37 err (_(" * nb_re_order_buffer_bank (uint32_t )\n")); 38 err (_(" * commit_priority (Tpriority_t )\n")); 39 err (_(" * commit_load_balancing (Tload_balancing_t)\n")); 40 err (_(" * size_issue_queue (uint32_t )\n")); 41 err (_(" * nb_issue_queue_bank (uint32_t )\n")); 42 err (_(" * issue_priority (Tpriority_t )\n")); 43 err (_(" * issue_load_balancing (Tload_balancing_t)\n")); 44 err (_(" * table_routing [nb_rename_unit][nb_inst_issue] (bool )\n")); 45 err (_(" * table_issue_type [nb_inst_issue][nb_type] (bool )\n")); 17 err (_(" * nb_front_end (uint32_t )\n")); 18 err (_(" * nb_context [nb_front_end] (uint32_t )\n")); 19 err (_(" * nb_rename_unit (uint32_t )\n")); 20 err (_(" * nb_execute_loop (uint32_t )\n")); 21 err (_(" * nb_inst_decod [nb_front_end] (uint32_t )\n")); 22 err (_(" * nb_inst_insert [nb_rename_unit] (uint32_t )\n")); 23 err (_(" * nb_inst_retire [nb_rename_unit] (uint32_t )\n")); 24 err (_(" * nb_inst_issue (uint32_t )\n")); 25 err (_(" * nb_inst_execute [nb_execute_loop] (uint32_t )\n")); 26 err (_(" * nb_inst_reexecute (uint32_t )\n")); 27 err (_(" * nb_inst_commit (uint32_t )\n")); 28 err (_(" * nb_inst_branch_complete (uint32_t )\n")); 29 err (_(" * nb_branch_speculated [nb_front_end][nb_context] (uint32_t )\n")); 30 err (_(" * size_nb_inst_decod (uint32_t )\n")); 31 err (_(" * nb_rename_unit_select (uint32_t )\n")); 32 err (_(" * nb_execute_loop_select (uint32_t )\n")); 33 err (_(" * size_general_data (uint32_t )\n")); 34 err (_(" * size_special_data (uint32_t )\n")); 35 err (_(" * link_rename_unit_with_front_end [nb_front_end] (uint32_t )\n")); 36 err (_(" * size_re_order_buffer (uint32_t )\n")); 37 err (_(" * nb_re_order_buffer_bank (uint32_t )\n")); 38 err (_(" * commit_priority (Tpriority_t )\n")); 39 err (_(" * commit_load_balancing (Tload_balancing_t )\n")); 40 err (_(" * size_issue_queue (uint32_t )\n")); 41 err (_(" * issue_queue_scheme (Tissue_queue_scheme_t)\n")); 42 err (_(" * nb_issue_queue_bank (uint32_t )\n")); 43 err (_(" * issue_priority (Tpriority_t )\n")); 44 err (_(" * issue_load_balancing (Tload_balancing_t )\n")); 45 err (_(" * table_routing [nb_rename_unit][nb_inst_issue] (bool )\n")); 46 err (_(" * table_issue_type [nb_inst_issue][nb_type] (bool )\n")); 46 47 err (_(" * TYPE_ALU \n")); 47 48 err (_(" * TYPE_SHIFT \n")); … … 146 147 Tload_balancing_t _commit_load_balancing = fromString<Tload_balancing_t>(argv[x++]); 147 148 uint32_t _size_issue_queue = fromString<uint32_t >(argv[x++]); 149 issue_queue::Tissue_queue_scheme_t 150 _issue_queue_scheme = fromString<issue_queue::Tissue_queue_scheme_t>(argv[x++]); 148 151 uint32_t _nb_issue_queue_bank = fromString<uint32_t >(argv[x++]); 149 152 Tpriority_t _issue_priority = fromString<Tpriority_t >(argv[x++]); … … 308 311 _commit_load_balancing , 309 312 _size_issue_queue , 313 _issue_queue_scheme , 310 314 _nb_issue_queue_bank , 311 315 _issue_priority , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/Parameters.h
r110 r111 57 57 // Issue 58 58 public : uint32_t _size_issue_queue ; 59 public : issue_queue::Tissue_queue_scheme_t 60 _issue_queue_scheme ; 59 61 public : uint32_t _nb_issue_queue_bank ; 60 62 public : Tpriority_t _issue_priority ; … … 152 154 // Issue 153 155 uint32_t size_issue_queue , 156 issue_queue::Tissue_queue_scheme_t 157 issue_queue_scheme , 154 158 uint32_t nb_issue_queue_bank , 155 159 Tpriority_t issue_priority , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/Parameters.cpp
r110 r111 44 44 // Issue 45 45 uint32_t size_issue_queue , 46 issue_queue::Tissue_queue_scheme_t 47 issue_queue_scheme , 46 48 uint32_t nb_issue_queue_bank , 47 49 Tpriority_t issue_priority , … … 101 103 _commit_load_balancing = commit_load_balancing ; 102 104 _size_issue_queue = size_issue_queue ; 105 _issue_queue_scheme = issue_queue_scheme ; 103 106 _nb_issue_queue_bank = nb_issue_queue_bank ; 104 107 _issue_priority = issue_priority ; … … 271 274 _nb_rename_unit , 272 275 _size_issue_queue , 276 _issue_queue_scheme , 273 277 _nb_issue_queue_bank , 274 278 size_packet_id , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/SelfTest/config-min.cfg
r97 r111 10 10 1 1 +1 # nb_decod_bloc 11 11 1 1 +1 # size_decod_queue [0] [nb_decod_bloc] 12 0 1 +1 # decod_queue_scheme [0] [nb_decod_bloc] 12 13 1 1 +1 # nb_inst_decod [0] [nb_decod_bloc] 13 14 1 1 +1 # nb_context_select [0] [nb_decod_bloc] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/SelfTest/config-w1a.cfg
r97 r111 10 10 1 1 +1 # nb_decod_bloc 11 11 4 4 +1 # size_decod_queue [0] [nb_decod_bloc] 12 0 1 +1 # decod_queue_scheme [0] [nb_decod_bloc] 12 13 1 1 +1 # nb_inst_decod [0] [nb_decod_bloc] 13 14 1 1 +1 # nb_context_select [0] [nb_decod_bloc] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/SelfTest/src/main.cpp
r97 r111 15 15 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 16 16 err (_("list_params is :\n")); 17 err (_(" * size_general_data (uint32_t )\n")); 18 err (_(" * size_special_data (uint32_t )\n")); 19 //morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void), 20 21 err (_(" * nb_thread (uint32_t )\n")); 22 err (_(" * size_ifetch_queue [nb_thread] (uint32_t )\n")); 23 err (_(" * nb_inst_fetch [nb_thread] (uint32_t )\n")); 24 //err (_(" * implement_group [nb_thread][NB_GROUP] (bool )\n")); 25 err (_(" * ras_size_queue [nb_thread] (uint32_t )\n")); 26 err (_(" * upt_size_queue [nb_thread] (uint32_t )\n")); 27 err (_(" * ufpt_size_queue [nb_thread] (uint32_t )\n")); 28 29 err (_(" * nb_decod_bloc (uint32_t )\n")); 30 err (_(" * size_decod_queue [nb_decod_bloc] (uint32_t )\n")); 31 err (_(" * nb_inst_decod [nb_decod_bloc] (uint32_t )\n")); 32 err (_(" * nb_context_select [nb_decod_bloc] (uint32_t )\n")); 33 err (_(" * context_select_priority [nb_decod_bloc] (Tpriority_t )\n")); 34 err (_(" * context_select_load_balancing [nb_decod_bloc] (Tload_balancing_t)\n")); 35 36 err (_(" * nb_rename_bloc (uint32_t )\n")); 37 err (_(" * nb_inst_insert [nb_rename_bloc] (uint32_t )\n")); 38 err (_(" * nb_inst_retire [nb_rename_bloc] (uint32_t )\n")); 39 err (_(" * rename_select_priority [nb_rename_bloc] (Tpriority_t )\n")); 40 err (_(" * rename_select_load_balancing [nb_rename_bloc] (Tload_balancing_t)\n")); 41 err (_(" * rename_select_nb_front_end_select [nb_rename_bloc] (uint32_t )\n")); 42 err (_(" * nb_general_register [nb_rename_bloc] (uint32_t )\n")); 43 err (_(" * nb_special_register [nb_rename_bloc] (uint32_t )\n")); 44 err (_(" * nb_reg_free [nb_rename_bloc] (uint32_t )\n")); 45 err (_(" * nb_rename_unit_bank [nb_rename_bloc] (uint32_t )\n")); 46 err (_(" * size_read_counter [nb_rename_bloc] (uint32_t )\n")); 47 48 err (_(" * nb_read_bloc (uint32_t )\n")); 49 err (_(" * size_read_queue [nb_read_bloc] (uint32_t )\n")); 50 err (_(" * size_reservation_station [nb_read_bloc] (uint32_t )\n")); 51 err (_(" * nb_inst_retire_reservation_station [nb_read_bloc] (uint32_t )\n")); 52 53 err (_(" * nb_write_bloc (uint32_t )\n")); 54 err (_(" * size_write_queue [nb_write_bloc] (uint32_t )\n")); 55 err (_(" * size_execute_queue [nb_write_bloc] (uint32_t )\n")); 56 err (_(" * nb_bypass_write [nb_write_bloc] (uint32_t )\n")); 57 58 err (_(" * nb_load_store_unit (uint32_t )\n")); 59 err (_(" * size_store_queue [nb_load_store_unit] (uint32_t )\n")); 60 err (_(" * size_load_queue [nb_load_store_unit] (uint32_t )\n")); 61 err (_(" * size_speculative_access_queue [nb_load_store_unit] (uint32_t )\n")); 62 err (_(" * nb_port_check [nb_load_store_unit] (uint32_t )\n")); 63 err (_(" * speculative_load [nb_load_store_unit] (Tspeculative_load)\n")); 64 err (_(" * nb_bypass_memory [nb_load_store_unit] (uint32_t )\n")); 65 err (_(" * nb_cache_port [nb_load_store_unit] (uint32_t )\n")); 66 err (_(" * nb_inst_memory [nb_load_store_unit] (uint32_t )\n")); 67 68 err (_(" * nb_functionnal_unit (uint32_t )\n")); 69 err (_(" * nb_inst_functionnal_unit [nb_functionnal_unit] (uint32_t )\n")); 70 //err (_(" * timing [nb_functionnal_unit][nb_type][nb_operation] (execute_timing_t )\n")); 71 72 err (_(" * nb_icache_port (uint32_t )\n")); 73 err (_(" * icache_port_priority (Tpriority_t )\n")); 74 err (_(" * icache_port_load_balancing (Tload_balancing_t)\n")); 75 76 err (_(" * nb_dcache_port (uint32_t )\n")); 77 err (_(" * dcache_port_priority (Tpriority_t )\n")); 78 err (_(" * dcache_port_load_balancing (Tload_balancing_t)\n")); 79 80 err (_(" * nb_front_end (uint32_t )\n")); 81 err (_(" * nb_context [nb_front_end] (uint32_t )\n")); 82 err (_(" * nb_decod_unit [nb_front_end] (uint32_t )\n")); 83 err (_(" * nb_inst_branch_predict [nb_front_end] (uint32_t )\n")); 84 err (_(" * nb_inst_branch_decod [nb_front_end] (uint32_t )\n")); 85 err (_(" * nb_inst_branch_update [nb_front_end] (uint32_t )\n")); 86 err (_(" * btb_size_queue [nb_front_end] (uint32_t )\n")); 87 err (_(" * btb_associativity [nb_front_end] (uint32_t )\n")); 88 err (_(" * btb_size_counter [nb_front_end] (uint32_t )\n")); 89 err (_(" * btb_victim_scheme [nb_front_end] (Tvictim_t )\n")); 90 err (_(" * dir_predictor_scheme [nb_front_end] (Tpredictor_t )\n")); 91 err (_(" * dir_have_bht [nb_front_end][3] (bool )\n")); 92 err (_(" * dir_bht_size_shifter [nb_front_end][3] (uint32_t )\n")); 93 err (_(" * dir_bht_nb_shifter [nb_front_end][3] (uint32_t )\n")); 94 err (_(" * dir_have_pht [nb_front_end][3] (bool )\n")); 95 err (_(" * dir_pht_size_counter [nb_front_end][3] (uint32_t )\n")); 96 err (_(" * dir_pht_nb_counter [nb_front_end][3] (uint32_t )\n")); 97 err (_(" * dir_pht_size_address_share [nb_front_end][3] (uint32_t )\n")); 98 99 err (_(" * nb_ooo_engine (uint32_t )\n")); 100 err (_(" * nb_rename_unit [nb_ooo_engine] (uint32_t )\n")); 101 err (_(" * nb_inst_issue [nb_ooo_engine] (uint32_t )\n")); 102 err (_(" * nb_inst_reexecute [nb_ooo_engine] (uint32_t )\n")); 103 err (_(" * nb_inst_commit [nb_ooo_engine] (uint32_t )\n")); 104 err (_(" * nb_inst_branch_complete [nb_ooo_engine] (uint32_t )\n")); 105 err (_(" * nb_rename_unit_select [nb_ooo_engine] (uint32_t )\n")); 106 err (_(" * nb_execute_loop_select [nb_ooo_engine] (uint32_t )\n")); 107 err (_(" * size_re_order_buffer [nb_ooo_engine] (uint32_t )\n")); 108 err (_(" * nb_re_order_buffer_bank [nb_ooo_engine] (uint32_t )\n")); 109 err (_(" * commit_priority [nb_ooo_engine] (Tpriority_t )\n")); 110 err (_(" * commit_load_balancing [nb_ooo_engine] (Tload_balancing_t)\n")); 111 err (_(" * size_issue_queue [nb_ooo_engine] (uint32_t )\n")); 112 err (_(" * nb_issue_queue_bank [nb_ooo_engine] (uint32_t )\n")); 113 err (_(" * issue_priority [nb_ooo_engine] (Tpriority_t )\n")); 114 err (_(" * issue_load_balancing [nb_ooo_engine] (Tload_balancing_t)\n")); 115 err (_(" * size_reexecute_queue [nb_ooo_engine] (uint32_t )\n")); 116 err (_(" * reexecute_priority [nb_ooo_engine] (Tpriority_t )\n")); 117 err (_(" * reexecute_load_balancing [nb_ooo_engine] (Tload_balancing_t)\n")); 118 119 err (_(" * nb_execute_loop (uint32_t )\n")); 120 err (_(" * nb_read_unit [nb_execute_loop] (uint32_t )\n")); 121 err (_(" * nb_execute_unit [nb_execute_loop] (uint32_t )\n")); 122 err (_(" * nb_write_unit [nb_execute_loop] (uint32_t )\n")); 123 err (_(" * nb_gpr_bank [nb_execute_loop] (uint32_t )\n")); 124 err (_(" * nb_gpr_port_read_by_bank [nb_execute_loop] (uint32_t )\n")); 125 err (_(" * nb_gpr_port_write_by_bank [nb_execute_loop] (uint32_t )\n")); 126 err (_(" * nb_spr_bank [nb_execute_loop] (uint32_t )\n")); 127 err (_(" * nb_spr_port_read_by_bank [nb_execute_loop] (uint32_t )\n")); 128 err (_(" * nb_spr_port_write_by_bank [nb_execute_loop] (uint32_t )\n")); 129 err (_(" * execution_unit_to_write_unit_priority [nb_execute_loop] (Tpriority_t )\n")); 130 err (_(" * read_unit_to_execution_unit_priority [nb_execute_loop] (Tpriority_t )\n")); 131 132 err (_(" * link_context_with_thread [nb_thread] (pair_dual )\n")); 133 err (_(" * link_decod_unit_with_decod_bloc [nb_decod_bloc] (pair_dual )\n")); 134 err (_(" * link_rename_unit_with_rename_bloc [nb_rename_bloc] (pair_dual )\n")); 135 err (_(" * link_read_unit_with_read_bloc [nb_read_bloc] (pair_dual )\n")); 136 err (_(" * link_write_unit_with_write_bloc [nb_write_bloc] (pair_dual )\n")); 137 err (_(" * link_execute_unit_with_functionnal_unit [nb_functionnal_unit] (pair_dual )\n")); 138 err (_(" * link_execute_unit_with_load_store_unit [nb_load_store_unit] (pair_dual )\n")); 139 err (_(" * link_decod_bloc_with_thread [nb_thread] (uint32_t )\n")); 140 err (_(" * link_rename_bloc_with_front_end [nb_front_end] (uint32_t )\n")); 141 err (_(" * table_dispatch [nb_ooo_engine][nb_inst_issue][nb_read_bloc] (bool )\n")); 142 err (_(" * link_read_bloc_and_load_store_unit [nb_read_bloc][nb_load_store_unit] (bool )\n")); 143 err (_(" * link_read_bloc_and_functionnal_unit [nb_read_bloc][nb_functionnal_unit] (bool )\n")); 144 err (_(" * link_write_bloc_and_load_store_unit [nb_write_bloc][nb_load_store_unit] (bool )\n")); 145 err (_(" * link_write_bloc_and_functionnal_unit [nb_write_bloc][nb_functionnal_unit] (bool )\n")); 146 err (_(" * link_load_store_unit_with_thread [nb_thread] (uint32_t )\n")); 147 err (_(" * link_thread_and_functionnal_unit [nb_thread][nb_functionnal_unit] (bool )\n")); 148 err (_(" * link_icache_port_with_thread [nb_thread] (uint32_t )\n")); 149 err (_(" * link_dcache_port_with_load_store_unit [nb_load_store_unit][nb_cache_port] (uint32_t )\n")); 150 151 err (_(" * dispatch_priority (Tpriority_t )\n")); 152 err (_(" * dispatch_load_balancing (Tload_balancing_t)\n")); 17 err (_(" * size_general_data (uint32_t )\n")); 18 err (_(" * size_special_data (uint32_t )\n")); 19 //morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void), 20 21 err (_(" * nb_thread (uint32_t )\n")); 22 err (_(" * size_ifetch_queue [nb_thread] (uint32_t )\n")); 23 err (_(" * nb_inst_fetch [nb_thread] (uint32_t )\n")); 24 //err (_(" * implement_group [nb_thread][NB_GROUP] (bool )\n")); 25 err (_(" * ras_size_queue [nb_thread] (uint32_t )\n")); 26 err (_(" * upt_size_queue [nb_thread] (uint32_t )\n")); 27 err (_(" * ufpt_size_queue [nb_thread] (uint32_t )\n")); 28 29 err (_(" * nb_decod_bloc (uint32_t )\n")); 30 err (_(" * size_decod_queue [nb_decod_bloc] (uint32_t )\n")); 31 err (_(" * decod_queue_scheme [nb_decod_bloc] (Tdecod_queue_scheme_t)\n")); 32 err (_(" * nb_inst_decod [nb_decod_bloc] (uint32_t )\n")); 33 err (_(" * nb_context_select [nb_decod_bloc] (uint32_t )\n")); 34 err (_(" * context_select_priority [nb_decod_bloc] (Tpriority_t )\n")); 35 err (_(" * context_select_load_balancing [nb_decod_bloc] (Tload_balancing_t )\n")); 36 37 err (_(" * nb_rename_bloc (uint32_t )\n")); 38 err (_(" * nb_inst_insert [nb_rename_bloc] (uint32_t )\n")); 39 err (_(" * nb_inst_retire [nb_rename_bloc] (uint32_t )\n")); 40 err (_(" * rename_select_priority [nb_rename_bloc] (Tpriority_t )\n")); 41 err (_(" * rename_select_load_balancing [nb_rename_bloc] (Tload_balancing_t )\n")); 42 err (_(" * rename_select_nb_front_end_select [nb_rename_bloc] (uint32_t )\n")); 43 err (_(" * nb_general_register [nb_rename_bloc] (uint32_t )\n")); 44 err (_(" * nb_special_register [nb_rename_bloc] (uint32_t )\n")); 45 err (_(" * nb_reg_free [nb_rename_bloc] (uint32_t )\n")); 46 err (_(" * nb_rename_unit_bank [nb_rename_bloc] (uint32_t )\n")); 47 err (_(" * size_read_counter [nb_rename_bloc] (uint32_t )\n")); 48 49 err (_(" * nb_read_bloc (uint32_t )\n")); 50 err (_(" * size_read_queue [nb_read_bloc] (uint32_t )\n")); 51 err (_(" * size_reservation_station [nb_read_bloc] (uint32_t )\n")); 52 err (_(" * nb_inst_retire_reservation_station [nb_read_bloc] (uint32_t )\n")); 53 54 err (_(" * nb_write_bloc (uint32_t )\n")); 55 err (_(" * size_write_queue [nb_write_bloc] (uint32_t )\n")); 56 err (_(" * size_execute_queue [nb_write_bloc] (uint32_t )\n")); 57 err (_(" * nb_bypass_write [nb_write_bloc] (uint32_t )\n")); 58 59 err (_(" * nb_load_store_unit (uint32_t )\n")); 60 err (_(" * size_store_queue [nb_load_store_unit] (uint32_t )\n")); 61 err (_(" * size_load_queue [nb_load_store_unit] (uint32_t )\n")); 62 err (_(" * size_speculative_access_queue [nb_load_store_unit] (uint32_t )\n")); 63 err (_(" * nb_port_check [nb_load_store_unit] (uint32_t )\n")); 64 err (_(" * speculative_load [nb_load_store_unit] (Tspeculative_load )\n")); 65 err (_(" * nb_bypass_memory [nb_load_store_unit] (uint32_t )\n")); 66 err (_(" * nb_cache_port [nb_load_store_unit] (uint32_t )\n")); 67 err (_(" * nb_inst_memory [nb_load_store_unit] (uint32_t )\n")); 68 69 err (_(" * nb_functionnal_unit (uint32_t )\n")); 70 err (_(" * nb_inst_functionnal_unit [nb_functionnal_unit] (uint32_t )\n")); 71 //err (_(" * timing [nb_functionnal_unit][nb_type][nb_operation] (execute_timing_t )\n")); 72 73 err (_(" * nb_icache_port (uint32_t )\n")); 74 err (_(" * icache_port_priority (Tpriority_t )\n")); 75 err (_(" * icache_port_load_balancing (Tload_balancing_t )\n")); 76 77 err (_(" * nb_dcache_port (uint32_t )\n")); 78 err (_(" * dcache_port_priority (Tpriority_t )\n")); 79 err (_(" * dcache_port_load_balancing (Tload_balancing_t )\n")); 80 81 err (_(" * nb_front_end (uint32_t )\n")); 82 err (_(" * nb_context [nb_front_end] (uint32_t )\n")); 83 err (_(" * nb_decod_unit [nb_front_end] (uint32_t )\n")); 84 err (_(" * nb_inst_branch_predict [nb_front_end] (uint32_t )\n")); 85 err (_(" * nb_inst_branch_decod [nb_front_end] (uint32_t )\n")); 86 err (_(" * nb_inst_branch_update [nb_front_end] (uint32_t )\n")); 87 err (_(" * btb_size_queue [nb_front_end] (uint32_t )\n")); 88 err (_(" * btb_associativity [nb_front_end] (uint32_t )\n")); 89 err (_(" * btb_size_counter [nb_front_end] (uint32_t )\n")); 90 err (_(" * btb_victim_scheme [nb_front_end] (Tvictim_t )\n")); 91 err (_(" * dir_predictor_scheme [nb_front_end] (Tpredictor_t )\n")); 92 err (_(" * dir_have_bht [nb_front_end][3] (bool )\n")); 93 err (_(" * dir_bht_size_shifter [nb_front_end][3] (uint32_t )\n")); 94 err (_(" * dir_bht_nb_shifter [nb_front_end][3] (uint32_t )\n")); 95 err (_(" * dir_have_pht [nb_front_end][3] (bool )\n")); 96 err (_(" * dir_pht_size_counter [nb_front_end][3] (uint32_t )\n")); 97 err (_(" * dir_pht_nb_counter [nb_front_end][3] (uint32_t )\n")); 98 err (_(" * dir_pht_size_address_share [nb_front_end][3] (uint32_t )\n")); 99 100 err (_(" * nb_ooo_engine (uint32_t )\n")); 101 err (_(" * nb_rename_unit [nb_ooo_engine] (uint32_t )\n")); 102 err (_(" * nb_inst_issue [nb_ooo_engine] (uint32_t )\n")); 103 err (_(" * nb_inst_reexecute [nb_ooo_engine] (uint32_t )\n")); 104 err (_(" * nb_inst_commit [nb_ooo_engine] (uint32_t )\n")); 105 err (_(" * nb_inst_branch_complete [nb_ooo_engine] (uint32_t )\n")); 106 err (_(" * nb_rename_unit_select [nb_ooo_engine] (uint32_t )\n")); 107 err (_(" * nb_execute_loop_select [nb_ooo_engine] (uint32_t )\n")); 108 err (_(" * size_re_order_buffer [nb_ooo_engine] (uint32_t )\n")); 109 err (_(" * nb_re_order_buffer_bank [nb_ooo_engine] (uint32_t )\n")); 110 err (_(" * commit_priority [nb_ooo_engine] (Tpriority_t )\n")); 111 err (_(" * commit_load_balancing [nb_ooo_engine] (Tload_balancing_t )\n")); 112 err (_(" * size_issue_queue [nb_ooo_engine] (uint32_t )\n")); 113 err (_(" * issue_queue_scheme [nb_ooo_engine] (Tissue_queue_scheme_t)\n")); 114 err (_(" * nb_issue_queue_bank [nb_ooo_engine] (uint32_t )\n")); 115 err (_(" * issue_priority [nb_ooo_engine] (Tpriority_t )\n")); 116 err (_(" * issue_load_balancing [nb_ooo_engine] (Tload_balancing_t )\n")); 117 err (_(" * size_reexecute_queue [nb_ooo_engine] (uint32_t )\n")); 118 err (_(" * reexecute_priority [nb_ooo_engine] (Tpriority_t )\n")); 119 err (_(" * reexecute_load_balancing [nb_ooo_engine] (Tload_balancing_t )\n")); 120 121 err (_(" * nb_execute_loop (uint32_t )\n")); 122 err (_(" * nb_read_unit [nb_execute_loop] (uint32_t )\n")); 123 err (_(" * nb_execute_unit [nb_execute_loop] (uint32_t )\n")); 124 err (_(" * nb_write_unit [nb_execute_loop] (uint32_t )\n")); 125 err (_(" * nb_gpr_bank [nb_execute_loop] (uint32_t )\n")); 126 err (_(" * nb_gpr_port_read_by_bank [nb_execute_loop] (uint32_t )\n")); 127 err (_(" * nb_gpr_port_write_by_bank [nb_execute_loop] (uint32_t )\n")); 128 err (_(" * nb_spr_bank [nb_execute_loop] (uint32_t )\n")); 129 err (_(" * nb_spr_port_read_by_bank [nb_execute_loop] (uint32_t )\n")); 130 err (_(" * nb_spr_port_write_by_bank [nb_execute_loop] (uint32_t )\n")); 131 err (_(" * execution_unit_to_write_unit_priority [nb_execute_loop] (Tpriority_t )\n")); 132 err (_(" * read_unit_to_execution_unit_priority [nb_execute_loop] (Tpriority_t )\n")); 133 134 err (_(" * link_context_with_thread [nb_thread] (pair_dual )\n")); 135 err (_(" * link_decod_unit_with_decod_bloc [nb_decod_bloc] (pair_dual )\n")); 136 err (_(" * link_rename_unit_with_rename_bloc [nb_rename_bloc] (pair_dual )\n")); 137 err (_(" * link_read_unit_with_read_bloc [nb_read_bloc] (pair_dual )\n")); 138 err (_(" * link_write_unit_with_write_bloc [nb_write_bloc] (pair_dual )\n")); 139 err (_(" * link_execute_unit_with_functionnal_unit [nb_functionnal_unit] (pair_dual )\n")); 140 err (_(" * link_execute_unit_with_load_store_unit [nb_load_store_unit] (pair_dual )\n")); 141 err (_(" * link_decod_bloc_with_thread [nb_thread] (uint32_t )\n")); 142 err (_(" * link_rename_bloc_with_front_end [nb_front_end] (uint32_t )\n")); 143 err (_(" * table_dispatch [nb_ooo_engine][nb_inst_issue][nb_read_bloc] (bool )\n")); 144 err (_(" * link_read_bloc_and_load_store_unit [nb_read_bloc][nb_load_store_unit] (bool )\n")); 145 err (_(" * link_read_bloc_and_functionnal_unit [nb_read_bloc][nb_functionnal_unit] (bool )\n")); 146 err (_(" * link_write_bloc_and_load_store_unit [nb_write_bloc][nb_load_store_unit] (bool )\n")); 147 err (_(" * link_write_bloc_and_functionnal_unit [nb_write_bloc][nb_functionnal_unit] (bool )\n")); 148 err (_(" * link_load_store_unit_with_thread [nb_thread] (uint32_t )\n")); 149 err (_(" * link_thread_and_functionnal_unit [nb_thread][nb_functionnal_unit] (bool )\n")); 150 err (_(" * link_icache_port_with_thread [nb_thread] (uint32_t )\n")); 151 err (_(" * link_dcache_port_with_load_store_unit [nb_load_store_unit][nb_cache_port] (uint32_t )\n")); 152 153 err (_(" * dispatch_priority (Tpriority_t )\n")); 154 err (_(" * dispatch_load_balancing (Tload_balancing_t )\n")); 153 155 err (_("\n")); 154 156 err (_(" - pair_dual : first = x div 1000, second = x mod 1000\n")); … … 189 191 uint32_t _nb_decod_bloc ;// 190 192 uint32_t * _size_decod_queue ;//[nb_decod_bloc] 193 multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t 194 * _decod_queue_scheme ;//[nb_decod_bloc] 191 195 uint32_t * _nb_inst_decod ;//[nb_decod_bloc] 192 196 uint32_t * _nb_context_select ;//[nb_decod_bloc] … … 281 285 Tload_balancing_t * _commit_load_balancing ;//[nb_ooo_engine] 282 286 uint32_t * _size_issue_queue ;//[nb_ooo_engine] 287 multi_ooo_engine::ooo_engine::issue_queue::Tissue_queue_scheme_t 288 * _issue_queue_scheme ;//[nb_ooo_engine] 283 289 uint32_t * _nb_issue_queue_bank ;//[nb_ooo_engine] 284 290 Tpriority_t * _issue_priority ;//[nb_ooo_engine] … … 354 360 SELFTEST0(_nb_decod_bloc ,uint32_t ,argv,x); 355 361 356 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+ 5*_nb_decod_bloc))362 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc)) 357 363 usage (argc, argv); 358 364 359 365 SELFTEST1(_size_decod_queue ,uint32_t ,argv,x,_nb_decod_bloc); 366 SELFTEST1(_decod_queue_scheme ,multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t,argv,x,_nb_decod_bloc); 360 367 SELFTEST1(_nb_inst_decod ,uint32_t ,argv,x,_nb_decod_bloc); 361 368 SELFTEST1(_nb_context_select ,uint32_t ,argv,x,_nb_decod_bloc); … … 367 374 SELFTEST0(_nb_rename_bloc ,uint32_t ,argv,x); 368 375 369 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+ 5*_nb_decod_bloc+10*_nb_rename_bloc))376 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+10*_nb_rename_bloc)) 370 377 usage (argc, argv); 371 378 … … 385 392 SELFTEST0(_nb_read_bloc ,uint32_t ,argv,x); 386 393 387 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+ 5*_nb_decod_bloc+10*_nb_rename_bloc+3*_nb_read_bloc))394 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+10*_nb_rename_bloc+3*_nb_read_bloc)) 388 395 usage (argc, argv); 389 396 … … 396 403 SELFTEST0(_nb_write_bloc ,uint32_t ,argv,x); 397 404 398 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+ 5*_nb_decod_bloc+10*_nb_rename_bloc+3*_nb_read_bloc+3*_nb_write_bloc))405 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+10*_nb_rename_bloc+3*_nb_read_bloc+3*_nb_write_bloc)) 399 406 usage (argc, argv); 400 407 … … 407 414 SELFTEST0(_nb_load_store_unit ,uint32_t ,argv,x); 408 415 409 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+ 5*_nb_decod_bloc+10*_nb_rename_bloc+3*_nb_read_bloc+3*_nb_write_bloc+8*_nb_load_store_unit))416 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+10*_nb_rename_bloc+3*_nb_read_bloc+3*_nb_write_bloc+8*_nb_load_store_unit)) 410 417 usage (argc, argv); 411 418 … … 424 431 SELFTEST0(_nb_functionnal_unit ,uint32_t ,argv,x); 425 432 426 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+ 5*_nb_decod_bloc+10*_nb_rename_bloc+3*_nb_read_bloc+3*_nb_write_bloc+8*_nb_load_store_unit+1*_nb_functionnal_unit))433 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+10*_nb_rename_bloc+3*_nb_read_bloc+3*_nb_write_bloc+8*_nb_load_store_unit+1*_nb_functionnal_unit)) 427 434 usage (argc, argv); 428 435 … … 467 474 SELFTEST0(_nb_front_end ,uint32_t ,argv,x); 468 475 469 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+ 5*_nb_decod_bloc+10*_nb_rename_bloc+3*_nb_read_bloc+3*_nb_write_bloc+8*_nb_load_store_unit+1*_nb_functionnal_unit+31*_nb_front_end))476 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+10*_nb_rename_bloc+3*_nb_read_bloc+3*_nb_write_bloc+8*_nb_load_store_unit+1*_nb_functionnal_unit+31*_nb_front_end)) 470 477 usage (argc, argv); 471 478 … … 494 501 SELFTEST0(_nb_ooo_engine ,uint32_t ,argv,x); 495 502 496 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+ 5*_nb_decod_bloc+10*_nb_rename_bloc+3*_nb_read_bloc+3*_nb_write_bloc+8*_nb_load_store_unit+1*_nb_functionnal_unit+31*_nb_front_end+18*_nb_ooo_engine))503 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+10*_nb_rename_bloc+3*_nb_read_bloc+3*_nb_write_bloc+8*_nb_load_store_unit+1*_nb_functionnal_unit+31*_nb_front_end+19*_nb_ooo_engine)) 497 504 usage (argc, argv); 498 505 … … 509 516 SELFTEST1(_commit_load_balancing ,Tload_balancing_t ,argv,x,_nb_ooo_engine); 510 517 SELFTEST1(_size_issue_queue ,uint32_t ,argv,x,_nb_ooo_engine); 518 SELFTEST1(_issue_queue_scheme ,multi_ooo_engine::ooo_engine::issue_queue::Tissue_queue_scheme_t,argv,x,_nb_ooo_engine); 511 519 SELFTEST1(_nb_issue_queue_bank ,uint32_t ,argv,x,_nb_ooo_engine); 512 520 SELFTEST1(_issue_priority ,Tpriority_t ,argv,x,_nb_ooo_engine); … … 521 529 SELFTEST0(_nb_execute_loop ,uint32_t ,argv,x); 522 530 523 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+ 5*_nb_decod_bloc+10*_nb_rename_bloc+3*_nb_read_bloc+3*_nb_write_bloc+8*_nb_load_store_unit+1*_nb_functionnal_unit+31*_nb_front_end+18*_nb_ooo_engine+11*_nb_execute_loop))531 if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+10*_nb_rename_bloc+3*_nb_read_bloc+3*_nb_write_bloc+8*_nb_load_store_unit+1*_nb_functionnal_unit+31*_nb_front_end+19*_nb_ooo_engine+11*_nb_execute_loop)) 524 532 usage (argc, argv); 525 533 … … 539 547 printf(" * Link\n"); 540 548 541 if (argc < static_cast<int>(2+NB_PARAMS+6*_nb_thread+6*_nb_decod_bloc+11*_nb_rename_bloc+4*_nb_read_bloc+4*_nb_write_bloc+9*_nb_load_store_unit+2*_nb_functionnal_unit+31*_nb_front_end+1 8*_nb_ooo_engine+11*_nb_execute_loop))549 if (argc < static_cast<int>(2+NB_PARAMS+6*_nb_thread+6*_nb_decod_bloc+11*_nb_rename_bloc+4*_nb_read_bloc+4*_nb_write_bloc+9*_nb_load_store_unit+2*_nb_functionnal_unit+31*_nb_front_end+19*_nb_ooo_engine+11*_nb_execute_loop)) 542 550 usage (argc, argv); 543 551 … … 593 601 _sum_cache_port += _nb_cache_port[i]; 594 602 595 if (argc != static_cast<int>(2+NB_PARAMS+6*_nb_thread+6*_nb_decod_bloc+11*_nb_rename_bloc+4*_nb_read_bloc+4*_nb_write_bloc+9*_nb_load_store_unit+2*_nb_functionnal_unit+31*_nb_front_end+1 8*_nb_ooo_engine+11*_nb_execute_loop+603 if (argc != static_cast<int>(2+NB_PARAMS+6*_nb_thread+6*_nb_decod_bloc+11*_nb_rename_bloc+4*_nb_read_bloc+4*_nb_write_bloc+9*_nb_load_store_unit+2*_nb_functionnal_unit+31*_nb_front_end+19*_nb_ooo_engine+11*_nb_execute_loop+ 596 604 3*_nb_thread+_nb_front_end+_sum_inst_issue*_nb_read_bloc+_nb_load_store_unit*(_nb_read_bloc+_nb_write_bloc+_nb_thread)+_nb_functionnal_unit*(_nb_read_bloc+_nb_write_bloc)+_sum_cache_port)) 597 605 usage (argc, argv); … … 633 641 _nb_decod_bloc , 634 642 _size_decod_queue , 643 _decod_queue_scheme , 635 644 _nb_inst_decod , 636 645 _nb_context_select , … … 714 723 _commit_load_balancing , 715 724 _size_issue_queue , 725 _issue_queue_scheme , 716 726 _nb_issue_queue_bank , 717 727 _issue_priority , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/include/Parameters.h
r110 r111 51 51 public : uint32_t _nb_decod_bloc ;// 52 52 public : uint32_t * _size_decod_queue ;//[nb_decod_bloc] 53 public : multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t 54 * _decod_queue_scheme ;//[nb_decod_bloc] 53 55 public : uint32_t * _nb_inst_decod ;//[nb_decod_bloc] 54 56 public : uint32_t * _nb_context_select ;//[nb_decod_bloc] … … 143 145 public : Tload_balancing_t * _commit_load_balancing ;//[nb_ooo_engine] 144 146 public : uint32_t * _size_issue_queue ;//[nb_ooo_engine] 147 public : multi_ooo_engine::ooo_engine::issue_queue::Tissue_queue_scheme_t 148 * _issue_queue_scheme ;//[nb_ooo_engine] 145 149 public : uint32_t * _nb_issue_queue_bank ;//[nb_ooo_engine] 146 150 public : Tpriority_t * _issue_priority ;//[nb_ooo_engine] … … 215 219 public : uint32_t * _front_end_nb_inst_branch_complete ;//[nb_front_end] 216 220 public : uint32_t ** _front_end_size_decod_queue ;//[nb_front_end][nb_decod_unit] 221 public : multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t 222 ** _front_end_decod_queue_scheme ;//[nb_front_end][nb_decod_unit] 223 217 224 public : uint32_t ** _front_end_nb_inst_decod ;//[nb_front_end][nb_decod_unit] 218 225 public : uint32_t * _front_end_sum_inst_decod ;//[nb_front_end] … … 223 230 public : uint32_t ** _front_end_upt_size_queue ;//[nb_front_end][nb_context] 224 231 public : uint32_t ** _front_end_ufpt_size_queue ;//[nb_front_end][nb_context] 232 //public : uint32_t ** _front_end_translate_num_context_to_num_thread ;//[nb_front_end][nb_context] 225 233 226 234 // translate for ooo_engine … … 355 363 uint32_t nb_decod_bloc , 356 364 uint32_t * size_decod_queue ,//[nb_decod_bloc] 365 multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t 366 * decod_queue_scheme ,//[nb_decod_bloc] 357 367 uint32_t * nb_inst_decod ,//[nb_decod_bloc] 358 368 uint32_t * nb_context_select ,//[nb_decod_bloc] … … 447 457 Tload_balancing_t * commit_load_balancing ,//[nb_ooo_engine] 448 458 uint32_t * size_issue_queue ,//[nb_ooo_engine] 459 multi_ooo_engine::ooo_engine::issue_queue::Tissue_queue_scheme_t 460 * issue_queue_scheme ,//[nb_ooo_engine] 449 461 uint32_t * nb_issue_queue_bank ,//[nb_ooo_engine] 450 462 Tpriority_t * issue_priority ,//[nb_ooo_engine] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters.cpp
r110 r111 89 89 uint32_t nb_decod_bloc , 90 90 uint32_t * size_decod_queue ,//[nb_decod_bloc] 91 multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t 92 * decod_queue_scheme ,//[nb_decod_bloc] 91 93 uint32_t * nb_inst_decod ,//[nb_decod_bloc] 92 94 uint32_t * nb_context_select ,//[nb_decod_bloc] … … 181 183 Tload_balancing_t * commit_load_balancing ,//[nb_ooo_engine] 182 184 uint32_t * size_issue_queue ,//[nb_ooo_engine] 185 multi_ooo_engine::ooo_engine::issue_queue::Tissue_queue_scheme_t 186 * issue_queue_scheme ,//[nb_ooo_engine] 183 187 uint32_t * nb_issue_queue_bank ,//[nb_ooo_engine] 184 188 Tpriority_t * issue_priority ,//[nb_ooo_engine] … … 242 246 _nb_decod_bloc = nb_decod_bloc ; 243 247 _size_decod_queue = size_decod_queue ; 248 _decod_queue_scheme = decod_queue_scheme ; 244 249 _nb_inst_decod = nb_inst_decod ; 245 250 _nb_context_select = nb_context_select ; … … 323 328 _commit_load_balancing = commit_load_balancing ; 324 329 _size_issue_queue = size_issue_queue ; 330 _issue_queue_scheme = issue_queue_scheme ; 325 331 _nb_issue_queue_bank = nb_issue_queue_bank ; 326 332 _issue_priority = issue_priority ; … … 786 792 ALLOC1(_front_end_nb_inst_branch_complete ,uint32_t ,_nb_front_end); 787 793 ALLOC2(_front_end_size_decod_queue ,uint32_t ,_nb_front_end,_nb_decod_unit[it1]); 794 ALLOC2(_front_end_decod_queue_scheme ,multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t 795 ,_nb_front_end,_nb_decod_unit[it1]); 788 796 ALLOC2(_front_end_nb_inst_decod ,uint32_t ,_nb_front_end,_nb_decod_unit[it1]); 789 797 ALLOC1(_front_end_sum_inst_decod ,uint32_t ,_nb_front_end); … … 804 812 805 813 _front_end_size_decod_queue [i][j] = _size_decod_queue [num_decod_bloc]; 814 _front_end_decod_queue_scheme [i][j] = _decod_queue_scheme [num_decod_bloc]; 806 815 _front_end_nb_inst_decod [i][j] = _nb_inst_decod [num_decod_bloc]; 807 816 _front_end_sum_inst_decod [i] += _nb_inst_decod [num_decod_bloc]; … … 1835 1844 _front_end_link_decod_unit_with_context [i], 1836 1845 _front_end_size_decod_queue [i], 1846 _front_end_decod_queue_scheme [i], 1837 1847 _front_end_nb_inst_decod [i], 1838 1848 _front_end_nb_context_select [i], … … 1858 1868 _front_end_upt_size_queue [i], 1859 1869 _front_end_ufpt_size_queue [i], 1860 _size_nb_inst_commit 1870 _size_nb_inst_commit , 1871 _nb_thread , 1872 _link_thread_with_context [i] 1861 1873 ); 1862 1874 … … 1890 1902 _commit_load_balancing [i], 1891 1903 _size_issue_queue [i], 1904 _issue_queue_scheme [i], 1892 1905 _nb_issue_queue_bank [i], 1893 1906 _issue_priority [i], … … 2153 2166 DELETE1(_front_end_sum_inst_decod ,_nb_front_end); 2154 2167 DELETE2(_front_end_nb_inst_decod ,_nb_front_end,_nb_decod_unit[it1]); 2168 DELETE2(_front_end_decod_queue_scheme ,_nb_front_end,_nb_decod_unit[it1]); 2155 2169 DELETE2(_front_end_size_decod_queue ,_nb_front_end,_nb_decod_unit[it1]); 2156 2170 DELETE1(_front_end_nb_inst_branch_complete ,_nb_front_end); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters_print.cpp
r97 r111 59 59 60 60 str+= toString(MSG_INFORMATION)+" * size_decod_queue : "+toString<uint32_t >(_size_decod_queue [i])+"\n"; 61 str+= toString(MSG_INFORMATION)+" * decod_queue_scheme : "+toString<multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t> 62 (_decod_queue_scheme [i])+"\n"; 61 63 str+= toString(MSG_INFORMATION)+" * nb_inst_decod : "+toString<uint32_t >(_nb_inst_decod [i])+"\n"; 62 64 str+= toString(MSG_INFORMATION)+" * nb_context_select : "+toString<uint32_t >(_nb_context_select [i])+"\n"; … … 182 184 str+= toString(MSG_INFORMATION)+" * commit_load_balancing : "+toString<Tload_balancing_t>(_commit_load_balancing [i])+"\n"; 183 185 str+= toString(MSG_INFORMATION)+" * size_issue_queue : "+toString<uint32_t >(_size_issue_queue [i])+"\n"; 186 str+= toString(MSG_INFORMATION)+" * issue_queue_scheme : "+toString<multi_ooo_engine::ooo_engine::issue_queue::Tissue_queue_scheme_t> 187 (_issue_queue_scheme [i])+"\n"; 184 188 str+= toString(MSG_INFORMATION)+" * nb_issue_queue_bank : "+toString<uint32_t >(_nb_issue_queue_bank [i])+"\n"; 185 189 str+= toString(MSG_INFORMATION)+" * issue_priority : "+toString<Tpriority_t >(_issue_priority [i])+"\n"; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp
r106 r111 87 87 88 88 #if defined(DEBUG_RegisterFile_Monolithic) and DEBUG_RegisterFile_Monolithic and (DEBUG >= DEBUG_TRACE) 89 if (0) 89 90 { 90 91 log_printf(TRACE,RegisterFile,FUNCTION," * Dump RegisterFile"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_transition.cpp
r106 r111 38 38 39 39 #if defined(DEBUG_RegisterFile_Multi_Banked) and DEBUG_RegisterFile_Multi_Banked and (DEBUG >= DEBUG_TRACE) 40 if (0) 40 41 { 41 42 log_printf(TRACE,RegisterFile,FUNCTION," * Dump RegisterFile"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h
r88 r111 14 14 // =====[ ALLOCATION / DELETE of ARRAY ]================================= 15 15 // ====================================================================== 16 17 16 #define ALLOC1(var,type,s1) \ 18 17 var = new type [s1] … … 50 49 } \ 51 50 } 51 52 #define DELETE0(var) \ 53 delete var; 52 54 53 55 #define DELETE1(var,s1) \ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Types.h
r97 r111 44 44 45 45 // ~~~~~ prediction_unit 46 typedef uint 8_tThistory_t;46 typedef uint32_t Thistory_t; 47 47 typedef Tptr_t Tprediction_ptr_t; 48 48 typedef uint8_t Tbranch_state_t; … … 165 165 template<> inline morpheo::behavioural::Tpriority_t fromString<morpheo::behavioural::Tpriority_t>(const std::string& x) 166 166 { 167 if ( (x.compare( "0")== 0) or167 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PRIORITY_STATIC))) == 0) or 168 168 (x.compare("priority_static") == 0)) 169 169 return morpheo::behavioural::PRIORITY_STATIC; 170 if ( (x.compare( "1")== 0) or170 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PRIORITY_ROUND_ROBIN))) == 0) or 171 171 (x.compare("priority_round_robin") == 0)) 172 172 return morpheo::behavioural::PRIORITY_ROUND_ROBIN; … … 186 186 template<> inline morpheo::behavioural::Tload_balancing_t fromString<morpheo::behavioural::Tload_balancing_t>(const std::string& x) 187 187 { 188 if ( (x.compare( "0")== 0) or188 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::LOAD_BALANCING_BALANCE))) == 0) or 189 189 (x.compare("load_balancing_balance") == 0)) 190 190 return morpheo::behavioural::LOAD_BALANCING_BALANCE; 191 if ( (x.compare( "1")== 0) or191 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::LOAD_BALANCING_MAXIMUM_FOR_PRIORITY))) == 0) or 192 192 (x.compare("load_balancing_maximum_for_priority") == 0)) 193 193 return morpheo::behavioural::LOAD_BALANCING_MAXIMUM_FOR_PRIORITY; … … 211 211 template<> inline morpheo::behavioural::Tvictim_t fromString<morpheo::behavioural::Tvictim_t>(const std::string& x) 212 212 { 213 if ( (x.compare( "0")== 0) or213 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_RANDOM ))) == 0) or 214 214 (x.compare("victim_random") == 0)) 215 215 return morpheo::behavioural::VICTIM_RANDOM; 216 if ( (x.compare( "1")== 0) or216 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_ROUND_ROBIN))) == 0) or 217 217 (x.compare("victim_round_robin") == 0)) 218 218 return morpheo::behavioural::VICTIM_ROUND_ROBIN; 219 if ( (x.compare( "2")== 0) or219 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_NLU ))) == 0) or 220 220 (x.compare("victim_nlu") == 0)) 221 221 return morpheo::behavioural::VICTIM_NLU; 222 if ( (x.compare( "3")== 0) or222 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_PSEUDO_LRU ))) == 0) or 223 223 (x.compare("victim_pseudo_lru") == 0)) 224 224 return morpheo::behavioural::VICTIM_PSEUDO_LRU; 225 if ( (x.compare( "4")== 0) or225 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_LRU ))) == 0) or 226 226 (x.compare("victim_lru") == 0)) 227 227 return morpheo::behavioural::VICTIM_LRU; 228 if ( (x.compare( "5")== 0) or228 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::VICTIM_FIFO ))) == 0) or 229 229 (x.compare("victim_fifo") == 0)) 230 230 return morpheo::behavioural::VICTIM_FIFO; … … 251 251 template<> inline morpheo::behavioural::Tpredictor_t fromString<morpheo::behavioural::Tpredictor_t>(const std::string& x) 252 252 { 253 if ( (x.compare( "0")== 0) or253 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_NEVER_TAKE ))) == 0) or 254 254 (x.compare("predictor_never_take") == 0)) 255 255 return morpheo::behavioural::PREDICTOR_NEVER_TAKE; 256 if ( (x.compare( "1")== 0) or256 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_ALWAYS_TAKE))) == 0) or 257 257 (x.compare("predictor_always_take") == 0)) 258 258 return morpheo::behavioural::PREDICTOR_ALWAYS_TAKE; 259 if ( (x.compare( "2")== 0) or259 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_STATIC ))) == 0) or 260 260 (x.compare("predictor_static") == 0)) 261 261 return morpheo::behavioural::PREDICTOR_STATIC; 262 if ( (x.compare( "3")== 0) or262 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_LAST_TAKE ))) == 0) or 263 263 (x.compare("predictor_last_take") == 0)) 264 264 return morpheo::behavioural::PREDICTOR_LAST_TAKE; 265 if ( (x.compare( "4")== 0) or265 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_COUNTER ))) == 0) or 266 266 (x.compare("predictor_counter") == 0)) 267 267 return morpheo::behavioural::PREDICTOR_COUNTER; 268 if ( (x.compare( "5")== 0) or268 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_LOCAL ))) == 0) or 269 269 (x.compare("predictor_local") == 0)) 270 270 return morpheo::behavioural::PREDICTOR_LOCAL; 271 if ( (x.compare( "6")== 0) or271 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_GLOBAL ))) == 0) or 272 272 (x.compare("predictor_global") == 0)) 273 273 return morpheo::behavioural::PREDICTOR_GLOBAL; 274 if ( (x.compare( "7")== 0) or274 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_META ))) == 0) or 275 275 (x.compare("predictor_meta") == 0)) 276 276 return morpheo::behavioural::PREDICTOR_META; 277 if ( (x.compare( "8")== 0) or277 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PREDICTOR_CUSTOM ))) == 0) or 278 278 (x.compare("predictor_custom") == 0)) 279 279 return morpheo::behavioural::PREDICTOR_CUSTOM; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h
r110 r111 10 10 #define MORPHEO_MAJOR_VERSION "0" 11 11 #define MORPHEO_MINOR_VERSION "2" 12 #define MORPHEO_REVISION "11 0"12 #define MORPHEO_REVISION "111" 13 13 #define MORPHEO_CODENAME "Castor" 14 14 15 #define MORPHEO_DATE_DAY " 19"15 #define MORPHEO_DATE_DAY "27" 16 16 #define MORPHEO_DATE_MONTH "02" 17 17 #define MORPHEO_DATE_YEAR "2009"
Note: See TracChangeset
for help on using the changeset viewer.