source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/src/main.cpp @ 2

Last change on this file since 2 was 2, checked in by kane, 17 years ago

Import Morpheo

File size: 2.2 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/include/test.h"
9
10#define NB_PARAMS 9
11
12void 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
29int main    (int argc, char * argv[])
30#else
31int 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  morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Parameters param (have_bht              ,
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
Note: See TracBrowser for help on using the repository browser.