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

Last change on this file since 81 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1/*
2 * $Id: Register_unit.cpp 81 2008-04-15 18:40:01Z rosiere $
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  {
37    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
38
39    log_printf(INFO,Register_unit,FUNCTION,"Allocation");
40    allocation (
41#ifdef STATISTICS
42                param_statistics
43#endif
44                );
45
46#ifdef STATISTICS
47    log_printf(INFO,Register_unit,FUNCTION,"Allocation of statistics");
48
49    // Allocation of statistics
50    statistics_declaration(param_statistics);
51#endif
52
53#ifdef VHDL
54    // generate the vhdl
55    log_printf(INFO,Register_unit,FUNCTION,"Generate the vhdl");
56
57    vhdl();
58#endif
59
60#ifdef SYSTEMC
61//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
62    log_printf(INFO,Register_unit,FUNCTION,"Method - transition");
63
64    SC_METHOD (transition);
65    dont_initialize ();
66    sensitive_pos << *(in_CLOCK);
67//#endif
68
69#ifdef SYSTEMCASS_SPECIFIC
70    // List dependency information
71#endif   
72
73#endif
74    log_printf(FUNC,Register_unit,FUNCTION,"End");
75  };
76 
77#undef  FUNCTION
78#define FUNCTION "Register_unit::~Register_unit"
79  Register_unit::~Register_unit (void)
80  {
81    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
82
83#ifdef STATISTICS
84    log_printf(INFO,Register_unit,FUNCTION,"Generate Statistics file");
85    delete _stat;
86#endif
87
88    log_printf(INFO,Register_unit,FUNCTION,"Deallocation");
89    deallocation ();
90
91    log_printf(FUNC,Register_unit,FUNCTION,"End");
92  };
93
94}; // end namespace register_unit
95}; // end namespace execute_loop
96}; // end namespace multi_execute_loop
97}; // end namespace core
98
99}; // end namespace behavioural
100}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.