source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/main.cpp @ 73

Last change on this file since 73 was 73, checked in by rosiere, 16 years ago

add two component :

  • Write Queue (in Moore version)
  • Execute Queue

add macro to help the interface allocation : Allocation.h

File size: 2.3 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/test.h"
9
10#define NB_PARAMS 9
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 (_(" * size_queue          (uint32_t)\n"));
17  err (_(" * nb_context          (uint32_t)\n"));
18  err (_(" * nb_front_end        (uint32_t)\n"));
19  err (_(" * nb_ooo_engine       (uint32_t)\n"));
20  err (_(" * nb_packet           (uint32_t)\n"));
21  err (_(" * size_general_data   (uint32_t)\n"));
22  err (_(" * size_special_data   (uint32_t)\n"));
23  err (_(" * nb_operation        (uint32_t)\n"));
24  err (_(" * nb_type             (uint32_t)\n"));
25
26  exit (1);
27}
28
29#ifndef SYSTEMC
30int main    (int argc, char * argv[])
31#else
32int sc_main (int argc, char * argv[])
33#endif
34{
35  if (argc != 2+NB_PARAMS)
36    usage (argc, argv);
37
38  uint32_t       x = 1;
39
40  const string   name      =      argv[x++];
41  const uint32_t size_queue          = atoi(argv[x++]);
42  const uint32_t nb_context          = atoi(argv[x++]);
43  const uint32_t nb_front_end        = atoi(argv[x++]);
44  const uint32_t nb_ooo_engine       = atoi(argv[x++]);
45  const uint32_t nb_packet           = atoi(argv[x++]);
46  const uint32_t size_general_data   = atoi(argv[x++]);
47  const uint32_t size_special_data   = atoi(argv[x++]);
48  const uint32_t nb_operation        = atoi(argv[x++]);
49  const uint32_t nb_type             = atoi(argv[x++]);
50
51  try 
52    {
53      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters
54        (size_queue         ,
55         nb_context         ,
56         nb_front_end       ,
57         nb_ooo_engine      ,
58         nb_packet          ,
59         size_general_data  ,
60         size_special_data  ,
61         nb_operation       ,
62         nb_type            );
63     
64      msg(_("%s"),param->print(1).c_str());
65     
66      test (name,param);
67    }
68  catch (morpheo::ErrorMorpheo & error)
69    {
70      msg (_("<%s> : %s.\n"),name.c_str(), error.what ());
71      exit (EXIT_FAILURE);
72    }
73  catch (...)
74    {
75      err (_("<%s> : This test must generate a error.\n"),name.c_str());
76      exit (EXIT_FAILURE);
77    }
78
79  return (EXIT_SUCCESS);
80}
81
Note: See TracBrowser for help on using the repository browser.