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

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

1) OOO_egine : add stat to depiste low perf source
2) Commit : add stat
3) LSU_Pointer : retire - always ack (else combinatory loop). insert - max nb_inst_memory
4) TopLevel? : add debug_idle_time to stop combinatory loop.
5) Issue_queue : add reexecute_queue, new implementation (routage after issue_queue)
6) Decod / Predictor : add "can_continue"

  • Property svn:keywords set to Id
File size: 6.4 KB
Line 
1#ifndef morpheo_behavioural_core_multi_ooo_engine_ooo_engine_rename_unit_register_translation_unit_free_list_unit_Free_List_unit_h
2#define morpheo_behavioural_core_multi_ooo_engine_ooo_engine_rename_unit_register_translation_unit_free_list_unit_Free_List_unit_h
3
4/*
5 * $Id: Free_List_unit.h 110 2009-02-19 16:31:47Z rosiere $
6 *
7 * [ Description ]
8 *
9 */
10
11#ifdef SYSTEMC
12#include "systemc.h"
13#endif
14
15#include <iostream>
16#include <list>
17#include "Common/include/ToString.h"
18#include "Common/include/Debug.h"
19#include "Behavioural/include/Types.h"
20
21#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Parameters.h"
22#ifdef STATISTICS
23#include "Behavioural/include/Stat.h"
24#endif
25#include "Behavioural/include/Component.h"
26#ifdef VHDL
27#include "Behavioural/include/Vhdl.h"
28#endif
29#include "Behavioural/include/Usage.h"
30
31#include "Behavioural/Generic/Priority/include/Priority.h"
32
33namespace morpheo {
34namespace behavioural {
35
36namespace core {
37namespace multi_ooo_engine {
38namespace ooo_engine {
39namespace rename_unit {
40namespace register_translation_unit {
41namespace free_list_unit {
42
43
44  class Free_List_unit
45#if SYSTEMC
46    : public sc_module
47#endif
48  {
49    // -----[ fields ]----------------------------------------------------
50    // Parameters
51  protected : const std::string  _name;
52  protected : const Parameters * _param;
53  private   : const Tusage_t     _usage;
54
55#ifdef STATISTICS
56  public    : Stat                           * _stat;
57  private   : counter_t                      * _stat_nb_inst_pop     ;
58  private   : counter_t                      * _stat_nb_inst_pop_gpr ;
59  private   : counter_t                      * _stat_nb_inst_pop_spr ;
60  private   : counter_t                      * _stat_nb_inst_push_gpr;
61  private   : counter_t                      * _stat_nb_inst_push_spr;
62  private   : counter_t                     ** _stat_bank_gpr_nb_elt ; //[nb_bank]
63  private   : counter_t                     ** _stat_bank_spr_nb_elt ; //[nb_bank]
64#endif
65
66  public    : Component                      * _component;
67  private   : Interfaces                     * _interfaces;
68
69#ifdef SYSTEMC
70    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71    // Interface
72  public    : SC_CLOCK                      *  in_CLOCK          ;
73  public    : SC_IN (Tcontrol_t)            *  in_NRESET         ;
74
75    // ~~~~~[ interface : "pop" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
76  public    : SC_IN (Tcontrol_t)           **  in_POP_VAL        ;
77  public    : SC_OUT(Tcontrol_t)           ** out_POP_ACK        ;
78  public    : SC_IN (Tcontrol_t        )   **  in_POP_GPR_VAL    ; // write_rd
79  public    : SC_OUT(Tgeneral_address_t)   ** out_POP_GPR_NUM_REG; // num_reg_rd
80  public    : SC_IN (Tcontrol_t        )   **  in_POP_SPR_VAL    ; // write_re
81  public    : SC_OUT(Tspecial_address_t)   ** out_POP_SPR_NUM_REG; // num_reg_re
82
83    // ~~~~~[ interface : "push_gpr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
84  public    : SC_IN (Tcontrol_t)           **  in_PUSH_GPR_VAL    ; // gpr_free (cf stat_list)
85  public    : SC_OUT(Tcontrol_t)           ** out_PUSH_GPR_ACK    ;
86  public    : SC_IN (Tgeneral_address_t)   **  in_PUSH_GPR_NUM_REG;
87
88    // ~~~~~[ interface : "push_spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89  public    : SC_IN (Tcontrol_t)           **  in_PUSH_SPR_VAL    ; // spr_free (cf stat_list)
90  public    : SC_OUT(Tcontrol_t)           ** out_PUSH_SPR_ACK    ;
91  public    : SC_IN (Tspecial_address_t)   **  in_PUSH_SPR_NUM_REG;
92
93    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
94  private   : generic::priority::Priority   * _priority_gpr;
95  private   : generic::priority::Priority   * _priority_spr;
96
97    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
98  private   : std::list<Tgeneral_address_t> * _gpr_list; //[nb_bank]
99  private   : std::list<Tspecial_address_t> * _spr_list; //[nb_bank]
100
101    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102  private   : Tcontrol_t                    * internal_POP_ACK      ; //[nb_pop]
103  private   : uint32_t                      * internal_POP_GPR_BANK ; //[nb_pop]
104  private   : uint32_t                      * internal_POP_SPR_BANK ; //[nb_pop]
105
106  private   : Tcontrol_t                    * internal_PUSH_GPR_ACK ; //[nb_push]
107  private   : Tcontrol_t                    * internal_PUSH_SPR_ACK ; //[nb_push]
108  private   : uint32_t                      * internal_PUSH_GPR_BANK; //[nb_push]
109  private   : uint32_t                      * internal_PUSH_SPR_BANK; //[nb_push]
110#endif
111
112    // -----[ Methods ]---------------------------------------------------
113
114#ifdef SYSTEMC
115    SC_HAS_PROCESS (Free_List_unit);
116#endif
117  public  :          Free_List_unit             
118  (
119#ifdef SYSTEMC
120   sc_module_name                                name,
121#else                                         
122   std::string                                   name,
123#endif                                         
124#ifdef STATISTICS
125   morpheo::behavioural::Parameters_Statistics * param_statistics,
126#endif
127   Parameters                                  * param,
128   morpheo::behavioural::Tusage_t                usage
129   );
130  public  :          ~Free_List_unit             (void);
131                                               
132  private : void        allocation                (
133#ifdef STATISTICS
134                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
135#else
136                                                   void
137#endif
138                                                   );
139  private : void        deallocation              (void);
140                                               
141#ifdef SYSTEMC                                 
142  public  : void        transition                (void);
143  public  : void        genMealy_pop              (void);
144  public  : void        genMealy_push_gpr         (void);
145  public  : void        genMealy_push_spr         (void);
146#endif
147
148#if VHDL                                       
149  public  : void        vhdl                      (void);
150  private : void        vhdl_declaration          (Vhdl * & vhdl);
151  private : void        vhdl_body                 (Vhdl * & vhdl);
152#endif                                         
153
154#ifdef STATISTICS
155  public  : void        statistics_allocation     (morpheo::behavioural::Parameters_Statistics * param_statistics);
156  public  : void        statistics_deallocation   (void);
157#endif
158#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
159  private : void        end_cycle                 (void);
160#endif
161  };
162
163}; // end namespace free_list_unit
164}; // end namespace register_translation_unit
165}; // end namespace rename_unit
166}; // end namespace ooo_engine
167}; // end namespace multi_ooo_engine
168}; // end namespace core
169
170}; // end namespace behavioural
171}; // end namespace morpheo             
172
173#endif
Note: See TracBrowser for help on using the repository browser.