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

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

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1/*
2 * $Id: Address_management.cpp 88 2008-12-10 18:31:39Z 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        // Affect output constant
77        internal_EVENT_ACK = 1;
78        PORT_WRITE(out_EVENT_ACK, internal_EVENT_ACK);
79
80        log_printf(INFO,Address_management,FUNCTION,"Method - transition");
81
82        SC_METHOD (transition);
83        dont_initialize ();
84        sensitive << (*(in_CLOCK)).pos();
85       
86# ifdef SYSTEMCASS_SPECIFIC
87        // List dependency information
88# endif   
89
90        log_printf(INFO,Address_management,FUNCTION,"Method - genMoore");
91
92        SC_METHOD (genMoore);
93        dont_initialize ();
94        sensitive << (*(in_CLOCK)).neg(); // use internal register
95       
96# ifdef SYSTEMCASS_SPECIFIC
97        // List dependency information
98# endif   
99       
100#endif
101      }
102
103    log_printf(FUNC,Address_management,FUNCTION,"End");
104  };
105   
106#undef  FUNCTION
107#define FUNCTION "Address_management::~Address_management"
108  Address_management::~Address_management (void)
109  {
110    log_printf(FUNC,Address_management,FUNCTION,"Begin");
111
112#ifdef STATISTICS
113    if (usage_is_set(_usage,USE_STATISTICS))
114      {
115        statistics_deallocation();
116      }
117#endif
118
119    log_printf(INFO,Address_management,FUNCTION,"Deallocation");
120    deallocation ();
121
122    log_printf(FUNC,Address_management,FUNCTION,"End");
123  };
124
125}; // end namespace address_management
126}; // end namespace ifetch_unit
127}; // end namespace front_end
128}; // end namespace multi_front_end
129}; // end namespace core
130
131}; // end namespace behavioural
132}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.