Merge remote-tracking branch 'origin/nr_pdsch_debug' into fix-frame-rx-and-memory
Conflicts: openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
This commit is contained in:
@@ -186,8 +186,8 @@ int8_t nr_ue_process_dlsch(module_id_t module_id, int cc_id, uint8_t gNB_index,
|
||||
ul_config->ul_config_list[ul_config->number_pdus].pucch_config_pdu.twoPUCCH_PC_AdjustmentStates = 0;
|
||||
|
||||
}
|
||||
if(mac->if_module != NULL && mac->if_module->ul_indication != NULL){
|
||||
mac->if_module->dl_indication(&mac->scheduled_response);
|
||||
if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL){
|
||||
mac->if_module->scheduled_response(&mac->scheduled_response);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1283,10 +1283,11 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fa
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
||||
fapi_nr_dl_config_request_t *dl_config = &mac->dl_config_request;
|
||||
fapi_nr_ul_config_request_t *ul_config = &mac->ul_config_request;
|
||||
|
||||
const uint16_t n_RB_ULBWP = 106;
|
||||
const uint16_t n_RB_DLBWP = 106;
|
||||
|
||||
printf("\n>>> nr_ue_process_dci at MAC layer with dci_format=%d\n",dci_format);
|
||||
printf("\n>>> nr_ue_process_dci at MAC layer with dci_format=%d\n",dci_format);
|
||||
|
||||
switch(dci_format){
|
||||
case format0_0:
|
||||
@@ -1743,8 +1744,6 @@ printf("\n>>> nr_ue_process_dci at MAC layer with dci_format=%d\n",dci_format);
|
||||
/* PDSCH_TO_HARQ_FEEDBACK_TIME_IND (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI)*/
|
||||
dlsch_config_pdu_1_0->pdsch_to_harq_feedback_time_ind = dci->pdsch_to_harq_feedback_time_ind;
|
||||
|
||||
dl_config->number_pdus = dl_config->number_pdus + 1;
|
||||
|
||||
printf("\n>>> (nr_ue_procedures.c) rnti=%d dl_config->number_pdus=%d\n",
|
||||
dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti,
|
||||
dl_config->number_pdus);
|
||||
@@ -1772,14 +1771,7 @@ printf("\n>>> nr_ue_process_dci at MAC layer with dci_format=%d\n",dci_format);
|
||||
|
||||
printf(">>> (nr_ue_procedures.c) pdu_type=%d\n\n",dl_config->dl_config_list[dl_config->number_pdus].pdu_type);
|
||||
|
||||
if(mac->if_module != NULL && mac->if_module->dl_indication != NULL)
|
||||
//printf(">>> mac->if_module->dl_indication(&mac->phy_config); \n");
|
||||
//for (int k=0;k<1000;k++) printf(">>> %d ",k);
|
||||
//mac->if_module->dl_indication(&mac->dl_info);
|
||||
//mac->if_module->dl_indication(&mac->dl_config_request);
|
||||
mac->if_module->dl_indication(&mac->phy_config);
|
||||
|
||||
|
||||
dl_config->number_pdus = dl_config->number_pdus + 1;
|
||||
break;
|
||||
|
||||
case format1_1:
|
||||
@@ -1961,14 +1953,12 @@ printf("\n>>> nr_ue_process_dci at MAC layer with dci_format=%d\n",dci_format);
|
||||
/* DMRS_SEQ_INI */
|
||||
//FIXME!!!
|
||||
|
||||
dl_config->number_pdus = dl_config->number_pdus + 1;
|
||||
|
||||
dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH;
|
||||
printf(">>> (nr_ue_procedures.c) pdu_type=%d\n\n",dl_config->dl_config_list[dl_config->number_pdus].pdu_type);
|
||||
|
||||
if(mac->if_module != NULL && mac->if_module->dl_indication != NULL)
|
||||
mac->if_module->dl_indication(&mac->phy_config);
|
||||
|
||||
dl_config->number_pdus = dl_config->number_pdus + 1;
|
||||
|
||||
break;
|
||||
|
||||
case format2_0:
|
||||
@@ -1988,7 +1978,6 @@ printf("\n>>> nr_ue_process_dci at MAC layer with dci_format=%d\n",dci_format);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(rnti == SI_RNTI){
|
||||
|
||||
}else if(rnti == mac->ra_rnti){
|
||||
|
||||
@@ -385,19 +385,18 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
|
||||
// Note: This should not be done in the MAC!
|
||||
for (int ii=0; ii<MAX_MOBILES_PER_GNB; ii++) {
|
||||
LTE_eNB_ULSCH_t *ulsch = RC.gNB[module_idP][CC_id]->ulsch[ii];
|
||||
NR_gNB_ULSCH_t *ulsch = RC.gNB[module_idP][CC_id]->ulsch[ii][0];
|
||||
if((ulsch != NULL) && (ulsch->rnti == rnti)){
|
||||
LOG_I(MAC, "clean_eNb_ulsch UE %x \n", rnti);
|
||||
clean_eNb_ulsch(ulsch);
|
||||
LOG_W(MAC, "TODO: clean_eNb_ulsch UE %x \n", rnti);
|
||||
//clean_eNb_ulsch(ulsch);
|
||||
}
|
||||
}
|
||||
|
||||
for (int ii=0; ii<MAX_MOBILES_PER_GNB; ii++) {
|
||||
NR_gNB_DLSCH_t *dlsch = RC.gNB[module_idP][CC_id]->dlsch[ii][0];
|
||||
if((dlsch != NULL) && (dlsch->rnti == rnti)){
|
||||
LOG_I(MAC, "clean_eNb_dlsch UE %x \n", rnti);
|
||||
LOG_E(PHY,"Calling with wrong paramter type\n");
|
||||
clean_eNb_dlsch(dlsch);
|
||||
LOG_W(MAC, "TODO: clean_eNb_dlsch UE %x \n", rnti);
|
||||
//clean_eNb_dlsch(dlsch);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +67,10 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP);
|
||||
|
||||
void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t slotP);
|
||||
|
||||
|
||||
void nr_configure_css_dci_initial(nfapi_nr_dl_config_pdcch_parameters_rel15_t* pdcch_params,
|
||||
nr_scs_e scs_common,
|
||||
@@ -108,4 +112,14 @@ uint64_t from_nrarfcn(int nr_bandP, uint32_t dl_nrarfcn);
|
||||
|
||||
uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint32_t bw);
|
||||
|
||||
void config_nr_mib(int Mod_idP,
|
||||
int CC_idP,
|
||||
int p_gNBP,
|
||||
int subCarrierSpacingCommon,
|
||||
uint32_t ssb_SubcarrierOffset,
|
||||
int dmrs_TypeA_Position,
|
||||
uint32_t pdcch_ConfigSIB1,
|
||||
int cellBarred,
|
||||
int intraFreqReselection);
|
||||
|
||||
#endif /*__LAYER2_NR_MAC_PROTO_H__*/
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "mac_proto.h"
|
||||
#include "assertions.h"
|
||||
#include "LAYER2/NR_MAC_UE/mac_extern.h"
|
||||
#include "SCHED_NR_UE/fapi_nr_ue_l1.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -127,16 +128,26 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info){
|
||||
uint32_t ret_mask = 0x0;
|
||||
module_id_t module_id = dl_info->module_id;
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
||||
fapi_nr_dl_config_request_t *dl_config = &mac->dl_config_request;
|
||||
fapi_nr_ul_config_request_t *ul_config = &mac->ul_config_request;
|
||||
|
||||
// clean up scheduled_response structure
|
||||
|
||||
dl_config->number_pdus = 0;
|
||||
ul_config->number_pdus = 0;
|
||||
//hook up pointers
|
||||
mac->scheduled_response.dl_config = dl_config;
|
||||
mac->scheduled_response.ul_config = ul_config;
|
||||
mac->scheduled_response.tx_request = &mac->tx_request;
|
||||
mac->scheduled_response.module_id = dl_info->module_id;
|
||||
mac->scheduled_response.CC_id = dl_info->cc_id;
|
||||
mac->scheduled_response.frame = dl_info->frame;
|
||||
mac->scheduled_response.slot = dl_info->slot;
|
||||
|
||||
if(dl_info->dci_ind != NULL){
|
||||
printf("[L2][IF MODULE][DL INDICATION][DCI_IND]\n");
|
||||
for(i=0; i<dl_info->dci_ind->number_of_dcis; ++i){
|
||||
printf(">>>NR_IF_Module i=%d, dl_info->dci_ind->number_of_dcis=%d\n",i,dl_info->dci_ind->number_of_dcis);
|
||||
fapi_nr_dci_pdu_rel15_t *dci = &dl_info->dci_ind->dci_list[i].dci;
|
||||
/*
|
||||
|
||||
ret_mask |= (handle_dci(
|
||||
dl_info->module_id,
|
||||
dl_info->cc_id,
|
||||
@@ -144,7 +155,7 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info){
|
||||
dci,
|
||||
(dl_info->dci_ind->dci_list+i)->rnti,
|
||||
(dl_info->dci_ind->dci_list+i)->dci_format)) << FAPI_NR_DCI_IND;
|
||||
*/
|
||||
|
||||
|
||||
/*switch((dl_info->dci_ind->dci_list+i)->dci_type){
|
||||
case FAPI_NR_DCI_TYPE_0_0:
|
||||
@@ -246,8 +257,8 @@ nr_ue_if_module_t *nr_ue_if_module_init(uint32_t module_id){
|
||||
nr_ue_if_module_inst[module_id]->cc_mask=0;
|
||||
nr_ue_if_module_inst[module_id]->current_frame = 0;
|
||||
nr_ue_if_module_inst[module_id]->current_slot = 0;
|
||||
nr_ue_if_module_inst[module_id]->phy_config_request = NULL;
|
||||
nr_ue_if_module_inst[module_id]->scheduled_response = NULL;
|
||||
nr_ue_if_module_inst[module_id]->phy_config_request = nr_ue_phy_config_request;
|
||||
nr_ue_if_module_inst[module_id]->scheduled_response = nr_ue_scheduled_response;
|
||||
nr_ue_if_module_inst[module_id]->dl_indication = nr_ue_dl_indication;
|
||||
nr_ue_if_module_inst[module_id]->ul_indication = nr_ue_ul_indication;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user