Commit c52316c6 authored by Raymond Knopp's avatar Raymond Knopp

intermediate commit. up to Msg4 ACK and DCI_0_0 reception verified with COTS UE (Quectel).

- first PUSCH containing RRCSetupComplete not programmed for reception in PHY for some reason. DCI_0_0 received by UE.
- if RA fails, on the second attempt there is usually a crash (sometimes in L2_interface.c when getting UE context (added AssertFatal on this now).
parent cc81141c
...@@ -1948,37 +1948,39 @@ void RCconfig_RU(void) ...@@ -1948,37 +1948,39 @@ void RCconfig_RU(void)
if (config_isparamset(RUParamList.paramarray[j], RU_SDR_CLK_SRC)) { if (config_isparamset(RUParamList.paramarray[j], RU_SDR_CLK_SRC)) {
if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "internal") == 0) { if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "internal") == 0) {
RC.ru[j]->openair0_cfg.clock_source = internal; RC.ru[j]->openair0_cfg.clock_source = internal;
LOG_D(PHY, "RU clock source set as internal\n"); LOG_I(PHY, "RU clock source set as internal\n");
} else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "external") == 0) { } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "external") == 0) {
RC.ru[j]->openair0_cfg.clock_source = external; RC.ru[j]->openair0_cfg.clock_source = external;
LOG_D(PHY, "RU clock source set as external\n"); LOG_I(PHY, "RU clock source set as external\n");
} else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "gpsdo") == 0) { } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "gpsdo") == 0) {
RC.ru[j]->openair0_cfg.clock_source = gpsdo; RC.ru[j]->openair0_cfg.clock_source = gpsdo;
LOG_D(PHY, "RU clock source set as gpsdo\n"); LOG_I(PHY, "RU clock source set as gpsdo\n");
} else { } else {
LOG_E(PHY, "Erroneous RU clock source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr)); LOG_E(PHY, "Erroneous RU clock source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr));
} }
} }
else { else {
RC.ru[j]->openair0_cfg.clock_source = unset; LOG_I(PHY,"Setting clock source to internal\n");
RC.ru[j]->openair0_cfg.clock_source = internal;
} }
if (config_isparamset(RUParamList.paramarray[j], RU_SDR_TME_SRC)) { if (config_isparamset(RUParamList.paramarray[j], RU_SDR_TME_SRC)) {
if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "internal") == 0) { if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "internal") == 0) {
RC.ru[j]->openair0_cfg.time_source = internal; RC.ru[j]->openair0_cfg.time_source = internal;
LOG_D(PHY, "RU time source set as internal\n"); LOG_I(PHY, "RU time source set as internal\n");
} else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "external") == 0) { } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "external") == 0) {
RC.ru[j]->openair0_cfg.time_source = external; RC.ru[j]->openair0_cfg.time_source = external;
LOG_D(PHY, "RU time source set as external\n"); LOG_I(PHY, "RU time source set as external\n");
} else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "gpsdo") == 0) { } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "gpsdo") == 0) {
RC.ru[j]->openair0_cfg.time_source = gpsdo; RC.ru[j]->openair0_cfg.time_source = gpsdo;
LOG_D(PHY, "RU time source set as gpsdo\n"); LOG_I(PHY, "RU time source set as gpsdo\n");
} else { } else {
LOG_E(PHY, "Erroneous RU time source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr)); LOG_E(PHY, "Erroneous RU time source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr));
} }
} }
else { else {
RC.ru[j]->openair0_cfg.time_source = unset; LOG_I(PHY,"Setting time source to internal\n");
RC.ru[j]->openair0_cfg.time_source = internal;
} }
if (strcmp(*(RUParamList.paramarray[j][RU_LOCAL_RF_IDX].strptr), "yes") == 0) { if (strcmp(*(RUParamList.paramarray[j][RU_LOCAL_RF_IDX].strptr), "yes") == 0) {
......
...@@ -224,7 +224,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, ...@@ -224,7 +224,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
// x_n contains the sequence r_u_v_alpha_delta(n) // x_n contains the sequence r_u_v_alpha_delta(n)
int n,i,l; int n,i,l;
int prb_offset[2] = {pucch_pdu->prb_start, pucch_pdu->prb_start}; int prb_offset[2] = {pucch_pdu->bwp_start+pucch_pdu->prb_start, pucch_pdu->bwp_start+pucch_pdu->prb_start};
nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,0,slot,&u[0],&v[0]); // calculating u and v value first hop nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,0,slot,&u[0],&v[0]); // calculating u and v value first hop
LOG_I(PHY,"pucch0: u %d, v %d\n",u[0],v[0]); LOG_I(PHY,"pucch0: u %d, v %d\n",u[0],v[0]);
...@@ -233,7 +233,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, ...@@ -233,7 +233,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
if (pucch_pdu->freq_hop_flag == 1) { if (pucch_pdu->freq_hop_flag == 1) {
nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,1,slot,&u[1],&v[1]); // calculating u and v value second hop nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,1,slot,&u[1],&v[1]); // calculating u and v value second hop
LOG_I(PHY,"pucch0 second hop: u %d, v %d\n",u[1],v[1]); LOG_I(PHY,"pucch0 second hop: u %d, v %d\n",u[1],v[1]);
prb_offset[1] = pucch_pdu->second_hop_prb; prb_offset[1] = pucch_pdu->bwp_start+pucch_pdu->second_hop_prb;
} }
AssertFatal(pucch_pdu->nr_of_symbols < 3,"nr_of_symbols %d not allowed\n",pucch_pdu->nr_of_symbols); AssertFatal(pucch_pdu->nr_of_symbols < 3,"nr_of_symbols %d not allowed\n",pucch_pdu->nr_of_symbols);
......
...@@ -249,7 +249,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) { ...@@ -249,7 +249,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
// if all segments are done // if all segments are done
if (rdata->nbSegments == ulsch_harq->processedSegments) { if (rdata->nbSegments == ulsch_harq->processedSegments) {
if (decodeSuccess) { if (decodeSuccess) {
LOG_D(PHY,"[gNB %d] ULSCH: Setting ACK for slot %d TBS %d\n", LOG_I(PHY,"[gNB %d] ULSCH: Setting ACK for slot %d TBS %d\n",
gNB->Mod_id,ulsch_harq->slot,ulsch_harq->TBS); gNB->Mod_id,ulsch_harq->slot,ulsch_harq->TBS);
ulsch_harq->status = SCH_IDLE; ulsch_harq->status = SCH_IDLE;
ulsch_harq->round = 0; ulsch_harq->round = 0;
......
...@@ -1286,6 +1286,7 @@ bool nr_acknack_scheduling(int mod_id, ...@@ -1286,6 +1286,7 @@ bool nr_acknack_scheduling(int mod_id,
/* verify that at that slot and symbol, resources are free. We only do this /* verify that at that slot and symbol, resources are free. We only do this
* for initialCyclicShift 0 (we assume it always has that one), so other * for initialCyclicShift 0 (we assume it always has that one), so other
* initialCyclicShifts can overlap with ICS 0!*/ * initialCyclicShifts can overlap with ICS 0!*/
if (pucch_Config) {
const NR_PUCCH_Resource_t *resource = const NR_PUCCH_Resource_t *resource =
pucch_Config->resourceToAddModList->list.array[pucch_res]; pucch_Config->resourceToAddModList->list.array[pucch_res];
DevAssert(resource->format.present == NR_PUCCH_Resource__format_PR_format0); DevAssert(resource->format.present == NR_PUCCH_Resource__format_PR_format0);
...@@ -1297,6 +1298,7 @@ bool nr_acknack_scheduling(int mod_id, ...@@ -1297,6 +1298,7 @@ bool nr_acknack_scheduling(int mod_id,
symb, resource->startingPRB, pucch->ul_slot); symb, resource->startingPRB, pucch->ul_slot);
vrb_map_UL[resource->startingPRB] |= symb; vrb_map_UL[resource->startingPRB] |= symb;
} }
}
return true; return true;
} }
......
...@@ -452,7 +452,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, ...@@ -452,7 +452,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
T_BUFFER(sduP, sdu_lenP)); T_BUFFER(sduP, sdu_lenP));
UE_info->mac_stats[UE_id].ulsch_total_bytes_rx += sdu_lenP; UE_info->mac_stats[UE_id].ulsch_total_bytes_rx += sdu_lenP;
LOG_D(NR_MAC, "[gNB %d][PUSCH %d] CC_id %d %d.%d Received ULSCH sdu from PHY (rnti %x, UE_id %d) ul_cqi %d sduP %p\n", LOG_I(NR_MAC, "[gNB %d][PUSCH %d] CC_id %d %d.%d Received ULSCH sdu from PHY (rnti %x, UE_id %d) ul_cqi %d sduP %p\n",
gnb_mod_idP, gnb_mod_idP,
harq_pid, harq_pid,
CC_idP, CC_idP,
...@@ -1110,7 +1110,8 @@ void nr_schedule_ulsch(module_id_t module_id, ...@@ -1110,7 +1110,8 @@ void nr_schedule_ulsch(module_id_t module_id,
memset(pusch_pdu, 0, sizeof(nfapi_nr_pusch_pdu_t)); memset(pusch_pdu, 0, sizeof(nfapi_nr_pusch_pdu_t));
future_ul_tti_req->n_pdus += 1; future_ul_tti_req->n_pdus += 1;
LOG_D(MAC, "%4d.%2d Scheduling UE specific PUSCH\n", frame, slot); LOG_I(MAC, "%4d.%2d Scheduling UE specific PUSCH for sched %d.%d, ul_tto_req %d.%d\n", frame, slot,
sched_pusch->frame,sched_pusch->slot,future_ul_tti_req->SFN,future_ul_tti_req->Slot);
pusch_pdu->pdu_bit_map = PUSCH_PDU_BITMAP_PUSCH_DATA; pusch_pdu->pdu_bit_map = PUSCH_PDU_BITMAP_PUSCH_DATA;
pusch_pdu->rnti = rnti; pusch_pdu->rnti = rnti;
......
...@@ -281,6 +281,7 @@ int8_t mac_rrc_nr_data_req(const module_id_t Mod_idP, ...@@ -281,6 +281,7 @@ int8_t mac_rrc_nr_data_req(const module_id_t Mod_idP,
LOG_D(NR_RRC,"[gNB %d] Frame %d CCCH request (Srb_id %ld)\n", Mod_idP, frameP, Srb_id); LOG_D(NR_RRC,"[gNB %d] Frame %d CCCH request (Srb_id %ld)\n", Mod_idP, frameP, Srb_id);
AssertFatal(ue_context_p!=NULL,"failed to get ue_context\n");
char payload_size = ue_context_p->ue_context.Srb0.Tx_buffer.payload_size; char payload_size = ue_context_p->ue_context.Srb0.Tx_buffer.payload_size;
// check if data is there for MAC // check if data is there for MAC
......
...@@ -923,8 +923,8 @@ int trx_usrp_reset_stats(openair0_device *device) { ...@@ -923,8 +923,8 @@ int trx_usrp_reset_stats(openair0_device *device) {
extern "C" { extern "C" {
int device_init(openair0_device *device, openair0_config_t *openair0_cfg) { int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
LOG_D(HW, "openair0_cfg[0].sdr_addrs == '%s'\n", openair0_cfg[0].sdr_addrs); LOG_I(HW, "openair0_cfg[0].sdr_addrs == '%s'\n", openair0_cfg[0].sdr_addrs);
LOG_D(HW, "openair0_cfg[0].clock_source == '%d'\n", openair0_cfg[0].clock_source); LOG_I(HW, "openair0_cfg[0].clock_source == '%d' (internal = %d, external = %d)\n", openair0_cfg[0].clock_source,internal,external);
usrp_state_t *s ; usrp_state_t *s ;
if ( device->priv == NULL) { if ( device->priv == NULL) {
...@@ -1015,15 +1015,15 @@ extern "C" { ...@@ -1015,15 +1015,15 @@ extern "C" {
if (args.find("clock_source")==std::string::npos) { if (args.find("clock_source")==std::string::npos) {
if (openair0_cfg[0].clock_source == internal) { if (openair0_cfg[0].clock_source == internal) {
s->usrp->set_clock_source("internal"); s->usrp->set_clock_source("internal");
LOG_D(HW,"Setting clock source to internal\n"); LOG_I(HW,"Setting clock source to internal\n");
} }
else if (openair0_cfg[0].clock_source == external ) { else if (openair0_cfg[0].clock_source == external ) {
s->usrp->set_clock_source("external"); s->usrp->set_clock_source("external");
LOG_D(HW,"Setting clock source to external\n"); LOG_I(HW,"Setting clock source to external\n");
} }
else if (openair0_cfg[0].clock_source==gpsdo) { else if (openair0_cfg[0].clock_source==gpsdo) {
s->usrp->set_clock_source("gpsdo"); s->usrp->set_clock_source("gpsdo");
LOG_D(HW,"Setting clock source to gpsdo\n"); LOG_I(HW,"Setting clock source to gpsdo\n");
} }
else { else {
LOG_W(HW,"Clock source set neither in usrp_args nor on command line, using default!\n"); LOG_W(HW,"Clock source set neither in usrp_args nor on command line, using default!\n");
...@@ -1038,15 +1038,15 @@ extern "C" { ...@@ -1038,15 +1038,15 @@ extern "C" {
if (args.find("time_source")==std::string::npos) { if (args.find("time_source")==std::string::npos) {
if (openair0_cfg[0].time_source == internal) { if (openair0_cfg[0].time_source == internal) {
s->usrp->set_time_source("internal"); s->usrp->set_time_source("internal");
LOG_D(HW,"Setting time source to internal\n"); LOG_I(HW,"Setting time source to internal\n");
} }
else if (openair0_cfg[0].time_source == external ) { else if (openair0_cfg[0].time_source == external ) {
s->usrp->set_time_source("external"); s->usrp->set_time_source("external");
LOG_D(HW,"Setting time source to external\n"); LOG_I(HW,"Setting time source to external\n");
} }
else if (openair0_cfg[0].time_source==gpsdo) { else if (openair0_cfg[0].time_source==gpsdo) {
s->usrp->set_time_source("gpsdo"); s->usrp->set_time_source("gpsdo");
LOG_D(HW,"Setting time source to gpsdo\n"); LOG_I(HW,"Setting time source to gpsdo\n");
} }
else { else {
LOG_W(HW,"Time source set neither in usrp_args nor on command line, using default!\n"); LOG_W(HW,"Time source set neither in usrp_args nor on command line, using default!\n");
......
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