source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit.cpp @ 72

Last change on this file since 72 was 72, checked in by rosiere, 16 years ago
  • SystemC de l'unite fonctionnelle.
  • gestion des groupes / instructions custom
File size: 3.0 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Functionnal_unit.h"
9
10namespace morpheo                    {
11namespace behavioural {
12namespace core {
13namespace multi_execute_loop {
14namespace execute_loop {
15namespace multi_execute_unit {
16namespace execute_unit {
17namespace functionnal_unit {
18
19
20#undef  FUNCTION
21#define FUNCTION "Functionnal_unit::Functionnal_unit"
22  Functionnal_unit::Functionnal_unit
23  (
24#ifdef SYSTEMC
25   sc_module_name name,
26#else
27   string name,
28#endif
29#ifdef STATISTICS
30   morpheo::behavioural::Parameters_Statistics * param_statistics,
31#endif
32   morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::Parameters * param,
33   morpheo::behavioural::Tusage_t usage
34   ):
35    _name              (name)
36    ,_param            (param)
37    ,_usage            (usage)
38  {
39    log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
40
41    log_printf(INFO,Functionnal_unit,FUNCTION,"Allocation");
42    allocation ();
43
44#ifdef STATISTICS
45    if (_usage & USE_STATISTICS)
46      { 
47        log_printf(INFO,Functionnal_unit,FUNCTION,"Allocation of statistics");
48
49        statistics_declaration(param_statistics);
50      }
51#endif
52
53#ifdef VHDL
54    if (_usage & USE_VHDL)
55      {
56        // generate the vhdl
57        log_printf(INFO,Functionnal_unit,FUNCTION,"Generate the vhdl");
58       
59        vhdl();
60      }
61#endif
62
63#ifdef SYSTEMC
64    if (_usage & USE_SYSTEMC)
65      {
66        log_printf(INFO,Functionnal_unit,FUNCTION,"Method - transition");
67
68        SC_METHOD (transition);
69        dont_initialize ();
70        sensitive << (*(in_CLOCK)).pos();
71       
72# ifdef SYSTEMCASS_SPECIFIC
73        // List dependency information
74# endif   
75
76        log_printf(INFO,Functionnal_unit,FUNCTION,"Method - genMoore");
77
78        SC_METHOD (genMoore);
79        dont_initialize ();
80        sensitive << (*(in_CLOCK)).neg();
81       
82# ifdef SYSTEMCASS_SPECIFIC
83        // List dependency information
84# endif   
85
86        log_printf(INFO,Functionnal_unit,FUNCTION,"Method - genMealy");
87
88        SC_METHOD (genMealy);
89        dont_initialize ();
90        sensitive << (*(in_CLOCK)).neg()
91                  << (*(in_EXECUTE_OUT_ACK));
92       
93# ifdef SYSTEMCASS_SPECIFIC
94        // List dependency information
95        (*(out_EXECUTE_IN_ACK)) (*(in_EXECUTE_OUT_ACK));
96# endif   
97       
98#endif
99      }
100    log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
101  };
102   
103#undef  FUNCTION
104#define FUNCTION "Functionnal_unit::~Functionnal_unit"
105  Functionnal_unit::~Functionnal_unit (void)
106  {
107    log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
108
109#ifdef STATISTICS
110    if (_usage & USE_STATISTICS)
111      {
112        log_printf(INFO,Functionnal_unit,FUNCTION,"Generate Statistics file");
113       
114        delete _stat;
115      }
116#endif
117
118    log_printf(INFO,Functionnal_unit,FUNCTION,"Deallocation");
119    deallocation ();
120
121    log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
122  };
123
124}; // end namespace functionnal_unit
125}; // end namespace execute_unit
126}; // end namespace multi_execute_unit
127}; // end namespace execute_loop
128}; // end namespace multi_execute_loop
129}; // end namespace core
130
131}; // end namespace behavioural
132}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.