source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/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.4 KB
Line 
1/*
2 * $Id: main.cpp 81 2008-04-15 18:40:01Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/include/test.h"
9
10#define NB_PARAMS 5
11
12void usage (string exec)
13{
14  cerr << "<Usage> " << exec << " name_instance list_params" << endl
15       << "list_params is :" << endl
16       << " - nb_port_read       (unsigned int)" << endl
17       << " - nb_port_write      (unsigned int)" << endl
18       << " - nb_port_read_write (unsigned int)" << endl
19       << " - nb_word            (unsigned int)" << endl
20       << " - size_word          (unsigned int)" << endl;
21  exit (1);
22}
23
24#ifndef SYSTEMC
25int main    (int argc, char * argv[])
26#else
27int sc_main (int argc, char * argv[])
28#endif
29{
30  if (argc <  2+NB_PARAMS)
31    usage (argv[0]);
32
33  const string   name               = argv[1];
34  const uint32_t nb_port_read       = atoi(argv[2]);
35  const uint32_t nb_port_write      = atoi(argv[3]);
36  const uint32_t nb_port_read_write = atoi(argv[4]);
37  const uint32_t nb_word            = atoi(argv[5]);
38  const uint32_t size_word          = atoi(argv[6]);
39 
40  morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters * param = new morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters
41    (nb_port_read ,
42     nb_port_write,
43     nb_port_read_write,
44     nb_word      ,
45     size_word    );
46 
47  test (name,param);
48
49  return (EXIT_SUCCESS);
50}
Note: See TracBrowser for help on using the repository browser.