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

Last change on this file since 88 was 88, checked in by rosiere, 15 years ago

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1/*
2 * $Id: Decod_unit.cpp 88 2008-12-10 18:31:39Z 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#if DEBUG_Decod_unit == true
42    log_printf(INFO,Decod_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
43
44    std::cout << *param << std::endl;
45#endif   
46
47    log_printf(INFO,Decod_unit,FUNCTION,_("Allocation"));
48
49    allocation (
50#ifdef STATISTICS
51                param_statistics
52#endif
53                );
54
55#ifdef STATISTICS
56    if (usage_is_set(_usage,USE_STATISTICS))
57      { 
58        log_printf(INFO,Decod_unit,FUNCTION,_("Allocation of statistics"));
59
60        statistics_allocation(param_statistics);
61      }
62#endif
63
64#ifdef VHDL
65    if (usage_is_set(_usage,USE_VHDL))
66      {
67        // generate the vhdl
68        log_printf(INFO,Decod_unit,FUNCTION,_("Generate the vhdl"));
69       
70        vhdl();
71      }
72#endif
73
74#ifdef SYSTEMC
75    if (usage_is_set(_usage,USE_SYSTEMC))
76      {
77        log_printf(INFO,Decod_unit,FUNCTION,_("Method - transition"));
78
79        SC_METHOD (transition);
80        dont_initialize ();
81        sensitive << (*(in_CLOCK)).pos();
82       
83# ifdef SYSTEMCASS_SPECIFIC
84        // List dependency information
85# endif   
86       
87#endif
88      }
89    log_end(Decod_unit,FUNCTION);
90  };
91   
92#undef  FUNCTION
93#define FUNCTION "Decod_unit::~Decod_unit"
94  Decod_unit::~Decod_unit (void)
95  {
96    log_begin(Decod_unit,FUNCTION);
97
98#ifdef STATISTICS
99    if (usage_is_set(_usage,USE_STATISTICS))
100      {
101        statistics_deallocation();
102      }
103#endif
104
105    log_printf(INFO,Decod_unit,FUNCTION,_("Deallocation"));
106    deallocation ();
107
108    log_end(Decod_unit,FUNCTION);
109  };
110
111}; // end namespace decod_unit
112}; // end namespace front_end
113}; // end namespace multi_front_end
114}; // end namespace core
115
116}; // end namespace behavioural
117}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.