[10] | 1 | #ifdef VHDL_TESTBENCH |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
[15] | 9 | #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h" |
---|
[10] | 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace generic { |
---|
| 14 | namespace select { |
---|
[15] | 15 | namespace select_priority_fixed { |
---|
[10] | 16 | |
---|
| 17 | |
---|
[15] | 18 | void Select_Priority_Fixed::vhdl_testbench_transition () |
---|
[10] | 19 | { |
---|
[15] | 20 | log_printf(FUNC,Select_Priority_Fixed,"vhdl_testbench_transition","Begin"); |
---|
[10] | 21 | |
---|
| 22 | // Evaluation before read the ouput signal |
---|
| 23 | sc_start(0); |
---|
| 24 | |
---|
[15] | 25 | // In order with file Select_Priority_Fixed_vhdl_testbench_port.cpp |
---|
[10] | 26 | // Warning : if a output depend of a subcomponent, take directly the port of subcomponent |
---|
| 27 | // (because we have no control on the ordonnancer's policy) |
---|
| 28 | |
---|
[15] | 29 | _vhdl_testbench->add_input (PORT_READ( in_NRESET)); |
---|
| 30 | |
---|
[10] | 31 | for (uint32_t i=0; i<_param._nb_entity; i++) |
---|
| 32 | { |
---|
| 33 | _vhdl_testbench->add_input (PORT_READ( in_VAL [i])); |
---|
| 34 | if (_param._encoding_one_hot) |
---|
| 35 | _vhdl_testbench->add_output(PORT_READ(out_ACK [i])); |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | if (_param._encoding_compact) |
---|
| 39 | { |
---|
| 40 | _vhdl_testbench->add_output(PORT_READ(out_ENTITY)); |
---|
| 41 | _vhdl_testbench->add_output(PORT_READ(out_ENTITY_ACK)); |
---|
| 42 | } |
---|
| 43 | // add_test : |
---|
| 44 | // - True : the cycle must be compare with the output of systemC |
---|
| 45 | // - False : no test |
---|
| 46 | _vhdl_testbench->add_test(true); |
---|
| 47 | |
---|
| 48 | _vhdl_testbench->new_cycle (); // always at the end |
---|
| 49 | |
---|
[15] | 50 | log_printf(FUNC,Select_Priority_Fixed,"vhdl_testbench_transition","End"); |
---|
[10] | 51 | }; |
---|
| 52 | |
---|
[15] | 53 | }; // end namespace select_priority_fixed |
---|
[10] | 54 | }; // end namespace select |
---|
| 55 | }; // end namespace generic |
---|
| 56 | |
---|
| 57 | }; // end namespace behavioural |
---|
| 58 | }; // end namespace morpheo |
---|
| 59 | #endif |
---|