Changeset 78 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_allocation.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_allocation.cpp
r75 r78 8 8 9 9 #include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h" 10 #include "Behavioural/include/Allocation.h" 10 11 11 12 namespace morpheo { … … 42 43 // ~~~~~[ Interface : "access" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 43 44 { 44 in_ACCESS_VAL = new SC_IN (Tcontrol_t) * [_param._nb_access]; 45 out_ACCESS_ACK = new SC_OUT(Tcontrol_t) * [_param._nb_access]; 46 if (_param._size_table>1) 47 in_ACCESS_ADDRESS = new SC_IN (Taddress_t) * [_param._nb_access]; 48 out_ACCESS_ENTITY = new SC_OUT(Tentity_t ) * [_param._nb_access]; 49 50 for (uint32_t i=0; i<_param._nb_access; i++) 51 { 52 Interface_fifo * interface = _interfaces->set_interface("access_"+toString(i) 53 #ifdef POSITION 54 , IN ,WEST, "Access" 55 #endif 56 ); 45 ALLOC1_INTERFACE("access",IN,WEST, "Access", _param->_nb_access); 57 46 58 in_ACCESS_VAL [i] = interface->set_signal_valack_in ("val" , VAL); 59 out_ACCESS_ACK [i] = interface->set_signal_valack_out ("ack" , ACK); 60 61 if (_param._size_table>1) 62 in_ACCESS_ADDRESS [i] = interface->set_signal_in <Taddress_t> ("address",static_cast<uint32_t>(log2(_param._size_table))); 63 out_ACCESS_ENTITY [i] = interface->set_signal_out <Tentity_t> ("entity" ,static_cast<uint32_t>(log2(_param._nb_entity ))); 64 } 47 ALLOC1_VALACK_IN ( in_ACCESS_VAL ,VAL); 48 ALLOC1_VALACK_OUT(out_ACCESS_ACK ,ACK); 49 ALLOC1_SIGNAL_IN ( in_ACCESS_HIT ,"hit" ,Tcontrol_t,1); 50 ALLOC1_SIGNAL_IN ( in_ACCESS_ADDRESS,"address",Taddress_t,log2(_param->_size_address)); 51 ALLOC1_SIGNAL_IN ( in_ACCESS_ENTITY ,"entity" ,Tentity_t ,log2(_param->_nb_entity )); 52 ALLOC1_SIGNAL_OUT(out_ACCESS_VICTIM ,"victim" ,Tentity_t ,log2(_param->_nb_entity )); 65 53 } 66 54 67 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 68 69 { 70 in_UPDATE_VAL = new SC_IN (Tcontrol_t) * [_param._nb_update]; 71 out_UPDATE_ACK = new SC_OUT(Tcontrol_t) * [_param._nb_update]; 72 if (_param._size_table>1) 73 in_UPDATE_ADDRESS = new SC_IN (Taddress_t) * [_param._nb_update]; 74 in_UPDATE_ENTITY = new SC_IN (Tentity_t ) * [_param._nb_update]; 75 76 for (uint32_t i=0; i<_param._nb_update; i++) 77 { 78 Interface_fifo * interface = _interfaces->set_interface("update_"+toString(i) 79 #ifdef POSITION 80 , IN ,EAST, "Update" 81 #endif 82 ); 55 // -----[ Register ]--------------------------------------------------- 56 reg_TABLE = new entry_t * [_param->_size_table]; 83 57 84 in_UPDATE_VAL [i] = interface->set_signal_valack_in ("val" , VAL); 85 out_UPDATE_ACK [i] = interface->set_signal_valack_out ("ack" , ACK); 86 if (_param._size_table>1) 87 in_UPDATE_ADDRESS [i] = interface->set_signal_in <Taddress_t> ("address",static_cast<uint32_t>(log2(_param._size_table))); 88 in_UPDATE_ENTITY [i] = interface->set_signal_in <Tentity_t> ("entity" ,static_cast<uint32_t>(log2(_param._nb_entity ))); 89 } 90 } 91 // -----[ Register ]--------------------------------------------------- 92 reg_TABLE = new entry_t * [_param._size_table]; 93 94 for (uint32_t i=0; i<_param._size_table; i++) 95 reg_TABLE [i] = new entry_t (_param._nb_entity); 58 for (uint32_t i=0; i<_param->_size_table; i++) 59 reg_TABLE [i] = new entry_t (_param->_nb_entity); 96 60 97 61 // -----[ Internal ]--------------------------------------------------- 98 internal_ACCESS_ENTITY = new Tentity_t [_param._nb_entity]; 62 internal_ACCESS_ACK = new Tcontrol_t [_param->_nb_access]; 63 internal_ACCESS_VICTIM = new Tentity_t [_param->_nb_access]; 99 64 100 65 #ifdef POSITION
Note: See TracChangeset
for help on using the changeset viewer.