source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_declaration.cpp @ 4

Last change on this file since 4 was 4, checked in by rosiere, 17 years ago
File size: 2.2 KB
Line 
1#ifdef VHDL
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
10
11namespace morpheo {
12namespace behavioural {
13namespace stage_1_ifetch {
14namespace predictor {
15namespace meta_predictor {
16namespace meta_predictor_glue {
17
18
19  void Meta_Predictor_Glue::vhdl_declaration (Vhdl & vhdl)
20  {
21    log_printf(FUNC,Meta_Predictor_Glue,"vhdl_declaration","Begin");
22
23    for (uint32_t i=0; i<_param._nb_prediction; i++)
24      {
25        if (_param._have_meta_predictor)
26          {
27        if (_param._predictor_0_have_pht)
28          vhdl.set_alias ("predictor_0_direction_"+toString(i),std_logic(1), "in_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i),std_logic_range(_param._predictor_0_pht_size_counter-1,_param._predictor_0_pht_size_counter-1));
29        else
30          vhdl.set_alias ("predictor_0_direction_"+toString(i),std_logic(1), "in_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i),std_logic_range(_param._predictor_0_bht_size_shifter-1,_param._predictor_0_bht_size_shifter-1));
31        if (_param._predictor_1_have_pht)
32          vhdl.set_alias ("predictor_1_direction_"+toString(i),std_logic(1), "in_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i),std_logic_range(_param._predictor_1_pht_size_counter-1,_param._predictor_1_pht_size_counter-1));
33        else
34          vhdl.set_alias ("predictor_1_direction_"+toString(i),std_logic(1), "in_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i),std_logic_range(_param._predictor_1_bht_size_shifter-1,_param._predictor_1_bht_size_shifter-1));
35          }
36
37        if (_param._predictor_2_have_pht)
38          vhdl.set_alias ("predictor_2_direction_"+toString(i),std_logic(1), "in_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i),std_logic_range(_param._predictor_2_pht_size_counter-1,_param._predictor_2_pht_size_counter-1));
39        else
40          vhdl.set_alias ("predictor_2_direction_"+toString(i),std_logic(1), "in_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i),std_logic_range(_param._predictor_2_bht_size_shifter-1,_param._predictor_2_bht_size_shifter-1));
41      }
42    log_printf(FUNC,Meta_Predictor_Glue,"vhdl_declaration","End");
43  };
44
45}; // end namespace meta_predictor_glue
46}; // end namespace meta_predictor
47}; // end namespace predictor
48}; // end namespace stage_1_ifetch
49
50}; // end namespace behavioural
51}; // end namespace morpheo             
52#endif
Note: See TracBrowser for help on using the repository browser.