source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/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.8 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Generic/Sort/SelfTest/include/test.h"
9
10#define NB_PARAMS 6
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_input            (uint32_t)\n"));
17  err (_(" * nb_output           (uint32_t)\n"));
18  err (_(" * ascending           (bool    )\n"));
19  err (_(" * size_data           (uint32_t)\n"));
20  err (_(" * have_port_index_out (bool    )\n"));
21  err (_(" * have_port_data_out  (bool    )\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 != static_cast<int>(2+NB_PARAMS))
33    usage (argc, argv);
34
35  uint32_t x = 1;
36
37  string name = argv[x++];
38
39  uint32_t _nb_input            = fromString<uint32_t>(argv[x++]);
40  uint32_t _nb_output           = fromString<uint32_t>(argv[x++]);
41  bool     _ascending           = fromString<bool    >(argv[x++]);
42  uint32_t _size_data           = fromString<uint32_t>(argv[x++]);
43  bool     _have_port_index_out = fromString<bool    >(argv[x++]);
44  bool     _have_port_data_out  = fromString<bool    >(argv[x++]);
45
46  int _return = EXIT_SUCCESS;
47
48  try 
49    {
50      morpheo::behavioural::generic::sort::Parameters * param = new morpheo::behavioural::generic::sort::Parameters
51        (_nb_input           ,
52         _nb_output          ,
53         _ascending          ,
54         _size_data          ,
55         _have_port_index_out,
56         _have_port_data_out );
57     
58      msg(_("%s"),param->print(1).c_str());
59     
60      test (name,param);
61    }
62  catch (morpheo::ErrorMorpheo & error)
63    {
64      msg (_("<%s> :\n%s"),name.c_str(), error.what ());
65      _return = EXIT_FAILURE;
66    }
67  catch (...)
68    {
69      err (_("<%s> : This test must generate a error.\n"),name.c_str());
70      _return = EXIT_FAILURE;
71    }
72
73  return (_return);
74}
Note: See TracBrowser for help on using the repository browser.