source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/main.cpp @ 81

Last change on this file since 81 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1/*
2 * $Id: main.cpp 81 2008-04-15 18:40:01Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/include/test.h"
9
10#define NB_PARAMS 0
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 (_(" * ()\n"));
17
18  exit (1);
19}
20
21#ifndef SYSTEMC
22int main    (int argc, char * argv[])
23#else
24int sc_main (int argc, char * argv[])
25#endif
26{
27  if (argc != static_cast<int>(2+NB_PARAMS))
28    usage (argc, argv);
29
30  uint32_t x = 1;
31
32  string name = argv[x++];
33//const uint32_t size_data = atoi(argv[x++]);
34//const uint32_t nb_port   = atoi(argv[x++]);
35
36  int _return = EXIT_SUCCESS;
37  try 
38    {
39      morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Parameters
40        (//size_data,
41         //nb_port 
42        );
43     
44      msg(_("%s"),param->print(1).c_str());
45     
46      test (name,param);
47    }
48  catch (morpheo::ErrorMorpheo & error)
49    {
50      msg (_("<%s> :\n%s"),name.c_str(), error.what ());
51      _return = EXIT_FAILURE;
52    }
53  catch (...)
54    {
55      err (_("<%s> : This test must generate a error.\n"),name.c_str());
56      _return = EXIT_FAILURE;
57    }
58
59  return (_return);
60}
Note: See TracBrowser for help on using the repository browser.