#ifdef SYSTEMC
/*
 * $Id: Front_end_Glue_genMealy_decod.cpp 88 2008-12-10 18:31:39Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/include/Front_end_Glue.h"

namespace morpheo                    {
namespace behavioural {
namespace core {
namespace multi_front_end {
namespace front_end {
namespace front_end_glue {

#undef  FUNCTION
#define FUNCTION "Front_end_Glue::genMealy_decod"
  void Front_end_Glue::genMealy_decod (void)
  {
    log_begin(Front_end_Glue,FUNCTION);

    // Warning : this function is an sc_method if _have_port_context_id

    for (uint32_t i=0; i<_param->_nb_decod_unit; ++i)
      for (uint32_t j=0; j<_param->_nb_inst_decod[i]; ++j)
        PORT_WRITE(out_DECOD_CONTEXT_ID [i][j],_param->_translate_context_id_from_decod_unit[i][PORT_READ(in_DECOD_DECOD_UNIT_CONTEXT_ID [i][j])]);

    log_end(Front_end_Glue,FUNCTION);
  };

}; // end namespace front_end_glue
}; // end namespace front_end
}; // end namespace multi_front_end
}; // end namespace core

}; // end namespace behavioural
}; // end namespace morpheo              
#endif
