[5] | 1 | #ifdef VHDL_TESTBENCH |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/include/Meta_Predictor.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace stage_1_ifetch { |
---|
| 14 | namespace predictor { |
---|
| 15 | namespace meta_predictor { |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | void Meta_Predictor::vhdl_testbench_transition () |
---|
| 19 | { |
---|
| 20 | log_printf(FUNC,Meta_Predictor,"vhdl_testbench_transition","Begin"); |
---|
| 21 | |
---|
| 22 | // Evaluation before read the ouput signal |
---|
| 23 | sc_start(0); |
---|
| 24 | |
---|
| 25 | // In order with file Meta_Predictor_vhdl_testbench_port.cpp |
---|
| 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 | |
---|
[5] | 31 | for (uint32_t i=0; i<_param._nb_prediction; i++) |
---|
| 32 | { |
---|
| 33 | _vhdl_testbench->add_input (PORT_READ( in_PREDICT_VAL [i])); |
---|
| 34 | _vhdl_testbench->add_output(PORT_READ(out_PREDICT_ACK [i])); |
---|
| 35 | _vhdl_testbench->add_input (PORT_READ( in_PREDICT_ADDRESS [i])); |
---|
| 36 | _vhdl_testbench->add_output(PORT_READ(out_PREDICT_HISTORY [i])); |
---|
| 37 | _vhdl_testbench->add_output(PORT_READ(out_PREDICT_DIRECTION [i])); |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | for (uint32_t i=0; i<_param._nb_branch_complete; i++) |
---|
| 41 | { |
---|
| 42 | _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_VAL [i])); |
---|
| 43 | _vhdl_testbench->add_output(PORT_READ(out_BRANCH_COMPLETE_ACK [i])); |
---|
| 44 | _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_ADDRESS [i])); |
---|
| 45 | _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_HISTORY [i])); |
---|
| 46 | _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_DIRECTION [i])); |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | // add_test : |
---|
| 50 | // - True : the cycle must be compare with the output of systemC |
---|
| 51 | // - False : no test |
---|
| 52 | _vhdl_testbench->add_test(true); |
---|
| 53 | |
---|
| 54 | _vhdl_testbench->new_cycle (); // always at the end |
---|
| 55 | |
---|
| 56 | log_printf(FUNC,Meta_Predictor,"vhdl_testbench_transition","End"); |
---|
| 57 | }; |
---|
| 58 | |
---|
| 59 | }; // end namespace meta_predictor |
---|
| 60 | }; // end namespace predictor |
---|
| 61 | }; // end namespace stage_1_ifetch |
---|
| 62 | |
---|
| 63 | }; // end namespace behavioural |
---|
| 64 | }; // end namespace morpheo |
---|
| 65 | #endif |
---|