source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit.cpp @ 74

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

New component : Read_unit (instance between a write queue and a optionnal execute_queue)

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