source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Load_Store_pointer_unit.h @ 122

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

Modif for performance :
1) Load Store Unit : store send request to valid exeception
2) Commit_unit : retire can bypass store
3) Commit_unit : add stat to manage store instruction
4) Load Store Unit and Load Store Pointer Manager : add store_queue_ptr_read
5) Fix lot of bug

  • Property svn:keywords set to Id
File size: 7.9 KB
Line 
1#ifndef morpheo_behavioural_core_multi_ooo_engine_ooo_engine_rename_unit_load_store_pointer_unit_Load_Store_pointer_unit_h
2#define morpheo_behavioural_core_multi_ooo_engine_ooo_engine_rename_unit_load_store_pointer_unit_Load_Store_pointer_unit_h
3
4/*
5 * $Id: Load_Store_pointer_unit.h 122 2009-06-03 08:15:51Z rosiere $
6 *
7 * [ Description ]
8 *
9 */
10
11#ifdef SYSTEMC
12#include "systemc.h"
13#endif
14
15#include <iostream>
16#include "Common/include/ToString.h"
17#include "Common/include/Debug.h"
18#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Types.h"
19
20#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Parameters.h"
21#ifdef STATISTICS
22#include "Behavioural/include/Stat.h"
23#endif
24#include "Behavioural/include/Component.h"
25#ifdef VHDL
26#include "Behavioural/include/Vhdl.h"
27#endif
28#include "Behavioural/include/Usage.h"
29
30namespace morpheo {
31namespace behavioural {
32
33namespace core {
34namespace multi_ooo_engine {
35namespace ooo_engine {
36namespace rename_unit {
37namespace load_store_pointer_unit {
38
39
40  class Load_Store_pointer_unit
41#if SYSTEMC
42    : public sc_module
43#endif
44  {
45    // -----[ fields ]----------------------------------------------------
46    // Parameters
47  protected : const std::string  _name;
48  protected : const Parameters * _param;
49  private   : const Tusage_t     _usage;
50
51#ifdef STATISTICS
52  public    : Stat                           * _stat;
53#endif
54
55  public    : Component                      * _component;
56  private   : Interfaces                     * _interfaces;
57
58#ifdef SYSTEMC
59    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61  public    : SC_CLOCK                      *  in_CLOCK        ;
62  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
63
64    // ~~~~~[ Interface : "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65  public    : SC_IN (Tcontrol_t     )      **  in_INSERT_VAL                  ; // [nb_inst_insert]
66  public    : SC_OUT(Tcontrol_t     )      ** out_INSERT_ACK                  ; // [nb_inst_insert]
67  public    : SC_IN (Tcontext_t     )      **  in_INSERT_FRONT_END_ID         ; // [nb_inst_insert]
68  public    : SC_IN (Tcontext_t     )      **  in_INSERT_CONTEXT_ID           ; // [nb_inst_insert]
69  public    : SC_IN (Ttype_t        )      **  in_INSERT_TYPE                 ; // [nb_inst_insert]
70  public    : SC_IN (Toperation_t   )      **  in_INSERT_OPERATION            ; // [nb_inst_insert]
71  public    : SC_OUT(Tlsq_ptr_t     )      ** out_INSERT_STORE_QUEUE_PTR_WRITE; // [nb_inst_insert]
72  public    : SC_OUT(Tlsq_ptr_t     )      ** out_INSERT_STORE_QUEUE_PTR_READ ; // [nb_inst_insert]
73  public    : SC_OUT(Tcontrol_t     )      ** out_INSERT_STORE_QUEUE_EMPTY    ; // [nb_inst_insert]
74  public    : SC_OUT(Tlsq_ptr_t     )      ** out_INSERT_LOAD_QUEUE_PTR_WRITE ; // [nb_inst_insert]
75
76    // ~~~~~[ Interface : "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77  public    : SC_IN (Tcontrol_t     )      **  in_RETIRE_VAL                  ; // [nb_inst_retire]
78  public    : SC_OUT(Tcontrol_t     )      ** out_RETIRE_ACK                  ; // [nb_inst_retire]
79  public    : SC_IN (Tcontext_t     )      **  in_RETIRE_FRONT_END_ID         ; // [nb_inst_retire]
80  public    : SC_IN (Tcontext_t     )      **  in_RETIRE_CONTEXT_ID           ; // [nb_inst_retire]
81//public    : SC_IN (Ttype_t        )      **  in_RETIRE_TYPE                 ; // [nb_inst_retire]
82//public    : SC_IN (Toperation_t   )      **  in_RETIRE_OPERATION            ; // [nb_inst_retire]
83  public    : SC_IN (Tcontrol_t     )      **  in_RETIRE_USE_STORE_QUEUE      ; // [nb_inst_retire]
84  public    : SC_IN (Tcontrol_t     )      **  in_RETIRE_USE_LOAD_QUEUE       ; // [nb_inst_retire]
85  public    : SC_IN (Tlsq_ptr_t     )      **  in_RETIRE_STORE_QUEUE_PTR_WRITE; // [nb_inst_retire]
86  public    : SC_IN (Tlsq_ptr_t     )      **  in_RETIRE_LOAD_QUEUE_PTR_WRITE ; // [nb_inst_retire]
87
88    // ~~~~~[ Interface "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89  public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_EVENT_VAL            ;//[nb_front_end][nb_context]
90  public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_EVENT_ACK            ;//[nb_front_end][nb_context]
91  public    : SC_IN (Tevent_state_t    )  ***  in_RETIRE_EVENT_STATE          ;//[nb_front_end][nb_context]
92
93    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
94
95    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
96  private   : Tlsq_ptr_t                     * reg_STORE_QUEUE_PTR_WRITE; // [nb_load_store_queue]
97  private   : Tlsq_ptr_t                    ** reg_STORE_QUEUE_PTR_READ ; // [nb_front_end][nb_context]
98  private   : bool                          ** reg_STORE_QUEUE_EMPTY    ; // [nb_front_end][nb_context]
99  private   : bool                          ** reg_STORE_QUEUE_USE      ; // [nb_load_store_queue][size_store_queue]
100  private   : Tlsq_ptr_t                     * reg_STORE_QUEUE_NB_USE   ; // [nb_load_store_queue]
101  private   : Tlsq_ptr_t                     * reg_LOAD_QUEUE_PTR_WRITE ; // [nb_load_store_queue]
102  private   : bool                          ** reg_LOAD_QUEUE_USE       ; // [nb_load_store_queue][size_load_queue]
103
104    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
105  private   : Tcontrol_t                     * internal_INSERT_ACK          ; // [nb_inst_insert]
106  private   : operation_use_t                * internal_INSERT_OPERATION_USE; // [nb_inst_insert]
107  private   : uint32_t                       * internal_INSERT_LSQ          ; // [nb_inst_insert]
108  private   : Tlsq_ptr_t                     * internal_INSERT_PTR          ; // [nb_inst_insert]
109
110  private   : Tcontrol_t                     * internal_RETIRE_ACK          ; // [nb_inst_retire]
111  private   : operation_use_t                * internal_RETIRE_OPERATION_USE; // [nb_inst_retire]
112  private   : uint32_t                       * internal_RETIRE_LSQ          ; // [nb_inst_retire]
113  private   : Tlsq_ptr_t                     * internal_RETIRE_PTR          ; // [nb_inst_retire]
114  private   : Tcontrol_t                    ** internal_RETIRE_EVENT_ACK    ;//[nb_front_end][nb_context]
115
116#endif
117
118    // -----[ Methods ]---------------------------------------------------
119
120#ifdef SYSTEMC
121    SC_HAS_PROCESS (Load_Store_pointer_unit);
122#endif
123  public  :          Load_Store_pointer_unit             
124  (
125#ifdef SYSTEMC
126   sc_module_name                                name,
127#else                                         
128   std::string                                   name,
129#endif                                         
130#ifdef STATISTICS
131   morpheo::behavioural::Parameters_Statistics * param_statistics,
132#endif
133   Parameters                                  * param,
134   morpheo::behavioural::Tusage_t                usage
135   );
136  public  :          ~Load_Store_pointer_unit             (void);
137                                               
138  private : void        allocation                (
139#ifdef STATISTICS
140                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
141#else
142                                                   void
143#endif
144                                                   );
145  private : void        deallocation              (void);
146                                               
147#ifdef SYSTEMC                                 
148  public  : void        transition                (void);
149  public  : void        genMealy_insert           (void);
150  public  : void        genMealy_retire           (void);
151#endif                                         
152
153#if VHDL                                       
154  public  : void        vhdl                      (void);
155  private : void        vhdl_declaration          (Vhdl * & vhdl);
156  private : void        vhdl_body                 (Vhdl * & vhdl);
157#endif                                         
158
159#ifdef STATISTICS
160  public  : void        statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
161#endif
162#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
163  private : void        end_cycle                 (void);
164#endif
165  };
166
167}; // end namespace load_store_pointer_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             
175
176#endif
Note: See TracBrowser for help on using the repository browser.