source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/src/main.cpp @ 77

Last change on this file since 77 was 77, checked in by rosiere, 16 years ago
  • Add two component :
    • network between read unit and execute unit
    • network between execute unit and write unit
  • remove parameters "nb_operation" and "nb_type"
  • in write_queue add the special case : load_speculative
File size: 3.0 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/include/test.h"
9
10#define NB_PARAMS 13
11
12void usage (int argc, char * argv[])
13{
14  cerr << "<Usage> " << argv[0] << " name_instance list_params" << endl
15       << "list_params is :" << endl
16       << " - size_queue          (unsigned int)" << endl
17       << " - nb_context          (unsigned int)" << endl
18       << " - nb_front_end        (unsigned int)" << endl
19       << " - nb_ooo_engine       (unsigned int)" << endl
20       << " - nb_packet           (unsigned int)" << endl
21       << " - size_general_data   (unsigned int)" << endl
22       << " - size_special_data   (unsigned int)" << endl
23       << " - nb_general_register (unsigned int)" << endl
24       << " - nb_special_register (unsigned int)" << endl
25       << " - nb_gpr_write        (unsigned int)" << endl
26       << " - nb_spr_write        (unsigned int)" << endl
27       << " - size_store_queue    (unsigned int)" << endl
28       << " - size_load_queue     (unsigned int)" << endl
29       << "" << endl;
30
31  for (int i=0; i<argc; i++)
32    cerr << argv[i] << " ";
33  cerr << endl;
34
35  exit (1);
36}
37
38#ifndef SYSTEMC
39int main    (int argc, char * argv[])
40#else
41int sc_main (int argc, char * argv[])
42#endif
43{
44  if (argc != 2+NB_PARAMS)
45    usage (argc, argv);
46
47  uint32_t x=1;
48  const string   name                =      argv[x++];
49  const uint32_t size_queue          = atoi(argv[x++]);
50  const uint32_t nb_context          = atoi(argv[x++]);
51  const uint32_t nb_front_end        = atoi(argv[x++]);
52  const uint32_t nb_ooo_engine       = atoi(argv[x++]);
53  const uint32_t nb_packet           = atoi(argv[x++]);
54  const uint32_t size_general_data   = atoi(argv[x++]);
55  const uint32_t size_special_data   = atoi(argv[x++]);
56  const uint32_t nb_general_register = atoi(argv[x++]);
57  const uint32_t nb_special_register = atoi(argv[x++]);
58  const uint32_t nb_gpr_write        = atoi(argv[x++]);
59  const uint32_t nb_spr_write        = atoi(argv[x++]);
60  const uint32_t size_store_queue    = atoi(argv[x++]);
61  const uint32_t size_load_queue     = atoi(argv[x++]);
62
63  try 
64    {
65      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters
66        ( size_queue   
67         ,nb_context         
68         ,nb_front_end       
69         ,nb_ooo_engine
70         ,nb_packet         
71         ,size_general_data 
72         ,size_special_data 
73         ,nb_general_register
74         ,nb_special_register
75         ,nb_gpr_write
76         ,nb_spr_write
77         ,size_store_queue
78         ,size_load_queue
79          );
80     
81      cout << param->print(1);
82     
83      test (name,param);
84    }
85  catch (morpheo::ErrorMorpheo & error)
86    {
87      cout << "<" << name << "> : " <<  error.what ();
88      exit (EXIT_FAILURE);
89    }
90  catch (...)
91    {
92      cerr << "<" << name << "> : This test must generate a error" << endl;
93      exit (EXIT_FAILURE);
94    }
95
96  return (EXIT_SUCCESS);
97}
98
Note: See TracBrowser for help on using the repository browser.