source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit.cpp @ 60

Last change on this file since 60 was 60, checked in by rosiere, 17 years ago
File size: 2.3 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Register_unit.h"
9
10namespace morpheo                    {
11namespace behavioural {
12namespace core {
13namespace multi_execute_loop {
14namespace execute_loop {
15namespace register_unit {
16
17
18#undef  FUNCTION
19#define FUNCTION "Register_unit::Register_unit"
20  Register_unit::Register_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_execute_loop::execute_loop::register_unit::Parameters * param,
31   morpheo::behavioural::Tusage_t usage
32   ):
33    _name              (name)
34    ,_param            (param)
35    ,_usage            (usage)
36#ifdef STATISTICS
37    ,_param_statistics (param_statistics)
38#endif
39  {
40    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
41
42    log_printf(INFO,Register_unit,FUNCTION,"Allocation");
43    allocation ();
44
45#ifdef STATISTICS
46    log_printf(INFO,Register_unit,FUNCTION,"Allocation of statistics");
47
48    // Allocation of statistics
49    _stat = new Statistics (static_cast<string>(_name),
50                            param_statistics          ,
51                            param);
52#endif
53
54#ifdef VHDL
55    // generate the vhdl
56    log_printf(INFO,Register_unit,FUNCTION,"Generate the vhdl");
57
58    vhdl();
59#endif
60
61#ifdef SYSTEMC
62//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
63    log_printf(INFO,Register_unit,FUNCTION,"Method - transition");
64
65    SC_METHOD (transition);
66    dont_initialize ();
67    sensitive_pos << *(in_CLOCK);
68//#endif
69
70#ifdef SYSTEMCASS_SPECIFIC
71    // List dependency information
72#endif   
73
74#endif
75    log_printf(FUNC,Register_unit,FUNCTION,"End");
76  };
77 
78#undef  FUNCTION
79#define FUNCTION "Register_unit::~Register_unit"
80  Register_unit::~Register_unit (void)
81  {
82    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
83
84#ifdef STATISTICS
85    log_printf(INFO,Register_unit,FUNCTION,"Generate Statistics file");
86
87    _stat->generate_file(statistics(0));
88    delete _stat;
89#endif
90
91    log_printf(INFO,Register_unit,FUNCTION,"Deallocation");
92    deallocation ();
93
94    log_printf(FUNC,Register_unit,FUNCTION,"End");
95  };
96
97}; // end namespace register_unit
98}; // end namespace execute_loop
99}; // end namespace multi_execute_loop
100}; // end namespace core
101
102}; // end namespace behavioural
103}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.