- Timestamp:
- Jan 15, 2009, 6:19:08 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Parameters.cpp
r100 r101 7 7 8 8 #include "Behavioural/Generic/Queue/include/Parameters.h" 9 9 #include "Common/include/Log2.h" 10 10 namespace morpheo { 11 11 namespace behavioural { … … 16 16 #undef FUNCTION 17 17 #define FUNCTION "Queue::Parameters" 18 Parameters::Parameters (uint32_t size_queue, 19 uint32_t size_data , 20 uint32_t nb_port_slot): 21 _size_queue (size_queue), 22 _size_data (size_data ), 23 _nb_port_slot (nb_port_slot) 18 Parameters::Parameters (uint32_t size_queue , 19 uint32_t size_data , 20 uint32_t nb_port_slot , 21 bool have_port_ptr_write, 22 bool have_port_ptr_read ): 23 _size_queue (size_queue), 24 _size_data (size_data ), 25 _nb_port_slot (nb_port_slot), 26 _have_port_ptr_write (have_port_ptr_write and (log2(size_queue)>0)), 27 _have_port_ptr_read (have_port_ptr_read and (log2(size_queue)>0)), 28 _size_ptr (log2(size_queue)), 29 _have_port_ptr (have_port_ptr_write or have_port_ptr_read) 24 30 { 25 31 log_printf(FUNC,Queue,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_allocation.cpp
r100 r101 72 72 ALLOC1_SIGNAL_OUT(out_SLOT_DATA ,"data",Tdata_t,_param->_size_data); 73 73 } 74 75 // ~~~~~[ Interface "ptr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 76 if (_param->_have_port_ptr) 77 { 78 ALLOC0_INTERFACE("ptr", OUT, EAST, _("Internal pointer.")); 79 80 if (_param->_have_port_ptr_write) 81 ALLOC0_SIGNAL_OUT(out_PTR_WRITE ,"write",Tptr_t,_param->_size_ptr); 82 if (_param->_have_port_ptr_read ) 83 ALLOC0_SIGNAL_OUT(out_PTR_READ ,"read" ,Tptr_t,_param->_size_ptr); 84 } 74 85 75 86 if (usage_is_set(_usage,USE_SYSTEMC)) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_deallocation.cpp
r100 r101 36 36 DELETE1_SIGNAL(out_SLOT_VAL ,_param->_nb_port_slot,1); 37 37 DELETE1_SIGNAL(out_SLOT_DATA ,_param->_nb_port_slot,_param->_size_data); 38 39 if (_param->_have_port_ptr_write) 40 DELETE0_SIGNAL(out_PTR_WRITE ,_param->_size_ptr); 41 if (_param->_have_port_ptr_read ) 42 DELETE0_SIGNAL(out_PTR_READ ,_param->_size_ptr); 38 43 39 44 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_genMoore.cpp
r100 r101 20 20 log_printf(FUNC,Queue,FUNCTION,"Begin"); 21 21 22 //--------------------------------------------- 22 23 // Output 24 //--------------------------------------------- 23 25 internal_INSERT_ACK = not _queue_control->full(); 24 26 internal_RETIRE_VAL = not _queue_control->empty(); … … 28 30 PORT_WRITE(out_RETIRE_DATA,_queue_data[(*_queue_control)[0]]); 29 31 32 //--------------------------------------------- 30 33 // Slot 34 //--------------------------------------------- 31 35 // Note : Slot 0 is the same slot as retire interface. 32 36 uint32_t nb_elt = _queue_control->nb_elt(); … … 37 41 PORT_WRITE(out_SLOT_DATA [i],_queue_data[(*_queue_control)[i]]); 38 42 } 43 44 //--------------------------------------------- 45 // Pointer 46 //--------------------------------------------- 47 if (_param->_have_port_ptr_write) 48 PORT_WRITE(out_PTR_WRITE, _queue_control->ptr_push()); 49 if (_param->_have_port_ptr_read ) 50 PORT_WRITE(out_PTR_READ , _queue_control->ptr_pop ()); 39 51 40 52 log_printf(FUNC,Queue,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_vhdl_body.cpp
r100 r101 62 62 else 63 63 vhdl->set_body (0,"out_SLOT_"+toString(i)+"_DATA <= reg_DATA(conv_integer(0));"); 64 } 65 66 if (_param->_have_port_ptr) 67 { 68 vhdl->set_body (0,""); 69 vhdl->set_comment(0,"---------------------------------------------------------------------------"); 70 vhdl->set_comment(0," Slot"); 71 vhdl->set_comment(0,"---------------------------------------------------------------------------"); 72 vhdl->set_body (0,""); 73 if (_param->_have_port_ptr_write) 74 vhdl->set_body (0,"out_PTR_WRITE <= signal_PTR_WRITE;"); 75 if (_param->_have_port_ptr_read) 76 vhdl->set_body (0,"out_PTR_READ <= signal_PTR_READ;"); 64 77 } 65 78
Note: See TracChangeset
for help on using the changeset viewer.