#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)
  {
    for (uint32_t i = 0; i < _param._nb_port_read; i ++)
      {
	vhdl_testbench.set_port (" in_READ_ENABLE_"+toString(i)+" ",IN ,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_ENABLE_"+toString(i)+" ",IN ,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
