source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod.cpp @ 132

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

1) add constant method - compatibility with SystemC
2) add Script to test sensitive list
3) fix bug in sensitive list

  • Property svn:keywords set to Id
File size: 22.2 KB
Line 
1/*
2 * $Id: Decod.cpp 132 2009-07-11 16:39:35Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h"
9
10namespace morpheo                    {
11namespace behavioural {
12namespace core {
13namespace multi_front_end {
14namespace front_end {
15namespace decod_unit {
16namespace decod {
17
18
19#undef  FUNCTION
20#define FUNCTION "Decod::Decod"
21  Decod::Decod
22  (
23#ifdef SYSTEMC
24   sc_module_name name,
25#else
26   string name,
27#endif
28#ifdef STATISTICS
29   morpheo::behavioural::Parameters_Statistics * param_statistics,
30#endif
31   morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::Parameters * param,
32   morpheo::behavioural::Tusage_t usage
33   ):
34    _name              (name)
35    ,_param            (param)
36    ,_usage            (usage)
37  {
38    log_printf(FUNC,Decod,FUNCTION,"Begin");
39
40// #if DEBUG_Decod == true
41//     log_printf(INFO,Decod,FUNCTION,_("<%s> Parameters"),_name.c_str());
42
43//     std::cout << *param << std::endl;
44// #endif   
45
46    log_printf(INFO,Decod,FUNCTION,"Allocation");
47
48    allocation (
49#ifdef STATISTICS
50                param_statistics
51#endif
52                );
53
54#ifdef STATISTICS
55    if (usage_is_set(_usage,USE_STATISTICS))
56      { 
57        log_printf(INFO,Decod,FUNCTION,"Allocation of statistics");
58
59        statistics_allocation(param_statistics);
60      }
61#endif
62
63#ifdef VHDL
64    if (usage_is_set(_usage,USE_VHDL))
65      {
66        // generate the vhdl
67        log_printf(INFO,Decod,FUNCTION,"Generate the vhdl");
68       
69        vhdl();
70      }
71#endif
72
73#ifdef SYSTEMC
74    if (usage_is_set(_usage,USE_SYSTEMC))
75      {
76        log_printf(INFO,Decod,FUNCTION,"Method - transition");
77
78        SC_METHOD (transition);
79        dont_initialize ();
80        sensitive << (*(in_CLOCK)).pos();
81       
82# ifdef SYSTEMCASS_SPECIFIC
83        // List dependency information
84# endif   
85       
86        log_printf(INFO,Decod,FUNCTION,"Method - genMealy");
87
88        SC_METHOD (genMealy);
89        dont_initialize ();
90        sensitive << (*(in_CLOCK)).neg() //use internal register
91                  << (*(in_NRESET))
92                  << (*(in_CONTEXT_EVENT_ACK));
93        for (uint32_t i=0; i<_param->_nb_context; i++)
94          {
95            for (uint32_t j=0; j<_param->_nb_inst_fetch [i]; j++)
96              sensitive << (*(in_IFETCH_VAL         [i][j]))
97                        << (*(in_IFETCH_INSTRUCTION [i][j]));
98            sensitive << (*(in_IFETCH_ADDRESS                     [i]))
99//                    << (*(in_IFETCH_ADDRESS_NEXT                [i]))
100                      << (*(in_IFETCH_BRANCH_STATE                [i]))
101                      << (*(in_IFETCH_EXCEPTION                   [i]))
102                      << (*(in_CONTEXT_DECOD_ENABLE               [i]));
103            if (_param->_have_port_context_id)
104            sensitive << (*(in_IFETCH_CONTEXT_ID                  [i]));
105            if (_param->_have_port_depth)
106            sensitive << (*(in_IFETCH_BRANCH_UPDATE_PREDICTION_ID [i]));
107            sensitive << (*(in_CONTEXT_DEPTH_VAL                  [i]));
108            if (_param->_have_port_depth)
109            sensitive << (*(in_CONTEXT_DEPTH                      [i]));
110            if (_param->_have_port_inst_ifetch_ptr)
111            sensitive << (*(in_IFETCH_INST_IFETCH_PTR             [i]));
112          }
113
114        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
115          sensitive << (*(in_DECOD_ACK            [i]))
116                    << (*(in_PREDICT_ACK          [i]))
117                    << (*(in_PREDICT_CAN_CONTINUE [i]))
118            ;
119
120# ifdef SYSTEMCASS_SPECIFIC
121        /*
122        // List dependency information
123
124        for (uint32_t i=0; i<_param->_nb_context; i++)
125          {
126            for (uint32_t j=0; j<_param->_nb_inst_fetch [i]; j++)
127              {
128                (*(out_IFETCH_ACK [i][j])) (*(in_IFETCH_VAL           [i][j]));
129                (*(out_IFETCH_ACK [i][j])) (*(in_IFETCH_INSTRUCTION   [i][j]));
130                if (_param->_have_port_context_id)
131                (*(out_IFETCH_ACK [i][j])) (*(in_IFETCH_CONTEXT_ID    [i]   ));
132                (*(out_IFETCH_ACK [i][j])) (*(in_CONTEXT_DECOD_ENABLE [i]   ));
133                (*(out_IFETCH_ACK [i][j])) (*(in_CONTEXT_EVENT_ACK          ));
134                for (uint32_t x=0; x<_param->_nb_inst_decod; x++)
135                  {
136                    (*(out_IFETCH_ACK [i][j])) (*(in_DECOD_ACK   [x]));
137                    (*(out_IFETCH_ACK [i][j])) (*(in_PREDICT_ACK [x]));
138//                  (*(out_IFETCH_ACK [i][j])) (*(in_PREDICT_CAN_CONTINUE [x]));
139                  }
140              }
141          }
142
143        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
144          {
145
146            (*(out_DECOD_VAL [i])) (*(in_PREDICT_ACK          [i]));
147//          (*(out_DECOD_VAL [i])) (*(in_PREDICT_CAN_CONTINUE [i]));
148            (*(out_DECOD_VAL [i])) (*(in_CONTEXT_EVENT_ACK    ));
149            for (uint32_t x=0; x<_param->_nb_context; x++)
150              {
151                (*(out_DECOD_VAL [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
152                if (_param->_have_port_context_id)
153                (*(out_DECOD_VAL [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
154                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
155                  {
156                    (*(out_DECOD_VAL [i])) (*(in_IFETCH_VAL         [x][y]));
157                    (*(out_DECOD_VAL [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
158                  }
159              }
160
161            if (_param->_have_port_context_id)
162              {
163            for (uint32_t x=0; x<_param->_nb_context; x++)
164              {
165                (*(out_DECOD_CONTEXT_ID [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
166                (*(out_DECOD_CONTEXT_ID [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
167                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
168                  {
169                    (*(out_DECOD_CONTEXT_ID [i])) (*(in_IFETCH_VAL [x][y]));
170                  }
171              }
172              }
173
174            for (uint32_t x=0; x<_param->_nb_context; x++)
175              {
176            if (_param->_have_port_depth[i])
177              {
178
179                (*(out_DECOD_DEPTH [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
180                (*(out_DECOD_DEPTH [i])) (*(in_CONTEXT_DEPTH        [x]));
181                if (_param->_have_port_context_id)
182                (*(out_DECOD_DEPTH [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
183                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
184                  {
185                    (*(out_DECOD_DEPTH [i])) (*(in_IFETCH_VAL [x][y]));
186                  }
187              }
188              }
189
190            for (uint32_t x=0; x<_param->_nb_context; x++)
191              {
192                (*(out_DECOD_TYPE [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
193                if (_param->_have_port_context_id)
194                (*(out_DECOD_TYPE [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
195                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
196                  {
197                    (*(out_DECOD_TYPE [i])) (*(in_IFETCH_VAL         [x][y]));
198                    (*(out_DECOD_TYPE [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
199                  }
200              }
201
202            for (uint32_t x=0; x<_param->_nb_context; x++)
203              {
204                (*(out_DECOD_OPERATION [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
205                if (_param->_have_port_context_id)
206                (*(out_DECOD_OPERATION [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
207                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
208                  {
209                    (*(out_DECOD_OPERATION [i])) (*(in_IFETCH_VAL         [x][y]));
210                    (*(out_DECOD_OPERATION [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
211                  }
212              }
213
214            for (uint32_t x=0; x<_param->_nb_context; x++)
215              {
216                (*(out_DECOD_IS_DELAY_SLOT [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
217                if (_param->_have_port_context_id)
218                (*(out_DECOD_IS_DELAY_SLOT [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
219                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
220                  {
221                    (*(out_DECOD_IS_DELAY_SLOT [i])) (*(in_IFETCH_VAL         [x][y]));
222                    (*(out_DECOD_IS_DELAY_SLOT [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
223                  }
224              }
225
226            for (uint32_t x=0; x<_param->_nb_context; x++)
227              {
228                (*(out_DECOD_HAS_IMMEDIAT [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
229                if (_param->_have_port_context_id)
230                (*(out_DECOD_HAS_IMMEDIAT [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
231                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
232                  {
233                    (*(out_DECOD_HAS_IMMEDIAT [i])) (*(in_IFETCH_VAL         [x][y]));
234                    (*(out_DECOD_HAS_IMMEDIAT [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
235                  }
236              }
237
238            for (uint32_t x=0; x<_param->_nb_context; x++)
239              {
240                (*(out_DECOD_READ_RA [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
241                if (_param->_have_port_context_id)
242                (*(out_DECOD_READ_RA [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
243                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
244                  {
245                    (*(out_DECOD_READ_RA [i])) (*(in_IFETCH_VAL         [x][y]));
246                    (*(out_DECOD_READ_RA [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
247                  }
248              }
249           
250            for (uint32_t x=0; x<_param->_nb_context; x++)
251              {
252                (*(out_DECOD_NUM_REG_RA [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
253                if (_param->_have_port_context_id)
254                (*(out_DECOD_NUM_REG_RA [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
255                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
256                  {
257                    (*(out_DECOD_NUM_REG_RA [i])) (*(in_IFETCH_VAL         [x][y]));
258                    (*(out_DECOD_NUM_REG_RA [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
259                  }
260              }
261
262            for (uint32_t x=0; x<_param->_nb_context; x++)
263              {
264                (*(out_DECOD_READ_RB [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
265                if (_param->_have_port_context_id)
266                (*(out_DECOD_READ_RB [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
267                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
268                  {
269                    (*(out_DECOD_READ_RB [i])) (*(in_IFETCH_VAL         [x][y]));
270                    (*(out_DECOD_READ_RB [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
271                  }
272              }
273
274            for (uint32_t x=0; x<_param->_nb_context; x++)
275              {
276                (*(out_DECOD_NUM_REG_RB [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
277                if (_param->_have_port_context_id)
278                (*(out_DECOD_NUM_REG_RB [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
279                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
280                  {
281                    (*(out_DECOD_NUM_REG_RB [i])) (*(in_IFETCH_VAL         [x][y]));
282                    (*(out_DECOD_NUM_REG_RB [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
283                  }
284              }
285
286            for (uint32_t x=0; x<_param->_nb_context; x++)
287              {
288                (*(out_DECOD_READ_RC [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
289                if (_param->_have_port_context_id)
290                (*(out_DECOD_READ_RC [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
291                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
292                  {
293                    (*(out_DECOD_READ_RC [i])) (*(in_IFETCH_VAL         [x][y]));
294                    (*(out_DECOD_READ_RC [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
295                  }
296              }
297
298            for (uint32_t x=0; x<_param->_nb_context; x++)
299              {
300                (*(out_DECOD_NUM_REG_RC [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
301                if (_param->_have_port_context_id)
302                (*(out_DECOD_NUM_REG_RC [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
303                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
304                  {
305                    (*(out_DECOD_NUM_REG_RC [i])) (*(in_IFETCH_VAL         [x][y]));
306                    (*(out_DECOD_NUM_REG_RC [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
307                  }
308              }
309
310            for (uint32_t x=0; x<_param->_nb_context; x++)
311              {
312                (*(out_DECOD_WRITE_RD [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
313                if (_param->_have_port_context_id)
314                (*(out_DECOD_WRITE_RD [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
315                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
316                  {
317                    (*(out_DECOD_WRITE_RD [i])) (*(in_IFETCH_VAL         [x][y]));
318                    (*(out_DECOD_WRITE_RD [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
319                  }
320              }
321
322            for (uint32_t x=0; x<_param->_nb_context; x++)
323              {
324                (*(out_DECOD_NUM_REG_RD [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
325                if (_param->_have_port_context_id)
326                (*(out_DECOD_NUM_REG_RD [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
327                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
328                  {
329                    (*(out_DECOD_NUM_REG_RD [i])) (*(in_IFETCH_VAL         [x][y]));
330                    (*(out_DECOD_NUM_REG_RD [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
331                  }
332              }
333
334            for (uint32_t x=0; x<_param->_nb_context; x++)
335              {
336                (*(out_DECOD_WRITE_RE [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
337                if (_param->_have_port_context_id)
338                (*(out_DECOD_WRITE_RE [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
339                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
340                  {
341                    (*(out_DECOD_WRITE_RE [i])) (*(in_IFETCH_VAL         [x][y]));
342                    (*(out_DECOD_WRITE_RE [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
343                  }
344              }
345
346            for (uint32_t x=0; x<_param->_nb_context; x++)
347              {
348                (*(out_DECOD_NUM_REG_RE [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
349                if (_param->_have_port_context_id)
350                (*(out_DECOD_NUM_REG_RE [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
351                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
352                  {
353                    (*(out_DECOD_NUM_REG_RE [i])) (*(in_IFETCH_VAL         [x][y]));
354                    (*(out_DECOD_NUM_REG_RE [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
355                  }
356              }
357
358            for (uint32_t x=0; x<_param->_nb_context; x++)
359              {
360                (*(out_DECOD_EXCEPTION_USE [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
361                if (_param->_have_port_context_id)
362                (*(out_DECOD_EXCEPTION_USE [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
363                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
364                  {
365                    (*(out_DECOD_EXCEPTION_USE [i])) (*(in_IFETCH_VAL         [x][y]));
366                    (*(out_DECOD_EXCEPTION_USE [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
367                  }
368              }
369
370            for (uint32_t x=0; x<_param->_nb_context; x++)
371              {
372                (*(out_DECOD_ADDRESS [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
373                if (_param->_have_port_context_id)
374                (*(out_DECOD_ADDRESS [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
375                (*(out_DECOD_ADDRESS [i])) (*(in_IFETCH_ADDRESS       [x]));
376                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
377                  {
378                    (*(out_DECOD_ADDRESS [i])) (*(in_IFETCH_VAL         [x][y]));
379                    (*(out_DECOD_ADDRESS [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
380                  }
381              }
382
383            for (uint32_t x=0; x<_param->_nb_context; x++)
384              {
385                (*(out_DECOD_IMMEDIAT [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
386                if (_param->_have_port_context_id)
387                (*(out_DECOD_IMMEDIAT [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
388//              (*(out_DECOD_IMMEDIAT [i])) (*(in_IFETCH_ADDRESS_NEXT  [x]));
389                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
390                  {
391                    (*(out_DECOD_IMMEDIAT [i])) (*(in_IFETCH_VAL         [x][y]));
392                    (*(out_DECOD_IMMEDIAT [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
393                  }
394              }
395
396            if (_param->_have_port_context_id)
397              {
398            for (uint32_t x=0; x<_param->_nb_context; x++)
399              {
400                (*(out_PREDICT_CONTEXT_ID [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
401                (*(out_PREDICT_CONTEXT_ID [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
402                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
403                  {
404                    (*(out_PREDICT_CONTEXT_ID [i])) (*(in_IFETCH_VAL         [x][y]));
405                    (*(out_PREDICT_CONTEXT_ID [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
406                  }
407              }
408              }
409
410            for (uint32_t x=0; x<_param->_nb_context; x++)
411              {
412                (*(out_PREDICT_MATCH_INST_IFETCH_PTR [i])) (*(in_CONTEXT_DECOD_ENABLE   [x]));
413                if (_param->_have_port_context_id)
414                (*(out_PREDICT_MATCH_INST_IFETCH_PTR [i])) (*(in_IFETCH_CONTEXT_ID      [x]));
415                if (_param->_have_port_inst_ifetch_ptr[i])
416                (*(out_PREDICT_MATCH_INST_IFETCH_PTR [i])) (*(in_IFETCH_INST_IFETCH_PTR [x]));
417                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
418                  {
419                    (*(out_PREDICT_MATCH_INST_IFETCH_PTR [i])) (*(in_IFETCH_VAL         [x][y]));
420                    (*(out_PREDICT_MATCH_INST_IFETCH_PTR [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
421                  }
422              }
423
424            for (uint32_t x=0; x<_param->_nb_context; x++)
425              {
426                (*(out_PREDICT_BRANCH_STATE [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
427                if (_param->_have_port_context_id)
428                (*(out_PREDICT_BRANCH_STATE [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
429                (*(out_PREDICT_BRANCH_STATE [i])) (*(in_IFETCH_BRANCH_STATE  [x]));
430                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
431                  {
432                    (*(out_PREDICT_BRANCH_STATE [i])) (*(in_IFETCH_VAL         [x][y]));
433                    (*(out_PREDICT_BRANCH_STATE [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
434                  }
435              }
436
437            if (_param->_have_port_branch_update_prediction_id)
438              {
439            for (uint32_t x=0; x<_param->_nb_context; x++)
440              {
441                (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i])) (*(in_CONTEXT_DECOD_ENABLE                [x]));
442                if (_param->_have_port_context_id)
443                (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i])) (*(in_IFETCH_CONTEXT_ID                   [x]));
444                (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i])) (*(in_IFETCH_BRANCH_UPDATE_PREDICTION_ID  [x]));
445                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
446                  {
447                    (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i])) (*(in_IFETCH_VAL         [x][y]));
448                    (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
449                  }
450              }
451              }
452
453            for (uint32_t x=0; x<_param->_nb_context; x++)
454              {
455                (*(out_PREDICT_BRANCH_CONDITION [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
456                if (_param->_have_port_context_id)
457                (*(out_PREDICT_BRANCH_CONDITION [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
458                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
459                  {
460                    (*(out_PREDICT_BRANCH_CONDITION [i])) (*(in_IFETCH_VAL         [x][y]));
461                    (*(out_PREDICT_BRANCH_CONDITION [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
462                  }
463              }
464
465//          for (uint32_t x=0; x<_param->_nb_context; x++)
466//            {
467//              (*(out_PREDICT_BRANCH_STACK_WRITE [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
468//              if (_param->_have_port_context_id)
469//              (*(out_PREDICT_BRANCH_STACK_WRITE [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
470//              for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
471//                {
472//                  (*(out_PREDICT_BRANCH_STACK_WRITE [i])) (*(in_IFETCH_VAL         [x][y]));
473//                  (*(out_PREDICT_BRANCH_STACK_WRITE [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
474//                }
475//            }
476
477            for (uint32_t x=0; x<_param->_nb_context; x++)
478              {
479                (*(out_PREDICT_BRANCH_DIRECTION [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
480                if (_param->_have_port_context_id)
481                (*(out_PREDICT_BRANCH_DIRECTION [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
482                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
483                  {
484                    (*(out_PREDICT_BRANCH_DIRECTION [i])) (*(in_IFETCH_VAL         [x][y]));
485                    (*(out_PREDICT_BRANCH_DIRECTION [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
486                  }
487              }
488
489            for (uint32_t x=0; x<_param->_nb_context; x++)
490              {
491                (*(out_PREDICT_ADDRESS_DEST [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
492                if (_param->_have_port_context_id)
493                (*(out_PREDICT_ADDRESS_DEST [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
494                (*(out_PREDICT_ADDRESS_DEST [i])) (*(in_IFETCH_ADDRESS       [x]));
495                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
496                  {
497                    (*(out_PREDICT_ADDRESS_DEST [i])) (*(in_IFETCH_VAL         [x][y]));
498                    (*(out_PREDICT_ADDRESS_DEST [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
499                  }
500
501                (*(out_PREDICT_ADDRESS_SRC [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
502                if (_param->_have_port_context_id)
503                (*(out_PREDICT_ADDRESS_SRC [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
504                (*(out_PREDICT_ADDRESS_SRC [i])) (*(in_IFETCH_ADDRESS       [x]));
505                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
506                  {
507                    (*(out_PREDICT_ADDRESS_SRC [i])) (*(in_IFETCH_VAL         [x][y]));
508                    (*(out_PREDICT_ADDRESS_SRC [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
509                  }
510
511              }
512
513
514            (*(out_PREDICT_VAL [i])) (*(in_CONTEXT_EVENT_ACK));
515            (*(out_PREDICT_VAL [i])) (*(in_DECOD_ACK [i]));
516            for (uint32_t x=0; x<_param->_nb_context; x++)
517              {
518                (*(out_PREDICT_VAL [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
519                if (_param->_have_port_context_id)
520                (*(out_PREDICT_VAL [i])) (*(in_IFETCH_CONTEXT_ID    [x]));
521                (*(out_PREDICT_VAL [i])) (*(in_IFETCH_ADDRESS       [x]));
522                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
523                  {
524                    (*(out_PREDICT_VAL [i])) (*(in_IFETCH_VAL         [x][y]));
525                    (*(out_PREDICT_VAL [i])) (*(in_IFETCH_INSTRUCTION [x][y]));
526                  }
527              }
528          }
529
530        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
531          {
532            (*(out_CONTEXT_EVENT_VAL)) (*(in_PREDICT_ACK          [i]));
533//          (*(out_CONTEXT_EVENT_VAL)) (*(in_PREDICT_CAN_CONTINUE [i]));
534            (*(out_CONTEXT_EVENT_VAL)) (*(in_DECOD_ACK   [i]));
535          }
536        for (uint32_t x=0; x<_param->_nb_context; x++)
537          {
538            (*(out_CONTEXT_EVENT_VAL)) (*(in_CONTEXT_DECOD_ENABLE [x]));
539            if (_param->_have_port_context_id)
540            (*(out_CONTEXT_EVENT_VAL)) (*(in_IFETCH_CONTEXT_ID    [x]));
541            (*(out_CONTEXT_EVENT_VAL)) (*(in_IFETCH_ADDRESS       [x]));
542            for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
543              {
544                (*(out_CONTEXT_EVENT_VAL)) (*(in_IFETCH_VAL         [x][y]));
545                (*(out_CONTEXT_EVENT_VAL)) (*(in_IFETCH_INSTRUCTION [x][y]));
546              }
547          }
548
549        if (_param->_have_port_context_id)
550          {
551        for (uint32_t x=0; x<_param->_nb_context; x++)
552          {
553            (*(out_CONTEXT_EVENT_CONTEXT_ID)) (*(in_CONTEXT_DECOD_ENABLE [x]));
554            (*(out_CONTEXT_EVENT_CONTEXT_ID)) (*(in_IFETCH_CONTEXT_ID    [x]));
555            for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
556              {
557                (*(out_CONTEXT_EVENT_CONTEXT_ID)) (*(in_IFETCH_VAL         [x][y]));
558                (*(out_CONTEXT_EVENT_CONTEXT_ID)) (*(in_IFETCH_INSTRUCTION [x][y]));
559              }
560          }
561          }
562
563        for (uint32_t x=0; x<_param->_nb_context; x++)
564          {
565            (*(out_CONTEXT_EVENT_TYPE)) (*(in_CONTEXT_DECOD_ENABLE [x]));
566            if (_param->_have_port_context_id)
567            (*(out_CONTEXT_EVENT_TYPE)) (*(in_IFETCH_CONTEXT_ID    [x]));
568            for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
569              {
570                (*(out_CONTEXT_EVENT_TYPE)) (*(in_IFETCH_VAL         [x][y]));
571                (*(out_CONTEXT_EVENT_TYPE)) (*(in_IFETCH_INSTRUCTION [x][y]));
572              }
573          }
574
575        for (uint32_t x=0; x<_param->_nb_context; x++)
576          {
577            (*(out_CONTEXT_EVENT_IS_DELAY_SLOT)) (*(in_CONTEXT_DECOD_ENABLE [x]));
578            if (_param->_have_port_context_id)
579            (*(out_CONTEXT_EVENT_IS_DELAY_SLOT)) (*(in_IFETCH_CONTEXT_ID    [x]));
580            for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
581              {
582                (*(out_CONTEXT_EVENT_IS_DELAY_SLOT)) (*(in_IFETCH_VAL         [x][y]));
583                (*(out_CONTEXT_EVENT_IS_DELAY_SLOT)) (*(in_IFETCH_INSTRUCTION [x][y]));
584              }
585          }
586
587        for (uint32_t x=0; x<_param->_nb_context; x++)
588          {
589            (*(out_CONTEXT_EVENT_ADDRESS)) (*(in_CONTEXT_DECOD_ENABLE [x]));
590            if (_param->_have_port_context_id)
591            (*(out_CONTEXT_EVENT_ADDRESS)) (*(in_IFETCH_CONTEXT_ID    [x]));
592            (*(out_CONTEXT_EVENT_ADDRESS)) (*(in_IFETCH_ADDRESS       [x]));
593//          (*(out_CONTEXT_EVENT_ADDRESS)) (*(in_IFETCH_ADDRESS_NEXT  [x]));
594            for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
595              {
596                (*(out_CONTEXT_EVENT_ADDRESS)) (*(in_IFETCH_VAL         [x][y]));
597                (*(out_CONTEXT_EVENT_ADDRESS)) (*(in_IFETCH_INSTRUCTION [x][y]));
598              }
599          }
600
601        for (uint32_t x=0; x<_param->_nb_context; x++)
602          {
603            (*(out_CONTEXT_EVENT_ADDRESS_EPCR)) (*(in_CONTEXT_DECOD_ENABLE [x]));
604            if (_param->_have_port_context_id)
605            (*(out_CONTEXT_EVENT_ADDRESS_EPCR)) (*(in_IFETCH_CONTEXT_ID    [x]));
606            (*(out_CONTEXT_EVENT_ADDRESS_EPCR)) (*(in_IFETCH_ADDRESS       [x]));
607//          (*(out_CONTEXT_EVENT_ADDRESS_EPCR)) (*(in_IFETCH_ADDRESS_NEXT  [x]));
608            for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
609              {
610                (*(out_CONTEXT_EVENT_ADDRESS_EPCR)) (*(in_IFETCH_VAL         [x][y]));
611                (*(out_CONTEXT_EVENT_ADDRESS_EPCR)) (*(in_IFETCH_INSTRUCTION [x][y]));
612              }
613          }
614        */
615# endif   
616       
617      }
618#endif
619
620    log_printf(FUNC,Decod,FUNCTION,"End");
621  };
622   
623#undef  FUNCTION
624#define FUNCTION "Decod::~Decod"
625  Decod::~Decod (void)
626  {
627    log_printf(FUNC,Decod,FUNCTION,"Begin");
628
629#ifdef STATISTICS
630    if (usage_is_set(_usage,USE_STATISTICS))
631      {
632        statistics_deallocation();
633      }
634#endif
635
636    log_printf(INFO,Decod,FUNCTION,"Deallocation");
637    deallocation ();
638
639    log_printf(FUNC,Decod,FUNCTION,"End");
640  };
641
642}; // end namespace decod
643}; // end namespace decod_unit
644}; // end namespace front_end
645}; // end namespace multi_front_end
646}; // end namespace core
647
648}; // end namespace behavioural
649}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.