source: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/SelfTest/src/main.cpp @ 72

Last change on this file since 72 was 72, checked in by rosiere, 16 years ago
  • SystemC de l'unite fonctionnelle.
  • gestion des groupes / instructions custom
File size: 1.1 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/@DIRECTORY/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
17  exit (1);
18}
19
20#ifndef SYSTEMC
21int main    (int argc, char * argv[])
22#else
23int sc_main (int argc, char * argv[])
24#endif
25{
26  if (argc != 2+NB_PARAMS)
27    usage (argc, argv);
28
29  uint32_t       x = 1;
30
31  const string   name      =      argv[x++];
32//const uint32_t size_data = atoi(argv[x++]);
33//const uint32_t nb_port   = atoi(argv[x++]);
34
35  try 
36    {
37      morpheo::behavioural::@NAMESPACE_USE::Parameters * param = new morpheo::behavioural::@NAMESPACE_USE::Parameters
38        (//size_data,
39         //nb_port 
40        );
41     
42      msg(_("%s"),param->print(1).c_str());
43     
44      test (name,param);
45    }
46  catch (morpheo::ErrorMorpheo & error)
47    {
48      msg (_("<%s> : %s.\n"),name.c_str(), error.what ());
49      exit (EXIT_FAILURE);
50    }
51  catch (...)
52    {
53      err (_("<%s> : This test must generate a error.\n"),name.c_str());
54      exit (EXIT_FAILURE);
55    }
56
57  return (EXIT_SUCCESS);
58}
59
Note: See TracBrowser for help on using the repository browser.