#ifdef SYSTEMC
/*
 * $Id: OOO_Engine_Glue_genMealy_retire.cpp 88 2008-12-10 18:31:39Z rosiere $
 *
 * [ Description ]
 * 
 */
/*
#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/include/OOO_Engine_Glue.h"

namespace morpheo                    {
namespace behavioural {
namespace core {
namespace multi_ooo_engine {
namespace ooo_engine {
namespace ooo_engine_glue {


#undef  FUNCTION
#define FUNCTION "OOO_Engine_Glue::genMealy_retire"
  void OOO_Engine_Glue::genMealy_retire (void)
  {
    log_begin(OOO_Engine_Glue,FUNCTION);
    log_function(OOO_Engine_Glue,FUNCTION,_name.c_str());

    uint32_t x=0;
    for (uint32_t i=0; i<_param->_nb_rename_unit; ++i)
      for (uint32_t j=0; j<_param->_nb_inst_retire[i]; ++j)
        {
          Tcontext_t         FRONT_END_ID       = (_param->_have_port_front_end_id)?PORT_READ(in_RETIRE_COMMIT_UNIT_FRONT_END_ID [i][j]):0;
          Tcontrol_t         WRITE_RD           = PORT_READ(in_RETIRE_COMMIT_UNIT_WRITE_RD           [i][j]);
          Tgeneral_address_t NUM_REG_RD_PHY_OLD = PORT_READ(in_RETIRE_COMMIT_UNIT_NUM_REG_RD_PHY_OLD [i][j]);
          Tgeneral_address_t NUM_REG_RD_PHY_NEW = PORT_READ(in_RETIRE_COMMIT_UNIT_NUM_REG_RD_PHY_NEW [i][j]);
          Tcontrol_t         WRITE_RE           = PORT_READ(in_RETIRE_COMMIT_UNIT_WRITE_RE           [i][j]);
          Tspecial_address_t NUM_REG_RE_PHY_OLD = PORT_READ(in_RETIRE_COMMIT_UNIT_NUM_REG_RE_PHY_OLD [i][j]);
          Tspecial_address_t NUM_REG_RE_PHY_NEW = PORT_READ(in_RETIRE_COMMIT_UNIT_NUM_REG_RE_PHY_NEW [i][j]);
          Tevent_state_t     EVENT_STATE        = PORT_READ(in_RETIRE_COMMIT_UNIT_EVENT_STATE        [i][j]);

          Tgeneral_address_t general_address_msb= FRONT_END_ID << _param->_size_general_register;
          Tspecial_address_t special_address_msb= FRONT_END_ID << _param->_size_special_register;

          PORT_WRITE(out_RETIRE_RD_OLD_USE     [x],0); 
          PORT_WRITE(out_RETIRE_RD_OLD_NUM_REG [x],general_address_msb | NUM_REG_RD_PHY_OLD);
          PORT_WRITE(out_RETIRE_RD_NEW_USE     [x],WRITE_RD);
          PORT_WRITE(out_RETIRE_RD_NEW_NUM_REG [x],general_address_msb | NUM_REG_RD_PHY_NEW);
          PORT_WRITE(out_RETIRE_RE_OLD_USE     [x],0); 
          PORT_WRITE(out_RETIRE_RE_OLD_NUM_REG [x],special_address_msb | NUM_REG_RE_PHY_OLD);
          PORT_WRITE(out_RETIRE_RE_NEW_USE     [x],WRITE_RE);
          PORT_WRITE(out_RETIRE_RE_NEW_NUM_REG [x],special_address_msb | NUM_REG_RE_PHY_NEW);
          
          if (_param->_have_port_front_end_id)
          PORT_WRITE(out_RETIRE_RENAME_UNIT_FRONT_END_ID       [i][j],_param->_translate_front_end_id_to_rename_unit [FRONT_END_ID]);
          PORT_WRITE(out_RETIRE_RENAME_UNIT_WRITE_RD           [i][j],WRITE_RD          );
          PORT_WRITE(out_RETIRE_RENAME_UNIT_NUM_REG_RD_PHY_OLD [i][j],NUM_REG_RD_PHY_OLD);
          PORT_WRITE(out_RETIRE_RENAME_UNIT_NUM_REG_RD_PHY_NEW [i][j],NUM_REG_RD_PHY_NEW);
          PORT_WRITE(out_RETIRE_RENAME_UNIT_WRITE_RE           [i][j],WRITE_RE          );
          PORT_WRITE(out_RETIRE_RENAME_UNIT_NUM_REG_RE_PHY_OLD [i][j],NUM_REG_RE_PHY_OLD);
          PORT_WRITE(out_RETIRE_RENAME_UNIT_NUM_REG_RE_PHY_NEW [i][j],NUM_REG_RE_PHY_NEW);
          PORT_WRITE(out_RETIRE_RENAME_UNIT_EVENT_STATE        [i][j],EVENT_STATE       );
           
          x ++;
        }

    log_end(OOO_Engine_Glue,FUNCTION);
  };

}; // end namespace ooo_engine_glue
}; // end namespace ooo_engine
}; // end namespace multi_ooo_engine
}; // end namespace core

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