Changeset 62 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_allocation.cpp
- Timestamp:
- Dec 4, 2007, 2:31:54 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_allocation.cpp
r53 r62 28 28 // ~~~~~[ Interface : "read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 29 29 30 in_READ_VAL = new SC_IN (Tcontrol_t) * [_param._nb_port_read]; 31 out_READ_ACK = new SC_OUT(Tcontrol_t) * [_param._nb_port_read]; 32 in_READ_ADDRESS = new SC_IN (Taddress_t) * [_param._nb_port_read]; 33 out_READ_DATA = new SC_OUT(Tdata_t ) * [_param._nb_port_read]; 30 in_READ_VAL = new SC_IN (Tcontrol_t) * [_param->_nb_port_read]; 31 out_READ_ACK = new SC_OUT(Tcontrol_t) * [_param->_nb_port_read]; 32 if (_param->_have_port_address == true) 33 in_READ_ADDRESS = new SC_IN (Taddress_t) * [_param->_nb_port_read]; 34 out_READ_DATA = new SC_OUT(Tdata_t ) * [_param->_nb_port_read]; 34 35 35 for (uint32_t i=0; i<_param ._nb_port_read; i++)36 for (uint32_t i=0; i<_param->_nb_port_read; i++) 36 37 { 37 38 rename = "in_READ_"+toString(i)+"_VAL" ; … … 39 40 rename = "out_READ_"+toString(i)+"_ACK" ; 40 41 out_READ_ACK [i] = new SC_OUT(Tcontrol_t) (rename.c_str()); 42 if (_param->_have_port_address == true) 43 { 41 44 rename = "in_READ_"+toString(i)+"_ADDRESS"; 42 45 in_READ_ADDRESS [i] = new SC_IN (Taddress_t) (rename.c_str()); 46 } 43 47 rename = "out_READ_"+toString(i)+"_DATA" ; 44 48 out_READ_DATA [i] = new SC_OUT(Tdata_t ) (rename.c_str()); … … 47 51 // ~~~~~[ Interface : "write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 48 52 49 in_WRITE_VAL = new SC_IN (Tcontrol_t) * [_param._nb_port_write]; 50 out_WRITE_ACK = new SC_OUT(Tcontrol_t) * [_param._nb_port_write]; 51 in_WRITE_ADDRESS = new SC_IN (Taddress_t) * [_param._nb_port_write]; 52 in_WRITE_DATA = new SC_IN (Tdata_t ) * [_param._nb_port_write]; 53 in_WRITE_VAL = new SC_IN (Tcontrol_t) * [_param->_nb_port_write]; 54 out_WRITE_ACK = new SC_OUT(Tcontrol_t) * [_param->_nb_port_write]; 55 if (_param->_have_port_address == true) 56 in_WRITE_ADDRESS = new SC_IN (Taddress_t) * [_param->_nb_port_write]; 57 in_WRITE_DATA = new SC_IN (Tdata_t ) * [_param->_nb_port_write]; 53 58 54 for (uint32_t i=0; i<_param ._nb_port_write; i++)59 for (uint32_t i=0; i<_param->_nb_port_write; i++) 55 60 { 56 61 rename = "in_WRITE_"+toString(i)+"_VAL" ; … … 58 63 rename = "out_WRITE_"+toString(i)+"_ACK" ; 59 64 out_WRITE_ACK [i] = new SC_OUT(Tcontrol_t) (rename.c_str()); 65 if (_param->_have_port_address == true) 66 { 60 67 rename = "in_WRITE_"+toString(i)+"_ADDRESS"; 61 68 in_WRITE_ADDRESS [i] = new SC_IN (Taddress_t) (rename.c_str()); 69 } 62 70 rename = "in_WRITE_"+toString(i)+"_DATA" ; 63 71 in_WRITE_DATA [i] = new SC_IN (Tdata_t ) (rename.c_str()); … … 65 73 66 74 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 67 if (_param ._instance == instance_RegisterFile_Monolithic)75 if (_param->_instance == instance_RegisterFile_Monolithic) 68 76 // =====[ component_RegisterFile_Monolithic ]========================= 69 77 { … … 72 80 ,_param_statistics 73 81 #endif 74 , *(_param._param_registerfile_monolithic)82 ,_param->_param_registerfile_monolithic 75 83 ); 76 84 … … 83 91 ,_param_statistics 84 92 #endif 85 , *(_param._param_registerfile_multi_banked)93 ,_param->_param_registerfile_multi_banked 86 94 ); 87 95 … … 89 97 // ~~~~~[ Component - Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 90 98 91 if (_param ._instance == instance_RegisterFile_Monolithic)99 if (_param->_instance == instance_RegisterFile_Monolithic) 92 100 // =====[ Component_RegisterFile_Monolithic - Instanciation ]========= 93 101 { … … 95 103 (*(component_RegisterFile_Monolithic ->in_NRESET)) (*(in_NRESET)); 96 104 97 for (uint32_t i=0; i<_param ._nb_port_read; i++)105 for (uint32_t i=0; i<_param->_nb_port_read; i++) 98 106 { 99 107 (*(component_RegisterFile_Monolithic -> in_READ_VAL [i])) (*( in_READ_VAL [i])); 100 108 (*(component_RegisterFile_Monolithic ->out_READ_ACK [i])) (*(out_READ_ACK [i])); 109 if (_param->_have_port_address == true) 101 110 (*(component_RegisterFile_Monolithic -> in_READ_ADDRESS [i])) (*( in_READ_ADDRESS [i])); 102 111 (*(component_RegisterFile_Monolithic ->out_READ_DATA [i])) (*(out_READ_DATA [i])); 103 112 } 104 113 105 for (uint32_t i=0; i<_param ._nb_port_write; i++)114 for (uint32_t i=0; i<_param->_nb_port_write; i++) 106 115 { 107 116 (*(component_RegisterFile_Monolithic -> in_WRITE_VAL [i])) (*( in_WRITE_VAL [i])); 108 117 (*(component_RegisterFile_Monolithic ->out_WRITE_ACK [i])) (*(out_WRITE_ACK [i])); 118 if (_param->_have_port_address == true) 109 119 (*(component_RegisterFile_Monolithic -> in_WRITE_ADDRESS [i])) (*( in_WRITE_ADDRESS [i])); 110 120 (*(component_RegisterFile_Monolithic -> in_WRITE_DATA [i])) (*( in_WRITE_DATA [i])); … … 117 127 (*(component_RegisterFile_Multi_Banked->in_NRESET)) (*(in_NRESET)); 118 128 119 for (uint32_t i=0; i<_param ._nb_port_read; i++)129 for (uint32_t i=0; i<_param->_nb_port_read; i++) 120 130 { 121 131 (*(component_RegisterFile_Multi_Banked-> in_READ_VAL [i])) (*( in_READ_VAL [i])); 122 132 (*(component_RegisterFile_Multi_Banked->out_READ_ACK [i])) (*(out_READ_ACK [i])); 133 if (_param->_have_port_address == true) 123 134 (*(component_RegisterFile_Multi_Banked-> in_READ_ADDRESS [i])) (*( in_READ_ADDRESS [i])); 124 135 (*(component_RegisterFile_Multi_Banked->out_READ_DATA [i])) (*(out_READ_DATA [i])); 125 136 } 126 137 127 for (uint32_t i=0; i<_param ._nb_port_write; i++)138 for (uint32_t i=0; i<_param->_nb_port_write; i++) 128 139 { 129 140 (*(component_RegisterFile_Multi_Banked-> in_WRITE_VAL [i])) (*( in_WRITE_VAL [i])); 130 141 (*(component_RegisterFile_Multi_Banked->out_WRITE_ACK [i])) (*(out_WRITE_ACK [i])); 142 if (_param->_have_port_address == true) 131 143 (*(component_RegisterFile_Multi_Banked-> in_WRITE_ADDRESS [i])) (*( in_WRITE_ADDRESS [i])); 132 144 (*(component_RegisterFile_Multi_Banked-> in_WRITE_DATA [i])) (*( in_WRITE_DATA [i])); … … 134 146 } 135 147 136 if (_param ._instance == instance_RegisterFile_Monolithic)148 if (_param->_instance == instance_RegisterFile_Monolithic) 137 149 _component = component_RegisterFile_Monolithic ->_component; 138 150 else
Note: See TracChangeset
for help on using the changeset viewer.