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

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

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Front_end_Glue_genMealy_depth.cpp 88 2008-12-10 18:31:39Z 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    for (uint32_t i=0; i<_param->_nb_context; ++i)
25      {
26        if (_param->_have_port_depth)
27          {
28            Tdepth_t min = PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN [i]);
29            PORT_WRITE(out_DEPTH_CONTEXT_STATE_MIN [i],min);
30            PORT_WRITE(out_DEPTH_MIN               [i],min);
31          }
32
33        PORT_WRITE(out_DEPTH_MAX [i], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX [i]));
34      }
35
36    for (uint32_t i=0; i<_param->_nb_decod_unit; ++i)
37      for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j)
38        {
39          uint32_t num_context = _param->_translate_context_id_from_decod_unit[i][j];
40         
41          if (_param->_have_port_depth)
42            {
43          PORT_WRITE(out_CONTEXT_DECOD_UNIT_DEPTH  [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_CURRENT [num_context]));
44          PORT_WRITE(out_DEPTH_DECOD_UNIT_MIN      [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN     [num_context]));
45            }
46          PORT_WRITE(out_DEPTH_DECOD_UNIT_MAX      [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX     [num_context]));
47        }
48
49    log_end(Front_end_Glue,FUNCTION);
50  };
51
52}; // end namespace front_end_glue
53}; // end namespace front_end
54}; // end namespace multi_front_end
55}; // end namespace core
56
57}; // end namespace behavioural
58}; // end namespace morpheo             
59#endif
Note: See TracBrowser for help on using the repository browser.