#ifdef SYSTEMC
/*
 * $Id: Free_List_unit_genMoore.cpp 123 2009-06-08 20:43:30Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Free_List_unit.h"

# ifdef DEBUG_TEST

namespace morpheo                    {
namespace behavioural {
namespace core {
namespace multi_ooo_engine {
namespace ooo_engine {
namespace rename_unit {
namespace register_translation_unit {
namespace free_list_unit {


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

//     if (PORT_READ(in_NRESET))
      {
    uint32_t gpr = 0;
    uint32_t spr = 0;
    
    for (uint32_t i=0; i<_param->_nb_bank; i++)
      {
        gpr += _gpr_list[i].size();
        spr += _spr_list[i].size();
      }
    
    PORT_WRITE(out_INFO_NB_GPR_FREE, gpr);
    PORT_WRITE(out_INFO_NB_SPR_FREE, spr);
      }
    

    log_end(Free_List_unit,FUNCTION);
  };

}; // end namespace free_list_unit
}; // end namespace register_translation_unit
}; // end namespace rename_unit
}; // end namespace ooo_engine
}; // end namespace multi_ooo_engine
}; // end namespace core

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