#ifdef VHDL_TESTBENCH
/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Generic/Select/Priority_Fixed/include/Priority_Fixed.h"

namespace morpheo                    {
namespace behavioural {
namespace generic {
namespace select {
namespace priority_fixed {


  void Priority_Fixed::vhdl_testbench_transition ()
  {
    log_printf(FUNC,Priority_Fixed,"vhdl_testbench_transition","Begin");

    // Evaluation before read the ouput signal
    sc_start(0);

    // In order with file Priority_Fixed_vhdl_testbench_port.cpp
    // Warning : if a output depend of a subcomponent, take directly the port of subcomponent
    // (because we have no control on the ordonnancer's policy)

    for (uint32_t i=0; i<_param._nb_entity; i++)
      {
	_vhdl_testbench->add_input (PORT_READ( in_VAL [i]));
	if (_param._encoding_one_hot)
	_vhdl_testbench->add_output(PORT_READ(out_ACK [i]));
      }
    
    if (_param._encoding_compact)
      {
    _vhdl_testbench->add_output(PORT_READ(out_ENTITY));
    _vhdl_testbench->add_output(PORT_READ(out_ENTITY_ACK));
      }
    // add_test :
    //  - True  : the cycle must be compare with the output of systemC
    //  - False : no test
    _vhdl_testbench->add_test(true);

    _vhdl_testbench->new_cycle (); // always at the end

    log_printf(FUNC,Priority_Fixed,"vhdl_testbench_transition","End");
  };

}; // end namespace priority_fixed
}; // end namespace select
}; // end namespace generic

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