source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_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.4 KB
Line 
1/*
2 * $Id: Ifetch_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/Ifetch_unit/include/Ifetch_unit.h"
9
10namespace morpheo                    {
11namespace behavioural {
12namespace core {
13namespace multi_front_end {
14namespace front_end {
15namespace ifetch_unit {
16
17
18#undef  FUNCTION
19#define FUNCTION "Ifetch_unit::Ifetch_unit"
20  Ifetch_unit::Ifetch_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::ifetch_unit::Parameters * param,
31   morpheo::behavioural::Tusage_t usage
32   ):
33    _name              (name)
34    ,_param            (param)
35    ,_usage            (usage)
36  {
37    log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin");
38
39#if DEBUG_Ifetch_unit == true
40    log_printf(INFO,Ifetch_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
41
42    std::cout << *param << std::endl;
43#endif   
44
45    log_printf(INFO,Ifetch_unit,FUNCTION,"Allocation");
46
47    allocation (
48#ifdef STATISTICS
49                param_statistics
50#endif
51                );
52
53#ifdef STATISTICS
54    if (usage_is_set(_usage,USE_STATISTICS))
55      { 
56        log_printf(INFO,Ifetch_unit,FUNCTION,"Allocation of statistics");
57
58        statistics_allocation(param_statistics);
59      }
60#endif
61
62#ifdef VHDL
63    if (usage_is_set(_usage,USE_VHDL))
64      {
65        // generate the vhdl
66        log_printf(INFO,Ifetch_unit,FUNCTION,"Generate the vhdl");
67       
68        vhdl();
69      }
70#endif
71
72#ifdef SYSTEMC
73    if (usage_is_set(_usage,USE_SYSTEMC))
74      {
75        log_printf(INFO,Ifetch_unit,FUNCTION,"Method - transition");
76
77        SC_METHOD (transition);
78        dont_initialize ();
79        sensitive << (*(in_CLOCK)).pos();
80       
81# ifdef SYSTEMCASS_SPECIFIC
82        // List dependency information
83# endif   
84       
85#endif
86      }
87    log_printf(FUNC,Ifetch_unit,FUNCTION,"End");
88  };
89   
90#undef  FUNCTION
91#define FUNCTION "Ifetch_unit::~Ifetch_unit"
92  Ifetch_unit::~Ifetch_unit (void)
93  {
94    log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin");
95
96#ifdef STATISTICS
97    if (usage_is_set(_usage,USE_STATISTICS))
98      {
99        statistics_deallocation();
100      }
101#endif
102
103    log_printf(INFO,Ifetch_unit,FUNCTION,"Deallocation");
104    deallocation ();
105
106    log_printf(FUNC,Ifetch_unit,FUNCTION,"End");
107  };
108
109}; // end namespace ifetch_unit
110}; // end namespace front_end
111}; // end namespace multi_front_end
112}; // end namespace core
113
114}; // end namespace behavioural
115}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.