source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit.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: 4.2 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Free_List_unit.h"
9
10namespace morpheo                    {
11namespace behavioural {
12namespace core {
13namespace multi_ooo_engine {
14namespace ooo_engine {
15namespace rename_unit {
16namespace register_translation_unit {
17namespace free_list_unit {
18
19
20#undef  FUNCTION
21#define FUNCTION "Free_List_unit::Free_List_unit"
22  Free_List_unit::Free_List_unit
23  (
24#ifdef SYSTEMC
25   sc_module_name name,
26#else
27   string name,
28#endif
29#ifdef STATISTICS
30   morpheo::behavioural::Parameters_Statistics * param_statistics,
31#endif
32   morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::free_list_unit::Parameters * param,
33   morpheo::behavioural::Tusage_t usage
34   ):
35    _name              (name)
36    ,_param            (param)
37    ,_usage            (usage)
38  {
39    log_printf(FUNC,Free_List_unit,FUNCTION,"Begin");
40
41    log_printf(INFO,Free_List_unit,FUNCTION,"Allocation");
42
43    allocation (
44#ifdef STATISTICS
45                param_statistics
46#endif
47                );
48
49#ifdef STATISTICS
50    if (_usage & USE_STATISTICS)
51      { 
52        log_printf(INFO,Free_List_unit,FUNCTION,"Allocation of statistics");
53
54        statistics_declaration(param_statistics);
55      }
56#endif
57
58#ifdef VHDL
59    if (_usage & USE_VHDL)
60      {
61        // generate the vhdl
62        log_printf(INFO,Free_List_unit,FUNCTION,"Generate the vhdl");
63       
64        vhdl();
65      }
66#endif
67
68#ifdef SYSTEMC
69    if (_usage & USE_SYSTEMC)
70      {
71        log_printf(INFO,Free_List_unit,FUNCTION,"Method - transition");
72
73        SC_METHOD (transition);
74        dont_initialize ();
75        sensitive << (*(in_CLOCK)).pos();
76       
77# ifdef SYSTEMCASS_SPECIFIC
78        // List dependency information
79# endif   
80
81        log_printf(INFO,Free_List_unit,FUNCTION,"Method - genMealy_pop");
82
83        SC_METHOD (genMealy_pop);
84        dont_initialize ();
85        sensitive << (*(in_CLOCK)).neg();
86        for (uint32_t i=0; i<_param->_nb_pop; i++)
87          sensitive << (*(in_POP_GPR_VAL[i]))
88                    << (*(in_POP_SPR_VAL[i]));
89       
90# ifdef SYSTEMCASS_SPECIFIC
91        // List dependency information
92       
93        for (uint32_t i=0; i<_param->_nb_pop; i++)
94          {
95            (*(out_POP_GPR_NUM_REG [i])) (*(in_POP_GPR_VAL[i]));
96            (*(out_POP_SPR_NUM_REG [i])) (*(in_POP_SPR_VAL[i]));
97            (*(out_POP_ACK         [i])) (*(in_POP_GPR_VAL[i]));
98            (*(out_POP_ACK         [i])) (*(in_POP_SPR_VAL[i]));
99          }
100# endif
101
102        log_printf(INFO,Free_List_unit,FUNCTION,"Method - genMealy_push_gpr");
103
104        SC_METHOD (genMealy_push_gpr);
105        dont_initialize ();
106        sensitive << (*(in_CLOCK)).neg();
107        for (uint32_t i=0; i<_param->_nb_push; i++)
108          sensitive << (*(in_PUSH_GPR_VAL    [i]))
109                    << (*(in_PUSH_GPR_NUM_REG[i]));
110       
111# ifdef SYSTEMCASS_SPECIFIC
112        // List dependency information
113       
114        for (uint32_t i=0; i<_param->_nb_push; i++)
115          {
116            (*(out_PUSH_GPR_ACK         [i])) (*(in_PUSH_GPR_VAL    [i]));
117            (*(out_PUSH_GPR_ACK         [i])) (*(in_PUSH_GPR_NUM_REG[i]));
118          }
119# endif
120
121        log_printf(INFO,Free_List_unit,FUNCTION,"Method - genMealy_push_spr");
122
123        SC_METHOD (genMealy_push_spr);
124        dont_initialize ();
125        sensitive << (*(in_CLOCK)).neg();
126        for (uint32_t i=0; i<_param->_nb_push; i++)
127          sensitive << (*(in_PUSH_SPR_VAL    [i]))
128                    << (*(in_PUSH_SPR_NUM_REG[i]));
129       
130# ifdef SYSTEMCASS_SPECIFIC
131        // List dependency information
132       
133        for (uint32_t i=0; i<_param->_nb_push; i++)
134          {
135            (*(out_PUSH_SPR_ACK         [i])) (*(in_PUSH_SPR_VAL    [i]));
136            (*(out_PUSH_SPR_ACK         [i])) (*(in_PUSH_SPR_NUM_REG[i]));
137          }
138# endif
139
140#endif
141      }
142    log_printf(FUNC,Free_List_unit,FUNCTION,"End");
143  };
144   
145#undef  FUNCTION
146#define FUNCTION "Free_List_unit::~Free_List_unit"
147  Free_List_unit::~Free_List_unit (void)
148  {
149    log_printf(FUNC,Free_List_unit,FUNCTION,"Begin");
150
151#ifdef STATISTICS
152    if (_usage & USE_STATISTICS)
153      {
154        log_printf(INFO,Free_List_unit,FUNCTION,"Generate Statistics file");
155       
156        delete _stat;
157      }
158#endif
159
160    log_printf(INFO,Free_List_unit,FUNCTION,"Deallocation");
161    deallocation ();
162
163    log_printf(FUNC,Free_List_unit,FUNCTION,"End");
164  };
165
166}; // end namespace free_list_unit
167}; // end namespace register_translation_unit
168}; // end namespace rename_unit
169}; // end namespace ooo_engine
170}; // end namespace multi_ooo_engine
171}; // end namespace core
172
173}; // end namespace behavioural
174}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.