Merge remote-tracking branch 'origin/ldpc_short_codeword_fixes' into integration_2020_wk51_2
This commit is contained in:
@@ -2131,6 +2131,10 @@ int get_num_dmrs(uint16_t dmrs_mask ) {
|
||||
for (int i=0;i<16;i++) num_dmrs+=((dmrs_mask>>i)&1);
|
||||
return(num_dmrs);
|
||||
}
|
||||
/* returns the total DMRS symbols in a slot*/
|
||||
uint8_t get_num_dmrs_symbols(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols){
|
||||
return get_num_dmrs(fill_dmrs_mask(pdsch_Config,dmrs_TypeA_Position,NrOfSymbols));
|
||||
}
|
||||
|
||||
// Table 5.1.2.2.1-1 38.214
|
||||
uint8_t getRBGSize(uint16_t bwp_size, long rbg_size_config) {
|
||||
|
||||
@@ -191,4 +191,7 @@ bool set_dl_ptrs_values(NR_PTRS_DownlinkConfig_t *ptrs_config,
|
||||
uint8_t *K_ptrs, uint8_t *L_ptrs,uint8_t *portIndex,
|
||||
uint8_t *nERatio,uint8_t *reOffset,
|
||||
uint8_t NrOfSymbols);
|
||||
|
||||
uint8_t get_num_dmrs_symbols(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -171,8 +171,8 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
|
||||
rel15->BWPSize,
|
||||
rel15->BWPStart,
|
||||
rel15->SubcarrierSpacing,
|
||||
rel15->dci_format,
|
||||
rel15->dci_length,
|
||||
rel15->dci_format_options[0],
|
||||
rel15->dci_length_options[0],
|
||||
sps,
|
||||
monitoringSymbolsWithinSlot);
|
||||
#endif
|
||||
@@ -213,9 +213,9 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
|
||||
// check available SS IDs
|
||||
if (pdcch_ConfigCommon->choice.setup->ra_SearchSpace){
|
||||
if (ss->searchSpaceId == *pdcch_ConfigCommon->choice.setup->ra_SearchSpace){
|
||||
LOG_D(MAC, "[DCI_CONFIG] Configure monitoring of PDCCH candidates in Type1-PDCCH common random access search space\n");
|
||||
switch(mac->ra_state){
|
||||
case WAIT_RAR:
|
||||
LOG_D(MAC, "[DCI_CONFIG] Configure monitoring of PDCCH candidates in Type1-PDCCH common random access search space\n");
|
||||
rel15->num_dci_options = 1;
|
||||
rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_0;
|
||||
config_dci_pdu(mac, rel15, dl_config, NR_RNTI_RA, ss_id);
|
||||
|
||||
@@ -1060,7 +1060,7 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
|
||||
num_rbs = table_38213_13_4_c2[index_4msb];
|
||||
num_symbols = table_38213_13_4_c3[index_4msb];
|
||||
rb_offset = table_38213_13_4_c4[index_4msb];
|
||||
LOG_I(MAC,"<<<<<<<<<index_4msb %d num_rbs %d num_symb %d rb_offset %d\n",index_4msb,num_rbs,num_symbols,rb_offset );
|
||||
LOG_D(MAC,"<<<<<<<<<index_4msb %d num_rbs %d num_symb %d rb_offset %d\n",index_4msb,num_rbs,num_symbols,rb_offset );
|
||||
}else if(min_channel_bw & bw_40MHz){
|
||||
AssertFatal(index_4msb < 10, "38.213 Table 13-6 4 MSB out of range\n");
|
||||
mac->type0_pdcch_ss_mux_pattern = 1;
|
||||
@@ -1420,6 +1420,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
// check type0 from 38.213 13 if we have no CellGroupConfig
|
||||
// TODO: implementation to be completed
|
||||
if (mac->scg == NULL) {
|
||||
|
||||
if(dl_info->ssb_index != -1){
|
||||
|
||||
if(mac->type0_pdcch_ss_mux_pattern == 1){
|
||||
@@ -5156,9 +5157,6 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
module_idP, frameP, subframe, buflen);
|
||||
AssertFatal(CC_id == 0,
|
||||
"Transmission on secondary CCs is not supported yet\n");
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&UE_mac_inst[module_idP].tx_ulsch_sdu);
|
||||
#endif
|
||||
|
||||
// Check for DCCH first
|
||||
// TO DO: Multiplex in the order defined by the logical channel prioritization
|
||||
|
||||
@@ -505,6 +505,9 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
|
||||
getN_PRB_DMRS(sched_ctrl->active_bwp, sched_ctrl->numDmrsCdmGrpsNoData);
|
||||
int nrOfSymbols = getNrOfSymbols(sched_ctrl->active_bwp,
|
||||
sched_ctrl->time_domain_allocation);
|
||||
uint8_t N_DMRS_SLOT = get_num_dmrs_symbols(sched_ctrl->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup,
|
||||
RC.nrmac[module_id]->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position ,
|
||||
nrOfSymbols);
|
||||
|
||||
int rbSize = 0;
|
||||
const int oh = 2 + (sched_ctrl->num_total_bytes >= 256)
|
||||
@@ -516,8 +519,7 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
|
||||
nr_get_code_rate_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx),
|
||||
rbSize,
|
||||
nrOfSymbols,
|
||||
N_PRB_DMRS, // FIXME // This should be multiplied by the
|
||||
// number of dmrs symbols
|
||||
N_PRB_DMRS * N_DMRS_SLOT,
|
||||
0 /* N_PRB_oh, 0 for initialBWP */,
|
||||
0 /* tb_scaling */,
|
||||
1 /* nrOfLayers */)
|
||||
@@ -577,13 +579,16 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
|
||||
uint8_t N_PRB_DMRS =
|
||||
getN_PRB_DMRS(sched_ctrl->active_bwp, sched_ctrl->numDmrsCdmGrpsNoData);
|
||||
|
||||
uint8_t N_DMRS_SLOT = get_num_dmrs_symbols(sched_ctrl->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup,
|
||||
RC.nrmac[module_id]->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position ,
|
||||
nrOfSymbols);
|
||||
const uint32_t TBS =
|
||||
nr_compute_tbs(nr_get_Qm_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx),
|
||||
nr_get_code_rate_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx),
|
||||
sched_ctrl->rbSize,
|
||||
nrOfSymbols,
|
||||
N_PRB_DMRS, // FIXME // This should be multiplied by the
|
||||
// number of dmrs symbols
|
||||
N_PRB_DMRS * N_DMRS_SLOT,
|
||||
0 /* N_PRB_oh, 0 for initialBWP */,
|
||||
0 /* tb_scaling */,
|
||||
1 /* nrOfLayers */)
|
||||
|
||||
@@ -108,8 +108,8 @@ int generate_CG_Config(gNB_RRC_INST *rrc,
|
||||
fd = fopen("reconfig.raw","w");
|
||||
if (fd != NULL) {
|
||||
fwrite((void *)buffer,1,(size_t)((enc_rval.encoded+7)>>3),fd);
|
||||
fclose(fd);
|
||||
}
|
||||
fclose(fd);
|
||||
}
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_RadioBearerConfig, NULL, (void *)rbconfig, buffer, 1024);
|
||||
@@ -134,8 +134,8 @@ int generate_CG_Config(gNB_RRC_INST *rrc,
|
||||
fd = fopen("rbconfig.raw","w");
|
||||
if (fd != NULL) {
|
||||
fwrite((void *)buffer,1,(size_t)((enc_rval.encoded+7)>>3),fd);
|
||||
fclose(fd);
|
||||
}
|
||||
fclose(fd);
|
||||
}
|
||||
|
||||
total_size = total_size + ((enc_rval.encoded+7)>>3);
|
||||
|
||||
Reference in New Issue
Block a user