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

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

Ajout du composant Meta_Predictor

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