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

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

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 7.0 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 88 2008-12-10 18:31:39Z 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 (Tcontrol_t     )      **  in_RETIRE_USE_STORE_QUEUE      ; // [nb_inst_retire]
82  public    : SC_IN (Tcontrol_t     )      **  in_RETIRE_USE_LOAD_QUEUE       ; // [nb_inst_retire]
83  public    : SC_IN (Tlsq_ptr_t     )      **  in_RETIRE_STORE_QUEUE_PTR_WRITE; // [nb_inst_retire]
84  public    : SC_IN (Tlsq_ptr_t     )      **  in_RETIRE_LOAD_QUEUE_PTR_WRITE ; // [nb_inst_retire]
85
86    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
87
88    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
89  public    : Tlsq_ptr_t                     * reg_STORE_QUEUE_PTR_WRITE; // [nb_load_store_queue]
90  public    : bool                          ** reg_STORE_QUEUE_USE      ; // [nb_load_store_queue][size_store_queue]
91  public    : Tlsq_ptr_t                     * reg_STORE_QUEUE_NB_USE   ; // [nb_load_store_queue]
92  public    : Tlsq_ptr_t                     * reg_LOAD_QUEUE_PTR_WRITE ; // [nb_load_store_queue]
93  public    : bool                          ** reg_LOAD_QUEUE_USE       ; // [nb_load_store_queue][size_load_queue]
94
95    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96  public    : Tcontrol_t                     * internal_INSERT_ACK          ; // [nb_inst_insert]
97  public    : operation_use_t                * internal_INSERT_OPERATION_USE; // [nb_inst_insert]
98  public    : uint32_t                       * internal_INSERT_LSQ          ; // [nb_inst_insert]
99  public    : Tlsq_ptr_t                     * internal_INSERT_PTR          ; // [nb_inst_insert]
100
101  public    : Tcontrol_t                     * internal_RETIRE_ACK          ; // [nb_inst_retire]
102  public    : operation_use_t                * internal_RETIRE_OPERATION_USE; // [nb_inst_retire]
103  public    : uint32_t                       * internal_RETIRE_LSQ          ; // [nb_inst_retire]
104  public    : Tlsq_ptr_t                     * internal_RETIRE_PTR          ; // [nb_inst_retire]
105
106#endif
107
108    // -----[ Methods ]---------------------------------------------------
109
110#ifdef SYSTEMC
111    SC_HAS_PROCESS (Load_Store_pointer_unit);
112#endif
113  public  :          Load_Store_pointer_unit             
114  (
115#ifdef SYSTEMC
116   sc_module_name                                name,
117#else                                         
118   std::string                                   name,
119#endif                                         
120#ifdef STATISTICS
121   morpheo::behavioural::Parameters_Statistics * param_statistics,
122#endif
123   Parameters                                  * param,
124   morpheo::behavioural::Tusage_t                usage
125   );
126  public  :          ~Load_Store_pointer_unit             (void);
127                                               
128  private : void        allocation                (
129#ifdef STATISTICS
130                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
131#else
132                                                   void
133#endif
134                                                   );
135  private : void        deallocation              (void);
136                                               
137#ifdef SYSTEMC                                 
138  public  : void        transition                (void);
139  public  : void        genMealy_insert           (void);
140  public  : void        genMealy_retire           (void);
141#endif                                         
142
143#if VHDL                                       
144  public  : void        vhdl                      (void);
145  private : void        vhdl_declaration          (Vhdl * & vhdl);
146  private : void        vhdl_body                 (Vhdl * & vhdl);
147#endif                                         
148
149#ifdef STATISTICS
150  public  : void        statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
151#endif
152#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
153  private : void        end_cycle                 (void);
154#endif
155  };
156
157}; // end namespace load_store_pointer_unit
158}; // end namespace rename_unit
159}; // end namespace ooo_engine
160}; // end namespace multi_ooo_engine
161}; // end namespace core
162
163}; // end namespace behavioural
164}; // end namespace morpheo             
165
166#endif
Note: See TracBrowser for help on using the repository browser.