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

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

namespace morpheo                    {
namespace behavioural {
namespace generic {
namespace shifter {


  void Shifter::vhdl_testbench_port (Vhdl_Testbench & vhdl_testbench)
  {
    for (uint32_t i=0; i<_param._nb_port; i++)
      {
	vhdl_testbench.set_port (" in_SHIFTER_DATA_"+toString(i)      , IN, _param._size_data);
	if (_param._shift_value == 0)
	vhdl_testbench.set_port (" in_SHIFTER_SHIFT_"+toString(i)     , IN, static_cast<uint32_t>(ceil(log2(_param._size_data))));
	if (_param._direction   == external_direction)
	vhdl_testbench.set_port (" in_SHIFTER_DIRECTION_"+toString(i) , IN, 1);
	if (_param._rotate      == external_rotate)
	vhdl_testbench.set_port (" in_SHIFTER_TYPE_"+toString(i)      , IN, 1);
	if (_param._carry       == external_carry)
	vhdl_testbench.set_port (" in_SHIFTER_CARRY_"+toString(i)     , IN, 1);
	if (_param._carry       == external_completion)
	if (_param._type_completion_bool == true)
	vhdl_testbench.set_port (" in_SHIFTER_CARRY_IN_"+toString(i)  , IN, 1);
	else
	vhdl_testbench.set_port (" in_SHIFTER_COMPLETION_"+toString(i), IN, _param._size_data_completion);
	vhdl_testbench.set_port ("out_SHIFTER_DATA_"+toString(i)      ,OUT, _param._size_data);
      }
  };

}; // end namespace shifter
}; // end namespace generic

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