source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management.cpp @ 131

Last change on this file since 131 was 131, checked in by rosiere, 15 years ago

1) add constant method
2) test with systemc 2.2.0

  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1/*
2 * $Id: Address_management.cpp 131 2009-07-08 18:40:08Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/include/Address_management.h"
9
10namespace morpheo                    {
11namespace behavioural {
12namespace core {
13namespace multi_front_end {
14namespace front_end {
15namespace ifetch_unit {
16namespace address_management {
17
18
19#undef  FUNCTION
20#define FUNCTION "Address_management::Address_management"
21  Address_management::Address_management
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_front_end::front_end::ifetch_unit::address_management::Parameters * param,
32   morpheo::behavioural::Tusage_t usage
33   ):
34    _name              (name)
35    ,_param            (param)
36    ,_usage            (usage)
37  {
38    log_printf(FUNC,Address_management,FUNCTION,"Begin");
39
40// #if DEBUG_Address_management == true
41//     log_printf(INFO,Address_management,FUNCTION,_("<%s> Parameters"),_name.c_str());
42
43//     std::cout << *param << std::endl;
44// #endif   
45
46    log_printf(INFO,Address_management,FUNCTION,"Allocation");
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,Address_management,FUNCTION,"Allocation of statistics");
58
59        statistics_allocation(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,Address_management,FUNCTION,"Generate the vhdl");
68       
69        vhdl();
70      }
71#endif
72
73#ifdef SYSTEMC
74    if (usage_is_set(_usage,USE_SYSTEMC))
75      {
76#ifdef SYSTEMCASS_SPECIFIC
77        constant();
78#else
79        log_printf(INFO,Address_management,FUNCTION,"Method - constant");
80
81        SC_METHOD (constant);
82//      dont_initialize ();
83       
84# ifdef SYSTEMCASS_SPECIFIC
85        // List dependency information
86# endif   
87#endif
88
89        log_printf(INFO,Address_management,FUNCTION,"Method - transition");
90
91        SC_METHOD (transition);
92        dont_initialize ();
93        sensitive << (*(in_CLOCK)).pos();
94       
95# ifdef SYSTEMCASS_SPECIFIC
96        // List dependency information
97# endif   
98
99        log_printf(INFO,Address_management,FUNCTION,"Method - genMoore");
100
101        SC_METHOD (genMoore);
102        dont_initialize ();
103        sensitive << (*(in_CLOCK)).neg(); // use internal register
104       
105# ifdef SYSTEMCASS_SPECIFIC
106        // List dependency information
107# endif   
108       
109#endif
110      }
111
112    log_printf(FUNC,Address_management,FUNCTION,"End");
113  };
114   
115#undef  FUNCTION
116#define FUNCTION "Address_management::~Address_management"
117  Address_management::~Address_management (void)
118  {
119    log_printf(FUNC,Address_management,FUNCTION,"Begin");
120
121#ifdef STATISTICS
122    if (usage_is_set(_usage,USE_STATISTICS))
123      {
124        statistics_deallocation();
125      }
126#endif
127
128    log_printf(INFO,Address_management,FUNCTION,"Deallocation");
129    deallocation ();
130
131    log_printf(FUNC,Address_management,FUNCTION,"End");
132  };
133
134}; // end namespace address_management
135}; // end namespace ifetch_unit
136}; // end namespace front_end
137}; // end namespace multi_front_end
138}; // end namespace core
139
140}; // end namespace behavioural
141}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.