Rev | Line | |
---|
[2] | 1 | #ifdef VHDL_TESTBENCH |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Generic/Counter/include/Counter.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace generic { |
---|
| 14 | namespace 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.