source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_testbench_transition.cpp @ 2

Last change on this file since 2 was 2, checked in by kane, 17 years ago

Import Morpheo

File size: 1.2 KB
Line 
1#ifdef VHDL_TESTBENCH
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Generic/Counter/include/Counter.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace generic {
14namespace counter {
15
16
17  void Counter::vhdl_testbench_transition ()
18  {
19    log_printf(FUNC,Counter,"vhdl_testbench_transition","Begin");
20
21    sc_start(0);
22
23    // In order with file Counter_vhdl_testbench_port.cpp
24    // Warning : if a output depend of a subcomponent, take directly the port of subcomponent
25    // (because we have no control on the ordonnancer's policy)
26
27    for (uint32_t i=0; i<_param._nb_port; i++)
28      {
29        _vhdl_testbench->add_input (PORT_READ( in_COUNTER_DATA  [i]));
30        _vhdl_testbench->add_input (PORT_READ( in_COUNTER_ADDSUB[i]));
31        _vhdl_testbench->add_output(PORT_READ(out_COUNTER_DATA  [i]));
32      }
33   
34    // add_test :
35    //  - True  : the cycle must be compare with the output of systemC
36    //  - False : no test
37    _vhdl_testbench->add_test(true);
38
39    _vhdl_testbench->new_cycle (); // always at the end
40
41    log_printf(FUNC,Counter,"vhdl_testbench_transition","End");
42  };
43
44}; // end namespace counter
45}; // end namespace generic
46
47}; // end namespace behavioural
48}; // end namespace morpheo             
49#endif
Note: See TracBrowser for help on using the repository browser.