Changeset 78 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_vhdl_body.cpp
- Timestamp:
- Mar 27, 2008, 11:04:49 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_vhdl_body.cpp
r75 r78 35 35 vhdl->set_body ("-- Way Way Way Way Way Way Way Way "); 36 36 vhdl->set_body ("-- 0 1 2 3 4 5 6 7 "); 37 for (uint32_t i=0; i<_param ._nb_access; i++)37 for (uint32_t i=0; i<_param->_nb_access; i++) 38 38 { 39 39 vhdl->set_body (""); … … 42 42 std::string access_address; 43 43 44 if (_param ._size_table>1)44 if (_param->_size_table>1) 45 45 access_address = "conv_integer(in_ACCESS_"+toString(i)+"_ADDRESS)"; 46 46 else … … 50 50 vhdl->set_body (""); 51 51 52 for (int32_t j=static_cast<uint32_t>(log2(_param ._nb_entity)-1); j>=0; j--)52 for (int32_t j=static_cast<uint32_t>(log2(_param->_nb_entity)-1); j>=0; j--) 53 53 { 54 54 vhdl->set_body ("access_entity_"+toString(i)+"("+toString(j)+") <= "); … … 56 56 uint32_t cpt=0; 57 57 58 for (int32_t k=(1<<j)-1; k<static_cast<int32_t>(_param ._nb_entity-1); k+=(1<<(j+1)))58 for (int32_t k=(1<<j)-1; k<static_cast<int32_t>(_param->_nb_entity-1); k+=(1<<(j+1))) 59 59 { 60 60 std::string cond = ""; 61 61 62 62 // Create the condition 63 for (uint32_t l=j+1; l<static_cast<uint32_t>(log2(_param ._nb_entity));l++)63 for (uint32_t l=j+1; l<static_cast<uint32_t>(log2(_param->_nb_entity));l++) 64 64 { 65 65 if (l==static_cast<uint32_t>(j+1)) … … 85 85 vhdl->set_body (""); 86 86 vhdl->set_body ("-- port access"); 87 for (uint32_t i=0; i<_param ._nb_access; i++)88 for (int32_t j=static_cast<uint32_t>(log2(_param ._nb_entity)-1); j>=0; j--)87 for (uint32_t i=0; i<_param->_nb_access; i++) 88 for (int32_t j=static_cast<uint32_t>(log2(_param->_nb_entity)-1); j>=0; j--) 89 89 { 90 90 uint32_t cpt=0; 91 91 92 for (int32_t k=(1<<j)-1; k<static_cast<int32_t>(_param ._nb_entity-1); k+=(1<<(j+1)))92 for (int32_t k=(1<<j)-1; k<static_cast<int32_t>(_param->_nb_entity-1); k+=(1<<(j+1))) 93 93 { 94 94 bool have_cond = false; … … 96 96 97 97 // condition to change the bit 98 for (uint32_t l=j+1; l<static_cast<uint32_t>(log2(_param ._nb_entity));l++)98 for (uint32_t l=j+1; l<static_cast<uint32_t>(log2(_param->_nb_entity));l++) 99 99 { 100 100 have_cond = true; … … 118 118 vhdl->set_body (""); 119 119 vhdl->set_body ("-- port update"); 120 for (uint32_t i=0; i<_param ._nb_update; i++)121 for (int32_t j=static_cast<uint32_t>(log2(_param ._nb_entity)-1); j>=0; j--)120 for (uint32_t i=0; i<_param->_nb_update; i++) 121 for (int32_t j=static_cast<uint32_t>(log2(_param->_nb_entity)-1); j>=0; j--) 122 122 { 123 123 uint32_t cpt=0; 124 124 125 for (int32_t k=(1<<j)-1; k<static_cast<int32_t>(_param ._nb_entity-1); k+=(1<<(j+1)))125 for (int32_t k=(1<<j)-1; k<static_cast<int32_t>(_param->_nb_entity-1); k+=(1<<(j+1))) 126 126 { 127 127 bool have_cond = false; … … 129 129 130 130 // condition to change the bit 131 for (uint32_t l=j+1; l<static_cast<uint32_t>(log2(_param ._nb_entity));l++)131 for (uint32_t l=j+1; l<static_cast<uint32_t>(log2(_param->_nb_entity));l++) 132 132 { 133 133 have_cond = true; … … 146 146 std::string update_address; 147 147 148 if (_param ._size_table>1)148 if (_param->_size_table>1) 149 149 update_address = "conv_integer(in_UPDATE_"+toString(i)+"_ADDRESS)"; 150 150 else … … 168 168 vhdl->set_body ("\tif in_CLOCK'event and in_CLOCK = '1' then"); 169 169 vhdl->set_body ("\t\t-- Access port"); 170 for (uint32_t i=0; i<_param ._nb_access; i++)170 for (uint32_t i=0; i<_param->_nb_access; i++) 171 171 { 172 172 std::string access_address; 173 173 174 if (_param ._size_table>1)174 if (_param->_size_table>1) 175 175 access_address = "conv_integer(in_ACCESS_"+toString(i)+"_ADDRESS)"; 176 176 else … … 183 183 184 184 vhdl->set_body ("\t\t-- Update port"); 185 for (uint32_t i=0; i<_param ._nb_update; i++)185 for (uint32_t i=0; i<_param->_nb_update; i++) 186 186 { 187 187 std::string update_address; 188 188 189 if (_param ._size_table>1)189 if (_param->_size_table>1) 190 190 update_address = "conv_integer(in_UPDATE_"+toString(i)+"_ADDRESS)"; 191 191 else … … 207 207 vhdl->set_body ("-- Ack is always "); 208 208 vhdl->set_body (""); 209 for (uint32_t i=0; i<_param ._nb_access; i++)209 for (uint32_t i=0; i<_param->_nb_access; i++) 210 210 { 211 211 vhdl->set_body ("out_ACCESS_"+toString(i)+"_ACK <= '1';"); … … 213 213 } 214 214 vhdl->set_body (""); 215 for (uint32_t i=0; i<_param ._nb_update; i++)215 for (uint32_t i=0; i<_param->_nb_update; i++) 216 216 { 217 217 vhdl->set_body ("out_UPDATE_"+toString(i)+"_ACK <= '1';");
Note: See TracChangeset
for help on using the changeset viewer.