[2] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
[48] | 8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/include/test.h" |
---|
[2] | 9 | |
---|
| 10 | #define NB_PARAMS 9 |
---|
| 11 | |
---|
| 12 | void usage (string exec) |
---|
| 13 | { |
---|
| 14 | cerr << "<Usage> " << exec << " name_instance list_params" << endl |
---|
| 15 | << "list_params is :" << endl |
---|
| 16 | << " - have_bht (boolean )" << endl |
---|
| 17 | << " - bht_size_history (unsigned int)" << endl |
---|
| 18 | << " - bht_size_address (unsigned int)" << endl |
---|
| 19 | << " - have_pht (boolean )" << endl |
---|
| 20 | << " - pht_size_address (unsigned int)" << endl |
---|
| 21 | << " - pht_size_address_share (unsigned int)" << endl |
---|
| 22 | << " - size_address (unsigned int)" << endl |
---|
| 23 | << " - nb_prediction (unsigned int)" << endl |
---|
| 24 | << " - nb_branch_complete (unsigned int)" << endl; |
---|
| 25 | exit (1); |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | #ifndef SYSTEMC |
---|
| 29 | int main (int argc, char * argv[]) |
---|
| 30 | #else |
---|
| 31 | int sc_main (int argc, char * argv[]) |
---|
| 32 | #endif |
---|
| 33 | { |
---|
| 34 | if (argc != 2+NB_PARAMS) |
---|
| 35 | usage (argv[0]); |
---|
| 36 | |
---|
| 37 | const string name = argv[1]; |
---|
| 38 | const bool have_bht = atoi(argv[ 2]); |
---|
| 39 | const uint32_t bht_size_history = atoi(argv[ 3]); |
---|
| 40 | const uint32_t bht_size_address = atoi(argv[ 4]); |
---|
| 41 | const bool have_pht = atoi(argv[ 5]); |
---|
| 42 | const uint32_t pht_size_address = atoi(argv[ 6]); |
---|
| 43 | const uint32_t pht_size_address_share = atoi(argv[ 7]); |
---|
| 44 | const uint32_t size_address = atoi(argv[ 8]); |
---|
| 45 | const uint32_t nb_prediction = atoi(argv[ 9]); |
---|
| 46 | const uint32_t nb_branch_complete = atoi(argv[10]); |
---|
| 47 | |
---|
[48] | 48 | morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Parameters param (have_bht , |
---|
[2] | 49 | bht_size_history , |
---|
| 50 | bht_size_address , |
---|
| 51 | have_pht , |
---|
| 52 | pht_size_address , |
---|
| 53 | pht_size_address_share, |
---|
| 54 | size_address , |
---|
| 55 | nb_prediction , |
---|
| 56 | nb_branch_complete ); |
---|
| 57 | |
---|
| 58 | test (name,param); |
---|
| 59 | |
---|
| 60 | return (EXIT_SUCCESS); |
---|
| 61 | } |
---|
| 62 | |
---|