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

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

namespace morpheo                    {
namespace behavioural                {
namespace generic                    {
namespace registerfile               {

  void RegisterFile::vhdl_testbench_port (Vhdl_Testbench & vhdl_testbench)
  {
    vhdl_testbench.set_port (" in_NRESET",IN ,1);

    for (uint32_t i = 0; i < _param._nb_port_read; i ++)
      {
	vhdl_testbench.set_port (" in_READ_VAL_"+toString(i)+"    ",IN ,1);
	vhdl_testbench.set_port ("out_READ_ACK_"+toString(i)+"    ",OUT,1);
	vhdl_testbench.set_port (" in_READ_ADDRESS_"+toString(i)+"",IN ,static_cast<uint32_t>(log2(_param._nb_word)));
	vhdl_testbench.set_port ("out_READ_DATA_"+toString(i)+"   ",OUT,_param._size_word);
      }

    for (uint32_t i = 0; i < _param._nb_port_write; i ++)
      {
	vhdl_testbench.set_port (" in_WRITE_VAL_"+toString(i)+"    ",IN ,1);
	vhdl_testbench.set_port ("out_WRITE_ACK_"+toString(i)+"    ",OUT,1);
	vhdl_testbench.set_port (" in_WRITE_ADDRESS_"+toString(i)+"",IN ,static_cast<uint32_t>(log2(_param._nb_word)));
	vhdl_testbench.set_port (" in_WRITE_DATA_"+toString(i)+"   ",IN ,_param._size_word    );
      }
  };

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