source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_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.8 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h"
9
10namespace morpheo                    {
11namespace behavioural {
12namespace core {
13namespace multi_execute_loop {
14namespace execute_loop {
15namespace multi_execute_unit {
16namespace execute_unit {
17namespace load_store_unit {
18
19
20#undef  FUNCTION
21#define FUNCTION "Load_store_unit::Load_store_unit"
22#ifdef SYSTEMC
23  Load_store_unit::Load_store_unit (sc_module_name name,
24#else
25  Load_store_unit::Load_store_unit (string name,
26#endif
27#ifdef STATISTICS
28                          morpheo::behavioural::Parameters_Statistics * param_statistics,
29#endif
30                          morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters * param ):
31                              _name              (name)
32                              ,_param            (param)
33  {
34    log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
35
36#ifdef SYSTEMC
37    log_printf(INFO,Load_store_unit,FUNCTION,"Allocation");
38
39    allocation ();
40#endif
41
42#ifdef STATISTICS
43    log_printf(INFO,Load_store_unit,FUNCTION,"Allocation of statistics");
44
45    statistics_declaration(param_statistics);
46#endif
47
48#ifdef VHDL
49    // generate the vhdl
50    log_printf(INFO,Load_store_unit,FUNCTION,"Generate the vhdl");
51
52    vhdl();
53#endif
54
55#ifdef SYSTEMC
56    // Function pointer
57
58    switch (_param->_speculative_load)
59      {
60      case SPECULATIVE_LOAD_COMMIT :
61        {
62          function_transition      = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_commit_transition     ;
63          function_genMoore        = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_commit_genMoore       ;
64          function_genMealy_dcache = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_commit_genMealy_dcache;
65          function_genMealy_insert = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_commit_genMealy_insert;
66          function_genMealy_retire = &morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::function_speculative_load_commit_genMealy_retire;
67          break;
68        }
69      case NO_SPECULATIVE_LOAD     :
70      case SPECULATIVE_LOAD_ACCESS :
71        //case SPECULATIVE_LOAD_BYPASS :
72      default                      :
73        {
74          break;
75        }
76      }
77
78    log_printf(INFO,Load_store_unit,FUNCTION,"Constant affectation");
79
80    internal_DCACHE_RSP_ACK = 1;
81    PORT_WRITE(out_DCACHE_RSP_ACK, 1);
82
83    log_printf(INFO,Load_store_unit,FUNCTION,"Method - transition");
84
85    SC_METHOD (transition);
86    dont_initialize ();
87    sensitive_pos << *(in_CLOCK);
88
89#ifdef SYSTEMCASS_SPECIFIC
90    // List dependency information
91#endif   
92
93    log_printf(INFO,Load_store_unit,FUNCTION,"Method - genMoore");
94
95    SC_METHOD (genMoore);
96    dont_initialize ();
97    sensitive_neg << *(in_CLOCK);
98
99#ifdef SYSTEMCASS_SPECIFIC
100    // List dependency information
101#endif   
102
103    log_printf(INFO,Load_store_unit,FUNCTION,"Method - genMealy_insert");
104
105    SC_METHOD (genMealy_insert);
106    dont_initialize ();
107    sensitive_neg << *(in_CLOCK);
108    sensitive     << *(in_MEMORY_IN_OPERATION);
109
110#ifdef SYSTEMCASS_SPECIFIC
111    // List dependency information
112    (*(out_MEMORY_IN_ACK)) (*(in_MEMORY_IN_OPERATION));
113#endif   
114
115    log_printf(INFO,Load_store_unit,FUNCTION,"Method - genMealy_retire");
116
117    SC_METHOD (genMealy_retire);
118    dont_initialize ();
119    sensitive_neg << *(in_CLOCK);
120
121#ifdef SYSTEMCASS_SPECIFIC
122    // List dependency information
123#endif   
124
125    log_printf(INFO,Load_store_unit,FUNCTION,"Method - genMealy_dcache");
126
127    SC_METHOD (genMealy_dcache);
128    dont_initialize ();
129    sensitive_neg << *(in_CLOCK);
130
131#ifdef SYSTEMCASS_SPECIFIC
132    // List dependency information
133#endif   
134
135#endif
136    log_printf(FUNC,Load_store_unit,FUNCTION,"End");
137  };
138 
139#undef  FUNCTION
140#define FUNCTION "Load_store_unit::~Load_store_unit"
141  Load_store_unit::~Load_store_unit (void)
142  {
143    log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
144
145#ifdef STATISTICS
146    log_printf(INFO,Load_store_unit,FUNCTION,"Generate Statistics file");
147
148    delete _stat;
149#endif
150
151#ifdef SYSTEMC
152    log_printf(INFO,Load_store_unit,FUNCTION,"Deallocation");
153
154    deallocation ();
155#endif
156
157    log_printf(FUNC,Load_store_unit,FUNCTION,"End");
158  };
159
160}; // end namespace load_store_unit
161}; // end namespace execute_unit
162}; // end namespace multi_execute_unit
163}; // end namespace execute_loop
164}; // end namespace multi_execute_loop
165}; // end namespace core
166
167}; // end namespace behavioural
168}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.