source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/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: 2.3 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/include/test.h"
9
10#define NB_PARAMS 5
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 (_(" * nb_general_register                (uint32_t)\n"));
19  err (_(" * nb_special_register                (uint32_t)\n"));
20  err (_(" * nb_inst_insert                     (uint32_t)\n"));
21  err (_(" * nb_inst_retire                     (uint32_t)\n"));
22
23  exit (1);
24}
25
26#ifndef SYSTEMC
27int main    (int argc, char * argv[])
28#else
29int sc_main (int argc, char * argv[])
30#endif
31{
32  if (argc < 2+NB_PARAMS)
33    usage (argc, argv);
34
35  uint32_t       x = 1;
36
37  const string   name      =      argv[x++];
38
39  uint32_t   _nb_front_end        = atoi(argv[x++]);
40
41  if (argc != static_cast<int>(2+NB_PARAMS+_nb_front_end))
42    usage (argc, argv);
43 
44  uint32_t * _nb_context          = new uint32_t [_nb_front_end];
45
46  for (uint32_t i=0; i<_nb_front_end; i++)
47    _nb_context [i] = atoi(argv[x++]);
48
49  uint32_t   _nb_general_register = atoi(argv[x++]);
50  uint32_t   _nb_special_register = atoi(argv[x++]);
51  uint32_t   _nb_inst_insert      = atoi(argv[x++]);
52  uint32_t   _nb_inst_retire      = atoi(argv[x++]);
53 
54  try 
55    {
56      morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_address_translation_unit::Parameters * param = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_address_translation_unit::Parameters
57        (_nb_front_end        ,
58         _nb_context          ,
59         _nb_general_register ,
60         _nb_special_register ,
61         _nb_inst_insert      ,
62         _nb_inst_retire      );
63     
64      msg(_("%s"),param->print(1).c_str());
65     
66      test (name,param);
67    }
68  catch (morpheo::ErrorMorpheo & error)
69    {
70      msg (_("<%s> : %s.\n"),name.c_str(), error.what ());
71      exit (EXIT_FAILURE);
72    }
73  catch (...)
74    {
75      err (_("<%s> : This test must generate a error.\n"),name.c_str());
76      exit (EXIT_FAILURE);
77    }
78
79  return (EXIT_SUCCESS);
80}
81
Note: See TracBrowser for help on using the repository browser.