[55] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/include/test.h" |
---|
| 9 | |
---|
| 10 | #define NB_PARAMS 0 |
---|
| 11 | |
---|
| 12 | void usage (int argc, char * argv[]) |
---|
| 13 | { |
---|
| 14 | cerr << "<Usage> " << argv[0] << " name_instance list_params" << endl |
---|
| 15 | << "list_params is :" << endl |
---|
| 16 | << " - size_queue (unsigned int)" << endl |
---|
| 17 | << " - nb_context (unsigned int)" << endl |
---|
| 18 | << " - nb_packet (unsigned int)" << endl |
---|
| 19 | << " - size_general_data (unsigned int)" << endl |
---|
| 20 | << " - size_special_data (unsigned int)" << endl |
---|
| 21 | << " - nb_general_register (unsigned int)" << endl |
---|
| 22 | << " - nb_special_register (unsigned int)" << endl |
---|
| 23 | << " - nb_operation (unsigned int)" << endl |
---|
| 24 | << " - nb_type (unsigned int)" << endl |
---|
| 25 | << " - nb_gpr_write (unsigned int)" << endl |
---|
| 26 | << " - nb_spr_write (unsigned int)" << endl |
---|
| 27 | << " - nb_bypass_write (unsigned int)" << endl |
---|
| 28 | << " - nb_bypass_memory (unsigned int)" << endl |
---|
| 29 | << "" << endl; |
---|
| 30 | |
---|
| 31 | for (int i=0; i<argc; i++) |
---|
| 32 | cerr << argv[i] << " "; |
---|
| 33 | cerr << endl; |
---|
| 34 | |
---|
| 35 | exit (1); |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | #ifndef SYSTEMC |
---|
| 39 | int main (int argc, char * argv[]) |
---|
| 40 | #else |
---|
| 41 | int sc_main (int argc, char * argv[]) |
---|
| 42 | #endif |
---|
| 43 | { |
---|
| 44 | if (argc < 2+NB_PARAMS) |
---|
| 45 | usage (argc, argv); |
---|
| 46 | |
---|
| 47 | const string name = argv[1]; |
---|
| 48 | const uint32_t size_queue = atoi(argv[ 2]); |
---|
| 49 | const uint32_t nb_context = atoi(argv[ 3]); |
---|
| 50 | const uint32_t nb_packet = atoi(argv[ 4]); |
---|
| 51 | const uint32_t size_general_data = atoi(argv[ 5]); |
---|
| 52 | const uint32_t size_special_data = atoi(argv[ 6]); |
---|
| 53 | const uint32_t nb_general_register = atoi(argv[ 7]); |
---|
| 54 | const uint32_t nb_special_register = atoi(argv[ 8]); |
---|
| 55 | const uint32_t nb_operation = atoi(argv[ 9]); |
---|
| 56 | const uint32_t nb_type = atoi(argv[10]); |
---|
| 57 | const uint32_t nb_gpr_write = atoi(argv[11]); |
---|
| 58 | const uint32_t nb_spr_write = atoi(argv[12]); |
---|
| 59 | const uint32_t nb_bypass_write = atoi(argv[13]); |
---|
| 60 | const uint32_t nb_bypass_memory = atoi(argv[14]); |
---|
| 61 | |
---|
| 62 | try |
---|
| 63 | { |
---|
| 64 | morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters |
---|
| 65 | (size_queue |
---|
| 66 | ,nb_context |
---|
| 67 | ,nb_packet |
---|
| 68 | ,size_general_data |
---|
| 69 | ,size_special_data |
---|
| 70 | ,nb_general_register |
---|
| 71 | ,nb_special_register |
---|
| 72 | ,nb_operation |
---|
| 73 | ,nb_type |
---|
| 74 | ,nb_gpr_write |
---|
| 75 | ,nb_spr_write |
---|
| 76 | ,nb_bypass_write |
---|
| 77 | ,nb_bypass_memory |
---|
| 78 | ); |
---|
| 79 | |
---|
| 80 | cout << param->print(1); |
---|
| 81 | |
---|
| 82 | test (name,param); |
---|
| 83 | } |
---|
| 84 | catch (morpheo::ErrorMorpheo & error) |
---|
| 85 | { |
---|
| 86 | cout << "<" << name << "> : " << error.what (); |
---|
| 87 | exit (EXIT_FAILURE); |
---|
| 88 | } |
---|
| 89 | catch (...) |
---|
| 90 | { |
---|
| 91 | cerr << "<" << name << "> : This test must generate a error" << endl; |
---|
| 92 | exit (EXIT_FAILURE); |
---|
| 93 | } |
---|
| 94 | |
---|
| 95 | return (EXIT_SUCCESS); |
---|
| 96 | } |
---|
| 97 | |
---|