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