Merge remote-tracking branch 'origin/nfapi-p7-refactoring' into integration_2024_w48 (!3131)
FAPI P7 Refactoring and unitary test creation This MR is a follow-up to the work done in !2714 this time separating the P7 FAPI messages into its own library (nr_fapi_p7). In the same way, utility functions to copy, free and compare have been added for each message, as well as an addition function to get the allocated size for a message, which is used for the messages that can be too big to fit in a buffer that's allocated in the stack. Unitary tests have been added for each of the messages, testing pack/unpack and the utility functions added.
This commit is contained in:
@@ -386,7 +386,7 @@ static inline int encode_parity_check_part_orig(unsigned char *c,unsigned char *
|
||||
rate=5;
|
||||
}
|
||||
else {
|
||||
printf("problem with BG\n");
|
||||
printf("problem with BG: is %d\n", BG);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
@@ -660,22 +660,21 @@ static void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, uint32
|
||||
}
|
||||
}
|
||||
|
||||
int fill_srs_reported_symbol_list(nfapi_nr_srs_reported_symbol_t *prgs,
|
||||
const nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
int fill_srs_reported_symbol(nfapi_nr_srs_reported_symbol_t *reported_symbol,
|
||||
const nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
const int N_RB_UL,
|
||||
const int8_t *snr_per_rb,
|
||||
const int srs_est) {
|
||||
|
||||
prgs->num_prgs = srs_pdu->beamforming.num_prgs;
|
||||
for(int prg_idx = 0; prg_idx < prgs->num_prgs; prg_idx++) {
|
||||
reported_symbol->num_prgs = srs_pdu->beamforming.num_prgs;
|
||||
for (int prg_idx = 0; prg_idx < reported_symbol->num_prgs; prg_idx++) {
|
||||
if (srs_est<0) {
|
||||
prgs->prg_list[prg_idx].rb_snr = 0xFF;
|
||||
reported_symbol->prg_list[prg_idx].rb_snr = 0xFF;
|
||||
} else if (snr_per_rb[prg_idx] < -64) {
|
||||
prgs->prg_list[prg_idx].rb_snr = 0;
|
||||
reported_symbol->prg_list[prg_idx].rb_snr = 0;
|
||||
} else if (snr_per_rb[prg_idx] > 63) {
|
||||
prgs->prg_list[prg_idx].rb_snr = 0xFE;
|
||||
reported_symbol->prg_list[prg_idx].rb_snr = 0xFE;
|
||||
} else {
|
||||
prgs->prg_list[prg_idx].rb_snr = (snr_per_rb[prg_idx] + 64) << 1;
|
||||
reported_symbol->prg_list[prg_idx].rb_snr = (snr_per_rb[prg_idx] + 64) << 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1065,7 +1064,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
|
||||
nr_srs_bf_report.num_symbols = 1 << srs_pdu->num_symbols;
|
||||
nr_srs_bf_report.wide_band_snr = srs_est >= 0 ? (gNB->srs->snr + 64) << 1 : 0xFF; // 0xFF will be set if this field is invalid
|
||||
nr_srs_bf_report.num_reported_symbols = 1 << srs_pdu->num_symbols;
|
||||
fill_srs_reported_symbol_list(&nr_srs_bf_report.prgs, srs_pdu, frame_parms->N_RB_UL, snr_per_rb, srs_est);
|
||||
fill_srs_reported_symbol(&nr_srs_bf_report.reported_symbol_list[0], srs_pdu, frame_parms->N_RB_UL, snr_per_rb, srs_est);
|
||||
|
||||
#ifdef SRS_IND_DEBUG
|
||||
LOG_I(NR_PHY, "nr_srs_bf_report.prg_size = %i\n", nr_srs_bf_report.prg_size);
|
||||
|
||||
Reference in New Issue
Block a user