[15] | 1 | #ifndef morpheo_behavioural_generic_registerfile_registerfile_multi_banked_registerfile_multi_banked_glue_RegisterFile_Multi_Banked_Glue_h |
---|
| 2 | #define morpheo_behavioural_generic_registerfile_registerfile_multi_banked_registerfile_multi_banked_glue_RegisterFile_Multi_Banked_Glue_h |
---|
[10] | 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 "Include/ToString.h" |
---|
| 17 | #include "Include/Debug.h" |
---|
| 18 | |
---|
[15] | 19 | #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/RegisterFile_Multi_Banked_Glue/include/Parameters.h" |
---|
| 20 | #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/RegisterFile_Multi_Banked_Glue/include/Types.h" |
---|
| 21 | #ifdef STATISTICS |
---|
| 22 | #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/RegisterFile_Multi_Banked_Glue/include/Statistics.h" |
---|
[10] | 23 | #endif |
---|
| 24 | #ifdef VHDL |
---|
| 25 | #include "Behavioural/include/Vhdl.h" |
---|
| 26 | #endif |
---|
| 27 | #ifdef VHDL_TESTBENCH |
---|
| 28 | #include "Behavioural/include/Vhdl_Testbench.h" |
---|
| 29 | #endif |
---|
| 30 | |
---|
| 31 | using namespace std; |
---|
| 32 | |
---|
| 33 | namespace morpheo { |
---|
| 34 | namespace behavioural { |
---|
| 35 | namespace generic { |
---|
[15] | 36 | namespace registerfile{ |
---|
[10] | 37 | namespace registerfile_multi_banked { |
---|
| 38 | namespace registerfile_multi_banked_glue { |
---|
| 39 | |
---|
| 40 | |
---|
| 41 | class RegisterFile_Multi_Banked_Glue |
---|
| 42 | #if SYSTEMC |
---|
| 43 | : public sc_module |
---|
| 44 | #endif |
---|
| 45 | { |
---|
| 46 | // -----[ fields ]---------------------------------------------------- |
---|
| 47 | // Parameters |
---|
| 48 | protected : const string _name; |
---|
| 49 | |
---|
| 50 | protected : const Parameters _param; |
---|
| 51 | //#ifdef STATISTICS |
---|
| 52 | // protected : const morpheo::behavioural::Parameters_Statistics _param_statistics; |
---|
| 53 | //#endif |
---|
| 54 | |
---|
| 55 | #ifdef STATISTICS |
---|
| 56 | private : Statistics * _stat; |
---|
| 57 | #endif |
---|
| 58 | |
---|
| 59 | #ifdef VHDL_TESTBENCH |
---|
| 60 | private : Vhdl_Testbench * _vhdl_testbench; |
---|
| 61 | #endif |
---|
| 62 | |
---|
| 63 | #ifdef SYSTEMC |
---|
| 64 | // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 65 | // Interface |
---|
| 66 | public : SC_CLOCK * in_CLOCK ; |
---|
| 67 | |
---|
| 68 | public : SC_IN (Tcontrol_t) ** in_READ_IN_VAL ; |
---|
| 69 | public : SC_OUT(Tcontrol_t) ** out_READ_IN_ACK ; |
---|
| 70 | public : SC_IN (Taddress_t) ** in_READ_IN_ADDRESS ; |
---|
| 71 | public : SC_OUT(Tdata_t ) ** out_READ_IN_DATA ; |
---|
| 72 | |
---|
[15] | 73 | public : SC_OUT(Tcontrol_t) **** out_READ_SELECT_VAL ; |
---|
| 74 | public : SC_IN (Tcontrol_t) **** in_READ_SELECT_ACK ; |
---|
[10] | 75 | |
---|
| 76 | public : SC_OUT(Tcontrol_t) *** out_READ_OUT_VAL ; |
---|
| 77 | public : SC_IN (Tcontrol_t) *** in_READ_OUT_ACK ; |
---|
| 78 | public : SC_OUT(Taddress_t) *** out_READ_OUT_ADDRESS ; |
---|
| 79 | public : SC_IN (Tdata_t ) *** in_READ_OUT_DATA ; |
---|
| 80 | |
---|
| 81 | public : SC_IN (Tcontrol_t) ** in_WRITE_IN_VAL ; |
---|
| 82 | public : SC_OUT(Tcontrol_t) ** out_WRITE_IN_ACK ; |
---|
| 83 | public : SC_IN (Taddress_t) ** in_WRITE_IN_ADDRESS ; |
---|
| 84 | public : SC_IN (Tdata_t ) ** in_WRITE_IN_DATA ; |
---|
| 85 | |
---|
[15] | 86 | public : SC_OUT(Tcontrol_t) **** out_WRITE_SELECT_VAL ; |
---|
| 87 | public : SC_IN (Tcontrol_t) **** in_WRITE_SELECT_ACK ; |
---|
[10] | 88 | |
---|
| 89 | public : SC_OUT(Tcontrol_t) *** out_WRITE_OUT_VAL ; |
---|
| 90 | public : SC_IN (Tcontrol_t) *** in_WRITE_OUT_ACK ; |
---|
| 91 | public : SC_OUT(Taddress_t) *** out_WRITE_OUT_ADDRESS ; |
---|
| 92 | public : SC_OUT(Tdata_t ) *** out_WRITE_OUT_DATA ; |
---|
| 93 | |
---|
| 94 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 95 | |
---|
| 96 | // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 97 | |
---|
| 98 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 99 | #endif |
---|
| 100 | |
---|
| 101 | // -----[ methods ]--------------------------------------------------- |
---|
| 102 | |
---|
| 103 | #ifdef SYSTEMC |
---|
| 104 | SC_HAS_PROCESS (RegisterFile_Multi_Banked_Glue); |
---|
| 105 | #endif |
---|
| 106 | public : RegisterFile_Multi_Banked_Glue ( |
---|
| 107 | #ifdef SYSTEMC |
---|
| 108 | sc_module_name name, |
---|
| 109 | #else |
---|
| 110 | string name, |
---|
| 111 | #endif |
---|
| 112 | #ifdef STATISTICS |
---|
| 113 | morpheo::behavioural::Parameters_Statistics param_statistics, |
---|
| 114 | #endif |
---|
| 115 | Parameters param ); |
---|
| 116 | |
---|
| 117 | public : RegisterFile_Multi_Banked_Glue (Parameters param ); |
---|
| 118 | public : ~RegisterFile_Multi_Banked_Glue (void); |
---|
| 119 | |
---|
| 120 | #ifdef SYSTEMC |
---|
| 121 | private : void allocation (void); |
---|
| 122 | private : void deallocation (void); |
---|
| 123 | |
---|
| 124 | #if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 125 | public : void transition (void); |
---|
| 126 | #endif |
---|
[15] | 127 | public : void genMealy_read_in (void); |
---|
| 128 | public : void genMealy_read_out (void); |
---|
| 129 | public : void genMealy_read_select (void); |
---|
[10] | 130 | |
---|
| 131 | #endif |
---|
| 132 | #ifdef STATISTICS |
---|
| 133 | public : string statistics (uint32_t depth); |
---|
| 134 | #endif |
---|
| 135 | |
---|
| 136 | #if VHDL |
---|
| 137 | public : void vhdl (void); |
---|
| 138 | private : void vhdl_port (Vhdl & vhdl); |
---|
| 139 | private : void vhdl_declaration (Vhdl & vhdl); |
---|
| 140 | private : void vhdl_body (Vhdl & vhdl); |
---|
| 141 | #endif |
---|
| 142 | |
---|
| 143 | #ifdef VHDL_TESTBENCH |
---|
| 144 | private : void vhdl_testbench_transition (void); |
---|
| 145 | #endif |
---|
| 146 | public : void vhdl_testbench_label (string label); |
---|
| 147 | }; |
---|
| 148 | |
---|
| 149 | }; // end namespace registerfile_multi_banked_glue |
---|
| 150 | }; // end namespace registerfile_multi_banked |
---|
[15] | 151 | }; // end namespace registerfile |
---|
[10] | 152 | }; // end namespace generic |
---|
| 153 | |
---|
| 154 | }; // end namespace behavioural |
---|
| 155 | }; // end namespace morpheo |
---|
| 156 | |
---|
| 157 | #endif |
---|