Add flag for Tx phase pre compensation

Used in ulsim to verify waveform in MATLAB
This commit is contained in:
Sakthivel Velumani
2025-09-30 00:24:39 +08:00
committed by alexjiao
parent b2174cb8e1
commit 83bf140bc3
5 changed files with 25 additions and 10 deletions
@@ -170,7 +170,8 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
c16_t **txdataF,
c16_t **txdata,
uint32_t linktype,
bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT]);
bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT],
bool no_phase_pre_comp);
void clean_UE_harq(PHY_VARS_NR_UE *UE);
+9 -7
View File
@@ -1506,19 +1506,21 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
c16_t **txdataF,
c16_t **txdata,
uint32_t linktype,
bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT])
bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT],
bool no_phase_pre_comp)
{
int N_RB = (linktype == link_type_sl) ? frame_parms->N_RB_SL : frame_parms->N_RB_UL;
for (int i = 0; i < NR_NUMBER_OF_SYMBOLS_PER_SLOT; i++) {
if (was_symbol_used[i] == false)
continue;
for (int ap = 0; ap < n_antenna_ports; ap++) {
apply_nr_rotation_TX(frame_parms, txdataF[ap], frame_parms->symbol_rotation[linktype], slot, N_RB, i, 1);
if (!no_phase_pre_comp) {
for (int i = 0; i < NR_NUMBER_OF_SYMBOLS_PER_SLOT; i++) {
if (was_symbol_used[i] == false)
continue;
for (int ap = 0; ap < n_antenna_ports; ap++) {
apply_nr_rotation_TX(frame_parms, txdataF[ap], frame_parms->symbol_rotation[linktype], slot, N_RB, i, 1);
}
}
}
for (int ap = 0; ap < n_antenna_ports; ap++) {
if (frame_parms->Ncp == 1) { // extended cyclic prefix
for (int i = 0; i < NR_NUMBER_OF_SYMBOLS_PER_SLOT_EXTENDED_CP; i++) {
+3
View File
@@ -499,6 +499,9 @@ typedef struct PHY_VARS_NR_UE_s {
/// RF and Interface devices per CC
openair0_device rfdevice;
/// Phase precompensation flag
bool no_phase_pre_comp;
void* scopeData;
// Pointers to hold PDSCH data only for phy simulators
void *phy_sim_rxdataF;
+2 -1
View File
@@ -404,7 +404,8 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, n
(c16_t **)txdataF,
txp,
link_type_ul,
was_symbol_used);
was_symbol_used,
ue->no_phase_pre_comp);
stop_meas_nr_ue_phy(ue, OFDM_MOD_STATS);
}
@@ -313,7 +313,15 @@ void phy_procedures_nrUE_SL_TX(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc
was_symbol_used[i] = true;
if (tx_action) {
LOG_D(NR_PHY, "Sending Uplink data \n");
nr_ue_pusch_common_procedures(ue, proc->nr_slot_tx, fp, fp->nb_antennas_tx, txdataF, txp, link_type_sl, was_symbol_used);
nr_ue_pusch_common_procedures(ue,
proc->nr_slot_tx,
fp,
fp->nb_antennas_tx,
txdataF,
txp,
link_type_sl,
was_symbol_used,
ue->no_phase_pre_comp);
}
LOG_D(NR_PHY, "****** end Sidelink TX-Chain for AbsSubframe %d.%d ******\n", frame_tx, slot_tx);