mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
using constants for FAPI precoding weigths instead of hardcoded values
This commit is contained in:
@@ -87,6 +87,7 @@ static inline const char *rnti_types(nr_rnti_type_t rr)
|
||||
#define NR_NUMBER_OF_SYMBOLS_PER_SLOT 14
|
||||
#define NR_NUMBER_OF_SYMBOLS_PER_SLOT_EXTENDED_CP 12
|
||||
#define NR_MAX_NB_LAYERS 4 // 8
|
||||
#define NR_MAX_CSI_PORTS 4
|
||||
|
||||
// Since the IQ samples are represented by SQ15 R+I (see https://en.wikipedia.org/wiki/Q_(number_format)) we need to compensate when
|
||||
// calcualting signal energy. Instead of shifting each sample right by 15, we can normalize the result in dB scale once its
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "stddef.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "nfapi_interface.h"
|
||||
#include "nfapi_nr_interface.h"
|
||||
|
||||
@@ -495,7 +496,7 @@ typedef struct {
|
||||
uint16_t pm_idx;
|
||||
uint16_t numLayers;
|
||||
uint16_t num_ant_ports;
|
||||
nfapi_nr_pm_weights_t weights[4][4]; // TODO temporary hardcoding
|
||||
nfapi_nr_pm_weights_t weights[NR_MAX_NB_LAYERS][NR_MAX_CSI_PORTS];
|
||||
} nfapi_nr_pm_pdu_t;
|
||||
|
||||
|
||||
|
||||
@@ -262,8 +262,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
|
||||
|
||||
// ceil((NB_RB*8(max allocation per RB)*2(QPSK))/32)
|
||||
ue->nr_csi_info = malloc16_clear(sizeof(nr_csi_info_t));
|
||||
ue->nr_csi_info->csi_rs_generated_signal = malloc16(NR_MAX_NB_PORTS * sizeof(*ue->nr_csi_info->csi_rs_generated_signal));
|
||||
for (int i = 0; i < NR_MAX_NB_PORTS; i++) {
|
||||
ue->nr_csi_info->csi_rs_generated_signal = malloc16(NR_MAX_CSI_PORTS * sizeof(*ue->nr_csi_info->csi_rs_generated_signal));
|
||||
for (int i = 0; i < NR_MAX_CSI_PORTS; i++) {
|
||||
ue->nr_csi_info->csi_rs_generated_signal[i] =
|
||||
malloc16_clear(fp->samples_per_frame_wCP * sizeof(**ue->nr_csi_info->csi_rs_generated_signal));
|
||||
}
|
||||
@@ -311,7 +311,7 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
|
||||
|
||||
for (int gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++) {
|
||||
|
||||
for (int i=0; i<NR_MAX_NB_PORTS; i++) {
|
||||
for (int i = 0; i < NR_MAX_CSI_PORTS; i++) {
|
||||
free_and_zero(ue->nr_csi_info->csi_rs_generated_signal[i]);
|
||||
}
|
||||
free_and_zero(ue->nr_csi_info->csi_rs_generated_signal);
|
||||
|
||||
@@ -68,8 +68,6 @@
|
||||
|
||||
#define NR_MAX_PDCCH_AGG_LEVEL 16 // 3GPP TS 38.211 V15.8 Section 7.3.2 Table 7.3.2.1-1: Supported PDCCH aggregation levels
|
||||
|
||||
#define NR_MAX_NB_PORTS 32
|
||||
|
||||
#define MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER 36
|
||||
|
||||
#define MAX_NUM_NR_ULSCH_SEGMENTS_PER_LAYER 34
|
||||
|
||||
@@ -879,6 +879,9 @@ void RCconfig_NR_L1(void)
|
||||
|
||||
// Antenna ports
|
||||
set_antenna_ports(&GNBParamList, &gNB->ap_N1, &gNB->ap_N2, &gNB->ap_XP);
|
||||
AssertFatal(gNB->ap_N1 * gNB->ap_N2 * gNB->ap_XP <= NR_MAX_CSI_PORTS,
|
||||
"Number of antenna ports set in config file exceeds the supported value of %d\n",
|
||||
NR_MAX_CSI_PORTS);
|
||||
}
|
||||
|
||||
// L1 params
|
||||
|
||||
Reference in New Issue
Block a user