Add configuration for phase compensation
For 7.2 FH, some RUs do phase compensation, whereas for others, the DU does it. In fact, this can be "negotiated" using the M plane. Since we don't have the M plane yet, add a configuration option to set where phase compensation is performed.
This commit is contained in:
@@ -604,6 +604,10 @@ typedef struct PHY_VARS_gNB_s {
|
||||
|
||||
// reference amplitude for TX
|
||||
int16_t TX_AMP;
|
||||
|
||||
// flag to activate 3GPP phase symbolwise rotation
|
||||
bool phase_comp;
|
||||
|
||||
// PUCCH0 Look-up table for cyclic-shifts
|
||||
NR_gNB_PUCCH0_LUT_t pucch0_lut;
|
||||
|
||||
|
||||
@@ -221,18 +221,20 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
|
||||
// if ((frame&127) == 0) dump_pdsch_stats(gNB);
|
||||
|
||||
//apply the OFDM symbol rotation here
|
||||
for (aa=0; aa<cfg->carrier_config.num_tx_ant.value; aa++) {
|
||||
apply_nr_rotation_TX(fp,
|
||||
&gNB->common_vars.txdataF[aa][txdataF_offset],
|
||||
fp->symbol_rotation[0],
|
||||
slot,
|
||||
fp->N_RB_DL,
|
||||
0,
|
||||
fp->Ncp == EXTENDED ? 12 : 14);
|
||||
if (gNB->phase_comp) {
|
||||
for (aa=0; aa<cfg->carrier_config.num_tx_ant.value; aa++) {
|
||||
apply_nr_rotation_TX(fp,
|
||||
&gNB->common_vars.txdataF[aa][txdataF_offset],
|
||||
fp->symbol_rotation[0],
|
||||
slot,
|
||||
fp->N_RB_DL,
|
||||
0,
|
||||
fp->Ncp == EXTENDED ? 12 : 14);
|
||||
|
||||
T(T_GNB_PHY_DL_OUTPUT_SIGNAL, T_INT(0),
|
||||
T_INT(frame), T_INT(slot),
|
||||
T_INT(aa), T_BUFFER(&gNB->common_vars.txdataF[aa][txdataF_offset], fp->samples_per_slot_wCP*sizeof(int32_t)));
|
||||
T(T_GNB_PHY_DL_OUTPUT_SIGNAL, T_INT(0),
|
||||
T_INT(frame), T_INT(slot),
|
||||
T_INT(aa), T_BUFFER(&gNB->common_vars.txdataF[aa][txdataF_offset], fp->samples_per_slot_wCP*sizeof(int32_t)));
|
||||
}
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX + gNB->CC_id, 0);
|
||||
|
||||
@@ -610,6 +610,7 @@ int main(int argc, char **argv)
|
||||
gNB = RC.gNB[0];
|
||||
gNB->ofdm_offset_divisor = UINT_MAX;
|
||||
gNB->ldpc_offload_flag = ldpc_offload_flag;
|
||||
gNB->phase_comp = true; // we need to perform phase compensation, otherwise everything will fail
|
||||
frame_parms = &gNB->frame_parms; //to be initialized I suppose (maybe not necessary for PBCH)
|
||||
frame_parms->nb_antennas_tx = n_tx;
|
||||
frame_parms->nb_antennas_rx = n_rx;
|
||||
|
||||
Reference in New Issue
Block a user