Changeset 112 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
- Timestamp:
- Mar 18, 2009, 11:36:26 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
- Files:
-
- 142 added
- 26 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/include/test.h
r81 r112 14 14 #include <iostream> 15 15 16 #include "Common/include/Time.h" 16 17 #include "Behavioural/Generic/Counter/include/Counter.h" 17 18 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp
r88 r112 80 80 } 81 81 82 Time * _time = new Time(); 83 82 84 /******************************************************** 83 85 * Simulation - Begin … … 147 149 ********************************************************/ 148 150 151 delete _time; 152 149 153 cout << "<" << name << "> ............ Stop Simulation" << endl; 150 154 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp
r88 r112 7 7 8 8 #include "Behavioural/Generic/Counter/include/Counter.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo { … … 34 35 , IN 35 36 , SOUTH 36 , "Generalist interface"37 , _("Generalist interface") 37 38 #endif 38 39 ); … … 43 44 44 45 // ~~~~~[ Interface : "counter" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 45 { 46 in_COUNTER_DATA = new SC_IN (Tdata_t) * [_param._nb_port]; 47 in_COUNTER_ADDSUB= new SC_IN (Tcontrol_t) * [_param._nb_port]; 48 out_COUNTER_DATA = new SC_OUT(Tdata_t) * [_param._nb_port]; 49 50 for (uint32_t i=0; i<_param._nb_port; i++) 51 { 52 Interface_fifo * interface = _interfaces->set_interface("counter_"+toString(i) 53 #ifdef POSITION 54 , IN 55 , SOUTH 56 , "Counter interface" 57 #endif 58 ); 46 { 47 ALLOC1_INTERFACE_BEGIN("counter", IN, SOUTH, _("Counter interface"), _param._nb_port); 59 48 60 in_COUNTER_DATA [i] = interface->set_signal_in <Tdata_t > ("data" , _param._size_data); 61 in_COUNTER_ADDSUB [i] = interface->set_signal_in <Tcontrol_t> ("addsub", 1 ); 62 out_COUNTER_DATA [i] = interface->set_signal_out <Tdata_t > ("data" , _param._size_data); 63 } 64 } 49 ALLOC1_SIGNAL_IN ( in_COUNTER_DATA ,"data" ,Tdata_t ,_param._size_data); 50 ALLOC1_SIGNAL_IN ( in_COUNTER_ADDSUB,"addsub",Tcontrol_t,1 ); 51 ALLOC1_SIGNAL_OUT(out_COUNTER_DATA ,"data" ,Tdata_t ,_param._size_data); 65 52 53 ALLOC1_INTERFACE_END(_param._nb_port); 54 } 55 66 56 #ifdef POSITION 67 57 if (usage_is_set(_usage,USE_POSITION)) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_deallocation.cpp
r88 r112 7 7 8 8 #include "Behavioural/Generic/Counter/include/Counter.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo { … … 23 24 delete in_NRESET; 24 25 25 delete [] in_COUNTER_DATA;26 delete [] in_COUNTER_ADDSUB;27 delete [] out_COUNTER_DATA;26 DELETE1_SIGNAL( in_COUNTER_DATA , _param._nb_port,_param._size_data); 27 DELETE1_SIGNAL( in_COUNTER_ADDSUB, _param._nb_port,1 ); 28 DELETE1_SIGNAL(out_COUNTER_DATA , _param._nb_port,_param._size_data); 28 29 } 29 30 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_allocation.cpp
r109 r112 49 49 // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 50 50 { 51 ALLOC0_INTERFACE ("insert", IN, WEST, _("Interface of data write."));51 ALLOC0_INTERFACE_BEGIN("insert", IN, WEST, _("Interface of data write.")); 52 52 53 53 ALLOC0_VALACK_IN ( in_INSERT_VAL ,VAL); 54 54 ALLOC0_VALACK_OUT(out_INSERT_ACK ,ACK); 55 55 ALLOC0_SIGNAL_IN ( in_INSERT_DATA ,"data",Tdata_t,_param->_size_data); 56 57 ALLOC0_INTERFACE_END(); 56 58 } 57 59 58 60 // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 59 61 { 60 ALLOC0_INTERFACE ("retire", OUT, EAST, _("Interface of data read."));62 ALLOC0_INTERFACE_BEGIN("retire", OUT, EAST, _("Interface of data read.")); 61 63 62 64 ALLOC0_VALACK_OUT(out_RETIRE_VAL ,VAL); 63 65 ALLOC0_VALACK_IN ( in_RETIRE_ACK ,ACK); 64 66 ALLOC0_SIGNAL_OUT(out_RETIRE_DATA ,"data",Tdata_t,_param->_size_data); 67 68 ALLOC0_INTERFACE_END(); 65 69 } 66 70 67 71 // ~~~~~[ Interface "slot" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 68 72 { 69 ALLOC1_INTERFACE ("slot", OUT, NORTH, _("Internal slot."),_param->_nb_port_slot);73 ALLOC1_INTERFACE_BEGIN("slot", OUT, NORTH, _("Internal slot."),_param->_nb_port_slot); 70 74 71 75 ALLOC1_VALACK_OUT(out_SLOT_VAL ,VAL); 72 76 ALLOC1_SIGNAL_OUT(out_SLOT_DATA ,"data",Tdata_t,_param->_size_data); 77 78 ALLOC1_INTERFACE_END(_param->_nb_port_slot); 73 79 } 74 80 … … 76 82 if (_param->_have_port_ptr) 77 83 { 78 ALLOC0_INTERFACE ("ptr", OUT, SOUTH, _("Internal pointer."));84 ALLOC0_INTERFACE_BEGIN("ptr", OUT, SOUTH, _("Internal pointer.")); 79 85 80 86 if (_param->_have_port_ptr_write) … … 82 88 if (_param->_have_port_ptr_read ) 83 89 ALLOC0_SIGNAL_OUT(out_PTR_READ ,"read" ,Tptr_t,_param->_size_ptr); 90 91 ALLOC0_INTERFACE_END(); 84 92 } 85 93 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_allocation.cpp
r109 r112 7 7 8 8 #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo { … … 33 34 , IN 34 35 ,SOUTH 35 , "Generalist interface"36 ,_("Generalist interface") 36 37 #endif 37 38 ); … … 40 41 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); 41 42 } 43 42 44 // ~~~~~[ Interface : "read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 45 { 46 ALLOC1_INTERFACE_BEGIN("read",IN,WEST,_("Interface Read"),_param->_nb_port_read); 43 47 44 in_READ_VAL = new SC_IN (Tcontrol_t) * [_param->_nb_port_read]; 45 out_READ_ACK = new SC_OUT(Tcontrol_t) * [_param->_nb_port_read]; 46 if (_param->_have_port_address) 47 in_READ_ADDRESS = new SC_IN (Taddress_t) * [_param->_nb_port_read]; 48 out_READ_DATA = new SC_OUT(Tdata_t ) * [_param->_nb_port_read]; 48 ALLOC1_VALACK_IN ( in_READ_VAL ,VAL); 49 ALLOC1_VALACK_OUT(out_READ_ACK ,ACK); 50 ALLOC1_SIGNAL_IN ( in_READ_ADDRESS,"address",Taddress_t,_param->_size_address); 51 ALLOC1_SIGNAL_OUT(out_READ_DATA ,"data" ,Tdata_t ,_param->_size_word); 49 52 50 for (uint32_t i=0; i<_param->_nb_port_read; i++) 51 { 52 Interface_fifo * interface = _interfaces->set_interface("read_"+toString(i) 53 #ifdef POSITION 54 , IN 55 ,WEST 56 , "Interface Read" 57 #endif 58 ); 59 60 in_READ_VAL [i] = interface->set_signal_valack_in ("val" , VAL); 61 out_READ_ACK [i] = interface->set_signal_valack_out ("ack" , ACK); 62 if (_param->_have_port_address) 63 in_READ_ADDRESS [i] = interface->set_signal_in <Taddress_t> ("address", _param->_size_address); 64 out_READ_DATA [i] = interface->set_signal_out <Tdata_t > ("data" , _param->_size_word); 65 } 53 ALLOC1_INTERFACE_END(_param->_nb_port_read); 54 } 66 55 67 56 // ~~~~~[ Interface : "write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 57 { 58 ALLOC1_INTERFACE_BEGIN("write",IN,EAST,_("Interface Write"),_param->_nb_port_write); 68 59 69 in_WRITE_VAL = new SC_IN (Tcontrol_t) * [_param->_nb_port_write]; 70 out_WRITE_ACK = new SC_OUT(Tcontrol_t) * [_param->_nb_port_write]; 71 if (_param->_have_port_address) 72 in_WRITE_ADDRESS = new SC_IN (Taddress_t) * [_param->_nb_port_write]; 73 in_WRITE_DATA = new SC_IN (Tdata_t ) * [_param->_nb_port_write]; 74 75 for (uint32_t i=0; i<_param->_nb_port_write; i++) 76 { 77 Interface_fifo * interface = _interfaces->set_interface("write_"+toString(i) 78 #ifdef POSITION 79 , IN 80 ,EAST 81 , "Interface Write" 82 #endif 83 ); 60 ALLOC1_VALACK_IN ( in_WRITE_VAL ,VAL); 61 ALLOC1_VALACK_OUT(out_WRITE_ACK ,ACK); 62 ALLOC1_SIGNAL_IN ( in_WRITE_ADDRESS,"address",Taddress_t,_param->_size_address); 63 ALLOC1_SIGNAL_IN ( in_WRITE_DATA ,"data" ,Tdata_t ,_param->_size_word); 84 64 85 in_WRITE_VAL [i] = interface->set_signal_valack_in ("val" , VAL); 86 out_WRITE_ACK [i] = interface->set_signal_valack_out ("ack" , ACK); 87 if (_param->_have_port_address) 88 in_WRITE_ADDRESS [i] = interface->set_signal_in <Taddress_t> ("address", _param->_size_address); 89 in_WRITE_DATA [i] = interface->set_signal_in <Tdata_t > ("data" , _param->_size_word); 90 } 65 ALLOC1_INTERFACE_END(_param->_nb_port_write); 66 } 91 67 92 68 // ~~~~~[ Interface : "read_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 69 { 70 ALLOC1_INTERFACE_BEGIN("read_write",IN,WEST,_("Interface Read_Write"),_param->_nb_port_read_write); 93 71 94 in_READ_WRITE_VAL = new SC_IN (Tcontrol_t) * [_param->_nb_port_read_write]; 95 out_READ_WRITE_ACK = new SC_OUT(Tcontrol_t) * [_param->_nb_port_read_write]; 96 in_READ_WRITE_RW = new SC_IN (Tcontrol_t) * [_param->_nb_port_read_write]; 97 if (_param->_have_port_address) 98 in_READ_WRITE_ADDRESS = new SC_IN (Taddress_t) * [_param->_nb_port_read_write]; 99 in_READ_WRITE_WDATA = new SC_IN (Tdata_t ) * [_param->_nb_port_read_write]; 100 out_READ_WRITE_RDATA = new SC_OUT(Tdata_t ) * [_param->_nb_port_read_write]; 72 ALLOC1_VALACK_IN ( in_READ_WRITE_VAL ,VAL); 73 ALLOC1_VALACK_OUT(out_READ_WRITE_ACK ,ACK); 74 ALLOC1_SIGNAL_IN ( in_READ_WRITE_RW ,"rw" ,Tcontrol_t,1); 75 ALLOC1_SIGNAL_IN ( in_READ_WRITE_ADDRESS,"address",Taddress_t,_param->_size_address); 76 ALLOC1_SIGNAL_IN ( in_READ_WRITE_WDATA ,"wdata" ,Tdata_t ,_param->_size_word); 77 ALLOC1_SIGNAL_OUT(out_READ_WRITE_RDATA ,"rdata" ,Tdata_t ,_param->_size_word); 101 78 102 for (uint32_t i=0; i<_param->_nb_port_read_write; i++) 103 { 104 Interface_fifo * interface = _interfaces->set_interface("read_write_"+toString(i) 105 #ifdef POSITION 106 , IN 107 ,WEST 108 , "Interface Read_Write" 109 #endif 110 ); 79 ALLOC1_INTERFACE_END(_param->_nb_port_read_write); 80 } 111 81 112 in_READ_WRITE_VAL [i] = interface->set_signal_valack_in ("val" , VAL);113 out_READ_WRITE_ACK [i] = interface->set_signal_valack_out ("ack" , ACK);114 in_READ_WRITE_RW [i] = interface->set_signal_valack_in ("rw" , VAL);115 if (_param->_have_port_address)116 in_READ_WRITE_ADDRESS [i] = interface->set_signal_in <Taddress_t> ("address", _param->_size_address);117 in_READ_WRITE_WDATA [i] = interface->set_signal_in <Tdata_t > ("wdata" , _param->_size_word);118 out_READ_WRITE_RDATA [i] = interface->set_signal_out <Tdata_t > ("rdata" , _param->_size_word);119 }120 121 // ----- Register122 82 if (usage_is_set(_usage,USE_SYSTEMC)) 123 reg_DATA = new Tdata_t [_param->_nb_word];83 ALLOC1(reg_DATA,Tdata_t,_param->_nb_word); 124 84 125 85 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_deallocation.cpp
r88 r112 2 2 * $Id$ 3 3 * 4 * [ 4 * [ Description ] 5 5 * 6 6 */ 7 7 8 8 #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo { … … 22 23 delete in_CLOCK; 23 24 delete in_NRESET; 24 // ----- Interface Read 25 delete [] in_READ_VAL ; 26 delete [] out_READ_ACK ; 27 if (_param->_have_port_address) 28 delete [] in_READ_ADDRESS; 29 delete [] out_READ_DATA ; 30 31 // ----- Interface Write 32 delete [] in_WRITE_VAL ; 33 delete [] out_WRITE_ACK ; 34 if (_param->_have_port_address) 35 delete [] in_WRITE_ADDRESS; 36 delete [] in_WRITE_DATA ; 37 38 // ----- Interface Read_Write 39 delete [] in_READ_WRITE_VAL ; 40 delete [] out_READ_WRITE_ACK ; 41 delete [] in_READ_WRITE_RW ; 42 if (_param->_have_port_address) 43 delete [] in_READ_WRITE_ADDRESS; 44 delete [] in_READ_WRITE_WDATA ; 45 delete [] out_READ_WRITE_RDATA ; 46 47 // ----- Register 48 delete [] reg_DATA; 25 26 DELETE1_SIGNAL( in_READ_VAL ,_param->_nb_port_read,1); 27 DELETE1_SIGNAL(out_READ_ACK ,_param->_nb_port_read,1); 28 DELETE1_SIGNAL( in_READ_ADDRESS ,_param->_nb_port_read,_param->_size_address); 29 DELETE1_SIGNAL(out_READ_DATA ,_param->_nb_port_read,_param->_size_word); 30 31 DELETE1_SIGNAL( in_WRITE_VAL ,_param->_nb_port_write,1); 32 DELETE1_SIGNAL(out_WRITE_ACK ,_param->_nb_port_write,1); 33 DELETE1_SIGNAL( in_WRITE_ADDRESS,_param->_nb_port_write,_param->_size_address); 34 DELETE1_SIGNAL( in_WRITE_DATA ,_param->_nb_port_write,_param->_size_word); 35 36 DELETE1_SIGNAL( in_READ_WRITE_VAL ,_param->_nb_port_read_write,1); 37 DELETE1_SIGNAL(out_READ_WRITE_ACK ,_param->_nb_port_read_write,1); 38 DELETE1_SIGNAL( in_READ_WRITE_RW ,_param->_nb_port_read_write,1); 39 DELETE1_SIGNAL( in_READ_WRITE_ADDRESS,_param->_nb_port_read_write,_param->_size_address); 40 DELETE1_SIGNAL( in_READ_WRITE_WDATA ,_param->_nb_port_read_write,_param->_size_word); 41 DELETE1_SIGNAL(out_READ_WRITE_RDATA ,_param->_nb_port_read_write,_param->_size_word); 42 43 DELETE1(reg_DATA,_param->_nb_word); 49 44 } 50 45 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_allocation.cpp
r88 r112 7 7 8 8 #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo { … … 36 37 ,IN 37 38 ,SOUTH, 38 "Generalist interface"39 _("Generalist interface") 39 40 #endif 40 41 ); … … 43 44 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); 44 45 45 // ~~~~~[ Interface : "read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 46 // ~~~~~[ Interface : "read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 47 { 48 ALLOC1_INTERFACE_BEGIN("read",IN,WEST,_("Interface Read"),_param->_nb_port_read); 46 49 47 in_READ_VAL = new SC_IN (Tcontrol_t) * [_param->_nb_port_read]; 48 out_READ_ACK = new SC_OUT(Tcontrol_t) * [_param->_nb_port_read]; 49 if (_param->_have_port_address == true) 50 in_READ_ADDRESS = new SC_IN (Taddress_t) * [_param->_nb_port_read]; 51 out_READ_DATA = new SC_OUT(Tdata_t ) * [_param->_nb_port_read]; 50 ALLOC1_VALACK_IN ( in_READ_VAL ,VAL); 51 ALLOC1_VALACK_OUT(out_READ_ACK ,ACK); 52 ALLOC1_SIGNAL_IN ( in_READ_ADDRESS,"address",Taddress_t, _param->_size_address); 53 ALLOC1_SIGNAL_OUT(out_READ_DATA ,"data" ,Tdata_t , _param->_size_word); 52 54 53 for (uint32_t i=0; i<_param->_nb_port_read; i++) 54 { 55 Interface_fifo * interface = _interfaces->set_interface("read_"+toString(i) 56 #ifdef POSITION 57 , IN 58 ,WEST 59 , "Interface Read" 60 #endif 61 ); 55 ALLOC1_INTERFACE_END(_param->_nb_port_read); 56 } 57 58 // ~~~~~[ Interface : "write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 59 { 60 ALLOC1_INTERFACE_BEGIN("write",IN,EAST,_("Interface Write"),_param->_nb_port_write); 62 61 63 in_READ_VAL [i] = interface->set_signal_valack_in ("val" , VAL); 64 out_READ_ACK [i] = interface->set_signal_valack_out ("ack" , ACK); 65 if (_param->_have_port_address == true) 66 in_READ_ADDRESS [i] = interface->set_signal_in <Taddress_t> ("address", static_cast<uint32_t>(log2(_param->_nb_word))); 67 out_READ_DATA [i] = interface->set_signal_out <Tdata_t > ("data" , _param->_size_word); 68 } 62 ALLOC1_VALACK_IN ( in_WRITE_VAL ,VAL); 63 ALLOC1_VALACK_OUT(out_WRITE_ACK ,ACK); 64 ALLOC1_SIGNAL_IN ( in_WRITE_ADDRESS,"address",Taddress_t,_param->_size_address); 65 ALLOC1_SIGNAL_IN ( in_WRITE_DATA ,"data" ,Tdata_t ,_param->_size_word); 69 66 70 // ~~~~~[ Interface : "write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 71 72 in_WRITE_VAL = new SC_IN (Tcontrol_t) * [_param->_nb_port_write]; 73 out_WRITE_ACK = new SC_OUT(Tcontrol_t) * [_param->_nb_port_write]; 74 if (_param->_have_port_address == true) 75 in_WRITE_ADDRESS = new SC_IN (Taddress_t) * [_param->_nb_port_write]; 76 in_WRITE_DATA = new SC_IN (Tdata_t ) * [_param->_nb_port_write]; 77 78 for (uint32_t i=0; i<_param->_nb_port_write; i++) 79 { 80 Interface_fifo * interface = _interfaces->set_interface("write_"+toString(i) 81 #ifdef POSITION 82 , IN 83 ,EAST 84 , "Interface Write" 85 #endif 86 ); 87 88 in_WRITE_VAL [i] = interface->set_signal_valack_in ("val" , VAL); 89 out_WRITE_ACK [i] = interface->set_signal_valack_out ("ack" , ACK); 90 if (_param->_have_port_address == true) 91 in_WRITE_ADDRESS [i] = interface->set_signal_in <Taddress_t> ("address", static_cast<uint32_t>(log2(_param->_nb_word))); 92 in_WRITE_DATA [i] = interface->set_signal_in <Tdata_t > ("data" , _param->_size_word); 67 ALLOC1_INTERFACE_END(_param->_nb_port_write); 93 68 } 94 69 95 70 if (usage_is_set(_usage,USE_SYSTEMC)) 96 71 { 97 // ~~~~~[ Registers ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 72 // ~~~~~[ Registers ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 73 ALLOC2(reg_DATA,Tdata_t,_param->_nb_bank,_param->_nb_word); 98 74 99 reg_DATA = new Tdata_t * [_param->_nb_bank]; 100 101 for (uint32_t i=0; i<_param->_nb_bank; i++) 102 { 103 reg_DATA [i] = new Tdata_t [_param->_nb_word]; 104 } 105 106 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 107 internal_WRITE_VAL = new bool [_param->_nb_port_write]; 108 internal_WRITE_BANK = new Taddress_t [_param->_nb_port_write]; 109 internal_WRITE_NUM_REG = new Taddress_t [_param->_nb_port_write]; 75 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 76 ALLOC1(internal_WRITE_VAL ,bool ,_param->_nb_port_write); 77 ALLOC1(internal_WRITE_BANK ,Taddress_t,_param->_nb_port_write); 78 ALLOC1(internal_WRITE_NUM_REG,Taddress_t,_param->_nb_port_write); 110 79 } 111 80 112 81 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 113 114 82 #ifdef POSITION 115 83 if (usage_is_set(_usage,USE_POSITION)) 116 84 _component->generate_file(); 117 85 #endif 118 86 119 87 log_printf(FUNC,RegisterFile_Multi_Banked,"allocation","End"); 120 88 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_deallocation.cpp
r88 r112 2 2 * $Id$ 3 3 * 4 * [ 4 * [ Description ] 5 5 * 6 6 */ 7 7 8 8 #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo { … … 23 24 delete in_CLOCK; 24 25 delete in_NRESET; 26 27 DELETE1_SIGNAL( in_READ_VAL ,_param->_nb_port_read,1); 28 DELETE1_SIGNAL(out_READ_ACK ,_param->_nb_port_read,1); 29 DELETE1_SIGNAL( in_READ_ADDRESS ,_param->_nb_port_read,_param->_size_address); 30 DELETE1_SIGNAL(out_READ_DATA ,_param->_nb_port_read,_param->_size_word); 25 31 26 // ----- Interface Read 27 delete [] in_READ_VAL ; 28 delete [] out_READ_ACK ; 29 if (_param->_have_port_address == true) 30 delete [] in_READ_ADDRESS; 31 delete [] out_READ_DATA ; 32 DELETE1_SIGNAL( in_WRITE_VAL ,_param->_nb_port_write,1); 33 DELETE1_SIGNAL(out_WRITE_ACK ,_param->_nb_port_write,1); 34 DELETE1_SIGNAL( in_WRITE_ADDRESS,_param->_nb_port_write,_param->_size_address); 35 DELETE1_SIGNAL( in_WRITE_DATA ,_param->_nb_port_write,_param->_size_word); 32 36 33 // ----- Interface Write 34 delete [] in_WRITE_VAL ; 35 delete [] out_WRITE_ACK ; 36 if (_param->_have_port_address == true) 37 delete [] in_WRITE_ADDRESS; 38 delete [] in_WRITE_DATA ; 37 DELETE2(reg_DATA ,_param->_nb_bank,_param->_nb_word); 39 38 40 // ----- Register 41 delete [] reg_DATA; 42 43 // ----- Internal 44 delete [] internal_WRITE_VAL; 45 delete [] internal_WRITE_BANK; 46 delete [] internal_WRITE_NUM_REG; 39 DELETE1(internal_WRITE_VAL ,_param->_nb_port_write); 40 DELETE1(internal_WRITE_BANK ,_param->_nb_port_write); 41 DELETE1(internal_WRITE_NUM_REG ,_param->_nb_port_write); 47 42 } 48 43 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/include/test.h
r81 r112 15 15 #include <sys/time.h> 16 16 17 #include "Common/include/Time.h" 17 18 #include "Behavioural/Generic/RegisterFile/include/RegisterFile.h" 18 19 … … 26 27 morpheo::behavioural::generic::registerfile::Parameters * param); 27 28 28 class Time29 {30 private : timeval time_begin;31 // private : timeval time_end;32 33 public : Time ()34 {35 gettimeofday(&time_begin ,NULL);36 };37 38 public : ~Time ()39 {40 cout << *this;41 };42 43 public : friend ostream& operator<< (ostream& output_stream,44 const Time & x)45 {46 timeval time_end;47 48 gettimeofday(&time_end ,NULL);49 50 uint32_t nb_cycles = static_cast<uint32_t>(sc_simulation_time());51 52 double average = static_cast<double>(nb_cycles) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec);53 54 output_stream << nb_cycles << "\t(" << average << " cycles / seconds )" << endl;55 56 return output_stream;57 }58 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/RegisterFile.h
r82 r112 53 53 54 54 public : Component * _component; 55 private : Interfaces * _interfaces; 55 56 56 57 #ifdef SYSTEMC -
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 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/include/test.h
r81 r112 14 14 #include <iostream> 15 15 16 #include "Common/include/Time.h" 16 17 #include "Behavioural/Generic/Shifter/include/Shifter.h" 17 18 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/src/test.cpp
r88 r112 99 99 (*(_Shifter->out_SHIFTER_DATA [i])) (SHIFTER_DATA_OUT [i]); 100 100 } 101 102 Time * _time = new Time(); 101 103 102 104 /******************************************************** … … 309 311 * Simulation - End 310 312 ********************************************************/ 313 delete _time; 311 314 312 315 cout << "<" << name << "> ............ Stop Simulation" << endl; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Parameters.h
r88 r112 29 29 public : const uint32_t _size_data_completion; 30 30 public : const bool _type_completion_bool; 31 32 public : const uint32_t _size_shift ; 31 33 32 34 public : const bool _internal_direction; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters.cpp
r88 r112 29 29 _size_data_completion ((carry != external_completion)?0:((_shift_value==0)?size_data:_shift_value)), 30 30 _type_completion_bool (type_completion_bool), 31 32 _size_shift (static_cast<uint32_t>(ceil(log2(_size_data)))), 31 33 32 34 _internal_direction ((direction == internal_right_shift)?_right :_left ), -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_allocation.cpp
r88 r112 7 7 8 8 #include "Behavioural/Generic/Shifter/include/Shifter.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo { … … 33 34 , IN 34 35 , SOUTH 35 , "Generalist interface"36 , _("Generalist interface") 36 37 #endif 37 38 ); … … 43 44 44 45 { 45 // Interface "shifter" 46 in_SHIFTER_DATA = new SC_IN (Tdata_t) * [_param->_nb_port]; 46 ALLOC1_INTERFACE_BEGIN("shifter", IN, SOUTH,_("Generalist interface"),_param->_nb_port); 47 48 ALLOC1_SIGNAL_IN ( in_SHIFTER_DATA ,"data" ,Tdata_t ,_param->_size_data); 47 49 if (_param->_shift_value == 0) 48 in_SHIFTER_SHIFT = new SC_IN (Tshift_t) * [_param->_nb_port]; 49 if (_param->_direction == external_direction) 50 in_SHIFTER_DIRECTION = new SC_IN (Tdirection_t) * [_param->_nb_port]; 51 if (_param->_rotate == external_rotate) 52 in_SHIFTER_TYPE = new SC_IN (Ttype_t) * [_param->_nb_port]; 53 if (_param->_carry == external_carry) 54 in_SHIFTER_CARRY = new SC_IN (Tcarry_t) * [_param->_nb_port]; 55 if (_param->_carry == external_completion) 50 ALLOC1_SIGNAL_IN ( in_SHIFTER_SHIFT ,"shift" ,Tshift_t ,_param->_size_shift); 51 if (_param->_direction == external_direction) 52 ALLOC1_SIGNAL_IN ( in_SHIFTER_DIRECTION ,"direction" ,Tdirection_t,1); 53 if (_param->_rotate == external_rotate) 54 ALLOC1_SIGNAL_IN ( in_SHIFTER_TYPE ,"type" ,Ttype_t ,1); 55 if (_param->_carry == external_carry) 56 ALLOC1_SIGNAL_IN ( in_SHIFTER_CARRY ,"carry" ,Tcarry_t ,1); 57 if (_param->_carry == external_completion) 58 { 56 59 if (_param->_type_completion_bool == true) 57 in_SHIFTER_CARRY_IN = new SC_IN (Tcontrol_t) * [_param->_nb_port]; 60 { 61 ALLOC1_SIGNAL_IN ( in_SHIFTER_CARRY_IN ,"carry_in" ,Tcontrol_t ,1); 62 } 58 63 else 59 in_SHIFTER_COMPLETION= new SC_IN (Tdata_t) * [_param->_nb_port]; 60 out_SHIFTER_DATA = new SC_OUT(Tdata_t) * [_param->_nb_port]; 64 { 65 ALLOC1_SIGNAL_IN ( in_SHIFTER_COMPLETION ,"completion",Tdata_t ,_param->_size_data_completion); 66 } 67 } 68 ALLOC1_SIGNAL_OUT(out_SHIFTER_DATA ,"data" ,Tdata_t ,_param->_size_data); 61 69 62 for (uint32_t i=0; i<_param->_nb_port; i++) 63 { 64 Interface_fifo * interface = _interfaces->set_interface("shifter_"+toString(i) 65 #ifdef POSITION 66 , IN 67 , SOUTH 68 , "Generalist interface" 69 #endif 70 ); 71 72 in_SHIFTER_DATA [i] = interface->set_signal_in <Tdata_t > ("data" ,_param->_size_data); 73 if (_param->_shift_value == 0) 74 in_SHIFTER_SHIFT [i] = interface->set_signal_in <Tshift_t > ("shift" ,static_cast<uint32_t>(ceil(log2(_param->_size_data)))); 75 if (_param->_direction == external_direction) 76 in_SHIFTER_DIRECTION [i] = interface->set_signal_in <Tdirection_t> ("direction" ,1); 77 if (_param->_rotate == external_rotate) 78 in_SHIFTER_TYPE [i] = interface->set_signal_in <Ttype_t > ("type" ,1); 79 if (_param->_carry == external_carry) 80 in_SHIFTER_CARRY [i] = interface->set_signal_in <Tcarry_t > ("carry" ,1); 81 if (_param->_carry == external_completion) 82 if (_param->_type_completion_bool == true) 83 in_SHIFTER_CARRY_IN [i] = interface->set_signal_in <Tcontrol_t > ("carry_in" ,1); 84 else 85 in_SHIFTER_COMPLETION [i] = interface->set_signal_in <Tdata_t > ("completion",_param->_size_data_completion); 86 out_SHIFTER_DATA [i] = interface->set_signal_out <Tdata_t > ("data" ,_param->_size_data); 87 } 70 ALLOC1_INTERFACE_END(_param->_nb_port); 88 71 } 89 72 90 73 #ifdef POSITION 91 74 if (usage_is_set(_usage,USE_POSITION)) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_deallocation.cpp
r88 r112 7 7 8 8 #include "Behavioural/Generic/Shifter/include/Shifter.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo { … … 19 20 { 20 21 #if (defined(STATISTICS) || defined (VHDL_TESTBENCH)) 21 delete in_CLOCK;22 delete in_CLOCK; 22 23 #endif 23 24 24 delete [] in_SHIFTER_DATA ; 25 if (_param->_shift_value == 0) 26 delete [] in_SHIFTER_SHIFT ; 27 if (_param->_direction == external_direction ) 28 delete [] in_SHIFTER_DIRECTION ; 29 if (_param->_rotate == external_rotate ) 30 delete [] in_SHIFTER_TYPE ; 31 if (_param->_carry == external_carry ) 32 delete [] in_SHIFTER_CARRY ; 33 if (_param->_carry == external_completion) 34 if (_param->_type_completion_bool == true) 35 delete [] in_SHIFTER_CARRY_IN ; 36 else 37 delete [] in_SHIFTER_COMPLETION; 38 delete [] out_SHIFTER_DATA ; 25 DELETE1_SIGNAL( in_SHIFTER_DATA ,_param->_nb_port,_param->_size_data); 26 if (_param->_shift_value == 0) 27 DELETE1_SIGNAL( in_SHIFTER_SHIFT ,_param->_nb_port,_param->_size_shift); 28 if (_param->_direction == external_direction) 29 DELETE1_SIGNAL( in_SHIFTER_DIRECTION ,_param->_nb_port,1); 30 if (_param->_rotate == external_rotate) 31 DELETE1_SIGNAL( in_SHIFTER_TYPE ,_param->_nb_port,1); 32 if (_param->_carry == external_carry) 33 DELETE1_SIGNAL( in_SHIFTER_CARRY ,_param->_nb_port,1); 34 if (_param->_carry == external_completion) 35 { 36 if (_param->_type_completion_bool == true) 37 { 38 DELETE1_SIGNAL( in_SHIFTER_CARRY_IN ,_param->_nb_port,1); 39 } 40 else 41 { 42 DELETE1_SIGNAL( in_SHIFTER_COMPLETION ,_param->_nb_port,_param->_size_data_completion); 43 } 44 } 45 DELETE1_SIGNAL(out_SHIFTER_DATA ,_param->_nb_port,_param->_size_data); 39 46 } 40 47 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_declaration.cpp
r81 r112 17 17 void Shifter::vhdl_declaration (Vhdl * & vhdl) 18 18 { 19 uint32_t log2_size_data = static_cast<uint32_t>(ceil(log2(_param ._size_data)));19 uint32_t log2_size_data = static_cast<uint32_t>(ceil(log2(_param->_size_data))); 20 20 21 21 vhdl->set_constant("cst_is_direction_left ",1,_left ); … … 25 25 vhdl->set_constant("cst_is_carry_arithmetic",1,_arithmetic); 26 26 vhdl->set_constant("cst_is_carry_logic ",1,_logic ); 27 vhdl->set_constant("cst_completion ",_param ._size_data,"(others => '1')");27 vhdl->set_constant("cst_completion ",_param->_size_data,"(others => '1')"); 28 28 29 for (uint32_t i=0; i<_param ._nb_port; i++)29 for (uint32_t i=0; i<_param->_nb_port; i++) 30 30 { 31 if (_param ._shift_value != 0)32 vhdl->set_constant("shift_"+toString(i),log2_size_data, _param ._shift_value);31 if (_param->_shift_value != 0) 32 vhdl->set_constant("shift_"+toString(i),log2_size_data, _param->_shift_value); 33 33 else 34 34 vhdl->set_alias ("shift_"+toString(i),std_logic(log2_size_data), "in_SHIFTER_"+toString(i)+"_SHIFT",std_logic_range(log2_size_data)); 35 35 36 if (_param ._size_data_completion > 0)36 if (_param->_size_data_completion > 0) 37 37 { 38 vhdl->set_signal ("shifter_completion_left_"+toString(i)+" ",_param ._size_data);39 vhdl->set_signal ("shifter_completion_right_"+toString(i)+"",_param ._size_data);40 vhdl->set_signal ("mask_completion_left_"+toString(i)+" ",_param ._size_data);41 vhdl->set_signal ("mask_completion_right_"+toString(i)+" ",_param ._size_data);38 vhdl->set_signal ("shifter_completion_left_"+toString(i)+" ",_param->_size_data); 39 vhdl->set_signal ("shifter_completion_right_"+toString(i)+"",_param->_size_data); 40 vhdl->set_signal ("mask_completion_left_"+toString(i)+" ",_param->_size_data); 41 vhdl->set_signal ("mask_completion_right_"+toString(i)+" ",_param->_size_data); 42 42 } 43 43 44 44 //-----[ Shift logic Left ]-------------------------------------------- 45 if (_param ._have_shift_logic_left)46 vhdl->set_signal ("shift_logic_left_"+toString(i)+" ",_param ._size_data);45 if (_param->_have_shift_logic_left) 46 vhdl->set_signal ("shift_logic_left_"+toString(i)+" ",_param->_size_data); 47 47 48 48 //-----[ Shift logic Right ]------------------------------------------- 49 if (_param ._have_shift_logic_right)50 vhdl->set_signal ("shift_logic_right_"+toString(i)+" ",_param ._size_data);49 if (_param->_have_shift_logic_right) 50 vhdl->set_signal ("shift_logic_right_"+toString(i)+" ",_param->_size_data); 51 51 52 52 //-----[ Shift arithmetic Left ]--------------------------------------- 53 if (_param ._have_shift_arithmetic_left)54 vhdl->set_signal ("shift_arithmetic_left_"+toString(i)+" ",_param ._size_data);53 if (_param->_have_shift_arithmetic_left) 54 vhdl->set_signal ("shift_arithmetic_left_"+toString(i)+" ",_param->_size_data); 55 55 56 56 //-----[ Shift arithmetic Right ]-------------------------------------- 57 if (_param ._have_shift_arithmetic_right)58 vhdl->set_signal ("shift_arithmetic_right_"+toString(i)+"",_param ._size_data);57 if (_param->_have_shift_arithmetic_right) 58 vhdl->set_signal ("shift_arithmetic_right_"+toString(i)+"",_param->_size_data); 59 59 60 60 //-----[ Rotate Left ]------------------------------------------------- 61 if (_param ._have_rotate_left)62 vhdl->set_signal ("rotate_left_"+toString(i)+" ",_param ._size_data);61 if (_param->_have_rotate_left) 62 vhdl->set_signal ("rotate_left_"+toString(i)+" ",_param->_size_data); 63 63 64 64 //-----[ Rotate Right ]------------------------------------------------ 65 if (_param ._have_rotate_right)66 vhdl->set_signal ("rotate_right_"+toString(i)+" ",_param ._size_data);65 if (_param->_have_rotate_right) 66 vhdl->set_signal ("rotate_right_"+toString(i)+" ",_param->_size_data); 67 67 } 68 68 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_allocation.cpp
r88 r112 53 53 // ~~~~~[ Interface : "input" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 54 54 { 55 ALLOC1_INTERFACE ("input", IN, WEST, "List of data unsort",_param->_nb_input);55 ALLOC1_INTERFACE_BEGIN("input", IN, WEST, "List of data unsort",_param->_nb_input); 56 56 57 57 ALLOC1_SIGNAL_IN(in_INPUT_VAL ,"val" , Tcontrol_t, 1); 58 58 ALLOC1_SIGNAL_IN(in_INPUT_DATA,"data", Tdata_t , _param->_size_data); 59 60 ALLOC1_INTERFACE_END(_param->_nb_input); 59 61 } 60 62 61 63 // ~~~~~[ Interface : "output" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 62 64 { 63 ALLOC1_INTERFACE ("output",OUT, EAST, "List of data sort",_param->_nb_output);65 ALLOC1_INTERFACE_BEGIN("output",OUT, EAST, "List of data sort",_param->_nb_output); 64 66 65 67 ALLOC1_SIGNAL_OUT(out_OUTPUT_VAL ,"val" ,Tcontrol_t,1); … … 68 70 if (_param->_have_port_data_out) 69 71 ALLOC1_SIGNAL_OUT(out_OUTPUT_DATA ,"data" ,Tdata_t ,_param->_size_data ); 72 73 ALLOC1_INTERFACE_END(_param->_nb_output); 70 74 } 71 75 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_deallocation.cpp
r88 r112 7 7 8 8 #include "Behavioural/Generic/Sort/include/Sort.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo { … … 25 26 delete in_NRESET; 26 27 27 delete [] in_INPUT_VAL ; 28 delete [] in_INPUT_DATA ; 29 delete [] out_OUTPUT_VAL ; 30 if (_param->_have_port_index_out) 31 delete [] out_OUTPUT_INDEX; 32 if (_param->_have_port_data_out) 33 delete [] out_OUTPUT_DATA ; 28 DELETE1_SIGNAL(in_INPUT_VAL ,_param->_nb_input, 1); 29 DELETE1_SIGNAL(in_INPUT_DATA,_param->_nb_input, _param->_size_data); 30 31 DELETE1_SIGNAL(out_OUTPUT_VAL ,_param->_nb_output,1); 32 if (_param->_have_port_index_out) 33 DELETE1_SIGNAL(out_OUTPUT_INDEX,_param->_nb_output,_param->_size_address); 34 if (_param->_have_port_data_out) 35 DELETE1_SIGNAL(out_OUTPUT_DATA ,_param->_nb_output,_param->_size_data ); 34 36 } 37 35 38 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 36 39 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_allocation.cpp
r95 r112 2 2 * $Id$ 3 3 * 4 * [ 4 * [ Description ] 5 5 * 6 6 */ … … 28 28 _interfaces = entity->set_interfaces(); 29 29 30 // ~~~~~[ 30 // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 31 31 { 32 32 Interface_fifo * interface = _interfaces->set_interface("" … … 40 40 } 41 41 42 // ~~~~~[ 42 // ~~~~~[ Interface : "access" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 43 43 { 44 ALLOC1_INTERFACE ("access",IN,WEST, "Access", _param->_nb_access);44 ALLOC1_INTERFACE_BEGIN("access",IN,WEST, "Access", _param->_nb_access); 45 45 46 46 ALLOC1_VALACK_IN ( in_ACCESS_VAL ,VAL); … … 50 50 ALLOC1_SIGNAL_IN ( in_ACCESS_ENTITY ,"entity" ,Tentity_t ,log2(_param->_nb_entity )); 51 51 ALLOC1_SIGNAL_OUT(out_ACCESS_VICTIM ,"victim" ,Tentity_t ,log2(_param->_nb_entity )); 52 53 ALLOC1_INTERFACE_END(_param->_nb_access); 52 54 } 53 55 54 56 if (usage_is_set(_usage,USE_SYSTEMC)) 55 57 { 56 // -----[Register ]---------------------------------------------------57 reg_TABLE = new entry_t * [_param->_size_table];58 59 for (uint32_t i=0; i<_param->_size_table; i++)60 reg_TABLE [i] = new entry_t (_param->_nb_entity);61 62 // -----[Internal ]---------------------------------------------------63 internal_ACCESS_ACK = new Tcontrol_t [_param->_nb_access];64 internal_ACCESS_VICTIM = new Tentity_t [_param->_nb_access];58 // -----[ Register ]--------------------------------------------------- 59 reg_TABLE = new entry_t * [_param->_size_table]; 60 61 for (uint32_t i=0; i<_param->_size_table; i++) 62 reg_TABLE [i] = new entry_t (_param->_nb_entity); 63 64 // -----[ Internal ]--------------------------------------------------- 65 ALLOC1(internal_ACCESS_ACK ,Tcontrol_t,_param->_nb_access); 66 ALLOC1(internal_ACCESS_VICTIM,Tentity_t ,_param->_nb_access); 65 67 } 66 68 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_deallocation.cpp
r88 r112 7 7 8 8 #include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo { … … 20 21 delete in_CLOCK; 21 22 delete in_NRESET; 22 // -----[ Interface access ]-------------------------------------------23 delete [] in_ACCESS_VAL ;24 delete [] out_ACCESS_ACK ;25 if (_param->_size_address>1)26 delete [] in_ACCESS_ADDRESS;27 delete [] in_ACCESS_HIT ;28 delete [] in_ACCESS_ENTITY ;29 delete [] out_ACCESS_VICTIM ;30 31 // -----[ Register ]---------------------------------------------------32 delete [] reg_TABLE;33 23 34 // -----[ Internal ]--------------------------------------------------- 35 delete [] internal_ACCESS_ACK ; 36 delete [] internal_ACCESS_VICTIM; 24 DELETE1_SIGNAL( in_ACCESS_VAL ,_param->_nb_access,1); 25 DELETE1_SIGNAL(out_ACCESS_ACK ,_param->_nb_access,1); 26 DELETE1_SIGNAL( in_ACCESS_HIT ,_param->_nb_access,1); 27 DELETE1_SIGNAL( in_ACCESS_ADDRESS,_param->_nb_access,log2(_param->_size_address)); 28 DELETE1_SIGNAL( in_ACCESS_ENTITY ,_param->_nb_access,log2(_param->_nb_entity )); 29 DELETE1_SIGNAL(out_ACCESS_VICTIM ,_param->_nb_access,log2(_param->_nb_entity )); 30 31 DELETE1(reg_TABLE ,_param->_size_table); 32 DELETE1(internal_ACCESS_ACK ,_param->_nb_access); 33 DELETE1(internal_ACCESS_VICTIM,_param->_nb_access); 37 34 } 38 35 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_allocation.cpp
r82 r112 31 31 // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 32 32 { 33 __ALLOC _SIGNAL(in_CLOCK ,"in_CLOCK" ,SC_CLOCK );34 __ALLOC _SIGNAL(in_NRESET,"in_NRESET",SC_IN (Tcontrol_t));33 __ALLOC0_SIGNAL(in_CLOCK ,"in_CLOCK" ,SC_CLOCK ); 34 __ALLOC0_SIGNAL(in_NRESET,"in_NRESET",SC_IN (Tcontrol_t)); 35 35 } 36 36 37 37 // ~~~~~[ Interface : "Access" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 38 38 { 39 __ALLOC1_INTERFACE ("ACCESS",_param->_nb_access);39 __ALLOC1_INTERFACE_BEGIN("ACCESS",_param->_nb_access); 40 40 41 41 __ALLOC1_SIGNAL_IN ( in_ACCESS_VAL ,"VAL" ,Tcontrol_t); … … 46 46 __ALLOC1_SIGNAL_IN ( in_ACCESS_ENTITY ,"ENTITY" ,Tentity_t ); 47 47 __ALLOC1_SIGNAL_OUT(out_ACCESS_VICTIM ,"VICTIM" ,Tentity_t ); 48 49 __ALLOC1_INTERFACE_END(_param->_nb_access); 48 50 } 49 51 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_deallocation.cpp
r88 r112 7 7 8 8 #include "Behavioural/Generic/Victim/include/Victim.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo {
Note: See TracChangeset
for help on using the changeset viewer.