source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_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.7 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/Pattern_History_Table/include/Pattern_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 pattern_history_table {
21
22
23#ifdef SYSTEMC
24  Pattern_History_Table::Pattern_History_Table (sc_module_name name,
25#else
26  Pattern_History_Table::Pattern_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::pattern_history_table::Parameters param ):
32                              _name              (name)
33                              ,_param            (param)
34#ifdef STATISTICS
35                              ,_param_statistics (param_statistics)
36#endif
37  {
38    log_printf(FUNC,Pattern_History_Table,"Pattern_History_Table","Begin");
39   
40#ifdef SYSTEMC
41    allocation ();
42#endif
43 
44#ifdef STATISTICS
45    // Allocation of statistics
46    _stat = new Statistics (static_cast<string>(_name),
47                            param_statistics          ,
48                            param);
49#endif
50
51#ifdef VHDL
52    // generate the vhdl
53    vhdl();
54#endif
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    log_printf(FUNC,Pattern_History_Table,"Pattern_History_Table","End");
75  };
76 
77  Pattern_History_Table::~Pattern_History_Table (void)
78  {
79    log_printf(FUNC,Pattern_History_Table,"~Pattern_History_Table","Begin");
80
81#ifdef STATISTICS
82    _stat->generate_file(statistics(0));
83   
84    delete _stat;
85#endif
86
87#ifdef SYSTEMC
88    deallocation ();
89#endif
90
91    log_printf(FUNC,Pattern_History_Table,"~Pattern_History_Table","End");
92  };
93
94}; // end namespace pattern_history_table
95}; // end namespace two_level_branch_predictor
96}; // end namespace meta_predictor
97
98}; // end namespace core
99}; // end namespace multi_front_end
100}; // end namespace front_end
101}; // end namespace prediction_unit
102}; // end namespace direction
103
104
105}; // end namespace behavioural
106}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.