source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/main.cpp @ 59

Last change on this file since 59 was 59, checked in by rosiere, 17 years ago

Add Load store queue -> but not terminated and tested
Add article to sympa 2007 -> but no started

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_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/test.h"
9
10#define NB_PARAMS 11
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_store_queue        (uint32_t)" << endl
17       << " - size_load_queue         (uint32_t)" << endl
18       << " - size_speculative_access_queue (uint32_t)" << endl
19       << " - nb_port_check           (uint32_t)" << endl
20       << " - speculative_load        (uint32_t)" << endl
21       << " - nb_context              (uint32_t)" << endl
22       << " - nb_packet               (uint32_t)" << endl
23       << " - size_general_data       (uint32_t)" << endl
24       << " - nb_general_register     (uint32_t)" << endl
25       << " - nb_operation            (uint32_t)" << endl
26       << " - nb_type                 (uint32_t)" << endl
27       << "" << endl;
28
29  for (int i=0; i<argc; i++)
30    cerr << argv[i] << " ";
31  cerr << endl;
32
33  exit (1);
34}
35
36#ifndef SYSTEMC
37int main    (int argc, char * argv[])
38#else
39int sc_main (int argc, char * argv[])
40#endif
41{
42  if (argc != 2+NB_PARAMS)
43    usage (argc, argv);
44
45  const string              name                     = argv[1];
46  const uint32_t            _size_store_queue        = atoi(argv[ 2]);
47  const uint32_t            _size_load_queue         = atoi(argv[ 3]);
48  const uint32_t            _size_speculative_access_queue = atoi(argv[ 4]);
49  const uint32_t            _nb_port_check           = atoi(argv[ 5]);
50  const Tspeculative_load_t _speculative_load        = fromString<Tspeculative_load_t>(argv[ 6]);
51  const uint32_t            _nb_context              = atoi(argv[ 7]);
52  const uint32_t            _nb_packet               = atoi(argv[ 8]);
53  const uint32_t            _size_general_data       = atoi(argv[ 9]);
54  const uint32_t            _nb_general_register     = atoi(argv[10]);
55  const uint32_t            _nb_operation            = atoi(argv[11]);
56  const uint32_t            _nb_type                 = atoi(argv[12]);
57
58  try 
59    {
60      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters
61        (
62         _size_store_queue       ,
63         _size_load_queue        ,
64         _size_speculative_access_queue,
65         _nb_port_check          ,
66         _speculative_load       ,
67         _nb_context             ,
68         _nb_packet              ,
69         _size_general_data      ,
70         _nb_general_register    ,
71         _nb_operation           ,
72         _nb_type               
73        );
74     
75      cout << param->print(1);
76     
77      test (name,param);
78    }
79  catch (morpheo::ErrorMorpheo & error)
80    {
81      cout << "<" << name << "> : " <<  error.what ();
82      exit (EXIT_FAILURE);
83    }
84  catch (...)
85    {
86      cerr << "<" << name << "> : This test must generate a error" << endl;
87      exit (EXIT_FAILURE);
88    }
89
90  return (EXIT_SUCCESS);
91}
92
Note: See TracBrowser for help on using the repository browser.