#ifdef SYSTEMC
/*
 * $Id: Queue_genMoore.cpp 81 2008-04-15 18:40:01Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Generic/Queue/include/Queue.h"

namespace morpheo                    {
namespace behavioural {
namespace generic {
namespace queue {

#undef  FUNCTION
#define FUNCTION "Queue::genMoore"
  void Queue::genMoore (void)
  {
    log_printf(FUNC,Queue,FUNCTION,"Begin");
    
    internal_INSERT_ACK = not _queue_control->full();
    internal_RETIRE_VAL = not _queue_control->empty();
    
    PORT_WRITE(out_INSERT_ACK , internal_INSERT_ACK);
    PORT_WRITE(out_RETIRE_VAL , internal_RETIRE_VAL);
    PORT_WRITE(out_RETIRE_DATA,_queue_data[(*_queue_control)[0]]);

    log_printf(FUNC,Queue,FUNCTION,"End");
  };

}; // end namespace queue
}; // end namespace generic

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