source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_depth.cpp @ 123

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

1) Fix performance
2) add auto generation to SPECINT2000
3) add reset in genMoore and genMealy

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Front_end_Glue_genMealy_depth.cpp 123 2009-06-08 20:43:30Z rosiere $
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/include/Front_end_Glue.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace front_end_glue {
17
18#undef  FUNCTION
19#define FUNCTION "Front_end_Glue::genMealy_depth"
20  void Front_end_Glue::genMealy_depth (void)
21  {
22    log_begin(Front_end_Glue,FUNCTION);
23
24    if (PORT_READ(in_NRESET))
25      {
26    for (uint32_t i=0; i<_param->_nb_context; ++i)
27      {
28        if (_param->_have_port_depth)
29          {
30        Tdepth_t min = PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN [i]);
31        PORT_WRITE(out_DEPTH_CONTEXT_STATE_MIN [i],min);
32        PORT_WRITE(out_DEPTH_MIN               [i],min);
33        PORT_WRITE(out_DEPTH_MAX               [i], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX [i]));
34          }
35        PORT_WRITE(out_DEPTH_FULL              [i], PORT_READ(in_DEPTH_PREDICTION_UNIT_FULL [i]));
36      }
37
38    for (uint32_t i=0; i<_param->_nb_decod_unit; ++i)
39      for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j)
40        {
41          uint32_t num_context = _param->_translate_context_id_from_decod_unit[i][j];
42         
43          PORT_WRITE(out_CONTEXT_DECOD_UNIT_DEPTH_VAL [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_VAL     [num_context]));
44          if (_param->_have_port_depth)
45            {
46          PORT_WRITE(out_CONTEXT_DECOD_UNIT_DEPTH     [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_CURRENT [num_context]));
47          PORT_WRITE(out_DEPTH_DECOD_UNIT_MIN         [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN     [num_context]));
48          PORT_WRITE(out_DEPTH_DECOD_UNIT_MAX         [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX     [num_context]));
49            }
50          PORT_WRITE(out_DEPTH_DECOD_UNIT_FULL        [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_FULL    [num_context]));
51        }
52      }
53
54    log_end(Front_end_Glue,FUNCTION);
55  };
56
57}; // end namespace front_end_glue
58}; // end namespace front_end
59}; // end namespace multi_front_end
60}; // end namespace core
61
62}; // end namespace behavioural
63}; // end namespace morpheo             
64#endif
Note: See TracBrowser for help on using the repository browser.