source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit.cpp @ 83

Last change on this file since 83 was 83, checked in by rosiere, 16 years ago

Add component : Context_State (manage miss prediction, exception , decod_enable, synchronisation instruction ...)

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