source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_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: 1.7 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/Branch_History_Table/include/Branch_History_Table.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace stage_1_ifetch {
14namespace predictor {
15namespace meta_predictor {
16namespace two_level_branch_predictor {
17namespace branch_history_table {
18
19
20  void Branch_History_Table::vhdl_port (Vhdl & vhdl)
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, static_cast<uint32_t>(ceil(log2(_param._nb_shifter))));
30        vhdl.set_port("out_PREDICT_HISTORY_"+toString(i)+"           ",OUT, _param._size_shifter);
31      }
32     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
33       {
34         vhdl.set_port (" in_BRANCH_COMPLETE_VAL_"+toString(i)+"      ", IN, 1);
35         vhdl.set_port ("out_BRANCH_COMPLETE_ACK_"+toString(i)+"      ",OUT, 1);
36         vhdl.set_port (" in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+"  ", IN, static_cast<uint32_t>(ceil(log2(_param._nb_shifter))));
37         vhdl.set_port (" in_BRANCH_COMPLETE_HISTORY_"+toString(i)+"  ", IN, _param._size_shifter);
38         vhdl.set_port (" in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"", IN, 1);
39       }
40  };
41
42}; // end namespace branch_history_table
43}; // end namespace two_level_branch_predictor
44}; // end namespace meta_predictor
45}; // end namespace predictor
46}; // end namespace stage_1_ifetch
47}; // end namespace behavioural
48}; // end namespace morpheo             
49#endif
Note: See TracBrowser for help on using the repository browser.