source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Stat_List_unit.h @ 118

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

1) Stat List : scan all queue to find free register
2) Write_queue : test "genMealy" add bypass [0]
3) Functionnal_unit : add const parameters to add or not the pipeline_in
4) Load Store Unit : if load make an exception, free nb_check
5) Debug, change test to add model

  • Property svn:keywords set to Id
File size: 8.6 KB
Line 
1 #ifndef morpheo_behavioural_core_multi_ooo_engine_ooo_engine_rename_unit_register_translation_unit_stat_list_unit_Stat_List_unit_h
2#define morpheo_behavioural_core_multi_ooo_engine_ooo_engine_rename_unit_register_translation_unit_stat_list_unit_Stat_List_unit_h
3
4/*
5 * $Id: Stat_List_unit.h 118 2009-05-20 22:01:32Z 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/Register_translation_unit/Stat_List_unit/include/Types.h"
19#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Parameters.h"
20#ifdef STATISTICS
21#include "Behavioural/include/Stat.h"
22#endif
23#include "Behavioural/include/Component.h"
24#ifdef VHDL
25#include "Behavioural/include/Vhdl.h"
26#endif
27#include "Behavioural/include/Usage.h"
28
29namespace morpheo {
30namespace behavioural {
31
32namespace core {
33namespace multi_ooo_engine {
34namespace ooo_engine {
35namespace rename_unit {
36namespace register_translation_unit {
37namespace stat_list_unit {
38
39
40  class Stat_List_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 (Tcontrol_t        )   **  in_INSERT_READ_RA           ;//[nb_inst_insert]
68  public    : SC_IN (Tgeneral_address_t)   **  in_INSERT_NUM_REG_RA_PHY    ;//[nb_inst_insert]
69  public    : SC_IN (Tcontrol_t        )   **  in_INSERT_READ_RB           ;//[nb_inst_insert]
70  public    : SC_IN (Tgeneral_address_t)   **  in_INSERT_NUM_REG_RB_PHY    ;//[nb_inst_insert]
71  public    : SC_IN (Tcontrol_t        )   **  in_INSERT_READ_RC           ;//[nb_inst_insert]
72  public    : SC_IN (Tspecial_address_t)   **  in_INSERT_NUM_REG_RC_PHY    ;//[nb_inst_insert]
73  public    : SC_IN (Tcontrol_t        )   **  in_INSERT_WRITE_RD          ;//[nb_inst_insert]
74  public    : SC_IN (Tgeneral_address_t)   **  in_INSERT_NUM_REG_RD_PHY_OLD;//[nb_inst_insert]
75  public    : SC_IN (Tgeneral_address_t)   **  in_INSERT_NUM_REG_RD_PHY_NEW;//[nb_inst_insert]
76  public    : SC_IN (Tcontrol_t        )   **  in_INSERT_WRITE_RE          ;//[nb_inst_insert]
77  public    : SC_IN (Tspecial_address_t)   **  in_INSERT_NUM_REG_RE_PHY_OLD;//[nb_inst_insert]
78  public    : SC_IN (Tspecial_address_t)   **  in_INSERT_NUM_REG_RE_PHY_NEW;//[nb_inst_insert]
79 
80    // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_VAL               ;//[nb_inst_retire]
82  public    : SC_OUT(Tcontrol_t        )   ** out_RETIRE_ACK               ;//[nb_inst_retire]
83  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_RESTORE           ;//[nb_inst_retire]
84  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_READ_RA           ;//[nb_inst_retire]
85  public    : SC_IN (Tgeneral_address_t)   **  in_RETIRE_NUM_REG_RA_PHY    ;//[nb_inst_retire]
86  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_READ_RB           ;//[nb_inst_retire]
87  public    : SC_IN (Tgeneral_address_t)   **  in_RETIRE_NUM_REG_RB_PHY    ;//[nb_inst_retire]
88  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_READ_RC           ;//[nb_inst_retire]
89  public    : SC_IN (Tspecial_address_t)   **  in_RETIRE_NUM_REG_RC_PHY    ;//[nb_inst_retire]
90  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_WRITE_RD          ;//[nb_inst_retire]
91  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_RESTORE_RD_PHY_OLD;//[nb_inst_retire]
92  public    : SC_IN (Tgeneral_address_t)   **  in_RETIRE_NUM_REG_RD_PHY_OLD;//[nb_inst_retire]
93  public    : SC_IN (Tgeneral_address_t)   **  in_RETIRE_NUM_REG_RD_PHY_NEW;//[nb_inst_retire]
94  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_WRITE_RE          ;//[nb_inst_retire]
95  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_RESTORE_RE_PHY_OLD;//[nb_inst_retire]
96  public    : SC_IN (Tspecial_address_t)   **  in_RETIRE_NUM_REG_RE_PHY_OLD;//[nb_inst_retire]
97  public    : SC_IN (Tspecial_address_t)   **  in_RETIRE_NUM_REG_RE_PHY_NEW;//[nb_inst_retire]
98
99    // ~~~~~[ interface : "push_gpr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100  public    : SC_OUT(Tcontrol_t)           ** out_PUSH_GPR_VAL             ;//[nb_reg_free]
101  public    : SC_IN (Tcontrol_t)           **  in_PUSH_GPR_ACK             ;//[nb_reg_free]
102  public    : SC_OUT(Tgeneral_address_t)   ** out_PUSH_GPR_NUM_REG         ;//[nb_reg_free]
103
104    // ~~~~~[ interface : "push_spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
105  public    : SC_OUT(Tcontrol_t)           ** out_PUSH_SPR_VAL             ;//[nb_reg_free]
106  public    : SC_IN (Tcontrol_t)           **  in_PUSH_SPR_ACK             ;//[nb_reg_free]
107  public    : SC_OUT(Tspecial_address_t)   ** out_PUSH_SPR_NUM_REG         ;//[nb_reg_free]
108
109    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
110
111    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
112  private   : stat_list_entry_t            ** gpr_stat_list; //[nb_bank][nb_general_register_by_bank]
113  private   : stat_list_entry_t            ** spr_stat_list; //[nb_bank][nb_general_register_by_bank]
114
115  private   : uint32_t                        reg_GPR_PTR_FREE;
116  private   : uint32_t                        reg_SPR_PTR_FREE;
117
118    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
119  private   : Tcontrol_t                    * internal_INSERT_ACK       ;//[nb_inst_insert]
120  private   : Tcontrol_t                    * internal_RETIRE_ACK       ;//[nb_inst_retire]
121  private   : Tcontrol_t                    * internal_PUSH_GPR_VAL     ;//[nb_reg_free]
122  private   : uint32_t                      * internal_PUSH_GPR_NUM_BANK;//[nb_reg_free]
123  private   : uint32_t                      * internal_PUSH_GPR_NUM_REG ;//[nb_reg_free]
124  private   : Tcontrol_t                    * internal_PUSH_SPR_VAL     ;//[nb_reg_free]
125  private   : uint32_t                      * internal_PUSH_SPR_NUM_BANK;//[nb_reg_free]
126  private   : uint32_t                      * internal_PUSH_SPR_NUM_REG ;//[nb_reg_free]
127#endif
128
129    // -----[ Methods ]---------------------------------------------------
130
131#ifdef SYSTEMC
132    SC_HAS_PROCESS (Stat_List_unit);
133#endif
134  public  :          Stat_List_unit             
135  (
136#ifdef SYSTEMC
137   sc_module_name                                name,
138#else                                         
139   std::string                                   name,
140#endif                                         
141#ifdef STATISTICS
142   morpheo::behavioural::Parameters_Statistics * param_statistics,
143#endif
144   Parameters                                  * param,
145   morpheo::behavioural::Tusage_t                usage
146   );
147  public  :          ~Stat_List_unit             (void);
148                                               
149  private : void        allocation                (
150#ifdef STATISTICS
151                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
152#else
153                                                   void
154#endif
155                                                   );
156  private : void        deallocation              (void);
157                                               
158#ifdef SYSTEMC                                 
159  public  : void        transition                (void);
160  public  : void        genMoore                  (void);
161//public  : void        genMealy                  (void);
162#endif                                         
163
164#if VHDL                                       
165  public  : void        vhdl                      (void);
166  private : void        vhdl_declaration          (Vhdl * & vhdl);
167  private : void        vhdl_body                 (Vhdl * & vhdl);
168#endif                                         
169
170#ifdef STATISTICS
171  public  : void        statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
172#endif
173#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
174  private : void        end_cycle                 (void);
175#endif
176  };
177
178}; // end namespace stat_list_unit
179}; // end namespace register_translation_unit
180}; // end namespace rename_unit
181}; // end namespace ooo_engine
182}; // end namespace multi_ooo_engine
183}; // end namespace core
184
185}; // end namespace behavioural
186}; // end namespace morpheo             
187
188#endif
Note: See TracBrowser for help on using the repository browser.