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

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

1) Configuration : instance configuration file : regroup similar instance
2) Configuration : timing default = 0
3) Debug/Commit_unit : Add watch dog timer
4) Issue_queue : Test parameters : add test if type is optionnal
5) Cor_glue : Fix insert index
6) Free_list : remove bank_by_pop (else deadlock)
7) Update Free List : add register to source event

  • Property svn:keywords set to Id
File size: 5.8 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 109 2009-02-16 20:28:31Z 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#endif
58
59  public    : Component                      * _component;
60  private   : Interfaces                     * _interfaces;
61
62#ifdef SYSTEMC
63    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64    // Interface
65  public    : SC_CLOCK                      *  in_CLOCK          ;
66  public    : SC_IN (Tcontrol_t)            *  in_NRESET         ;
67
68    // ~~~~~[ interface : "pop" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69  public    : SC_IN (Tcontrol_t)           **  in_POP_VAL        ;
70  public    : SC_OUT(Tcontrol_t)           ** out_POP_ACK        ;
71  public    : SC_IN (Tcontrol_t        )   **  in_POP_GPR_VAL    ; // write_rd
72  public    : SC_OUT(Tgeneral_address_t)   ** out_POP_GPR_NUM_REG; // num_reg_rd
73  public    : SC_IN (Tcontrol_t        )   **  in_POP_SPR_VAL    ; // write_re
74  public    : SC_OUT(Tspecial_address_t)   ** out_POP_SPR_NUM_REG; // num_reg_re
75
76    // ~~~~~[ interface : "push_gpr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77  public    : SC_IN (Tcontrol_t)           **  in_PUSH_GPR_VAL    ; // gpr_free (cf stat_list)
78  public    : SC_OUT(Tcontrol_t)           ** out_PUSH_GPR_ACK    ;
79  public    : SC_IN (Tgeneral_address_t)   **  in_PUSH_GPR_NUM_REG;
80
81    // ~~~~~[ interface : "push_spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
82  public    : SC_IN (Tcontrol_t)           **  in_PUSH_SPR_VAL    ; // spr_free (cf stat_list)
83  public    : SC_OUT(Tcontrol_t)           ** out_PUSH_SPR_ACK    ;
84  public    : SC_IN (Tspecial_address_t)   **  in_PUSH_SPR_NUM_REG;
85
86    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
87  private   : generic::priority::Priority   * _priority_gpr;
88  private   : generic::priority::Priority   * _priority_spr;
89
90    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
91  private   : std::list<Tgeneral_address_t> * _gpr_list; //[nb_bank]
92  private   : std::list<Tspecial_address_t> * _spr_list; //[nb_bank]
93
94    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
95  private   : Tcontrol_t                    * internal_POP_ACK      ; //[nb_pop]
96  private   : uint32_t                      * internal_POP_GPR_BANK ; //[nb_pop]
97  private   : uint32_t                      * internal_POP_SPR_BANK ; //[nb_pop]
98
99  private   : Tcontrol_t                    * internal_PUSH_GPR_ACK ; //[nb_push]
100  private   : Tcontrol_t                    * internal_PUSH_SPR_ACK ; //[nb_push]
101  private   : uint32_t                      * internal_PUSH_GPR_BANK; //[nb_push]
102  private   : uint32_t                      * internal_PUSH_SPR_BANK; //[nb_push]
103#endif
104
105    // -----[ Methods ]---------------------------------------------------
106
107#ifdef SYSTEMC
108    SC_HAS_PROCESS (Free_List_unit);
109#endif
110  public  :          Free_List_unit             
111  (
112#ifdef SYSTEMC
113   sc_module_name                                name,
114#else                                         
115   std::string                                   name,
116#endif                                         
117#ifdef STATISTICS
118   morpheo::behavioural::Parameters_Statistics * param_statistics,
119#endif
120   Parameters                                  * param,
121   morpheo::behavioural::Tusage_t                usage
122   );
123  public  :          ~Free_List_unit             (void);
124                                               
125  private : void        allocation                (
126#ifdef STATISTICS
127                                                   morpheo::behavioural::Parameters_Statistics * param_statistics
128#else
129                                                   void
130#endif
131                                                   );
132  private : void        deallocation              (void);
133                                               
134#ifdef SYSTEMC                                 
135  public  : void        transition                (void);
136  public  : void        genMealy_pop              (void);
137  public  : void        genMealy_push_gpr         (void);
138  public  : void        genMealy_push_spr         (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 free_list_unit
156}; // end namespace register_translation_unit
157}; // end namespace rename_unit
158}; // end namespace ooo_engine
159}; // end namespace multi_ooo_engine
160}; // end namespace core
161
162}; // end namespace behavioural
163}; // end namespace morpheo             
164
165#endif
Note: See TracBrowser for help on using the repository browser.