Changeset 95 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
- Timestamp:
- Dec 16, 2008, 5:24:26 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/include/test.h
r81 r95 14 14 15 15 #include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h" 16 #include "Common/include/Time.h" 16 17 17 18 using namespace std; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/test.cpp
r88 r95 89 89 (*(_Victim_Pseudo_LRU->out_ACCESS_VICTIM [i])) (ACCESS_VICTIM [i]); 90 90 } 91 92 Time * _time = new Time(); 91 93 92 94 /******************************************************** … … 210 212 211 213 cout << "<" << name << "> ............ Stop Simulation" << endl; 214 delete _time; 212 215 213 216 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_allocation.cpp
r88 r95 36 36 ); 37 37 38 in_CLOCK = interface->set_signal_clk ("clock" ,1 );39 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1 );38 in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_YES); 39 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); 40 40 } 41 41 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_vhdl_body.cpp
r81 r95 116 116 } 117 117 118 vhdl->set_body ("");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--)122 {123 uint32_t cpt=0;118 // vhdl->set_body (""); 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--) 122 // { 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)))126 {127 bool have_cond = false;128 std::string cond = "";129 130 // condition to change the bit131 for (uint32_t l=j+1; l<static_cast<uint32_t>(log2(_param->_nb_entity));l++)132 {133 have_cond = true;134 135 if (l==static_cast<uint32_t>(j+1))136 cond += "when";137 else138 cond += " and";139 cond += " in_UPDATE_"+toString(i)+"_ENTITY("+toString(l)+")='"+toString((cpt>>(l-(j+1)))&1)+"'";140 }141 142 vhdl->set_body ("update_next_entry_"+toString(i)+"("+toString(k)+") <=");143 vhdl->set_body ("\tnot in_UPDATE_"+toString(i)+"_ENTITY("+toString(j)+") "+cond);144 if (have_cond == true)145 {146 std::string update_address;147 148 if (_param->_size_table>1)149 update_address = "conv_integer(in_UPDATE_"+toString(i)+"_ADDRESS)";150 else151 update_address = "0";125 // for (int32_t k=(1<<j)-1; k<static_cast<int32_t>(_param->_nb_entity-1); k+=(1<<(j+1))) 126 // { 127 // bool have_cond = false; 128 // std::string cond = ""; 129 130 // // condition to change the bit 131 // for (uint32_t l=j+1; l<static_cast<uint32_t>(log2(_param->_nb_entity));l++) 132 // { 133 // have_cond = true; 134 135 // if (l==static_cast<uint32_t>(j+1)) 136 // cond += "when"; 137 // else 138 // cond += " and"; 139 // cond += " in_UPDATE_"+toString(i)+"_ENTITY("+toString(l)+")='"+toString((cpt>>(l-(j+1)))&1)+"'"; 140 // } 141 142 // vhdl->set_body ("update_next_entry_"+toString(i)+"("+toString(k)+") <="); 143 // vhdl->set_body ("\tnot in_UPDATE_"+toString(i)+"_ENTITY("+toString(j)+") "+cond); 144 // if (have_cond == true) 145 // { 146 // std::string update_address; 147 148 // if (_param->_size_table>1) 149 // update_address = "conv_integer(in_UPDATE_"+toString(i)+"_ADDRESS)"; 150 // else 151 // update_address = "0"; 152 152 153 vhdl->set_body ("\telse reg_TABLE ("+update_address+")("+toString(k)+")");154 }155 vhdl->set_body ("\t;");156 cpt ++;157 }158 }153 // vhdl->set_body ("\telse reg_TABLE ("+update_address+")("+toString(k)+")"); 154 // } 155 // vhdl->set_body ("\t;"); 156 // cpt ++; 157 // } 158 // } 159 159 160 160 vhdl->set_body (""); … … 182 182 } 183 183 184 vhdl->set_body ("\t\t-- Update port");185 for (uint32_t i=0; i<_param->_nb_update; i++)186 {187 std::string update_address;188 189 if (_param->_size_table>1)190 update_address = "conv_integer(in_UPDATE_"+toString(i)+"_ADDRESS)";191 else192 update_address = "0";184 // vhdl->set_body ("\t\t-- Update port"); 185 // for (uint32_t i=0; i<_param->_nb_update; i++) 186 // { 187 // std::string update_address; 188 189 // if (_param->_size_table>1) 190 // update_address = "conv_integer(in_UPDATE_"+toString(i)+"_ADDRESS)"; 191 // else 192 // update_address = "0"; 193 193 194 vhdl->set_body ("\t\tif (in_UPDATE_"+toString(i)+"_VAL = '1') then");195 vhdl->set_body ("\t\t\treg_TABLE ("+update_address+") <= update_next_entry_"+toString(i)+";");196 vhdl->set_body ("\t\tend if;");197 }194 // vhdl->set_body ("\t\tif (in_UPDATE_"+toString(i)+"_VAL = '1') then"); 195 // vhdl->set_body ("\t\t\treg_TABLE ("+update_address+") <= update_next_entry_"+toString(i)+";"); 196 // vhdl->set_body ("\t\tend if;"); 197 // } 198 198 199 199 vhdl->set_body ("\tend if;"); … … 210 210 { 211 211 vhdl->set_body ("out_ACCESS_"+toString(i)+"_ACK <= '1';"); 212 vhdl->set_body ("out_ACCESS_"+toString(i)+"_ ENTITY<= access_entity_"+toString(i)+" when in_ACCESS_"+toString(i)+"_VAL = '1' else (others => '0');");212 vhdl->set_body ("out_ACCESS_"+toString(i)+"_VICTIM <= access_entity_"+toString(i)+" when in_ACCESS_"+toString(i)+"_VAL = '1' else (others => '0');"); 213 213 } 214 214 vhdl->set_body (""); 215 for (uint32_t i=0; i<_param->_nb_update; i++)216 {217 vhdl->set_body ("out_UPDATE_"+toString(i)+"_ACK <= '1';");218 }215 // for (uint32_t i=0; i<_param->_nb_update; i++) 216 // { 217 // vhdl->set_body ("out_UPDATE_"+toString(i)+"_ACK <= '1';"); 218 // } 219 219 }; 220 220 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_vhdl_declaration.cpp
r81 r95 29 29 } 30 30 31 for (uint32_t i=0; i<_param->_nb_update; i++)32 {33 vhdl->set_signal ("update_next_entry_"+toString(i)+"",std_logic(_param->_nb_entity-1));34 }31 // for (uint32_t i=0; i<_param->_nb_update; i++) 32 // { 33 // vhdl->set_signal ("update_next_entry_"+toString(i)+"",std_logic(_param->_nb_entity-1)); 34 // } 35 35 }; 36 36
Note: See TracChangeset
for help on using the changeset viewer.