Changeset 71 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/main.cpp
- Timestamp:
- Jan 19, 2008, 12:09:01 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/main.cpp
r59 r71 8 8 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/test.h" 9 9 10 #define NB_PARAMS 11 10 #define number_of_test 2 11 12 #define NB_PARAMS 13 11 13 12 14 void usage (int argc, char * argv[]) … … 20 22 << " - speculative_load (uint32_t)" << endl 21 23 << " - nb_context (uint32_t)" << endl 24 << " - nb_front_end (uint32_t)" << endl 25 << " - nb_ooo_engine (uint32_t)" << endl 22 26 << " - nb_packet (uint32_t)" << endl 23 27 << " - size_general_data (uint32_t)" << endl … … 40 44 #endif 41 45 { 42 if (argc != 2+NB_PARAMS) 43 usage (argc, argv); 46 switch (number_of_test) 47 { 48 case 1 : 49 { 50 51 if (argc != 2+NB_PARAMS) 52 usage (argc, argv); 53 54 uint32_t x=1; 55 56 const string name = argv[x++]; 57 const uint32_t _size_store_queue = atoi(argv[x++]); 58 const uint32_t _size_load_queue = atoi(argv[x++]); 59 const uint32_t _size_speculative_access_queue = atoi(argv[x++]); 60 const uint32_t _nb_port_check = atoi(argv[x++]); 61 const Tspeculative_load_t _speculative_load = fromString<Tspeculative_load_t>(argv[x++]); 62 const uint32_t _nb_context = atoi(argv[x++]); 63 const uint32_t _nb_front_end = atoi(argv[x++]); 64 const uint32_t _nb_ooo_engine = atoi(argv[x++]); 65 const uint32_t _nb_packet = atoi(argv[x++]); 66 const uint32_t _size_general_data = atoi(argv[x++]); 67 const uint32_t _nb_general_register = atoi(argv[x++]); 68 const uint32_t _nb_operation = atoi(argv[x++]); 69 const uint32_t _nb_type = atoi(argv[x++]); 70 71 try 72 { 73 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters 74 ( 75 _size_store_queue , 76 _size_load_queue , 77 _size_speculative_access_queue, 78 _nb_port_check , 79 _speculative_load , 80 _nb_context , 81 _nb_front_end , 82 _nb_ooo_engine , 83 _nb_packet , 84 _size_general_data , 85 _nb_general_register , 86 _nb_operation , 87 _nb_type 88 ); 89 90 cout << param->print(1); 91 92 test1 (name,param); 93 94 } 95 catch (morpheo::ErrorMorpheo & error) 96 { 97 cout << "<" << name << "> : " << error.what (); 98 exit (EXIT_FAILURE); 99 } 100 catch (...) 101 { 102 cerr << "<" << name << "> : This test must generate a error" << endl; 103 exit (EXIT_FAILURE); 104 } 105 106 break; 107 } 108 case 2 : 109 { 110 try 111 { 112 test2 (); 113 } 114 catch (morpheo::ErrorMorpheo & error) 115 { 116 cout << error.what (); 117 exit (EXIT_FAILURE); 118 } 119 catch (...) 120 { 121 cerr << "This test must generate a error" << endl; 122 exit (EXIT_FAILURE); 123 } 124 125 break; 126 } 127 default : 128 { 129 std::cerr << "Invalid number of test" << std::endl; 130 exit (EXIT_FAILURE); 44 131 45 const string name = argv[1]; 46 const uint32_t _size_store_queue = atoi(argv[ 2]); 47 const uint32_t _size_load_queue = atoi(argv[ 3]); 48 const uint32_t _size_speculative_access_queue = atoi(argv[ 4]); 49 const uint32_t _nb_port_check = atoi(argv[ 5]); 50 const Tspeculative_load_t _speculative_load = fromString<Tspeculative_load_t>(argv[ 6]); 51 const uint32_t _nb_context = atoi(argv[ 7]); 52 const uint32_t _nb_packet = atoi(argv[ 8]); 53 const uint32_t _size_general_data = atoi(argv[ 9]); 54 const uint32_t _nb_general_register = atoi(argv[10]); 55 const uint32_t _nb_operation = atoi(argv[11]); 56 const uint32_t _nb_type = atoi(argv[12]); 57 58 try 59 { 60 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters 61 ( 62 _size_store_queue , 63 _size_load_queue , 64 _size_speculative_access_queue, 65 _nb_port_check , 66 _speculative_load , 67 _nb_context , 68 _nb_packet , 69 _size_general_data , 70 _nb_general_register , 71 _nb_operation , 72 _nb_type 73 ); 74 75 cout << param->print(1); 76 77 test (name,param); 132 break; 133 } 78 134 } 79 catch (morpheo::ErrorMorpheo & error) 80 { 81 cout << "<" << name << "> : " << error.what (); 82 exit (EXIT_FAILURE); 83 } 84 catch (...) 85 { 86 cerr << "<" << name << "> : This test must generate a error" << endl; 87 exit (EXIT_FAILURE); 88 } 89 135 90 136 return (EXIT_SUCCESS); 91 137 }
Note: See TracChangeset
for help on using the changeset viewer.