source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_testbench_port.cpp @ 3

Last change on this file since 3 was 2, checked in by kane, 17 years ago

Import Morpheo

File size: 2.6 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/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace stage_1_ifetch {
14namespace predictor {
15namespace meta_predictor {
16namespace two_level_branch_predictor {
17namespace two_level_branch_predictor_glue {
18
19
20  void Two_Level_Branch_Predictor_Glue::vhdl_testbench_port ()
21  {
22    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_testbench_port","Begin");
23
24    for (uint32_t i=0; i<_param._nb_prediction; i++)
25      {
26        if (_param._have_bht)
27          {
28        _vhdl_testbench->set_port (" in_PREDICT_BHT_ACK_"    +toString(i), IN, 1);
29        _vhdl_testbench->set_port ("out_PREDICT_BHT_ADDRESS_"+toString(i),OUT,_param._bht_size_address);
30          }
31        if (_param._have_bht and _param._have_pht)
32        _vhdl_testbench->set_port (" in_PREDICT_BHT_HISTORY_"+toString(i), IN,_param._bht_size_history);
33        if (_param._have_pht)
34          {
35        _vhdl_testbench->set_port (" in_PREDICT_PHT_ACK_"    +toString(i), IN, 1);
36        _vhdl_testbench->set_port ("out_PREDICT_PHT_ADDRESS_"+toString(i),OUT,_param._pht_size_address);
37          }
38        _vhdl_testbench->set_port ("out_PREDICT_ACK_"        +toString(i),OUT, 1);
39        _vhdl_testbench->set_port (" in_PREDICT_ADDRESS_"    +toString(i), IN,_param._size_address);
40      }
41
42    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
43      {
44        if (_param._have_bht)
45          {
46        _vhdl_testbench->set_port (" in_BRANCH_COMPLETE_BHT_ACK_"    +toString(i), IN, 1);
47        _vhdl_testbench->set_port ("out_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i),OUT,_param._bht_size_address);
48          }
49        if (_param._have_bht and _param._have_pht)
50        _vhdl_testbench->set_port (" in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i), IN,_param._bht_size_history);
51        if (_param._have_pht)
52          {
53        _vhdl_testbench->set_port (" in_BRANCH_COMPLETE_PHT_ACK_"    +toString(i), IN, 1);
54        _vhdl_testbench->set_port ("out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i),OUT,_param._pht_size_address);
55          }
56        _vhdl_testbench->set_port ("out_BRANCH_COMPLETE_ACK_"        +toString(i),OUT, 1);
57        _vhdl_testbench->set_port (" in_BRANCH_COMPLETE_ADDRESS_"    +toString(i), IN,_param._size_address);
58      }
59
60    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_testbench_port","End");
61  };
62
63}; // end namespace two_level_branch_predictor_glue
64}; // end namespace two_level_branch_predictor
65}; // end namespace meta_predictor
66}; // end namespace predictor
67}; // end namespace stage_1_ifetch
68
69}; // end namespace behavioural
70}; // end namespace morpheo             
71#endif
Note: See TracBrowser for help on using the repository browser.