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

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

1) Ajout d'un "printer" XML pour la configuration de paramètres

2) Fin du composant "Two_Level_Branch_Predictor"

validation * systemc

  • vhdl
File size: 1.8 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/Pattern_History_Table/include/Pattern_History_Table.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace stage_1_ifetch {
14namespace predictor {
15namespace meta_predictor {
16namespace two_level_branch_predictor {
17namespace pattern_history_table {
18
19
20  void Pattern_History_Table::vhdl_port (Vhdl & vhdl)
21  {
22    log_printf(FUNC,Pattern_History_Table,"vhdl_port","Begin");
23
24    vhdl.set_port (" in_CLOCK" , IN, 1);
25
26    for (uint32_t i=0; i<_param._nb_prediction; i++)
27      {
28        vhdl.set_port(" in_PREDICT_VAL_"+toString(i)+"               ", IN, 1);
29        vhdl.set_port("out_PREDICT_ACK_"+toString(i)+"               ",OUT, 1);
30        vhdl.set_port(" in_PREDICT_ADDRESS_"+toString(i)+"           ", IN, static_cast<uint32_t>(ceil(log2(_param._nb_counter))));
31        vhdl.set_port("out_PREDICT_HISTORY_"+toString(i)+"           ",OUT, _param._size_counter);
32      }
33     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
34       {
35         vhdl.set_port (" in_BRANCH_COMPLETE_VAL_"+toString(i)+"      ", IN, 1);
36         vhdl.set_port ("out_BRANCH_COMPLETE_ACK_"+toString(i)+"      ",OUT, 1);
37         vhdl.set_port (" in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+"  ", IN, static_cast<uint32_t>(ceil(log2(_param._nb_counter))));
38         vhdl.set_port (" in_BRANCH_COMPLETE_HISTORY_"+toString(i)+"  ", IN, _param._size_counter);
39         vhdl.set_port (" in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"", IN, 1);
40       }
41
42    log_printf(FUNC,Pattern_History_Table,"vhdl_port","End");
43  };
44
45}; // end namespace pattern_history_table
46}; // end namespace two_level_branch_predictor
47}; // end namespace meta_predictor
48}; // end namespace predictor
49}; // end namespace stage_1_ifetch
50
51}; // end namespace behavioural
52}; // end namespace morpheo             
53#endif
Note: See TracBrowser for help on using the repository browser.