[2] | 1 | #ifdef VHDL |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.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 | |
---|
| 18 | void Two_Level_Branch_Predictor::vhdl_port (Vhdl & vhdl) |
---|
| 19 | { |
---|
| 20 | log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_port","Begin"); |
---|
| 21 | |
---|
| 22 | vhdl.set_port (" in_CLOCK" , IN, 1); |
---|
| 23 | |
---|
| 24 | for (uint32_t i=0; i<_param._nb_prediction; i++) |
---|
| 25 | { |
---|
[3] | 26 | vhdl.set_port (" in_PREDICT_VAL_"+toString(i)+" ", IN, 1); |
---|
| 27 | vhdl.set_port ("out_PREDICT_ACK_"+toString(i)+" ",OUT, 1); |
---|
| 28 | vhdl.set_port (" in_PREDICT_ADDRESS_"+toString(i)+" ", IN,_param._size_address); |
---|
[2] | 29 | if (_param._have_bht) |
---|
[3] | 30 | vhdl.set_port ("out_PREDICT_BHT_HISTORY_"+toString(i)+" ",OUT,_param._bht_size_shifter); |
---|
[2] | 31 | if (_param._have_pht) |
---|
[3] | 32 | vhdl.set_port ("out_PREDICT_PHT_HISTORY_"+toString(i)+" ",OUT,_param._pht_size_counter); |
---|
[2] | 33 | } |
---|
| 34 | |
---|
| 35 | for (uint32_t i=0; i<_param._nb_branch_complete; i++) |
---|
| 36 | { |
---|
[3] | 37 | vhdl.set_port (" in_BRANCH_COMPLETE_VAL_"+toString(i)+" ", IN, 1); |
---|
| 38 | vhdl.set_port ("out_BRANCH_COMPLETE_ACK_"+toString(i)+" ",OUT, 1); |
---|
| 39 | vhdl.set_port (" in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+" ", IN,_param._size_address); |
---|
[2] | 40 | if (_param._have_bht) |
---|
[3] | 41 | vhdl.set_port (" in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+"", IN,_param._bht_size_shifter); |
---|
| 42 | if (_param._have_pht) |
---|
| 43 | vhdl.set_port (" in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i)+"", IN,_param._pht_size_counter); |
---|
| 44 | vhdl.set_port (" in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+" ", IN, 1); |
---|
[2] | 45 | } |
---|
| 46 | |
---|
| 47 | log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_port","End"); |
---|
| 48 | }; |
---|
| 49 | |
---|
| 50 | }; // end namespace two_level_branch_predictor |
---|
| 51 | }; // end namespace meta_predictor |
---|
| 52 | }; // end namespace predictor |
---|
| 53 | }; // end namespace stage_1_ifetch |
---|
| 54 | }; // end namespace behavioural |
---|
| 55 | }; // end namespace morpheo |
---|
| 56 | #endif |
---|