source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Core.cpp @ 146

Last change on this file since 146 was 146, checked in by rosiere, 13 years ago

1) Integration of RegisterFile_Internal_Banked in RegisterFile?
2) Erase "read_write" interface in RegisterFile_Monolithic component
3) Add smith predictor parameters in Load_store_pointer_unit.
4) Fix not statistics flags

  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1/*
2 * $Id: Core.cpp 146 2011-02-01 20:57:54Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/include/Core.h"
9
10namespace morpheo                    {
11namespace behavioural {
12namespace core {
13
14
15#undef  FUNCTION
16#define FUNCTION "Core::Core"
17  Core::Core
18  (
19#ifdef SYSTEMC
20   sc_module_name name,
21#else
22   string name,
23#endif
24#ifdef STATISTICS
25   morpheo::behavioural::Parameters_Statistics * param_statistics,
26#endif
27   Parameters * param,
28   morpheo::behavioural::Tusage_t           usage// ,
29   // morpheo::behavioural::Function_pointer * function_pointer
30   ):
31    _name              (name)
32    ,_param            (param)
33    ,_usage            (usage)
34  {
35    log_begin(Core,FUNCTION);
36
37    usage_environment(_usage);
38
39// #if DEBUG_Core == true
40//     log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str());
41
42//     std::cout << *param << std::endl;
43// #endif   
44
45    log_printf(INFO,Core,FUNCTION,_("<%s> Allocation"),_name.c_str());
46
47    allocation (
48#ifdef STATISTICS
49                param_statistics
50#endif
51                // function_pointer
52                );
53
54#ifdef STATISTICS
55    if (usage_is_set(_usage,USE_STATISTICS))
56      { 
57        log_printf(INFO,Core,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str());
58
59        statistics_allocation(param_statistics);
60      }
61#endif
62
63#ifdef VHDL
64    if (usage_is_set(_usage,USE_VHDL))
65      {
66        // generate the vhdl
67        log_printf(INFO,Core,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
68       
69        vhdl();
70      }
71#endif
72
73#ifdef SYSTEMC
74# if defined(STATISTICS) or defined(VHDL_TESTBENCH)
75    if (usage_is_set(_usage,USE_SYSTEMC))
76      {
77
78        // if (function_pointer==NULL)
79        //   {
80        log_printf(INFO,Core,FUNCTION,_("<%s> Method - transition"),_name.c_str());
81
82        SC_METHOD (transition);
83        dont_initialize ();
84        sensitive << (*(in_CLOCK)).pos();
85
86# ifdef SYSTEMCASS_SPECIFIC
87        // List dependency information
88# endif   
89        //   }
90        // else
91        //   {
92        //     function_pointer->transition_add(static_cast<f_t>(&morpheo::behavioural::core::Core::transition));
93        //   }
94
95      }
96# endif
97#endif
98    log_end(Core,FUNCTION);
99  };
100   
101#undef  FUNCTION
102#define FUNCTION "Core::~Core"
103  Core::~Core (void)
104  {
105    log_begin(Core,FUNCTION);
106
107#ifdef STATISTICS
108    if (usage_is_set(_usage,USE_STATISTICS))
109      {
110        statistics_deallocation();
111      }
112#endif
113
114    log_printf(INFO,Core,FUNCTION,_("<%s> Deallocation"),_name.c_str());
115    deallocation ();
116
117    log_end(Core,FUNCTION);
118  };
119
120}; // end namespace core
121}; // end namespace behavioural
122}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.