source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top.cpp @ 113

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

1) Add modelsim simulation systemC
2) Modelsim cosimulation systemC / VHDL is not finish !!!! (cf execute_queue and write_unit)
3) Add multi architecture
5) Add template for comparator, multiplier and divider
6) Change Message
Warning) Various test macro have change, many selftest can't compile

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1/*
2 * $Id: top.cpp 113 2009-04-14 18:39:12Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/top.h"
9#include "Behavioural/include/Selftest.h"
10
11#define NB_PARAMS 10
12
13#ifdef MTI_SYSTEMC
14SC_MODULE_EXPORT(top);
15#endif
16
17#ifdef MTI_SYSTEMC
18SC_CTOR(top::top)
19#else
20top::top (sc_module_name module_name, int argc, char * argv[])
21#endif
22{
23#ifdef MTI_SYSTEMC
24  // accessing command-line arguments with modelsim
25  int argc;
26  const char * const * argv;
27
28  argc = sc_argc ();
29  argv = sc_argv ();
30#endif
31
32  if (argc != 2+NB_PARAMS)
33    usage (argc, argv);
34
35  uint32_t size_queue         ;
36  uint32_t nb_context         ;
37  uint32_t nb_front_end       ;
38  uint32_t nb_ooo_engine      ;
39  uint32_t nb_packet          ;
40  uint32_t size_general_data  ;
41  uint32_t nb_general_register;
42  uint32_t size_special_data  ;
43  uint32_t nb_special_register;
44  uint32_t nb_bypass_write    ;
45
46  uint32_t x=1;
47  SELFTEST0(name               ,string  ,argv,x);
48  SELFTEST0(size_queue         ,uint32_t,argv,x);
49  SELFTEST0(nb_context         ,uint32_t,argv,x);
50  SELFTEST0(nb_front_end       ,uint32_t,argv,x);
51  SELFTEST0(nb_ooo_engine      ,uint32_t,argv,x);
52  SELFTEST0(nb_packet          ,uint32_t,argv,x);
53  SELFTEST0(size_general_data  ,uint32_t,argv,x);
54  SELFTEST0(nb_general_register,uint32_t,argv,x);
55  SELFTEST0(size_special_data  ,uint32_t,argv,x);
56  SELFTEST0(nb_special_register,uint32_t,argv,x);
57  SELFTEST0(nb_bypass_write    ,uint32_t,argv,x);
58
59  _param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Parameters
60    (size_queue         ,
61     nb_context         ,
62     nb_front_end       ,
63     nb_ooo_engine      ,
64     nb_packet          ,
65     size_general_data  ,
66     nb_general_register,
67     size_special_data  ,
68     nb_special_register,
69     nb_bypass_write    ,
70     true
71     );
72 
73  // msg(_("%s"),_param.print(0).c_str());
74 
75  // Allocation component
76  allocation ();
77 
78#ifdef MTI_SYSTEMC
79  SC_THREAD(test);
80#endif
81}
82
83top::~top (void)
84{
85  deallocation ();
86  delete _param;
87}
Note: See TracBrowser for help on using the repository browser.