Commit a3ba41b2 authored by Sakthivel Velumani's avatar Sakthivel Velumani

Don't do OFDM mod on PRACH slots

set number of prach slots in prach_vars in first slot and set as
inactive in last slot so we can skip OFDM modulation in slots that
already has prach.
parent a635b4b4
...@@ -298,6 +298,7 @@ typedef struct { ...@@ -298,6 +298,7 @@ typedef struct {
typedef struct { typedef struct {
int16_t amp; int16_t amp;
bool active; bool active;
int num_prach_slots;
fapi_nr_ul_config_prach_pdu prach_pdu; fapi_nr_ul_config_prach_pdu prach_pdu;
} NR_UE_PRACH; } NR_UE_PRACH;
......
...@@ -294,6 +294,10 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, n ...@@ -294,6 +294,10 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, n
pucch_procedures_ue_nr(ue, proc, phy_data, (c16_t **)&txdataF); pucch_procedures_ue_nr(ue, proc, phy_data, (c16_t **)&txdataF);
LOG_D(PHY, "Sending Uplink data \n"); LOG_D(PHY, "Sending Uplink data \n");
// Don't do OFDM Mod if txdata contains prach
const NR_UE_PRACH *prach_var = ue->prach_vars[proc->gNB_id];
if (!prach_var->active) {
start_meas_nr_ue_phy(ue, OFDM_MOD_STATS); start_meas_nr_ue_phy(ue, OFDM_MOD_STATS);
nr_ue_pusch_common_procedures(ue, nr_ue_pusch_common_procedures(ue,
proc->nr_slot_tx, proc->nr_slot_tx,
...@@ -302,6 +306,7 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, n ...@@ -302,6 +306,7 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, n
(c16_t **)txdataF, (c16_t **)txdataF,
link_type_ul); link_type_ul);
stop_meas_nr_ue_phy(ue, OFDM_MOD_STATS); stop_meas_nr_ue_phy(ue, OFDM_MOD_STATS);
}
nr_ue_prach_procedures(ue, proc); nr_ue_prach_procedures(ue, proc);
...@@ -1168,11 +1173,15 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc) ...@@ -1168,11 +1173,15 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH, VCD_FUNCTION_IN);
if (ue->prach_vars[gNB_id]->active) { NR_UE_PRACH *prach_var = ue->prach_vars[gNB_id];
fapi_nr_ul_config_prach_pdu *prach_pdu = &ue->prach_vars[gNB_id]->prach_pdu; if (prach_var->active) {
fapi_nr_ul_config_prach_pdu *prach_pdu = &prach_var->prach_pdu;
// Generate PRACH in first slot. For L839, the following slots are also filled in this slot.
if (prach_pdu->prach_slot == nr_slot_tx) {
ue->tx_power_dBm[nr_slot_tx] = prach_pdu->prach_tx_power; ue->tx_power_dBm[nr_slot_tx] = prach_pdu->prach_tx_power;
LOG_D(PHY, "In %s: [UE %d][RAPROC][%d.%d]: Generating PRACH Msg1 (preamble %d, P0_PRACH %d)\n", LOG_D(PHY,
"In %s: [UE %d][RAPROC][%d.%d]: Generating PRACH Msg1 (preamble %d, P0_PRACH %d)\n",
__FUNCTION__, __FUNCTION__,
mod_id, mod_id,
frame_tx, frame_tx,
...@@ -1180,7 +1189,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc) ...@@ -1180,7 +1189,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc)
prach_pdu->ra_PreambleIndex, prach_pdu->ra_PreambleIndex,
ue->tx_power_dBm[nr_slot_tx]); ue->tx_power_dBm[nr_slot_tx]);
ue->prach_vars[gNB_id]->amp = AMP; prach_var->amp = AMP;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH, VCD_FUNCTION_IN);
...@@ -1197,7 +1206,8 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc) ...@@ -1197,7 +1206,8 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH, VCD_FUNCTION_OUT);
LOG_D(PHY, "In %s: [UE %d][RAPROC][%d.%d]: Generated PRACH Msg1 (TX power PRACH %d dBm, digital power %d dBW (amp %d)\n", LOG_D(PHY,
"In %s: [UE %d][RAPROC][%d.%d]: Generated PRACH Msg1 (TX power PRACH %d dBm, digital power %d dBW (amp %d)\n",
__FUNCTION__, __FUNCTION__,
mod_id, mod_id,
frame_tx, frame_tx,
...@@ -1206,7 +1216,14 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc) ...@@ -1206,7 +1216,14 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc)
dB_fixed(prach_power), dB_fixed(prach_power),
ue->prach_vars[gNB_id]->amp); ue->prach_vars[gNB_id]->amp);
ue->prach_vars[gNB_id]->active = false; // set duration of prach slots so we know when to skip OFDM modulation
const int prach_format = ue->prach_vars[gNB_id]->prach_pdu.prach_format;
const int prach_slots = (prach_format < 4) ? get_long_prach_dur(prach_format, ue->frame_parms.numerology_index) : 1;
prach_var->num_prach_slots = prach_slots;
}
// set as inactive in the last slot
prach_var->active = !(nr_slot_tx == (prach_pdu->prach_slot + prach_var->num_prach_slots - 1));
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH, VCD_FUNCTION_OUT);
......
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