| 1 | #ifndef morpheo_behavioural_generic_victim_Victim_h |
|---|
| 2 | #define morpheo_behavioural_generic_victim_Victim_h |
|---|
| 3 | |
|---|
| 4 | /* |
|---|
| 5 | * $Id: Victim.h 82 2008-05-01 16:48:45Z 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/include/Types.h" |
|---|
| 19 | |
|---|
| 20 | #include "Behavioural/Generic/Victim/include/Types.h" |
|---|
| 21 | #include "Behavioural/Generic/Victim/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/Victim/Victim_Random/include/Victim_Random.h" |
|---|
| 32 | // #include "Behavioural/Generic/Victim/Victim_Round_Robin/include/Victim_Round_Robin.h" |
|---|
| 33 | // #include "Behavioural/Generic/Victim/Victim_NLU/include/Victim_NLU.h" |
|---|
| 34 | #include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h" |
|---|
| 35 | // #include "Behavioural/Generic/Victim/Victim_LRU/include/Victim_LRU.h" |
|---|
| 36 | // #include "Behavioural/Generic/Victim/Victim_FIFO/include/Victim_FIFO.h" |
|---|
| 37 | |
|---|
| 38 | namespace morpheo { |
|---|
| 39 | namespace behavioural { |
|---|
| 40 | namespace generic { |
|---|
| 41 | namespace victim { |
|---|
| 42 | |
|---|
| 43 | class Victim |
|---|
| 44 | #if SYSTEMC |
|---|
| 45 | : public sc_module |
|---|
| 46 | #endif |
|---|
| 47 | { |
|---|
| 48 | // -----[ fields ]---------------------------------------------------- |
|---|
| 49 | // Parameters |
|---|
| 50 | protected : const std::string _name; |
|---|
| 51 | protected : const Parameters * _param; |
|---|
| 52 | private : const Tusage_t _usage; |
|---|
| 53 | |
|---|
| 54 | #ifdef STATISTICS |
|---|
| 55 | public : Stat * _stat; |
|---|
| 56 | #endif |
|---|
| 57 | |
|---|
| 58 | public : Component * _component; |
|---|
| 59 | |
|---|
| 60 | #ifdef SYSTEMC |
|---|
| 61 | // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 62 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 63 | public : SC_CLOCK * in_CLOCK ; |
|---|
| 64 | public : SC_IN (Tcontrol_t) * in_NRESET ; |
|---|
| 65 | |
|---|
| 66 | // ~~~~~[ Interface : "Access" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 67 | public : SC_IN (Tcontrol_t) ** in_ACCESS_VAL ; |
|---|
| 68 | public : SC_OUT(Tcontrol_t) ** out_ACCESS_ACK ; |
|---|
| 69 | public : SC_IN (Taddress_t) ** in_ACCESS_ADDRESS; |
|---|
| 70 | public : SC_IN (Tcontrol_t) ** in_ACCESS_HIT ; |
|---|
| 71 | public : SC_IN (Tentity_t ) ** in_ACCESS_ENTITY ; |
|---|
| 72 | public : SC_OUT(Tentity_t ) ** out_ACCESS_VICTIM ; |
|---|
| 73 | |
|---|
| 74 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 75 | |
|---|
| 76 | //public : morpheo::behavioural::generic::victim::victim_random ::Victim_Random * _component_victim_random ; |
|---|
| 77 | //public : morpheo::behavioural::generic::victim::victim_round_robin::Victim_Round_Robin * _component_victim_round_robin; |
|---|
| 78 | //public : morpheo::behavioural::generic::victim::victim_nlu ::Victim_NLU * _component_victim_nlu ; |
|---|
| 79 | public : morpheo::behavioural::generic::victim::victim_pseudo_lru ::Victim_Pseudo_LRU * _component_victim_pseudo_lru ; |
|---|
| 80 | //public : morpheo::behavioural::generic::victim::victim_lru ::Victim_LRU * _component_victim_lru ; |
|---|
| 81 | //public : morpheo::behavioural::generic::victim::victim_fifo ::Victim_FIFO * _component_victim_fifo ; |
|---|
| 82 | |
|---|
| 83 | // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 84 | |
|---|
| 85 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 86 | #endif |
|---|
| 87 | |
|---|
| 88 | // -----[ Methods ]--------------------------------------------------- |
|---|
| 89 | |
|---|
| 90 | #ifdef SYSTEMC |
|---|
| 91 | SC_HAS_PROCESS (Victim); |
|---|
| 92 | #endif |
|---|
| 93 | public : Victim |
|---|
| 94 | ( |
|---|
| 95 | #ifdef SYSTEMC |
|---|
| 96 | sc_module_name name, |
|---|
| 97 | #else |
|---|
| 98 | std::string name, |
|---|
| 99 | #endif |
|---|
| 100 | #ifdef STATISTICS |
|---|
| 101 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
|---|
| 102 | #endif |
|---|
| 103 | Parameters * param, |
|---|
| 104 | morpheo::behavioural::Tusage_t usage |
|---|
| 105 | ); |
|---|
| 106 | public : ~Victim (void); |
|---|
| 107 | |
|---|
| 108 | private : void allocation ( |
|---|
| 109 | #ifdef STATISTICS |
|---|
| 110 | morpheo::behavioural::Parameters_Statistics * param_statistics |
|---|
| 111 | #else |
|---|
| 112 | void |
|---|
| 113 | #endif |
|---|
| 114 | ); |
|---|
| 115 | private : void deallocation (void); |
|---|
| 116 | }; |
|---|
| 117 | }; // end namespace victim |
|---|
| 118 | }; // end namespace generic |
|---|
| 119 | |
|---|
| 120 | }; // end namespace behavioural |
|---|
| 121 | }; // end namespace morpheo |
|---|
| 122 | |
|---|
| 123 | #endif |
|---|