#ifdef VHDL_TESTBENCH

/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/include/Vhdl_Testbench.h"

#include <sstream>
using namespace std;

namespace morpheo              {
namespace behavioural          {
  
  uint32_t Vhdl_Testbench::get_input (void)
  {
    list<string>::iterator i   = _list_input.begin();
    
    uint32_t counter = 0;

    if (i != _list_input.end())
      {
	_vhdl->set_body ("");
	_vhdl->set_body ("with testbench_counter select");
	_vhdl->set_body ("\ttestbench_input <=");

	while (i != _list_input.end())
	  {
	    list<string>::iterator j = i;
	    ++i;

	    if (i != _list_input.end())
	      _vhdl->set_body ("\t\""+*j+"\" when "+toString(counter++)+",");
	    else
	      _vhdl->set_body ("\t\""+*j+"\" when others;");
	  }
      }

    return counter;
  };
  
}; // end namespace behavioural          
}; // end namespace morpheo              

#endif
