source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/SelfTest/src/test.cpp @ 82

Last change on this file since 82 was 82, checked in by rosiere, 16 years ago
  • support locale (now must "just" translate)
  • update all component with new test format
  • update all component with usage
  • New component : decod queue and prediction_unit
  • Property svn:keywords set to Id
File size: 19.2 KB
Line 
1/*
2 * $Id: test.cpp 82 2008-05-01 16:48:45Z rosiere $
3 *
4 * [ Description ]
5 *
6 * Test
7 */
8
9#define NB_ITERATION  1
10#define CYCLE_MAX     (128*NB_ITERATION)
11
12#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/SelfTest/include/test.h"
13#include "Common/include/Test.h"
14#include "Behavioural/include/Allocation.h"
15
16void test (string name,
17           morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::Parameters * _param)
18{
19  msg(_("<%s> : Simulation SystemC.\n"),name.c_str());
20
21#ifdef STATISTICS
22  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50);
23#endif
24
25  Read_unit * _Read_unit = new Read_unit
26    (name.c_str(),
27#ifdef STATISTICS
28     _parameters_statistics,
29#endif
30     _param,
31     USE_ALL);
32 
33#ifdef SYSTEMC
34  /*********************************************************************
35   * Déclarations des signaux
36   *********************************************************************/
37  string rename;
38
39  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
40  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
41
42  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_VAL                   ," in_READ_UNIT_IN_VAL                   ",Tcontrol_t        );
43  ALLOC_SC_SIGNAL (out_READ_UNIT_IN_ACK                   ,"out_READ_UNIT_IN_ACK                   ",Tcontrol_t        );
44  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_CONTEXT_ID            ," in_READ_UNIT_IN_CONTEXT_ID            ",Tcontext_t        );
45  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_FRONT_END_ID          ," in_READ_UNIT_IN_FRONT_END_ID          ",Tcontext_t        );
46  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_OOO_ENGINE_ID         ," in_READ_UNIT_IN_OOO_ENGINE_ID         ",Tcontext_t        );
47  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_PACKET_ID             ," in_READ_UNIT_IN_PACKET_ID             ",Tpacket_t         );
48  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_OPERATION             ," in_READ_UNIT_IN_OPERATION             ",Toperation_t      );
49  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_TYPE                  ," in_READ_UNIT_IN_TYPE                  ",Ttype_t           );
50  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE ," in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE ",Tlsq_ptr_t        );
51  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE  ," in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE  ",Tlsq_ptr_t        );
52  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_HAS_IMMEDIAT          ," in_READ_UNIT_IN_HAS_IMMEDIAT          ",Tcontrol_t        );
53  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_IMMEDIAT              ," in_READ_UNIT_IN_IMMEDIAT              ",Tgeneral_data_t   );
54  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_READ_RA               ," in_READ_UNIT_IN_READ_RA               ",Tcontrol_t        );
55  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_NUM_REG_RA            ," in_READ_UNIT_IN_NUM_REG_RA            ",Tgeneral_address_t);
56  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_READ_RB               ," in_READ_UNIT_IN_READ_RB               ",Tcontrol_t        );
57  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_NUM_REG_RB            ," in_READ_UNIT_IN_NUM_REG_RB            ",Tgeneral_address_t);
58  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_READ_RC               ," in_READ_UNIT_IN_READ_RC               ",Tcontrol_t        );
59  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_NUM_REG_RC            ," in_READ_UNIT_IN_NUM_REG_RC            ",Tspecial_address_t);
60  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_WRITE_RD              ," in_READ_UNIT_IN_WRITE_RD              ",Tcontrol_t        );
61  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_NUM_REG_RD            ," in_READ_UNIT_IN_NUM_REG_RD            ",Tgeneral_address_t);
62  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_WRITE_RE              ," in_READ_UNIT_IN_WRITE_RE              ",Tcontrol_t        );
63  ALLOC_SC_SIGNAL ( in_READ_UNIT_IN_NUM_REG_RE            ," in_READ_UNIT_IN_NUM_REG_RE            ",Tspecial_address_t);
64  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_VAL                  ,"out_READ_UNIT_OUT_VAL                  ",Tcontrol_t        ,_param->_nb_inst_retire);
65  ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_ACK                  ," in_READ_UNIT_OUT_ACK                  ",Tcontrol_t        ,_param->_nb_inst_retire);
66  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_CONTEXT_ID           ,"out_READ_UNIT_OUT_CONTEXT_ID           ",Tcontext_t        ,_param->_nb_inst_retire);
67  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_FRONT_END_ID         ,"out_READ_UNIT_OUT_FRONT_END_ID         ",Tcontext_t        ,_param->_nb_inst_retire);
68  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_OOO_ENGINE_ID        ,"out_READ_UNIT_OUT_OOO_ENGINE_ID        ",Tcontext_t        ,_param->_nb_inst_retire);
69  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_PACKET_ID            ,"out_READ_UNIT_OUT_PACKET_ID            ",Tpacket_t         ,_param->_nb_inst_retire);
70  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_OPERATION            ,"out_READ_UNIT_OUT_OPERATION            ",Toperation_t      ,_param->_nb_inst_retire);
71  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_TYPE                 ,"out_READ_UNIT_OUT_TYPE                 ",Ttype_t           ,_param->_nb_inst_retire);
72  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,"out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,_param->_nb_inst_retire);
73  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,"out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t        ,_param->_nb_inst_retire);
74  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_HAS_IMMEDIAT         ,"out_READ_UNIT_OUT_HAS_IMMEDIAT         ",Tcontrol_t        ,_param->_nb_inst_retire);
75  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_IMMEDIAT             ,"out_READ_UNIT_OUT_IMMEDIAT             ",Tgeneral_data_t   ,_param->_nb_inst_retire);
76  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_DATA_RA              ,"out_READ_UNIT_OUT_DATA_RA              ",Tgeneral_data_t   ,_param->_nb_inst_retire);
77  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_DATA_RB              ,"out_READ_UNIT_OUT_DATA_RB              ",Tgeneral_data_t   ,_param->_nb_inst_retire);
78  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_DATA_RC              ,"out_READ_UNIT_OUT_DATA_RC              ",Tspecial_data_t   ,_param->_nb_inst_retire);
79  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_WRITE_RD             ,"out_READ_UNIT_OUT_WRITE_RD             ",Tcontrol_t        ,_param->_nb_inst_retire);
80  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_NUM_REG_RD           ,"out_READ_UNIT_OUT_NUM_REG_RD           ",Tgeneral_address_t,_param->_nb_inst_retire);
81  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_WRITE_RE             ,"out_READ_UNIT_OUT_WRITE_RE             ",Tcontrol_t        ,_param->_nb_inst_retire);
82  ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_NUM_REG_RE           ,"out_READ_UNIT_OUT_NUM_REG_RE           ",Tspecial_address_t,_param->_nb_inst_retire);
83  ALLOC1_SC_SIGNAL(out_GPR_READ_VAL                       ,"out_GPR_READ_VAL                       ",Tcontrol_t        ,_param->_nb_gpr_read);
84  ALLOC1_SC_SIGNAL( in_GPR_READ_ACK                       ," in_GPR_READ_ACK                       ",Tcontrol_t        ,_param->_nb_gpr_read);
85  ALLOC1_SC_SIGNAL(out_GPR_READ_OOO_ENGINE_ID             ,"out_GPR_READ_OOO_ENGINE_ID             ",Tcontext_t        ,_param->_nb_gpr_read);
86  ALLOC1_SC_SIGNAL(out_GPR_READ_NUM_REG                   ,"out_GPR_READ_NUM_REG                   ",Tgeneral_address_t,_param->_nb_gpr_read);
87  ALLOC1_SC_SIGNAL( in_GPR_READ_DATA                      ," in_GPR_READ_DATA                      ",Tgeneral_data_t   ,_param->_nb_gpr_read);
88  ALLOC1_SC_SIGNAL( in_GPR_READ_DATA_VAL                  ," in_GPR_READ_DATA_VAL                  ",Tcontrol_t        ,_param->_nb_gpr_read);
89  ALLOC1_SC_SIGNAL(out_SPR_READ_VAL                       ,"out_SPR_READ_VAL                       ",Tcontrol_t        ,_param->_nb_spr_read);
90  ALLOC1_SC_SIGNAL( in_SPR_READ_ACK                       ," in_SPR_READ_ACK                       ",Tcontrol_t        ,_param->_nb_spr_read);
91  ALLOC1_SC_SIGNAL(out_SPR_READ_OOO_ENGINE_ID             ,"out_SPR_READ_OOO_ENGINE_ID             ",Tcontext_t        ,_param->_nb_spr_read);
92  ALLOC1_SC_SIGNAL(out_SPR_READ_NUM_REG                   ,"out_SPR_READ_NUM_REG                   ",Tspecial_address_t,_param->_nb_spr_read);
93  ALLOC1_SC_SIGNAL( in_SPR_READ_DATA                      ," in_SPR_READ_DATA                      ",Tspecial_data_t   ,_param->_nb_spr_read);
94  ALLOC1_SC_SIGNAL( in_SPR_READ_DATA_VAL                  ," in_SPR_READ_DATA_VAL                  ",Tcontrol_t        ,_param->_nb_spr_read);
95  ALLOC1_SC_SIGNAL( in_GPR_WRITE_VAL                      ," in_GPR_WRITE_VAL                      ",Tcontrol_t        ,_param->_nb_gpr_write);
96  ALLOC1_SC_SIGNAL( in_GPR_WRITE_OOO_ENGINE_ID            ," in_GPR_WRITE_OOO_ENGINE_ID            ",Tcontext_t        ,_param->_nb_gpr_write);
97  ALLOC1_SC_SIGNAL( in_GPR_WRITE_NUM_REG                  ," in_GPR_WRITE_NUM_REG                  ",Tgeneral_address_t,_param->_nb_gpr_write);
98  ALLOC1_SC_SIGNAL( in_GPR_WRITE_DATA                     ," in_GPR_WRITE_DATA                     ",Tgeneral_data_t   ,_param->_nb_gpr_write);
99  ALLOC1_SC_SIGNAL( in_SPR_WRITE_VAL                      ," in_SPR_WRITE_VAL                      ",Tcontrol_t        ,_param->_nb_spr_write);
100  ALLOC1_SC_SIGNAL( in_SPR_WRITE_OOO_ENGINE_ID            ," in_SPR_WRITE_OOO_ENGINE_ID            ",Tcontext_t        ,_param->_nb_spr_write);
101  ALLOC1_SC_SIGNAL( in_SPR_WRITE_NUM_REG                  ," in_SPR_WRITE_NUM_REG                  ",Tspecial_address_t,_param->_nb_spr_write);
102  ALLOC1_SC_SIGNAL( in_SPR_WRITE_DATA                     ," in_SPR_WRITE_DATA                     ",Tspecial_data_t   ,_param->_nb_spr_write);
103  ALLOC1_SC_SIGNAL( in_BYPASS_WRITE_OOO_ENGINE_ID         ," in_BYPASS_WRITE_OOO_ENGINE_ID         ",Tcontext_t        ,_param->_nb_bypass_write);
104  ALLOC1_SC_SIGNAL( in_BYPASS_WRITE_GPR_VAL               ," in_BYPASS_WRITE_GPR_VAL               ",Tcontrol_t        ,_param->_nb_bypass_write);
105  ALLOC1_SC_SIGNAL( in_BYPASS_WRITE_GPR_NUM_REG           ," in_BYPASS_WRITE_GPR_NUM_REG           ",Tgeneral_address_t,_param->_nb_bypass_write);
106  ALLOC1_SC_SIGNAL( in_BYPASS_WRITE_GPR_DATA              ," in_BYPASS_WRITE_GPR_DATA              ",Tgeneral_data_t   ,_param->_nb_bypass_write);
107  ALLOC1_SC_SIGNAL( in_BYPASS_WRITE_SPR_VAL               ," in_BYPASS_WRITE_SPR_VAL               ",Tcontrol_t        ,_param->_nb_bypass_write);
108  ALLOC1_SC_SIGNAL( in_BYPASS_WRITE_SPR_NUM_REG           ," in_BYPASS_WRITE_SPR_NUM_REG           ",Tspecial_address_t,_param->_nb_bypass_write);
109  ALLOC1_SC_SIGNAL( in_BYPASS_WRITE_SPR_DATA              ," in_BYPASS_WRITE_SPR_DATA              ",Tspecial_data_t   ,_param->_nb_bypass_write);
110  ALLOC1_SC_SIGNAL( in_BYPASS_MEMORY_VAL                  ," in_BYPASS_MEMORY_VAL                  ",Tcontrol_t        ,_param->_nb_bypass_memory);
111  ALLOC1_SC_SIGNAL( in_BYPASS_MEMORY_OOO_ENGINE_ID        ," in_BYPASS_MEMORY_OOO_ENGINE_ID        ",Tcontext_t        ,_param->_nb_bypass_memory);
112  ALLOC1_SC_SIGNAL( in_BYPASS_MEMORY_NUM_REG              ," in_BYPASS_MEMORY_NUM_REG              ",Tgeneral_address_t,_param->_nb_bypass_memory);
113  ALLOC1_SC_SIGNAL( in_BYPASS_MEMORY_DATA                 ," in_BYPASS_MEMORY_DATA                 ",Tgeneral_data_t   ,_param->_nb_bypass_memory);
114 
115  /********************************************************
116   * Instanciation
117   ********************************************************/
118 
119  msg(_("<%s> : Instanciation of _Read_unit.\n"),name.c_str());
120
121  (*(_Read_unit->in_CLOCK))        (*(in_CLOCK));
122  (*(_Read_unit->in_NRESET))       (*(in_NRESET));
123
124  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_VAL                   );
125  INSTANCE_SC_SIGNAL (_Read_unit,out_READ_UNIT_IN_ACK                   );
126  if (_param->_have_port_context_id)
127  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_CONTEXT_ID            );
128  if (_param->_have_port_front_end_id)
129  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_FRONT_END_ID          );
130  if (_param->_have_port_ooo_engine_id)
131  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_OOO_ENGINE_ID         );
132  if (_param->_have_port_packet_id)
133  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_PACKET_ID             );
134  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_OPERATION             );
135  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_TYPE                  );
136  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE );
137  if (_param->_have_port_load_queue_ptr)
138  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE  );
139  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_HAS_IMMEDIAT          );
140  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_IMMEDIAT              );
141  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_READ_RA               );
142  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_NUM_REG_RA            );
143  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_READ_RB               );
144  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_NUM_REG_RB            );
145  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_READ_RC               );
146  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_NUM_REG_RC            );
147  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_WRITE_RD              );
148  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_NUM_REG_RD            );
149  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_WRITE_RE              );
150  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_NUM_REG_RE            );
151  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_VAL                  ,_param->_nb_inst_retire);
152  INSTANCE1_SC_SIGNAL(_Read_unit, in_READ_UNIT_OUT_ACK                  ,_param->_nb_inst_retire);
153  if (_param->_have_port_context_id)
154  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_CONTEXT_ID           ,_param->_nb_inst_retire);
155  if (_param->_have_port_front_end_id)
156  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_FRONT_END_ID         ,_param->_nb_inst_retire);
157  if (_param->_have_port_ooo_engine_id)
158  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_OOO_ENGINE_ID        ,_param->_nb_inst_retire);
159  if (_param->_have_port_packet_id)
160  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_PACKET_ID            ,_param->_nb_inst_retire);
161  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_OPERATION            ,_param->_nb_inst_retire);
162  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_TYPE                 ,_param->_nb_inst_retire);
163  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_retire);
164  if (_param->_have_port_load_queue_ptr)
165  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_retire);
166  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_HAS_IMMEDIAT         ,_param->_nb_inst_retire);
167  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_IMMEDIAT             ,_param->_nb_inst_retire);
168  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_DATA_RA              ,_param->_nb_inst_retire);
169  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_DATA_RB              ,_param->_nb_inst_retire);
170  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_DATA_RC              ,_param->_nb_inst_retire);
171  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_WRITE_RD             ,_param->_nb_inst_retire);
172  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_NUM_REG_RD           ,_param->_nb_inst_retire);
173  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_WRITE_RE             ,_param->_nb_inst_retire);
174  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_NUM_REG_RE           ,_param->_nb_inst_retire);
175  INSTANCE1_SC_SIGNAL(_Read_unit,out_GPR_READ_VAL                       ,_param->_nb_gpr_read);
176  INSTANCE1_SC_SIGNAL(_Read_unit, in_GPR_READ_ACK                       ,_param->_nb_gpr_read);
177  if (_param->_have_port_ooo_engine_id)
178  INSTANCE1_SC_SIGNAL(_Read_unit,out_GPR_READ_OOO_ENGINE_ID             ,_param->_nb_gpr_read);
179  INSTANCE1_SC_SIGNAL(_Read_unit,out_GPR_READ_NUM_REG                   ,_param->_nb_gpr_read);
180  INSTANCE1_SC_SIGNAL(_Read_unit, in_GPR_READ_DATA                      ,_param->_nb_gpr_read);
181  INSTANCE1_SC_SIGNAL(_Read_unit, in_GPR_READ_DATA_VAL                  ,_param->_nb_gpr_read);
182  INSTANCE1_SC_SIGNAL(_Read_unit,out_SPR_READ_VAL                       ,_param->_nb_spr_read);
183  INSTANCE1_SC_SIGNAL(_Read_unit, in_SPR_READ_ACK                       ,_param->_nb_spr_read);
184  if (_param->_have_port_ooo_engine_id)
185  INSTANCE1_SC_SIGNAL(_Read_unit,out_SPR_READ_OOO_ENGINE_ID             ,_param->_nb_spr_read);
186  INSTANCE1_SC_SIGNAL(_Read_unit,out_SPR_READ_NUM_REG                   ,_param->_nb_spr_read);
187  INSTANCE1_SC_SIGNAL(_Read_unit, in_SPR_READ_DATA                      ,_param->_nb_spr_read);
188  INSTANCE1_SC_SIGNAL(_Read_unit, in_SPR_READ_DATA_VAL                  ,_param->_nb_spr_read);
189  INSTANCE1_SC_SIGNAL(_Read_unit, in_GPR_WRITE_VAL                      ,_param->_nb_gpr_write);
190  if (_param->_have_port_ooo_engine_id)
191  INSTANCE1_SC_SIGNAL(_Read_unit, in_GPR_WRITE_OOO_ENGINE_ID            ,_param->_nb_gpr_write);
192  INSTANCE1_SC_SIGNAL(_Read_unit, in_GPR_WRITE_NUM_REG                  ,_param->_nb_gpr_write);
193  INSTANCE1_SC_SIGNAL(_Read_unit, in_GPR_WRITE_DATA                     ,_param->_nb_gpr_write);
194  INSTANCE1_SC_SIGNAL(_Read_unit, in_SPR_WRITE_VAL                      ,_param->_nb_spr_write);
195  if (_param->_have_port_ooo_engine_id)
196  INSTANCE1_SC_SIGNAL(_Read_unit, in_SPR_WRITE_OOO_ENGINE_ID            ,_param->_nb_spr_write);
197  INSTANCE1_SC_SIGNAL(_Read_unit, in_SPR_WRITE_NUM_REG                  ,_param->_nb_spr_write);
198  INSTANCE1_SC_SIGNAL(_Read_unit, in_SPR_WRITE_DATA                     ,_param->_nb_spr_write);
199  if (_param->_have_port_ooo_engine_id)
200  INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_WRITE_OOO_ENGINE_ID         ,_param->_nb_bypass_write);
201  INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_WRITE_GPR_VAL               ,_param->_nb_bypass_write);
202  INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_WRITE_GPR_NUM_REG           ,_param->_nb_bypass_write);
203  INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_WRITE_GPR_DATA              ,_param->_nb_bypass_write);
204  INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_WRITE_SPR_VAL               ,_param->_nb_bypass_write);
205  INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_WRITE_SPR_NUM_REG           ,_param->_nb_bypass_write);
206  INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_WRITE_SPR_DATA              ,_param->_nb_bypass_write);
207  INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_MEMORY_VAL                  ,_param->_nb_bypass_memory);
208  if (_param->_have_port_ooo_engine_id)
209  INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_MEMORY_OOO_ENGINE_ID        ,_param->_nb_bypass_memory);
210  INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_MEMORY_NUM_REG              ,_param->_nb_bypass_memory);
211  INSTANCE1_SC_SIGNAL(_Read_unit, in_BYPASS_MEMORY_DATA                 ,_param->_nb_bypass_memory);
212 
213  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
214   
215  Time * _time = new Time();
216
217  /********************************************************
218   * Simulation - Begin
219   ********************************************************/
220
221  // Initialisation
222
223  const uint32_t seed = 0;
224//const uint32_t seed = static_cast<uint32_t>(time(NULL));
225
226  srand(seed);
227
228  SC_START(0);
229  LABEL("Initialisation");
230
231  LABEL("Reset");
232  in_NRESET->write(0);
233  SC_START(5);
234  in_NRESET->write(1); 
235
236  LABEL("Loop of Test");
237
238  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
239    {
240      LABEL("Iteration %d",iteration);
241
242      SC_START(1);
243    }
244
245  /********************************************************
246   * Simulation - End
247   ********************************************************/
248
249  TEST_OK ("End of Simulation");
250  delete _time;
251
252  msg(_("<%s> : ............ Stop Simulation\n"),name.c_str());
253
254  delete in_CLOCK;
255  delete in_NRESET;
256#endif
257
258  delete _Read_unit;
259#ifdef STATISTICS
260  delete _parameters_statistics;
261#endif
262}
Note: See TracBrowser for help on using the repository browser.