source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_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.0 KB
Line 
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
11namespace morpheo                    {
12namespace behavioural {
13namespace stage_1_ifetch {
14namespace predictor {
15namespace meta_predictor {
16namespace 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    vhdl.set_port (" in_NRESET", IN, 1);
24
25    for (uint32_t i=0; i<_param._nb_prediction; i++)
26      {
27        vhdl.set_port (" in_PREDICT_VAL_"+toString(i)+"                ", IN, 1);
28        vhdl.set_port ("out_PREDICT_ACK_"+toString(i)+"                ",OUT, 1);
29        vhdl.set_port (" in_PREDICT_ADDRESS_"+toString(i)+"            ", IN,_param._size_address);
30        if (_param._have_bht)
31        vhdl.set_port ("out_PREDICT_BHT_HISTORY_"+toString(i)+"        ",OUT,_param._bht_size_shifter);
32        if (_param._have_pht)
33        vhdl.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.set_port (" in_BRANCH_COMPLETE_VAL_"+toString(i)+"        ", IN, 1);
39        vhdl.set_port ("out_BRANCH_COMPLETE_ACK_"+toString(i)+"        ",OUT, 1);
40        vhdl.set_port (" in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+"    ", IN,_param._size_address);
41        if (_param._have_bht)
42        vhdl.set_port (" in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+"", IN,_param._bht_size_shifter);
43        if (_param._have_pht)
44        vhdl.set_port (" in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i)+"", IN,_param._pht_size_counter);
45        vhdl.set_port (" in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"  ", IN, 1);
46      }
47
48    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_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}; // end namespace behavioural
56}; // end namespace morpheo             
57#endif
Note: See TracBrowser for help on using the repository browser.