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

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

Modification des classes d'encapsulation des interfaces :

  • gère les signaux à écrire dans le vhdl
  • les traces pour le testbench
  • la génération des vhdl structurelles

-> test sur la Pattern History Table

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