source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table.cpp @ 48

Last change on this file since 48 was 48, checked in by rosiere, 17 years ago

Modification des Makefile : pas de creation inutile de shell

File size: 2.4 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h"
9
10namespace morpheo                    {
11namespace behavioural {
12namespace core {
13namespace multi_front_end {
14namespace front_end {
15namespace prediction_unit {
16namespace direction {
17
18namespace meta_predictor {
19namespace two_level_branch_predictor {
20namespace branch_history_table {
21
22
23#ifdef SYSTEMC
24  Branch_History_Table::Branch_History_Table (sc_module_name name,
25#else
26  Branch_History_Table::Branch_History_Table (string name,
27#endif
28#ifdef STATISTICS
29                                              morpheo::behavioural::Parameters_Statistics             param_statistics,
30#endif
31                                              morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table::Parameters param ):
32                                               _name             (name)
33                                              ,_param            (param)
34#ifdef STATISTICS
35                                              ,_param_statistics (param_statistics)
36#endif
37  {
38
39#ifdef SYSTEMC
40    allocation ();
41#endif
42
43#ifdef STATISTICS
44    // Allocation of statistics
45    _stat = new Statistics (static_cast<string>(_name),
46                            param_statistics          ,
47                            param);
48#endif
49
50#ifdef VHDL
51    // generate the vhdl
52    vhdl();
53#endif
54
55
56#ifdef SYSTEMC
57//     // Constant
58//     for (uint32_t i=0; i<_param._nb_prediction     ; i++)
59//       PORT_WRITE(out_PREDICT_ACK         [i],1);
60//     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
61//       PORT_WRITE(out_BRANCH_COMPLETE_ACK [i],1);
62
63#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
64    SC_METHOD (transition);
65    dont_initialize ();
66    sensitive_pos << *(in_CLOCK);
67#endif
68
69#ifdef SYSTEMCASS_SPECIFIC
70    // List dependency information
71#endif   
72
73#endif
74  };
75 
76  Branch_History_Table::~Branch_History_Table (void)
77  {
78#ifdef STATISTICS
79
80    _stat->generate_file(statistics(0));
81
82    delete _stat;
83#endif
84
85#ifdef SYSTEMC
86    deallocation ();
87#endif
88  };
89
90}; // end namespace branch_history_table
91}; // end namespace two_level_branch_predictor
92}; // end namespace meta_predictor
93
94}; // end namespace core
95}; // end namespace multi_front_end
96}; // end namespace front_end
97}; // end namespace prediction_unit
98}; // end namespace direction
99
100
101}; // end namespace behavioural
102}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.