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

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

namespace morpheo                    {
namespace behavioural {
namespace generic {
namespace counter {


  void Counter::vhdl_testbench_transition ()
  {
    log_printf(FUNC,Counter,"vhdl_testbench_transition","Begin");

    sc_start(0);

    // In order with file Counter_vhdl_testbench_port.cpp
    // Warning : if a output depend of a subcomponent, take directly the port of subcomponent
    // (because we have no control on the ordonnancer's policy)

    for (uint32_t i=0; i<_param._nb_port; i++)
      {
	_vhdl_testbench->add_input (PORT_READ( in_COUNTER_DATA  [i]));
	_vhdl_testbench->add_input (PORT_READ( in_COUNTER_ADDSUB[i]));
	_vhdl_testbench->add_output(PORT_READ(out_COUNTER_DATA  [i]));
      }
    
    // add_test :
    //  - True  : the cycle must be compare with the output of systemC
    //  - False : no test
    _vhdl_testbench->add_test(true);

    _vhdl_testbench->new_cycle (); // always at the end

    log_printf(FUNC,Counter,"vhdl_testbench_transition","End");
  };

}; // end namespace counter
}; // end namespace generic

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