source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/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: 1.6 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Generic/Victim/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 (_(" * victim_scheme (Tvictim_t)\n"));
17  err (_(" * nb_entity     (uint32_t )\n"));
18  err (_(" * nb_entry      (uint32_t )\n"));
19  err (_(" * nb_access     (uint32_t )\n"));
20  err (_(" * table_global  (bool     )\n"));
21
22  exit (1);
23}
24
25#ifndef SYSTEMC
26int main    (int argc, char * argv[])
27#else
28int sc_main (int argc, char * argv[])
29#endif
30{
31  if (argc != static_cast<int>(2+NB_PARAMS))
32    usage (argc, argv);
33
34  uint32_t x = 1;
35
36  string name = argv[x++];
37  Tvictim_t _victim_scheme = fromString<Tvictim_t>(argv[x++]);
38  uint32_t  _nb_entity     = fromString<uint32_t >(argv[x++]);
39  uint32_t  _nb_entry      = fromString<uint32_t >(argv[x++]);
40  uint32_t  _nb_access     = fromString<uint32_t >(argv[x++]);
41  bool      _table_global  = fromString<bool     >(argv[x++]);
42
43  int _return = EXIT_SUCCESS;
44  try 
45    {
46      morpheo::behavioural::generic::victim::Parameters * param = new morpheo::behavioural::generic::victim::Parameters
47        (_victim_scheme,
48         _nb_entity    ,
49         _nb_entry     ,
50         _nb_access    ,
51         _table_global );
52     
53      msg(_("%s"),param->print(1).c_str());
54     
55      test (name,param);
56    }
57  catch (morpheo::ErrorMorpheo & error)
58    {
59      msg (_("<%s> :\n%s"),name.c_str(), error.what ());
60      _return = EXIT_FAILURE;
61    }
62  catch (...)
63    {
64      err (_("<%s> : This test must generate a error.\n"),name.c_str());
65      _return = EXIT_FAILURE;
66    }
67
68  return (_return);
69}
Note: See TracBrowser for help on using the repository browser.