source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/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/SelfTest/include/top.h"
9#include "Behavioural/include/Selftest.h"
10
11#define NB_PARAMS 11
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 x=1;
36
37  uint32_t size_write_queue    ;
38  uint32_t size_execute_queue  ;
39  uint32_t nb_context          ;
40  uint32_t nb_front_end        ;
41  uint32_t nb_ooo_engine       ;
42  uint32_t nb_packet           ;
43  uint32_t size_general_data   ;
44  uint32_t nb_general_register ;
45  uint32_t size_special_data   ;
46  uint32_t nb_special_register ;
47  uint32_t nb_bypass_write     ;
48
49  SELFTEST0(name,string,argv,x);
50  SELFTEST0(size_write_queue    ,uint32_t,argv,x);
51  SELFTEST0(size_execute_queue  ,uint32_t,argv,x);
52  SELFTEST0(nb_context          ,uint32_t,argv,x);
53  SELFTEST0(nb_front_end        ,uint32_t,argv,x);
54  SELFTEST0(nb_ooo_engine       ,uint32_t,argv,x);
55  SELFTEST0(nb_packet           ,uint32_t,argv,x);
56  SELFTEST0(size_general_data   ,uint32_t,argv,x);
57  SELFTEST0(nb_general_register ,uint32_t,argv,x);
58  SELFTEST0(size_special_data   ,uint32_t,argv,x);
59  SELFTEST0(nb_special_register ,uint32_t,argv,x);
60  SELFTEST0(nb_bypass_write     ,uint32_t,argv,x);
61
62  _param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters
63    (size_write_queue   ,
64     size_execute_queue ,
65     nb_context         ,
66     nb_front_end       ,
67     nb_ooo_engine      ,
68     nb_packet          ,
69     size_general_data  ,
70     nb_general_register,
71     size_special_data  ,
72     nb_special_register,
73     nb_bypass_write    ,
74     true
75     );
76 
77  // msg(_("%s"),_param.print(0).c_str());
78 
79  // Allocation component
80  allocation ();
81 
82#ifdef MTI_SYSTEMC
83  SC_THREAD(test);
84#endif
85}
86
87top::~top (void)
88{
89  deallocation ();
90  delete _param;
91}
Note: See TracBrowser for help on using the repository browser.