[53] | 1 | #ifndef morpheo_behavioural_generic_registerfile_RegisterFile_h |
---|
| 2 | #define morpheo_behavioural_generic_registerfile_RegisterFile_h |
---|
| 3 | |
---|
| 4 | /* |
---|
| 5 | * $Id: RegisterFile.h 146 2011-02-01 20:57:54Z rosiere $ |
---|
| 6 | * |
---|
[78] | 7 | * [ Description ] |
---|
[53] | 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 | |
---|
| 19 | #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h" |
---|
[146] | 20 | #include "Behavioural/Generic/RegisterFile/RegisterFile_Internal_Banked/include/RegisterFile_Internal_Banked.h" |
---|
[53] | 21 | #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h" |
---|
| 22 | |
---|
| 23 | #include "Behavioural/Generic/RegisterFile/include/Parameters.h" |
---|
| 24 | #include "Behavioural/Generic/RegisterFile/include/Types.h" |
---|
| 25 | #ifdef STATISTICS |
---|
[75] | 26 | #include "Behavioural/include/Stat.h" |
---|
[53] | 27 | #endif |
---|
| 28 | #include "Behavioural/include/Component.h" |
---|
| 29 | #ifdef VHDL |
---|
| 30 | #include "Behavioural/include/Vhdl.h" |
---|
| 31 | #endif |
---|
[82] | 32 | #include "Behavioural/include/Usage.h" |
---|
[53] | 33 | |
---|
| 34 | namespace morpheo { |
---|
| 35 | namespace behavioural { |
---|
| 36 | namespace generic { |
---|
| 37 | namespace registerfile { |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | class RegisterFile |
---|
| 41 | #if SYSTEMC |
---|
| 42 | : public sc_module |
---|
| 43 | #endif |
---|
| 44 | { |
---|
[78] | 45 | // -----[ fields ]---------------------------------------------------- |
---|
[53] | 46 | // Parameters |
---|
[82] | 47 | protected : const std::string _name; |
---|
[62] | 48 | protected : const Parameters * _param; |
---|
[82] | 49 | private : const Tusage_t _usage; |
---|
[75] | 50 | |
---|
[62] | 51 | #ifdef STATISTICS |
---|
[75] | 52 | public : Stat * _stat; |
---|
[62] | 53 | #endif |
---|
[53] | 54 | |
---|
| 55 | public : Component * _component; |
---|
[112] | 56 | private : Interfaces * _interfaces; |
---|
[53] | 57 | |
---|
| 58 | #ifdef SYSTEMC |
---|
[78] | 59 | // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[53] | 60 | // Interface |
---|
| 61 | public : SC_CLOCK * in_CLOCK ; |
---|
| 62 | public : SC_IN (Tcontrol_t) * in_NRESET ; |
---|
| 63 | |
---|
| 64 | // ----- Interface Read |
---|
| 65 | public : SC_IN (Tcontrol_t) ** in_READ_VAL ; |
---|
| 66 | public : SC_OUT (Tcontrol_t) ** out_READ_ACK ; |
---|
| 67 | public : SC_IN (Taddress_t) ** in_READ_ADDRESS ; |
---|
| 68 | public : SC_OUT (Tdata_t) ** out_READ_DATA ; |
---|
| 69 | |
---|
| 70 | // ----- Interface Write |
---|
| 71 | public : SC_IN (Tcontrol_t) ** in_WRITE_VAL ; |
---|
| 72 | public : SC_OUT (Tcontrol_t) ** out_WRITE_ACK ; |
---|
| 73 | public : SC_IN (Taddress_t) ** in_WRITE_ADDRESS; |
---|
| 74 | public : SC_IN (Tdata_t) ** in_WRITE_DATA ; |
---|
| 75 | |
---|
| 76 | #endif |
---|
| 77 | |
---|
[78] | 78 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[146] | 79 | protected : morpheo::behavioural::generic::registerfile::registerfile_monolithic ::RegisterFile_Monolithic ::RegisterFile_Monolithic * component_RegisterFile_Monolithic; |
---|
| 80 | protected : morpheo::behavioural::generic::registerfile::registerfile_internal_banked::RegisterFile_Internal_Banked::RegisterFile_Internal_Banked * component_RegisterFile_Internal_Banked; |
---|
| 81 | protected : morpheo::behavioural::generic::registerfile::registerfile_multi_banked ::RegisterFile_Multi_Banked ::RegisterFile_Multi_Banked * component_RegisterFile_Multi_Banked; |
---|
[53] | 82 | |
---|
[78] | 83 | // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[53] | 84 | |
---|
[78] | 85 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[53] | 86 | |
---|
[78] | 87 | // -----[ methods ]--------------------------------------------------- |
---|
[53] | 88 | |
---|
| 89 | #ifdef SYSTEMC |
---|
| 90 | SC_HAS_PROCESS (RegisterFile); |
---|
| 91 | #endif |
---|
| 92 | public : RegisterFile ( |
---|
| 93 | #ifdef SYSTEMC |
---|
[75] | 94 | sc_module_name name, |
---|
[53] | 95 | #else |
---|
[75] | 96 | std::string name, |
---|
[53] | 97 | #endif |
---|
| 98 | #ifdef STATISTICS |
---|
[75] | 99 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
[53] | 100 | #endif |
---|
[82] | 101 | Parameters * param , |
---|
| 102 | Tusage_t usage); |
---|
[75] | 103 | |
---|
[53] | 104 | public : ~RegisterFile (void); |
---|
| 105 | |
---|
| 106 | #ifdef SYSTEMC |
---|
[75] | 107 | private : void allocation ( |
---|
| 108 | #ifdef STATISTICS |
---|
| 109 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
| 110 | #else |
---|
| 111 | void |
---|
| 112 | #endif |
---|
| 113 | ); |
---|
[53] | 114 | private : void deallocation (void); |
---|
| 115 | #endif |
---|
| 116 | }; |
---|
| 117 | |
---|
| 118 | }; // end namespace registerfile |
---|
| 119 | }; // end namespace generic |
---|
| 120 | |
---|
| 121 | }; // end namespace behavioural |
---|
| 122 | }; // end namespace morpheo |
---|
| 123 | |
---|
| 124 | #endif |
---|