Minor improvements and LOG updates
This commit is contained in:
@@ -875,7 +875,6 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
|||||||
fill_default_coresetZero(nr_mac->sched_ctrlCommon->coreset,cc->ServingCellConfigCommon);
|
fill_default_coresetZero(nr_mac->sched_ctrlCommon->coreset,cc->ServingCellConfigCommon);
|
||||||
fill_default_initialDownlinkBWP(nr_mac->sched_ctrlCommon->active_bwp,cc->ServingCellConfigCommon);
|
fill_default_initialDownlinkBWP(nr_mac->sched_ctrlCommon->active_bwp,cc->ServingCellConfigCommon);
|
||||||
}
|
}
|
||||||
nr_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL;
|
|
||||||
|
|
||||||
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
||||||
long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
|
long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
|
||||||
@@ -1018,7 +1017,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
|||||||
pdsch_pdu_rel15->VRBtoPRBMapping = 0;
|
pdsch_pdu_rel15->VRBtoPRBMapping = 0;
|
||||||
pdsch_pdu_rel15->StartSymbolIndex = startSymbolIndex;
|
pdsch_pdu_rel15->StartSymbolIndex = startSymbolIndex;
|
||||||
pdsch_pdu_rel15->NrOfSymbols = nrOfSymbols;
|
pdsch_pdu_rel15->NrOfSymbols = nrOfSymbols;
|
||||||
pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(nr_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup,
|
pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(NULL,
|
||||||
nr_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position,
|
nr_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position,
|
||||||
nrOfSymbols,
|
nrOfSymbols,
|
||||||
startSymbolIndex);
|
startSymbolIndex);
|
||||||
@@ -1172,7 +1171,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
|||||||
SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols);
|
SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols);
|
||||||
AssertFatal(startSymbolIndex >= 0, "StartSymbolIndex is negative\n");
|
AssertFatal(startSymbolIndex >= 0, "StartSymbolIndex is negative\n");
|
||||||
|
|
||||||
uint16_t dlDmrsSymbPos = fill_dmrs_mask(nr_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup,
|
uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL,
|
||||||
nr_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position,
|
nr_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position,
|
||||||
nrOfSymbols,
|
nrOfSymbols,
|
||||||
startSymbolIndex);
|
startSymbolIndex);
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP,
|
|||||||
// get MIB every 8 frames
|
// get MIB every 8 frames
|
||||||
if((slotP == 0) && (frameP & 7) == 0) {
|
if((slotP == 0) && (frameP & 7) == 0) {
|
||||||
|
|
||||||
mib_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, MIBCH, 1, &cc->MIB_pdu.payload[0]);
|
mib_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, MIBCH, 0, 1, &cc->MIB_pdu.payload[0]);
|
||||||
|
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
"[gNB %d] Frame %d : MIB->BCH CC_id %d, Received %d bytes\n",
|
"[gNB %d] Frame %d : MIB->BCH CC_id %d, Received %d bytes\n",
|
||||||
@@ -540,8 +540,6 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
|
|||||||
|
|
||||||
void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) {
|
void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) {
|
||||||
|
|
||||||
LOG_D(MAC,"Schedule_nr_sib1: frameP = %i, slotP = %i\n", frameP, slotP);
|
|
||||||
|
|
||||||
// TODO: Get these values from RRC
|
// TODO: Get these values from RRC
|
||||||
const int CC_id = 0;
|
const int CC_id = 0;
|
||||||
int time_domain_allocation = 0;
|
int time_domain_allocation = 0;
|
||||||
@@ -577,14 +575,14 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
|
|||||||
(type0_PDCCH_CSS_config->num_rbs > 0) &&
|
(type0_PDCCH_CSS_config->num_rbs > 0) &&
|
||||||
(type0_PDCCH_CSS_config->active == true)) {
|
(type0_PDCCH_CSS_config->active == true)) {
|
||||||
|
|
||||||
LOG_D(MAC,"> SIB1 transmission\n");
|
LOG_D(NR_MAC,"(%d.%d) SIB1 transmission: ssb_index %d\n", frameP, slotP, type0_PDCCH_CSS_config->ssb_index);
|
||||||
|
|
||||||
// Get SIB1
|
// Get SIB1
|
||||||
uint8_t sib1_payload[NR_MAX_SIB_LENGTH/8];
|
uint8_t sib1_payload[NR_MAX_SIB_LENGTH/8];
|
||||||
uint8_t sib1_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, BCCH, 1, sib1_payload);
|
uint8_t sib1_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, BCCH, SI_RNTI, 1, sib1_payload);
|
||||||
LOG_D(MAC,"sib1_sdu_length = %i\n", sib1_sdu_length);
|
LOG_D(NR_MAC,"sib1_sdu_length = %i\n", sib1_sdu_length);
|
||||||
LOG_D(MAC,"SIB1: \n");
|
LOG_D(NR_MAC,"SIB1: \n");
|
||||||
for (int i=0;i<sib1_sdu_length;i++) LOG_D(MAC,"byte %d : %x\n",i,((uint8_t*)sib1_payload)[i]);
|
for (int k=0;k<sib1_sdu_length;k++) LOG_D(NR_MAC,"byte %d : %x\n",k,((uint8_t*)sib1_payload)[k]);
|
||||||
|
|
||||||
// Configure sched_ctrlCommon for SIB1
|
// Configure sched_ctrlCommon for SIB1
|
||||||
schedule_control_sib1(module_idP, CC_id, type0_PDCCH_CSS_config, time_domain_allocation, mcsTableIdx, mcs, candidate_idx, sib1_sdu_length);
|
schedule_control_sib1(module_idP, CC_id, type0_PDCCH_CSS_config, time_domain_allocation, mcsTableIdx, mcs, candidate_idx, sib1_sdu_length);
|
||||||
|
|||||||
Reference in New Issue
Block a user