source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Read_unit.cpp @ 146

Last change on this file since 146 was 146, checked in by rosiere, 13 years ago

1) Integration of RegisterFile_Internal_Banked in RegisterFile?
2) Erase "read_write" interface in RegisterFile_Monolithic component
3) Add smith predictor parameters in Load_store_pointer_unit.
4) Fix not statistics flags

  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1/*
2 * $Id: Read_unit.cpp 146 2011-02-01 20:57:54Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/include/Read_unit.h"
9
10namespace morpheo                    {
11namespace behavioural {
12namespace core {
13namespace multi_execute_loop {
14namespace execute_loop {
15namespace multi_read_unit {
16namespace read_unit {
17
18
19#undef  FUNCTION
20#define FUNCTION "Read_unit::Read_unit"
21  Read_unit::Read_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_read_unit::read_unit::Parameters * param,
32   morpheo::behavioural::Tusage_t usage
33   ):
34    _name              (name)
35    ,_param            (param)
36    ,_usage            (usage)
37  {
38    log_printf(FUNC,Read_unit,FUNCTION,_("<%s> Begin"),_name.c_str());
39
40// #if DEBUG_Read_unit == true
41//     log_printf(INFO,Read_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
42
43//     std::cout << *param << std::endl;
44// #endif   
45
46    log_printf(INFO,Read_unit,FUNCTION,_("<%s> Allocation"),_name.c_str());
47
48    allocation (
49#ifdef STATISTICS
50                param_statistics
51#endif
52                );
53
54#ifdef STATISTICS
55    if (usage_is_set(_usage,USE_STATISTICS))
56      { 
57        log_printf(INFO,Read_unit,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str());
58
59        statistics_declaration(param_statistics);
60      }
61#endif
62
63#ifdef VHDL
64    if (usage_is_set(_usage,USE_VHDL))
65      {
66        // generate the vhdl
67        log_printf(INFO,Read_unit,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
68       
69        vhdl();
70      }
71#endif
72
73#ifdef SYSTEMC
74# if defined(STATISTICS) or defined(VHDL_TESTBENCH)
75    if (usage_is_set(_usage,USE_SYSTEMC))
76      {
77        log_printf(INFO,Read_unit,FUNCTION,_("<%s> Method - transition"),_name.c_str());
78
79        SC_METHOD (transition);
80        dont_initialize ();
81        sensitive << (*(in_CLOCK)).pos();
82       
83# ifdef SYSTEMCASS_SPECIFIC
84        // List dependency information
85# endif   
86      }
87# endif
88#endif
89    log_printf(FUNC,Read_unit,FUNCTION,_("<%s> End"),_name.c_str());
90  };
91   
92#undef  FUNCTION
93#define FUNCTION "Read_unit::~Read_unit"
94  Read_unit::~Read_unit (void)
95  {
96    log_printf(FUNC,Read_unit,FUNCTION,_("<%s> Begin"),_name.c_str());
97
98#ifdef STATISTICS
99    if (usage_is_set(_usage,USE_STATISTICS))
100      {
101        log_printf(INFO,Read_unit,FUNCTION,_("<%s> Generate Statistics file"),_name.c_str());
102       
103        delete _stat;
104      }
105#endif
106
107    log_printf(INFO,Read_unit,FUNCTION,_("<%s> Deallocation"),_name.c_str());
108    deallocation ();
109
110    log_printf(FUNC,Read_unit,FUNCTION,_("<%s> End"),_name.c_str());
111  };
112
113}; // end namespace read_unit
114}; // end namespace multi_read_unit
115}; // end namespace execute_loop
116}; // end namespace multi_execute_loop
117}; // end namespace core
118
119}; // end namespace behavioural
120}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.