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

Last change on this file since 78 was 78, checked in by rosiere, 16 years ago

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
File size: 2.7 KB
Line 
1/*
2 * $Id$
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    log_printf(INFO,Address_management,FUNCTION,"Allocation");
41
42    allocation (
43#ifdef STATISTICS
44                param_statistics
45#endif
46                );
47
48#ifdef STATISTICS
49    if (_usage & USE_STATISTICS)
50      { 
51        log_printf(INFO,Address_management,FUNCTION,"Allocation of statistics");
52
53        statistics_allocation(param_statistics);
54      }
55#endif
56
57#ifdef VHDL
58    if (_usage & USE_VHDL)
59      {
60        // generate the vhdl
61        log_printf(INFO,Address_management,FUNCTION,"Generate the vhdl");
62       
63        vhdl();
64      }
65#endif
66
67#ifdef SYSTEMC
68    if (_usage & USE_SYSTEMC)
69      {
70        // Affect output constant
71        internal_EVENT_ACK = 1;
72        PORT_WRITE(out_EVENT_ACK, internal_EVENT_ACK);
73
74        log_printf(INFO,Address_management,FUNCTION,"Method - transition");
75
76        SC_METHOD (transition);
77        dont_initialize ();
78        sensitive << (*(in_CLOCK)).pos();
79       
80# ifdef SYSTEMCASS_SPECIFIC
81        // List dependency information
82# endif   
83
84        log_printf(INFO,Address_management,FUNCTION,"Method - genMoore");
85
86        SC_METHOD (genMoore);
87        dont_initialize ();
88        sensitive << (*(in_CLOCK)).neg(); // use internal register
89       
90# ifdef SYSTEMCASS_SPECIFIC
91        // List dependency information
92# endif   
93       
94#endif
95      }
96    log_printf(FUNC,Address_management,FUNCTION,"End");
97  };
98   
99#undef  FUNCTION
100#define FUNCTION "Address_management::~Address_management"
101  Address_management::~Address_management (void)
102  {
103    log_printf(FUNC,Address_management,FUNCTION,"Begin");
104
105#ifdef STATISTICS
106    if (_usage & USE_STATISTICS)
107      {
108        statistics_deallocation();
109      }
110#endif
111
112    log_printf(INFO,Address_management,FUNCTION,"Deallocation");
113    deallocation ();
114
115    log_printf(FUNC,Address_management,FUNCTION,"End");
116  };
117
118}; // end namespace address_management
119}; // end namespace ifetch_unit
120}; // end namespace front_end
121}; // end namespace multi_front_end
122}; // end namespace core
123
124}; // end namespace behavioural
125}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.