Commit b8b674f4 authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'l1-sidelink' of https://gitlab.eurecom.fr/matzakos/LTE-D2D into l1-sidelink

parents 7e40eaf7 88cfb6a9
......@@ -1036,7 +1036,7 @@ void pscch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
slsch->group_destination_id = (sci_rx_flip>>(63-1-7-5-11-8-RAbits+1))&255;
ue->slcch_received = 1;
ue->slsch_decoded = 0;
//#ifdef DEBUG_SCI_DECODING
#ifdef DEBUG_SCI_DECODING
printf("sci %lx (%d bits,RAbits %d) : freq_hop %d, resource_block_coding %d, time_resource_pattern %d, mcs %d, timing_advance_indication %d, group_destination_id %d (gid shift %d result %lx => %lx\n",
sci_rx_flip,length,RAbits,
slsch->freq_hopping_flag,
......@@ -1049,7 +1049,7 @@ void pscch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
(sci_rx_flip>>(63-1-7-5-11-8-RAbits+1)),
(sci_rx_flip>>(63-1-7-5-11-8-RAbits+1))&255
);
//#endif
#endif
// check group_id here (not done yet)
ue->slsch_rx_sdu_active=1;
/*
......
......@@ -3443,7 +3443,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
int sdu_length;
//uint8_t sl_lcids[2] = {3, 10}; //list of lcids for SL - hardcoded
int i = 0;
int mcs=10;
int mcs=16;
int L_CRBs=10;
int RB_start=0;
// Note: this is hard-coded for now for the default SL configuration (4 SF PSCCH, 36 SF PSSCH)
......@@ -3561,8 +3561,9 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
if (slsch_test == 1 && rlc_status.bytes_in_buffer < 2) rlc_status.bytes_in_buffer = 300;
if (TBS <= rlc_status.bytes_in_buffer) req = TBS;
else req = rlc_status.bytes_in_buffer;
// + 2 to account for the fact that RLC doesn't add the header in the status indication for UE (BSR usage, must be different for SL, to be validated)
if (TBS <= rlc_status.bytes_in_buffer+2) req = TBS;
else req = rlc_status.bytes_in_buffer+2;
if (req>0) {
sdu_length = mac_rlc_data_req(module_idP,
......
......@@ -189,7 +189,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
#endif /* defined(ENABLE_USE_MME) */
#ifdef PDCP_DEBUG
LOG_I(PDCP, "PDCP->IP TTI %d INST %d: Preparing %d Bytes of data from rab %d to Nas_mesh\n",
LOG_D(PDCP, "PDCP->IP TTI %d INST %d: Preparing %d Bytes of data from rab %d to Nas_mesh\n",
ctxt_pP->frame, ((pdcp_data_ind_header_t *)(sdu_p->data))->inst,
((pdcp_data_ind_header_t *)(sdu_p->data))->data_size, ((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id);
#endif //PDCP_DEBUG
......@@ -250,7 +250,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
#endif //PDCP_USE_RT_FIFO
#ifdef PDCP_DEBUG
LOG_I(PDCP, "Frame %d Sent %d Bytes of header to Nas_mesh\n",
LOG_D(PDCP, "Frame %d Sent %d Bytes of header to Nas_mesh\n",
ctxt_pP->frame,
bytes_wrote);
#endif //PDCP_DEBUG
......@@ -307,7 +307,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
#endif // PDCP_USE_RT_FIFO
#ifdef PDCP_DEBUG
LOG_I(PDCP, "PDCP->IP Frame %d INST %d: Sent %d Bytes of data from rab %d to higher layers\n",
LOG_D(PDCP, "PDCP->IP Frame %d INST %d: Sent %d Bytes of data from rab %d to higher layers\n",
ctxt_pP->frame,
((pdcp_data_ind_header_t *)(sdu_p->data))->inst,
bytes_wrote,
......
......@@ -21,6 +21,8 @@
#define RLC_UM_MODULE 1
#define RLC_UM_C 1
#define TRACE_RLC_UM_TX_STATUS 1
#define TRACE_RLC_UM_PDU 1
//#define TRACE_RLC_UM_PDU 1
//-----------------------------------------------------------------------------
//#include "rtos_header.h"
......@@ -371,6 +373,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
# else
LOG_T(RLC, "%s", message_string);
# endif // ENABLE_ITTI
LOG_D(RLC,"%s", message_string);
#endif // TRACE_RLC_UM_PDU
tb_p = tb_p->next;
......@@ -534,19 +537,19 @@ rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP
if ((((rlc_um_entity_t *) rlc_pP)->rb_id > 0) && (status_resp.buffer_occupancy_in_bytes > 0)) {
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" MAC_STATUS_INDICATION (DATA) %d bytes requested -> %d bytes available\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,((rlc_um_entity_t *)rlc_pP)),
tbs_sizeP,
status_resp.buffer_occupancy_in_bytes);
if ((tx_statusP.tx_status == MAC_TX_STATUS_SUCCESSFUL) && (tx_statusP.no_pdu)) {
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" MAC_STATUS_INDICATION TX STATUS SUCCESSFUL %d PDUs\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,((rlc_um_entity_t *)rlc_pP)),
tx_statusP.no_pdu);
}
if ((tx_statusP.tx_status == MAC_TX_STATUS_UNSUCCESSFUL) && (tx_statusP.no_pdu)) {
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" MAC_STATUS_INDICATION TX STATUS UNSUCCESSFUL %d PDUs\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,((rlc_um_entity_t *)rlc_pP)),
tx_statusP.no_pdu);
}
}
......@@ -833,6 +836,7 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t
#endif
*/
# endif
RLC_UM_MUTEX_LOCK(&rlc_p->lock_input_sdus, ctxt_pP, rlc_p);
rlc_p->buffer_occupancy += ((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_size;
list_add_tail_eurecom(sdu_pP, &rlc_p->input_sdus);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment