source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/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: 1.3 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 * Test 0
7 */
8
9#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/include/test.h"
10
11#define NB_PARAMS 4
12
13void usage (string exec)
14{
15  cerr << "<Usage> " << exec << " name_instance list_params" << endl
16       << "list_params is :" << endl
17       << " - size_counter       (unsigned int)" << endl
18       << " - nb_counter         (unsigned int)" << endl
19       << " - nb_prediction      (unsigned int)" << endl
20       << " - nb_branch_complete (unsigned int)" << endl;
21  exit (1);
22}
23
24#ifndef SYSTEMC
25int main    (int argc, char * argv[])
26#else
27int sc_main (int argc, char * argv[])
28#endif
29{
30  if (argc != 2+NB_PARAMS)
31    usage (argv[0]);
32
33  const string   name               = argv[1];
34  const uint32_t size_counter       = atoi(argv[2]);
35  const uint32_t nb_counter         = atoi(argv[3]);
36  const uint32_t nb_prediction      = atoi(argv[4]);
37  const uint32_t nb_branch_complete = atoi(argv[5]);
38
39  morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::pattern_history_table::Parameters param (size_counter       ,
40                                                                                                                                       nb_counter         ,
41                                                                                                                                       nb_prediction      ,
42                                                                                                                                       nb_branch_complete );
43
44  test (name,param);
45
46  return (EXIT_SUCCESS);
47}
Note: See TracBrowser for help on using the repository browser.