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