source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/src/main.cpp @ 78

Last change on this file since 78 was 78, checked in by rosiere, 16 years ago

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
File size: 3.0 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/include/test.h"
9
10#define NB_PARAMS 7
11
12void usage (int argc, char * argv[])
13{
14  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
15  err (_("list_params is :\n"));
16  err (_(" * nb_front_end                         (uint32_t         )\n"));
17  err (_(" * nb_context            [nb_front_end] (uint32_t         )\n"));
18  err (_(" * max_branch_speculated                (uint32_t         )\n"));
19  err (_(" * size_general_data                    (uint32_t         )\n"));
20  err (_(" * nb_inst_rename                       (uint32_t         )\n"));
21  err (_(" * nb_inst_decod         [nb_front_end] (uint32_t         )\n"));
22  err (_(" * nb_front_end_select                  (uint32_t         )\n"));
23  err (_(" * priority                             (Tpriority_t      )\n"));
24  err (_(" * load_balancing                       (Tload_balancing_t)\n"));
25
26  exit (1);
27}
28
29#ifndef SYSTEMC
30int main    (int argc, char * argv[])
31#else
32int sc_main (int argc, char * argv[])
33#endif
34{
35  if (argc <  static_cast<int>(2+NB_PARAMS))
36    usage (argc, argv);
37
38  uint32_t x = 1;
39
40  string name = argv[x++];
41
42  uint32_t          _nb_front_end         = atoi(argv[x++]);
43
44  if (argc != static_cast<int>(2+NB_PARAMS+2*_nb_front_end))
45    usage (argc, argv);
46
47  uint32_t *        _nb_context           = new uint32_t [_nb_front_end];
48  for (uint32_t i=0; i<_nb_front_end; i++)
49    _nb_context [i] = atoi(argv[x++]);
50
51  uint32_t          _max_branch_speculated= atoi(argv[x++]);
52  uint32_t          _size_general_data    = atoi(argv[x++]);
53  uint32_t          _nb_inst_rename       = atoi(argv[x++]);
54  uint32_t *        _nb_inst_decod        = new uint32_t [_nb_front_end];
55  for (uint32_t i=0; i<_nb_front_end; i++)
56    _nb_inst_decod [i] = atoi(argv[x++]);
57
58  uint32_t          _nb_front_end_select  = atoi(argv[x++]);
59  Tpriority_t       _priority             = fromString<Tpriority_t      >(argv[x++]);
60  Tload_balancing_t _load_balancing       = fromString<Tload_balancing_t>(argv[x++]);
61
62  int _return = EXIT_SUCCESS;
63  try 
64    {
65      morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::rename_select::Parameters * param = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::rename_select::Parameters
66        (_nb_front_end         ,
67         _nb_context           ,
68         _max_branch_speculated,
69         _size_general_data    ,
70         _nb_inst_rename       ,
71         _nb_inst_decod        ,
72         _nb_front_end_select  ,
73         _priority             ,
74         _load_balancing       );
75     
76      msg(_("%s"),param->print(1).c_str());
77     
78      test (name,param);
79    }
80  catch (morpheo::ErrorMorpheo & error)
81    {
82      msg (_("<%s> :\n%s"),name.c_str(), error.what ());
83      _return = EXIT_FAILURE;
84    }
85  catch (...)
86    {
87      err (_("<%s> : This test must generate a error.\n"),name.c_str());
88      _return = EXIT_FAILURE;
89    }
90
91  delete _nb_context   ;
92  delete _nb_inst_decod;
93
94  return (_return);
95}
Note: See TracBrowser for help on using the repository browser.