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 @ 81

Last change on this file since 81 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:keywords set to Id
File size: 6.8 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 81 2008-04-15 18:40:01Z 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_LOAD_QUEUE_PTR_WRITE ; // [nb_inst_insert]
73
74    // ~~~~~[ Interface : "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
75  public    : SC_IN (Tcontrol_t     )      **  in_RETIRE_VAL                  ; // [nb_inst_retire]
76  public    : SC_OUT(Tcontrol_t     )      ** out_RETIRE_ACK                  ; // [nb_inst_retire]
77  public    : SC_IN (Tcontext_t     )      **  in_RETIRE_FRONT_END_ID         ; // [nb_inst_retire]
78  public    : SC_IN (Tcontext_t     )      **  in_RETIRE_CONTEXT_ID           ; // [nb_inst_retire]
79  public    : SC_IN (Ttype_t        )      **  in_RETIRE_TYPE                 ; // [nb_inst_retire]
80  public    : SC_IN (Toperation_t   )      **  in_RETIRE_OPERATION            ; // [nb_inst_retire]
81  public    : SC_IN (Tlsq_ptr_t     )      **  in_RETIRE_STORE_QUEUE_PTR_WRITE; // [nb_inst_retire]
82  public    : SC_IN (Tlsq_ptr_t     )      **  in_RETIRE_LOAD_QUEUE_PTR_WRITE ; // [nb_inst_retire]
83
84    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
85
86    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
87  public    : Tlsq_ptr_t                     * reg_STORE_QUEUE_PTR_WRITE; // [nb_load_store_queue]
88  public    : bool                          ** reg_STORE_QUEUE_USE      ; // [nb_load_store_queue][size_store_queue]
89  public    : Tlsq_ptr_t                     * reg_STORE_QUEUE_NB_USE   ; // [nb_load_store_queue]
90  public    : Tlsq_ptr_t                     * reg_LOAD_QUEUE_PTR_WRITE ; // [nb_load_store_queue]
91  public    : bool                          ** reg_LOAD_QUEUE_USE       ; // [nb_load_store_queue][size_load_queue]
92
93    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94  public    : Tcontrol_t                     * internal_INSERT_ACK          ; // [nb_inst_insert]
95  public    : operation_use_t                * internal_INSERT_OPERATION_USE; // [nb_inst_insert]
96  public    : uint32_t                       * internal_INSERT_LSQ          ; // [nb_inst_insert]
97  public    : Tlsq_ptr_t                     * internal_INSERT_PTR          ; // [nb_inst_insert]
98
99  public    : Tcontrol_t                     * internal_RETIRE_ACK          ; // [nb_inst_retire]
100  public    : operation_use_t                * internal_RETIRE_OPERATION_USE; // [nb_inst_retire]
101  public    : uint32_t                       * internal_RETIRE_LSQ          ; // [nb_inst_retire]
102  public    : Tlsq_ptr_t                     * internal_RETIRE_PTR          ; // [nb_inst_retire]
103
104#endif
105
106    // -----[ Methods ]---------------------------------------------------
107
108#ifdef SYSTEMC
109    SC_HAS_PROCESS (Load_Store_pointer_unit);
110#endif
111  public  :          Load_Store_pointer_unit             
112  (
113#ifdef SYSTEMC
114   sc_module_name                                name,
115#else                                         
116   std::string                                   name,
117#endif                                         
118#ifdef STATISTICS
119   morpheo::behavioural::Parameters_Statistics * param_statistics,
120#endif
121   Parameters                                  * param,
122   morpheo::behavioural::Tusage_t                usage=USE_ALL
123   );
124  public  :          ~Load_Store_pointer_unit             (void);
125                                               
126  private : void        allocation                (
127#ifdef STATISTICS
128                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
129#else
130                                                   void
131#endif
132                                                   );
133  private : void        deallocation              (void);
134                                               
135#ifdef SYSTEMC                                 
136  public  : void        transition                (void);
137  public  : void        genMealy_insert           (void);
138  public  : void        genMealy_retire           (void);
139#endif                                         
140
141#if VHDL                                       
142  public  : void        vhdl                      (void);
143  private : void        vhdl_declaration          (Vhdl * & vhdl);
144  private : void        vhdl_body                 (Vhdl * & vhdl);
145#endif                                         
146
147#ifdef STATISTICS
148  public  : void        statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
149#endif
150#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
151  private : void        end_cycle                 (void);
152#endif
153  };
154
155}; // end namespace load_store_pointer_unit
156}; // end namespace rename_unit
157}; // end namespace ooo_engine
158}; // end namespace multi_ooo_engine
159}; // end namespace core
160
161}; // end namespace behavioural
162}; // end namespace morpheo             
163
164#endif
Note: See TracBrowser for help on using the repository browser.