source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_testbench_port.cpp @ 15

Last change on this file since 15 was 15, checked in by rosiere, 17 years ago

Interface normalisé
Début du banc de registres multi niveaux

File size: 2.1 KB
Line 
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/include/Two_Level_Branch_Predictor.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace stage_1_ifetch {
14namespace predictor {
15namespace meta_predictor {
16namespace two_level_branch_predictor {
17
18
19  void Two_Level_Branch_Predictor::vhdl_testbench_port ()
20  {
21    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_testbench_port","Begin");
22
23    _vhdl_testbench->set_port (" in_NRESET", IN, 1);
24
25    for (uint32_t i=0; i<_param._nb_prediction; i++)
26      {
27        _vhdl_testbench->set_port (" in_PREDICT_VAL_"        +toString(i), IN, 1);
28        _vhdl_testbench->set_port ("out_PREDICT_ACK_"        +toString(i),OUT, 1);
29        _vhdl_testbench->set_port (" in_PREDICT_ADDRESS_"    +toString(i), IN,_param._size_address);
30        if (_param._have_bht)
31        _vhdl_testbench->set_port ("out_PREDICT_BHT_HISTORY_"+toString(i),OUT,_param._bht_size_shifter);
32        if (_param._have_pht)
33        _vhdl_testbench->set_port ("out_PREDICT_PHT_HISTORY_"+toString(i),OUT,_param._pht_size_counter);
34      }
35
36    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
37      {
38        _vhdl_testbench->set_port (" in_BRANCH_COMPLETE_VAL_"        +toString(i), IN, 1);
39        _vhdl_testbench->set_port ("out_BRANCH_COMPLETE_ACK_"        +toString(i),OUT, 1);
40        _vhdl_testbench->set_port (" in_BRANCH_COMPLETE_ADDRESS_"    +toString(i), IN,_param._size_address);
41        if (_param._have_bht)
42        _vhdl_testbench->set_port (" in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i), IN,_param._bht_size_shifter);
43        if (_param._have_pht)
44        _vhdl_testbench->set_port (" in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i), IN,_param._pht_size_counter);
45        _vhdl_testbench->set_port (" in_BRANCH_COMPLETE_DIRECTION_"  +toString(i), IN, 1);
46      }
47
48    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_testbench_port","End");
49  };
50
51}; // end namespace two_level_branch_predictor
52}; // end namespace meta_predictor
53}; // end namespace predictor
54}; // end namespace stage_1_ifetch
55
56}; // end namespace behavioural
57}; // end namespace morpheo             
58#endif
Note: See TracBrowser for help on using the repository browser.