1 | #ifdef VHDL_TESTBENCH |
---|
2 | /* |
---|
3 | * $Id$ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace stage_1_ifetch { |
---|
14 | namespace predictor { |
---|
15 | namespace meta_predictor { |
---|
16 | namespace two_level_branch_predictor { |
---|
17 | namespace branch_history_table { |
---|
18 | |
---|
19 | void Branch_History_Table::vhdl_testbench_port (void) |
---|
20 | { |
---|
21 | _vhdl_testbench->set_port (" in_NRESET", IN, 1); |
---|
22 | for (uint32_t i=0; i<_param._nb_prediction; i++) |
---|
23 | { |
---|
24 | _vhdl_testbench->set_port (" in_PREDICT_VAL_"+toString(i)+" ", IN, 1); |
---|
25 | _vhdl_testbench->set_port ("out_PREDICT_ACK_"+toString(i)+" ",OUT, 1); |
---|
26 | _vhdl_testbench->set_port (" in_PREDICT_ADDRESS_"+toString(i)+" ", IN, static_cast<uint32_t>(ceil(log2(_param._nb_shifter)))); |
---|
27 | _vhdl_testbench->set_port ("out_PREDICT_HISTORY_"+toString(i)+" ",OUT, _param._size_shifter); |
---|
28 | } |
---|
29 | |
---|
30 | for (uint32_t i=0; i<_param._nb_branch_complete; i++) |
---|
31 | { |
---|
32 | _vhdl_testbench->set_port (" in_BRANCH_COMPLETE_VAL_"+toString(i)+" ", IN, 1); |
---|
33 | _vhdl_testbench->set_port ("out_BRANCH_COMPLETE_ACK_"+toString(i)+" ",OUT, 1); |
---|
34 | _vhdl_testbench->set_port (" in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" ", IN, static_cast<uint32_t>(ceil(log2(_param._nb_shifter)))); |
---|
35 | _vhdl_testbench->set_port (" in_BRANCH_COMPLETE_HISTORY_"+toString(i)+" ", IN, _param._size_shifter); |
---|
36 | _vhdl_testbench->set_port (" in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"", IN, 1); |
---|
37 | } |
---|
38 | }; |
---|
39 | |
---|
40 | }; // end namespace branch_history_table |
---|
41 | }; // end namespace two_level_branch_predictor |
---|
42 | }; // end namespace meta_predictor |
---|
43 | }; // end namespace predictor |
---|
44 | }; // end namespace stage_1_ifetch |
---|
45 | }; // end namespace behavioural |
---|
46 | }; // end namespace morpheo |
---|
47 | #endif |
---|