source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Multiplier/SelfTest/src/main.cpp @ 112

Last change on this file since 112 was 112, checked in by rosiere, 15 years ago

1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone

  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1/*
2 * $Id: main.cpp 112 2009-03-18 22:36:26Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Generic/Multiplier/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
34  int _return = EXIT_SUCCESS;
35  try 
36    {
37      morpheo::behavioural::generic::multiplier::Parameters * param = new morpheo::behavioural::generic::multiplier::Parameters
38        (
39         true //is_toplevel
40        );
41     
42      msg(_("%s"),param->print(0).c_str());
43     
44      test (name,param);
45    }
46  catch (morpheo::ErrorMorpheo & error)
47    {
48      msg (_("<%s> :\n%s"),name.c_str(), error.what ());
49      _return = EXIT_FAILURE;
50    }
51 
52  try 
53    {
54      if (_return == EXIT_SUCCESS)
55        TEST_OK("Multiplier : no error");
56      else
57        TEST_KO("Multiplier : a lot of error");
58    }
59  catch (morpheo::ErrorMorpheo & error)
60    {
61//       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
62      _return = EXIT_FAILURE;
63    }
64
65  return (_return);
66}
Note: See TracBrowser for help on using the repository browser.