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

#include "Behavioural/include/Interface_fifo.h"

namespace morpheo              {
namespace behavioural          {

  bool Interface_fifo::testbench_transaction (void)
  {
    log_printf(FUNC,Behavioural,"testbench_transaction","Begin");
    
    bool res = true;

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

	while ((i != _list_signal_val->end()) and (res == true))
	  {
	    res = (*i)->read<bool>();
	    ++i;
	  }
      }

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

	while ((i != _list_signal_ack->end()) and (res == true))
	  {
	    res = (*i)->read<bool>();
	    ++i;
	  }
      }

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

    return res;
  };

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