Commit c89b5f2f authored by Raymond Knopp's avatar Raymond Knopp

changed DCI candidates to 4 for initialDownlinkBWP ue-specific searchSpace....

changed DCI candidates to 4 for initialDownlinkBWP ue-specific searchSpace. ulsch/pusch stats added to nrL1stats.log
parent 5f0e2e74
...@@ -114,7 +114,6 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int first_symb,int num_symb) { ...@@ -114,7 +114,6 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int first_symb,int num_symb) {
nb_rb = 0; nb_rb = 0;
n0_power_tot2=0; n0_power_tot2=0;
for (rb=0; rb<frame_parms->N_RB_UL; rb++) { for (rb=0; rb<frame_parms->N_RB_UL; rb++) {
n0_power_tot=0; n0_power_tot=0;
offset0 = (frame_parms->first_carrier_offset + (rb*12))%frame_parms->ofdm_symbol_size; offset0 = (frame_parms->first_carrier_offset + (rb*12))%frame_parms->ofdm_symbol_size;
...@@ -137,7 +136,6 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int first_symb,int num_symb) { ...@@ -137,7 +136,6 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int first_symb,int num_symb) {
measurements->n0_subband_power[aarx][rb]/=num_symb; measurements->n0_subband_power[aarx][rb]/=num_symb;
measurements->n0_subband_power_dB[aarx][rb] = dB_fixed(measurements->n0_subband_power[aarx][rb]); measurements->n0_subband_power_dB[aarx][rb] = dB_fixed(measurements->n0_subband_power[aarx][rb]);
n0_power_tot += measurements->n0_subband_power[aarx][rb]; n0_power_tot += measurements->n0_subband_power[aarx][rb];
} //antenna } //antenna
n0_power_tot/=frame_parms->nb_antennas_rx; n0_power_tot/=frame_parms->nb_antennas_rx;
n0_power_tot2 += n0_power_tot; n0_power_tot2 += n0_power_tot;
......
...@@ -164,6 +164,7 @@ void dump_pusch_stats(FILE *fd,PHY_VARS_gNB *gNB) { ...@@ -164,6 +164,7 @@ void dump_pusch_stats(FILE *fd,PHY_VARS_gNB *gNB) {
gNB->ulsch_stats[i].total_bytes_rx, gNB->ulsch_stats[i].total_bytes_rx,
gNB->ulsch_stats[i].total_bytes_tx); gNB->ulsch_stats[i].total_bytes_tx);
} }
fprintf(fd,"%s",output);
} }
void clear_pusch_stats(PHY_VARS_gNB *gNB) { void clear_pusch_stats(PHY_VARS_gNB *gNB) {
......
...@@ -1226,11 +1226,10 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB, ...@@ -1226,11 +1226,10 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
gNB->pusch_vars[ulsch_id]->ulsch_noise_power[aarx]=0; gNB->pusch_vars[ulsch_id]->ulsch_noise_power[aarx]=0;
} }
gNB->pusch_vars[ulsch_id]->ulsch_power[aarx] += signal_energy_nodc(&gNB->pusch_vars[ulsch_id]->ul_ch_estimates[aarx][symbol*frame_parms->ofdm_symbol_size], gNB->pusch_vars[ulsch_id]->ulsch_power[aarx] += signal_energy_nodc(&gNB->pusch_vars[ulsch_id]->ul_ch_estimates[aarx][symbol*frame_parms->ofdm_symbol_size],
rel15_ul->rb_size*12)/num_symb; rel15_ul->rb_size*12);
if (gNB->pusch_vars[ulsch_id]->ulsch_power[aarx]==1) return (1); if (gNB->pusch_vars[ulsch_id]->ulsch_power[aarx]==1) return (1);
for (int rb=0;rb<rel15_ul->rb_size;rb++) { for (int rb=0;rb<rel15_ul->rb_size;rb++) {
printf("aarx %d symbol %d, rb %d => %d\n",aarx,symbol,rb,dB_fixed(gNB->measurements.n0_subband_power[aarx][rel15_ul->bwp_start+rel15_ul->rb_start+rb])); gNB->pusch_vars[ulsch_id]->ulsch_noise_power[aarx]+=gNB->measurements.n0_subband_power[aarx][rel15_ul->bwp_start+rel15_ul->rb_start+rb]/rel15_ul->rb_size;
gNB->pusch_vars[ulsch_id]->ulsch_noise_power[aarx]+=gNB->measurements.n0_subband_power[aarx][rel15_ul->bwp_start+rel15_ul->rb_start+rb]/rel15_ul->rb_size/num_symb;
} }
} }
} }
......
...@@ -451,7 +451,7 @@ void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { ...@@ -451,7 +451,7 @@ void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
if ((symbol>=pucch_pdu->start_symbol_index) && if ((symbol>=pucch_pdu->start_symbol_index) &&
(symbol<(pucch_pdu->start_symbol_index + pucch_pdu->nr_of_symbols))){ (symbol<(pucch_pdu->start_symbol_index + pucch_pdu->nr_of_symbols))){
for (rb=0; rb<pucch_pdu->prb_size; rb++) { for (rb=0; rb<pucch_pdu->prb_size; rb++) {
rb2 = rb+pucch_pdu->prb_start; rb2 = rb+pucch_pdu->prb_start+pucch_pdu->bwp_start;
gNB->rb_mask_ul[rb2>>5] |= (1<<(rb2&31)); gNB->rb_mask_ul[rb2>>5] |= (1<<(rb2&31));
} }
nb_rb+=pucch_pdu->prb_size; nb_rb+=pucch_pdu->prb_size;
...@@ -479,7 +479,7 @@ void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { ...@@ -479,7 +479,7 @@ void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
if ((symbol>=symbol_start) && if ((symbol>=symbol_start) &&
(symbol<symbol_end)){ (symbol<symbol_end)){
for (rb=0; rb<ulsch_harq->ulsch_pdu.rb_size; rb++) { for (rb=0; rb<ulsch_harq->ulsch_pdu.rb_size; rb++) {
rb2 = rb+ulsch_harq->ulsch_pdu.rb_start; rb2 = rb+ulsch_harq->ulsch_pdu.rb_start+ulsch_harq->ulsch_pdu.bwp_start;
gNB->rb_mask_ul[rb2>>5] |= (1<<(rb2&31)); gNB->rb_mask_ul[rb2>>5] |= (1<<(rb2&31));
} }
nb_rb+=ulsch_harq->ulsch_pdu.rb_size; nb_rb+=ulsch_harq->ulsch_pdu.rb_size;
...@@ -541,8 +541,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) ...@@ -541,8 +541,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
num_symb++; num_symb++;
} }
} }
else num_symb=14; else num_symb=NR_NUMBER_OF_SYMBOLS_PER_SLOT;
gNB_I0_measurements(gNB,first_symb,num_symb); gNB_I0_measurements(gNB,first_symb,num_symb);
int offset = 10*gNB->frame_parms.ofdm_symbol_size + gNB->frame_parms.first_carrier_offset; int offset = 10*gNB->frame_parms.ofdm_symbol_size + gNB->frame_parms.first_carrier_offset;
...@@ -622,6 +621,9 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) ...@@ -622,6 +621,9 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
LOG_D(PHY, "PUSCH detection started in frame %d slot %d\n", LOG_D(PHY, "PUSCH detection started in frame %d slot %d\n",
frame_rx,slot_rx); frame_rx,slot_rx);
int num_dmrs=0;
for (int s=0;s<NR_NUMBER_OF_SYMBOLS_PER_SLOT; s++)
num_dmrs+=(ulsch_harq->ulsch_pdu.ul_dmrs_symb_pos>>s)&1;
#ifdef DEBUG_RXDATA #ifdef DEBUG_RXDATA
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms; NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
...@@ -661,6 +663,10 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) ...@@ -661,6 +663,10 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
return; return;
} }
} }
for (int aarx=0;aarx<gNB->frame_parms.nb_antennas_rx;aarx++) {
gNB->pusch_vars[ULSCH_id]->ulsch_power[aarx]/=num_dmrs;
gNB->pusch_vars[ULSCH_id]->ulsch_noise_power[aarx]/=num_dmrs;
}
stop_meas(&gNB->rx_pusch_stats); stop_meas(&gNB->rx_pusch_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,0);
//LOG_M("rxdataF_comp.m","rxF_comp",gNB->pusch_vars[0]->rxdataF_comp[0],6900,1,1); //LOG_M("rxdataF_comp.m","rxF_comp",gNB->pusch_vars[0]->rxdataF_comp[0],6900,1,1);
......
...@@ -444,7 +444,7 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier, ...@@ -444,7 +444,7 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
ss1->nrofCandidates = calloc(1,sizeof(*ss1->nrofCandidates)); ss1->nrofCandidates = calloc(1,sizeof(*ss1->nrofCandidates));
ss1->nrofCandidates->aggregationLevel1 = NR_SearchSpace__nrofCandidates__aggregationLevel1_n0; ss1->nrofCandidates->aggregationLevel1 = NR_SearchSpace__nrofCandidates__aggregationLevel1_n0;
ss1->nrofCandidates->aggregationLevel2 = NR_SearchSpace__nrofCandidates__aggregationLevel2_n0; ss1->nrofCandidates->aggregationLevel2 = NR_SearchSpace__nrofCandidates__aggregationLevel2_n0;
ss1->nrofCandidates->aggregationLevel4 = NR_SearchSpace__nrofCandidates__aggregationLevel4_n1; ss1->nrofCandidates->aggregationLevel4 = NR_SearchSpace__nrofCandidates__aggregationLevel4_n4;
ss1->nrofCandidates->aggregationLevel8 = NR_SearchSpace__nrofCandidates__aggregationLevel8_n0; ss1->nrofCandidates->aggregationLevel8 = NR_SearchSpace__nrofCandidates__aggregationLevel8_n0;
ss1->nrofCandidates->aggregationLevel16 = NR_SearchSpace__nrofCandidates__aggregationLevel16_n0; ss1->nrofCandidates->aggregationLevel16 = NR_SearchSpace__nrofCandidates__aggregationLevel16_n0;
ss1->searchSpaceType = calloc(1,sizeof(*ss1->searchSpaceType)); ss1->searchSpaceType = calloc(1,sizeof(*ss1->searchSpaceType));
......
...@@ -628,6 +628,10 @@ rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP( ...@@ -628,6 +628,10 @@ rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(
} }
static NR_CipheringAlgorithm_t rrc_gNB_select_ciphering(uint16_t algorithms) { static NR_CipheringAlgorithm_t rrc_gNB_select_ciphering(uint16_t algorithms) {
return NR_CipheringAlgorithm_nea0;
if (algorithms & NGAP_ENCRYPTION_NEA3_MASK) { if (algorithms & NGAP_ENCRYPTION_NEA3_MASK) {
return NR_CipheringAlgorithm_nea3; return NR_CipheringAlgorithm_nea3;
} }
...@@ -640,10 +644,12 @@ static NR_CipheringAlgorithm_t rrc_gNB_select_ciphering(uint16_t algorithms) { ...@@ -640,10 +644,12 @@ static NR_CipheringAlgorithm_t rrc_gNB_select_ciphering(uint16_t algorithms) {
return NR_CipheringAlgorithm_nea1; return NR_CipheringAlgorithm_nea1;
} }
return NR_CipheringAlgorithm_nea0;
} }
static e_NR_IntegrityProtAlgorithm rrc_gNB_select_integrity(uint16_t algorithms) { static e_NR_IntegrityProtAlgorithm rrc_gNB_select_integrity(uint16_t algorithms) {
return NR_IntegrityProtAlgorithm_nia1;
if (algorithms & NGAP_INTEGRITY_NIA3_MASK) { if (algorithms & NGAP_INTEGRITY_NIA3_MASK) {
return NR_IntegrityProtAlgorithm_nia3; return NR_IntegrityProtAlgorithm_nia3;
} }
...@@ -671,7 +677,7 @@ rrc_gNB_process_security( ...@@ -671,7 +677,7 @@ rrc_gNB_process_security(
/* Save security parameters */ /* Save security parameters */
ue_context_pP->ue_context.security_capabilities = *security_capabilities_pP; ue_context_pP->ue_context.security_capabilities = *security_capabilities_pP;
// translation // translation
LOG_D(NR_RRC, LOG_I(NR_RRC,
"[gNB %d] NAS security_capabilities.encryption_algorithms %u AS ciphering_algorithm %lu NAS security_capabilities.integrity_algorithms %u AS integrity_algorithm %u\n", "[gNB %d] NAS security_capabilities.encryption_algorithms %u AS ciphering_algorithm %lu NAS security_capabilities.integrity_algorithms %u AS integrity_algorithm %u\n",
ctxt_pP->module_id, ctxt_pP->module_id,
ue_context_pP->ue_context.security_capabilities.nRencryption_algorithms, ue_context_pP->ue_context.security_capabilities.nRencryption_algorithms,
......
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