- Timestamp:
- Dec 19, 2008, 4:34:00 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/SelfTest/src/test.cpp
r88 r97 10 10 #include "Behavioural/Custom/include/Custom_default.h" 11 11 #include "Behavioural/Custom/include/Custom_example.h" 12 #include "Common/include/Time.h" 12 13 13 14 void test (string name) 14 15 { 16 Time * timing = new Time (false); 17 15 18 morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (void) = &(morpheo::behavioural::custom::default_get_custom_information); 16 19 … … 81 84 delete generator1; 82 85 delete simulator1; 83 84 86 delete timing; 85 87 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/include/Configuration.h
r88 r97 46 46 public : ~Configuration (); 47 47 48 public : std::string header (void); 48 49 public : std::string getName (void); 49 50 public : Tusage_t getUsage (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/include/Parameters.h
r88 r97 30 30 public : uint32_t * _ras_size_queue ;//[nb_thread] 31 31 public : uint32_t * _upt_size_queue ;//[nb_thread] 32 public : uint32_t * _ufpt_size_queue ;//[nb_thread] 32 33 33 34 // Decod bloc -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Configuration.cpp
r88 r97 23 23 log_begin(Configuration,FUNCTION); 24 24 25 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 26 // Simulator configuration 27 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 28 25 29 _simulator = new Simulator (filename_simulator); 26 _generator = new Generator (filename_generator);27 _instance = new Instance (filename_instance ,28 _generator,29 get_custom_information);30 30 31 31 //-------------------------------------------------- 32 // Name32 // Directory 33 33 //-------------------------------------------------- 34 _name = _instance->getName(); 34 directory_init (_simulator->getParam("directory_statistics"), 35 _simulator->getParam("directory_vhdl" ), 36 _simulator->getParam("directory_position" ), 37 _simulator->getParam("directory_log" )); 35 38 36 39 //-------------------------------------------------- 37 // Parameters40 // Debug & Log File 38 41 //-------------------------------------------------- 39 _param = _instance->_param; 42 debug_init (fromString<debug_verbosity_t>(_simulator->getParam("debug_level"))); 43 44 log_init(fromString<bool>(_simulator->getParam("debug_have_log_file")), 45 MORPHEO_LOG); 40 46 41 47 //-------------------------------------------------- … … 64 70 65 71 //-------------------------------------------------- 72 // Header 73 //-------------------------------------------------- 74 75 if (usage_is_set(_usage,USE_HEADER)) 76 std::cout << header(); 77 78 //-------------------------------------------------- 66 79 // Parameters_Statistics 67 80 //-------------------------------------------------- … … 75 88 fromString<double>(_simulator->getParam("simulation_nb_instruction"))); 76 89 90 91 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 92 // Generator configuration + Instance 93 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 94 95 _generator = new Generator (filename_generator); 96 _instance = new Instance (filename_instance , 97 _generator, 98 get_custom_information); 99 77 100 //-------------------------------------------------- 78 // Directory101 // Name 79 102 //-------------------------------------------------- 80 directory_init (_simulator->getParam("directory_statistics"), 81 _simulator->getParam("directory_vhdl" ), 82 _simulator->getParam("directory_position" ), 83 _simulator->getParam("directory_log" )); 103 _name = _instance->getName(); 104 105 //-------------------------------------------------- 106 // Parameters 107 //-------------------------------------------------- 108 _param = _instance->_param; 109 84 110 85 111 log_end(Configuration,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Instance.cpp
r88 r97 164 164 DELETE1(_param->_nb_inst_decod ,_param->_nb_decod_bloc); 165 165 DELETE1(_param->_size_decod_queue ,_param->_nb_decod_bloc); 166 DELETE1(_param->_ufpt_size_queue ,_param->_nb_thread); 166 167 DELETE1(_param->_upt_size_queue ,_param->_nb_thread); 167 168 DELETE1(_param->_ras_size_queue ,_param->_nb_thread); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Instance_fromInternalStructure.cpp
r88 r97 21 21 // Common 22 22 //----------------------------------------------------- 23 23 //log_printf(INFO,Configuration,FUNCTION,_("COMMON")); 24 24 25 25 _param->_size_general_data = fromString<uint32_t>(getParam("size_data" , "")); … … 46 46 ALLOC1(_param->_ras_size_queue ,uint32_t,_param->_nb_thread); 47 47 ALLOC1(_param->_upt_size_queue ,uint32_t,_param->_nb_thread); 48 ALLOC1(_param->_ufpt_size_queue ,uint32_t,_param->_nb_thread); 48 49 49 50 for (uint32_t i=0; i<_param->_nb_thread; ++i) 50 51 { 51 52 //log_printf(INFO,Configuration,FUNCTION,_("THREAD [%d]"),i); 52 53 53 54 _param->_size_ifetch_queue [i] = fromString<uint32_t>(getParam("size_ifetch_queue", "thread",toString(i).c_str(),"")); … … 55 56 _param->_ras_size_queue [i] = fromString<uint32_t>(getParam("ras_size_queue" , "thread",toString(i).c_str(),"")); 56 57 _param->_upt_size_queue [i] = fromString<uint32_t>(getParam("upt_size_queue" , "thread",toString(i).c_str(),"")); 58 _param->_ufpt_size_queue [i] = fromString<uint32_t>(getParam("ufpt_size_queue" , "thread",toString(i).c_str(),"")); 57 59 58 60 // just read !!! … … 85 87 for (uint32_t i=0; i<_param->_nb_decod_bloc; ++i) 86 88 { 87 89 //log_printf(INFO,Configuration,FUNCTION,_("DECOD_BLOC [%d]"),i); 88 90 89 91 _param->_size_decod_queue [i] = fromString<uint32_t > (getParam("size_decod_queue" , "decod_bloc",toString(i).c_str(),"")); … … 111 113 for (uint32_t i=0; i<_param->_nb_rename_bloc; ++i) 112 114 { 113 115 //log_printf(INFO,Configuration,FUNCTION,_("RENAME_BLOC [%d]"),i); 114 116 115 117 _param->_nb_inst_insert [i] = fromString<uint32_t > (getParam("nb_inst_insert" , "rename_bloc",toString(i).c_str(),"")); … … 134 136 for (uint32_t i=0; i<_param->_nb_read_bloc; ++i) 135 137 { 136 138 //log_printf(INFO,Configuration,FUNCTION,_("READ_BLOC [%d]"),i); 137 139 138 140 _param->_size_read_queue [i] = fromString<uint32_t> (getParam("size_read_queue" ,"read_bloc",toString(i).c_str(),"")); … … 150 152 for (uint32_t i=0; i<_param->_nb_write_bloc; ++i) 151 153 { 152 154 //log_printf(INFO,Configuration,FUNCTION,_("WRITE_BLOC [%d]"),i); 153 155 154 156 _param->_size_write_queue [i] = fromString<uint32_t> (getParam("size_write_queue" ,"write_bloc",toString(i).c_str(),"")); … … 171 173 for (uint32_t i=0; i<_param->_nb_load_store_unit; ++i) 172 174 { 173 175 //log_printf(INFO,Configuration,FUNCTION,_("LOAD_STORE_UNIT [%d]"),i); 174 176 175 177 _param->_size_store_queue [i] = fromString<uint32_t> (getParam("size_store_queue" ,"load_store_unit",toString(i).c_str(),"")); … … 192 194 for (uint32_t i=0; i<_param->_nb_functionnal_unit; ++i) 193 195 { 194 196 //log_printf(INFO,Configuration,FUNCTION,_("FUNCTIONNAL_UNIT [%d]"),i); 195 197 196 198 _param->_nb_inst_functionnal_unit [i] = fromString<uint32_t> (getParam("nb_inst_functionnal_unit","functionnal_unit",toString(i).c_str(),"")); … … 243 245 //----------------------------------------------------- 244 246 245 247 //log_printf(INFO,Configuration,FUNCTION,_("ICACHE_PORT")); 246 248 247 249 _param->_nb_icache_port = fromString<uint32_t >(getParam("nb_icache_port" , "")); … … 252 254 // dcache_port 253 255 //----------------------------------------------------- 254 256 //log_printf(INFO,Configuration,FUNCTION,_("DCACHE_PORT")); 255 257 256 258 _param->_nb_dcache_port = fromString<uint32_t >(getParam("nb_dcache_port" , "")); … … 282 284 for (uint32_t i=0; i<_param->_nb_front_end; ++i) 283 285 { 284 286 //log_printf(INFO,Configuration,FUNCTION,_("FRONT_END [%d]"),i); 285 287 286 288 _param->_nb_context [i] = fromString<uint32_t >(getParam("nb_context" ,"front_end",toString(i).c_str(), "")); … … 306 308 for (uint32_t j=0; j<3; ++j) 307 309 { 308 310 //log_printf(INFO,Configuration,FUNCTION,_("PREDICTOR [%d][%d]"),i,j); 309 311 310 312 _param->_dir_have_bht [i][j] = fromString<bool >(getParam("dir_have_bht" ,"front_end",toString(i).c_str(),"predictor",toString(j).c_str(), "")); … … 343 345 for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i) 344 346 { 345 347 //log_printf(INFO,Configuration,FUNCTION,_("OOO_ENGINE [%d]"),i); 346 348 347 349 _param->_nb_rename_unit [i] = fromString<uint32_t >(getParam("nb_rename_unit" ,"ooo_engine",toString(i).c_str(), "")); … … 383 385 for (uint32_t i=0; i<_param->_nb_execute_loop; ++i) 384 386 { 385 387 //log_printf(INFO,Configuration,FUNCTION,_("EXECUTE_LOOP [%d]"),i); 386 388 387 389 _param->_nb_read_unit [i] = fromString<uint32_t >(getParam("nb_read_unit" ,"execute_loop",toString(i).c_str(), "")); … … 402 404 //----------------------------------------------------- 403 405 404 406 //log_printf(INFO,Configuration,FUNCTION,_("LINK")); 405 407 406 408 _param->_dispatch_priority = fromString<Tpriority_t >(getParam("dispatch_priority" , "")); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Instance_getLink.cpp
r88 r97 74 74 { 75 75 _return = link2array(dest); 76 76 //log_printf(INFO,Configuration,FUNCTION,_("Link \"%s[%s]\"= %s."),name,src.c_str(),dest.c_str()); 77 77 } 78 78 else 79 79 { 80 80 _return.clear(); 81 81 //log_printf(INFO,Configuration,FUNCTION,_("Link \"%s[%s]\" not find."),name,src.c_str()); 82 82 } 83 83 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Instance_getParam.cpp
r88 r97 48 48 if (it == ((*list_components)[component]).end()) 49 49 { 50 50 //log_printf(INFO,Configuration,FUNCTION,_("Component \"%s[%s]\" is not define, take default value for parameter \"%s\"."),component.c_str(),id.c_str(),name); 51 51 52 52 value = _generator->getParam(name)->_default; … … 68 68 if (it == (*list_parameters).end()) 69 69 { 70 70 //log_printf(INFO,Configuration,FUNCTION,_("Component \"%s[%s]\" is define, but parameter \"%s\" is not define. Take default value."),component.c_str(),id.c_str(),name); 71 71 72 72 value = _generator->getParam(name)->_default; … … 85 85 } 86 86 87 87 //log_printf(INFO,Configuration,FUNCTION,_("Parameters \"%s\" = %s."),name,value.c_str()); 88 88 89 89 log_end(Configuration,FUNCTION);
Note: See TracChangeset
for help on using the changeset viewer.