source: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component.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

File size: 2.1 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/@DIRECTORY/include/@COMPONENT.h"
9
10namespace morpheo                    {
11namespace behavioural {
12@NAMESPACE_BEGIN
13
14#undef  FUNCTION
15#define FUNCTION "@COMPONENT::@COMPONENT"
16  @COMPONENT::@COMPONENT
17  (
18#ifdef SYSTEMC
19   sc_module_name name,
20#else
21   string name,
22#endif
23#ifdef STATISTICS
24   morpheo::behavioural::Parameters_Statistics * param_statistics,
25#endif
26   morpheo::behavioural::@NAMESPACE_USE::Parameters * param,
27   morpheo::behavioural::Tusage_t usage
28   ):
29    _name              (name)
30    ,_param            (param)
31    ,_usage            (usage)
32  {
33    log_begin(@COMPONENT,FUNCTION);
34
35    usage_environment(_usage);
36
37    log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Allocation"),_name.c_str());
38
39    allocation (
40#ifdef STATISTICS
41                param_statistics
42#endif
43                );
44
45#ifdef STATISTICS
46    if (usage_is_set(_usage,USE_STATISTICS))
47      { 
48        log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Allocation of statistics"),_name.c_str());
49
50        statistics_allocation(param_statistics);
51      }
52#endif
53
54#ifdef VHDL
55    if (usage_is_set(_usage,USE_VHDL))
56      {
57        // generate the vhdl
58        log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Generate the vhdl"),_name.c_str());
59       
60        vhdl();
61      }
62#endif
63
64#if defined(SYSTEMC) and (defined(STATISTICS) or defined(VHDL_TESTBENCH))
65    if (usage_is_set(_usage,USE_SYSTEMC))
66      {
67        log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Method - transition"),_name.c_str());
68
69        SC_METHOD (transition);
70        dont_initialize ();
71        sensitive << (*(in_CLOCK)).pos();
72       
73# ifdef SYSTEMCASS_SPECIFIC
74        // List dependency information
75# endif   
76      }
77#endif
78    log_end(@COMPONENT,FUNCTION);
79  };
80
81#undef  FUNCTION
82#define FUNCTION "@COMPONENT::~@COMPONENT"
83  @COMPONENT::~@COMPONENT (void)
84  {
85    log_begin(@COMPONENT,FUNCTION);
86
87#ifdef STATISTICS
88    if (usage_is_set(_usage,USE_STATISTICS))
89      {
90        statistics_deallocation();
91      }
92#endif
93
94    log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Deallocation"),_name.c_str());
95    deallocation ();
96
97    log_end(@COMPONENT,FUNCTION);
98  };
99
100@NAMESPACE_END
101}; // end namespace behavioural
102}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.