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

Last change on this file since 88 was 88, checked in by rosiere, 16 years ago

Almost complete design
with Test and test platform

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