Changeset 112 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed
- Timestamp:
- Mar 18, 2009, 11:36:26 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_allocation.cpp
r88 r112 7 7 8 8 #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo{ … … 35 36 ,IN 36 37 ,WEST 37 , "Generalist interface"38 ,_("Generalist interface") 38 39 #endif 39 40 ); … … 41 42 in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_NO); 42 43 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_NO); 44 45 { 46 ALLOC1_INTERFACE_BEGIN("",IN,SOUTH,_("select interface"),_param->_nb_entity); 43 47 44 in_VAL = new SC_IN (Tcontrol_t) * [_param->_nb_entity];45 if (_param->_encoding_one_hot)46 out_ACK = new SC_OUT(Tcontrol_t) * [_param->_nb_entity];48 ALLOC1_SIGNAL_IN ( in_VAL ,"val" ,Tcontrol_t,1); 49 if (_param->_encoding_one_hot) 50 ALLOC1_SIGNAL_OUT(out_ACK ,"ack" ,Tcontrol_t,1); 47 51 48 for (uint32_t i=0; i<_param->_nb_entity; i++) 49 { 50 in_VAL [i] = interface->set_signal_in <Tcontrol_t> ("val_"+toString(i),1); 51 if (_param->_encoding_one_hot) 52 out_ACK [i] = interface->set_signal_out <Tcontrol_t> ("ack_"+toString(i),1); 53 } 52 ALLOC1_INTERFACE_END(_param->_nb_entity); 53 } 54 54 55 if (_param->_encoding_compact) 56 { 57 out_ENTITY = interface->set_signal_out <Tentity_t > ("entity" , _param->_size_entity); 58 out_ENTITY_ACK = interface->set_signal_out <Tcontrol_t> ("entity_ack", 1); 59 } 55 if (_param->_encoding_compact) 56 { 57 ALLOC0_INTERFACE_BEGIN("",OUT,SOUTH,_("select interface")); 60 58 61 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 59 ALLOC0_SIGNAL_OUT(out_ENTITY ,"entity" ,Tentity_t ,_param->_size_entity); 60 ALLOC0_SIGNAL_OUT(out_ENTITY_ACK,"entity_ack",Tcontrol_t,1); 61 62 ALLOC0_INTERFACE_END(); 63 } 64 65 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 62 66 63 67 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_deallocation.cpp
r88 r112 7 7 8 8 #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo { … … 24 25 delete in_NRESET; 25 26 26 delete [] in_VAL; 27 if (_param->_encoding_one_hot) 28 delete [] out_ACK; 29 30 if (_param->_encoding_compact) 31 { 32 delete out_ENTITY; 33 delete out_ENTITY_ACK; 34 } 27 DELETE1_SIGNAL( in_VAL ,_param->_nb_entity,1); 28 if (_param->_encoding_one_hot) 29 DELETE1_SIGNAL(out_ACK ,_param->_nb_entity,1); 30 if (_param->_encoding_compact) 31 { 32 DELETE0_SIGNAL(out_ENTITY ,_param->_size_entity); 33 DELETE0_SIGNAL(out_ENTITY_ACK,1); 34 } 35 35 } 36 36 37 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 38
Note: See TracChangeset
for help on using the changeset viewer.