source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h @ 78

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

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
File size: 4.4 KB
Line 
1#ifndef morpheo_behavioural_generic_victim_victim_pseudo_lru_Victim_Pseudo_LRU_h
2#define morpheo_behavioural_generic_victim_victim_pseudo_lru_Victim_Pseudo_LRU_h
3
4/*
5 * $Id$
6 *
7 * [ Description ]
8 *
9 */
10    // Tree of Pseudo-LRU
11    //
12    // |               4-5-6-7?              |
13    // |          0_______|_______1          |
14    // |          |               |          |
15    // |         2-3?            6-7?        |
16    // |      0___|___1       0___|___1      |
17    // |      |       |       |       |      |
18    // |      1?      3?      5?      7?     |
19    // |    0_|_1   0_|_1   0_|_1   0_|_1    |
20    // |    |   |   |   |   |   |   |   |    |
21    // |   Way Way Way Way Way Way Way Way   |
22    // |    0   1   2   3   4   5   6   7    |
23
24
25
26#ifdef SYSTEMC
27#include "systemc.h"
28#endif
29
30#include <iostream>
31#include "Common/include/ToString.h"
32#include "Common/include/Debug.h"
33
34#include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Parameters.h"
35#include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Types.h"
36#ifdef STATISTICS
37#include "Behavioural/include/Stat.h"
38#endif
39#ifdef VHDL
40#include "Behavioural/include/Vhdl.h"
41#endif
42#include "Behavioural/include/Component.h"
43
44namespace morpheo {
45namespace behavioural {
46namespace generic {
47namespace victim {
48namespace victim_pseudo_lru {
49
50  class Victim_Pseudo_LRU
51#if SYSTEMC
52    : public sc_module
53#endif
54  {
55    // -----[ fields ]----------------------------------------------------
56    // Parameters
57  protected : const std::string   _name;
58
59  protected : const Parameters  * _param;
60#ifdef STATISTICS
61  public    : Stat                           * _stat;
62#endif
63
64  public    : Component                      * _component;
65  private   : Interfaces                     * _interfaces;
66
67#ifdef SYSTEMC
68    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69    // Interface
70  public    : SC_CLOCK                      *  in_CLOCK         ;
71  public    : SC_IN (Tcontrol_t)            *  in_NRESET        ;
72
73    // Interface access
74  public    : SC_IN (Tcontrol_t)           **  in_ACCESS_VAL    ;
75  public    : SC_OUT(Tcontrol_t)           ** out_ACCESS_ACK    ;
76  public    : SC_IN (Taddress_t)           **  in_ACCESS_ADDRESS;
77  public    : SC_IN (Tcontrol_t)           **  in_ACCESS_HIT    ; // hit = 1 : update next_victim with in_entity else with out_victim
78  public    : SC_IN (Tentity_t )           **  in_ACCESS_ENTITY ;
79  public    : SC_OUT(Tentity_t )           ** out_ACCESS_VICTIM ;
80
81    // Interface update
82    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
83  private   : entry_t                      ** reg_TABLE;
84
85    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
86  private   : Tcontrol_t                    * internal_ACCESS_ACK   ;
87  private   : Tentity_t                     * internal_ACCESS_VICTIM;
88#endif
89
90    // -----[ methods ]---------------------------------------------------
91
92#ifdef SYSTEMC
93    SC_HAS_PROCESS (Victim_Pseudo_LRU);
94#endif
95
96  public  :          Victim_Pseudo_LRU             
97  (
98#ifdef SYSTEMC
99   sc_module_name                                name,
100#else                                         
101   std::string                                   name,
102#endif                                         
103#ifdef STATISTICS
104   morpheo::behavioural::Parameters_Statistics * param_statistics,
105#endif
106   Parameters                                  * param );
107                                               
108  public  :          Victim_Pseudo_LRU              (Parameters param );
109  public  :          ~Victim_Pseudo_LRU             (void);
110                                               
111#ifdef SYSTEMC                                 
112  private : void     allocation                (void);
113  private : void     deallocation              (void);
114                                               
115  public  : void     transition                (void);
116  public  : void     genMoore                  (void);
117#endif
118                                               
119#if VHDL                                       
120  public  : void     vhdl                      (void);
121  private : void     vhdl_declaration          (Vhdl * & vhdl);
122  private : void     vhdl_body                 (Vhdl * & vhdl);
123#endif                                         
124                                               
125#ifdef STATISTICS
126  public  : void     statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
127#endif
128
129#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
130  private : void     end_cycle                 (void);
131#endif
132  };
133
134}; // end namespace victim_pseudo_lru
135}; // end namespace victim
136}; // end namespace generic
137
138}; // end namespace behavioural
139}; // end namespace morpheo             
140
141#endif
Note: See TracBrowser for help on using the repository browser.