Commit 0bb524f0 authored by Raymond Knopp's avatar Raymond Knopp

Small modification for received SCI filtering

parent 6feb5ade
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
extern int extern int
multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP); multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP);
extern uint8_t D2D_en; extern uint8_t D2D_en;
extern UE_MAC_INST *UE_mac_inst;
void ulsch_channel_level(int32_t **drs_ch_estimates_ext, LTE_DL_FRAME_PARMS *frame_parms, int32_t *avg, uint16_t nb_rb, int symbol_offset); void ulsch_channel_level(int32_t **drs_ch_estimates_ext, LTE_DL_FRAME_PARMS *frame_parms, int32_t *avg, uint16_t nb_rb, int symbol_offset);
void ulsch_extract_rbs_single(int32_t **rxdataF, void ulsch_extract_rbs_single(int32_t **rxdataF,
...@@ -1084,7 +1085,22 @@ void pscch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra ...@@ -1084,7 +1085,22 @@ void pscch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
slsch->mcs = (sci_rx_flip>>(63-1-7-5-RAbits+1))&31; slsch->mcs = (sci_rx_flip>>(63-1-7-5-RAbits+1))&31;
slsch->timing_advance_indication = (sci_rx_flip>>(63-1-7-5-11-RAbits+1))&2047; slsch->timing_advance_indication = (sci_rx_flip>>(63-1-7-5-11-RAbits+1))&2047;
slsch->group_destination_id = (sci_rx_flip>>(63-1-7-5-11-8-RAbits+1))&255; slsch->group_destination_id = (sci_rx_flip>>(63-1-7-5-11-8-RAbits+1))&255;
uint8_t group_id_found = 0;
for (int j = 0; j< MAX_NUM_LCID; j++){
//PC5-S (default RX)
if (UE_mac_inst[ue->Mod_id].sl_info[j].groupL2Id == slsch->group_destination_id) {
group_id_found = 1;
break;
}
}
//if(slsch->group_destination_id == UE_mac_inst[ue->Mod_id].groupL2Id || slsch->group_destination_id == UE_mac_inst[ue->Mod_id].sourceL2Id)
if(slsch->mcs<=20 && slsch->freq_hopping_flag==0 && (group_id_found|| slsch->group_destination_id == UE_mac_inst[ue->Mod_id].sourceL2Id))
ue->slcch_received = 1; ue->slcch_received = 1;
else
ue->slcch_received = 0;
//ue->slcch_received = 1;
ue->slsch_decoded = 0; ue->slsch_decoded = 0;
#ifdef DEBUG_SCI_DECODING #ifdef DEBUG_SCI_DECODING
printf("%d.%d 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", printf("%d.%d 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",
......
...@@ -643,7 +643,7 @@ ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP, ...@@ -643,7 +643,7 @@ ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
0); 0);
} }
else { else {
LOG_I(MAC, "[UE %d] Frame %d Sending MIBSL to RRC (LCID Id %d,len %d) : %x.%x.%x.%x.%x\n", LOG_D(MAC, "[UE %d] Frame %d Sending MIBSL to RRC (LCID Id %d,len %d) : %x.%x.%x.%x.%x\n",
module_idP, frameP, MIBSLCH, 5, slss->slmib[0],slss->slmib[1],slss->slmib[2],slss->slmib[3],slss->slmib[4]); module_idP, frameP, MIBSLCH, 5, slss->slmib[0],slss->slmib[1],slss->slmib[2],slss->slmib[3],slss->slmib[4]);
mac_rrc_data_ind_ue(module_idP, CC_id, frameP, 0, // unknown subframe mac_rrc_data_ind_ue(module_idP, CC_id, frameP, 0, // unknown subframe
...@@ -653,7 +653,7 @@ ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP, ...@@ -653,7 +653,7 @@ ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
// copy frame/subframe // copy frame/subframe
*frame = UE_mac_inst[module_idP].directFrameNumber_r12; *frame = UE_mac_inst[module_idP].directFrameNumber_r12;
*subframe = UE_mac_inst[module_idP].directSubframeNumber_r12; *subframe = UE_mac_inst[module_idP].directSubframeNumber_r12;
LOG_I(MAC,"SL: Resetting SF.SFN to %d.%d\n",*frame,*subframe); LOG_D(MAC,"SL: Resetting SF.SFN to %d.%d\n",*frame,*subframe);
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_OUT); (VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_OUT);
...@@ -921,6 +921,7 @@ void ue_send_sl_sdu(module_id_t module_idP, ...@@ -921,6 +921,7 @@ void ue_send_sl_sdu(module_id_t module_idP,
break; break;
} }
//LOG_I(MAC, "MAX_NUM_LCID: %d, MAX_NUM_LCID_DATA: %d, ")
for (j = 0; j< MAX_NUM_LCID; j++){ for (j = 0; j< MAX_NUM_LCID; j++){
if ((longh->LCID < MAX_NUM_LCID_DATA) && (j < MAX_NUM_LCID_DATA)){ if ((longh->LCID < MAX_NUM_LCID_DATA) && (j < MAX_NUM_LCID_DATA)){
if ((UE_mac_inst[module_idP].sl_info[j].destinationL2Id == sourceL2Id) && (UE_mac_inst[module_idP].sl_info[j].sourceL2Id == destinationL2Id)) { if ((UE_mac_inst[module_idP].sl_info[j].destinationL2Id == sourceL2Id) && (UE_mac_inst[module_idP].sl_info[j].sourceL2Id == destinationL2Id)) {
......
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