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

#include "Behavioural/include/Interface_fifo.h"

namespace morpheo              {
namespace behavioural          {

  std::string Interface_fifo::testbench_test_transaction (Vhdl * & vhdl)
  {
    log_printf(FUNC,Behavioural,"testbench_test_transaction","Begin");
    
    std::string name = testbench_test_transaction_name(vhdl);

    vhdl->set_body(name+" <= '1'");

    // list "val"
    if (_list_signal_val->empty()== false)
      {
	std::list<Signal*>::iterator i = _list_signal_val->begin();

	while (i != _list_signal_val->end())
	  {
	    vhdl->set_body("\tand "+(*i)->get_name());
	    ++i;
	  }
      }

    // list "ack"
    if (_list_signal_ack->empty()== false)
      {
	std::list<Signal*>::iterator i = _list_signal_ack->begin();

	while (i != _list_signal_ack->end())
	  {
	    vhdl->set_body("\tand "+(*i)->get_name());
	    ++i;
	  }
      }

    vhdl->set_body("\t;");
    vhdl->set_body("");

    log_printf(FUNC,Behavioural,"testbench_test_transaction","End");

    return name;
  };

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