Changeset 103 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
- Timestamp:
- Jan 16, 2009, 5:55:32 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/include/Queue.h
r101 r103 75 75 76 76 // ~~~~~[ Interface "slot" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 77 public : SC_OUT(Tcontrol_t) ** out_SLOT_VAL ; 78 public : SC_OUT(Tdata_t ) ** out_SLOT_DATA; 77 public : SC_OUT(Tcontrol_t) ** out_SLOT_VAL ; //[nb_port_slot] 78 public : SC_OUT(Tdata_t ) ** out_SLOT_DATA; //[nb_port_slot] 79 79 80 80 // ~~~~~[ Interface "ptr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_vhdl_body.cpp
r101 r103 46 46 else 47 47 vhdl->set_body (0,"signal_SLOT_"+toString(i)+" <= const_PTR_INIT when signal_SLOT_"+toString(i-1)+" = const_PTR_MAX else signal_SLOT_"+toString(i-1)+"+'1';"); 48 48 49 } 49 50 … … 51 52 { 52 53 if (_param->_nb_port_slot > 1) 53 vhdl->set_body (0,"out_SLOT_"+toString(i)+"_VAL <= '1' when reg_NB_ELT > "+std_logic_cst(log2(_param->_size_queue+1),i)+" else '0';"); 54 else 55 vhdl->set_body (0,"out_SLOT_"+toString(i)+"_VAL <= not signal_EMPTY;"); 56 54 vhdl->set_body (0,"signal_SLOT_"+toString(i)+"_VAL <= '1' when reg_NB_ELT > "+std_logic_cst(log2(_param->_size_queue+1),i)+" else '0';"); 55 else 56 vhdl->set_body (0,"signal_SLOT_"+toString(i)+"_VAL <= not signal_EMPTY;"); 57 58 vhdl->set_body (0,"out_SLOT_"+toString(i)+"_VAL <= signal_SLOT_"+toString(i)+"_VAL;"); 59 60 #ifdef SYSTEMC_VHDL_COMPATIBILITY 61 std::string str_val_disable=std_logic_cst(_param->_size_data,0)+" when signal_SLOT_"+toString(i)+"_VAL='0' else"; 62 #endif 57 63 if (_param->_nb_port_slot > 1) 58 vhdl->set_body (0,"out_SLOT_"+toString(i)+"_DATA <= reg_DATA(conv_integer(signal_SLOT_"+toString(i)+"));"); 64 { 65 vhdl->set_body (0,"out_SLOT_"+toString(i)+"_DATA <= "); 66 #ifdef SYSTEMC_VHDL_COMPATIBILITY 67 vhdl->set_body (1,str_val_disable); 68 #endif 69 vhdl->set_body (1,"reg_DATA(conv_integer(signal_SLOT_"+toString(i)+"));"); 70 } 59 71 else 60 72 if (_param->_size_queue > 1) 61 vhdl->set_body (0,"out_SLOT_"+toString(i)+"_DATA <= reg_DATA(conv_integer(signal_PTR_READ));"); 73 { 74 vhdl->set_body (0,"out_SLOT_"+toString(i)+"_DATA <="); 75 #ifdef SYSTEMC_VHDL_COMPATIBILITY 76 vhdl->set_body (1,str_val_disable); 77 #endif 78 vhdl->set_body (1,"reg_DATA(conv_integer(signal_PTR_READ));"); 79 } 62 80 else 63 vhdl->set_body (0,"out_SLOT_"+toString(i)+"_DATA <= reg_DATA(conv_integer(0));"); 81 { 82 vhdl->set_body (0,"out_SLOT_"+toString(i)+"_DATA <="); 83 #ifdef SYSTEMC_VHDL_COMPATIBILITY 84 vhdl->set_body (1,str_val_disable); 85 #endif 86 vhdl->set_body (1,"reg_DATA(conv_integer(0));"); 87 } 64 88 } 65 89 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_vhdl_declaration.cpp
r100 r103 38 38 } 39 39 40 if (_param->_nb_port_slot>0) 41 for (uint32_t i=0; i<_param->_nb_port_slot; ++i) 42 vhdl->set_signal ("signal_SLOT_"+toString(i)+"_VAL", 1); 43 40 44 if (_param->_nb_port_slot>1) 41 45 {
Note: See TracChangeset
for help on using the changeset viewer.