Commit 900a78fd authored by francescomani's avatar francescomani

preliminary cleanup

parent ccdabb4c
...@@ -98,12 +98,6 @@ The infinite loop: ...@@ -98,12 +98,6 @@ The infinite loop:
raw incoming data is in buffer called "rxdata" raw incoming data is in buffer called "rxdata"
We derivate frame number, slot number, ... from the RX timestamp We derivate frame number, slot number, ... from the RX timestamp
{: .func2} {: .func2}
## nr_fep_full()
"front end processing" of uplink signal
performs DFT on the signal
it computes the buffer rxdataF (for frequency) from rxdata (samples over time)
rxdataF is the rxdata in frequency domain, phase aligned
{: .func3}
## gNB_top() ## gNB_top()
only compute frame numbre, slot number, ... only compute frame numbre, slot number, ...
{: .func3} {: .func3}
......
...@@ -499,15 +499,16 @@ void clean_UE_harq(PHY_VARS_NR_UE *UE) ...@@ -499,15 +499,16 @@ void clean_UE_harq(PHY_VARS_NR_UE *UE)
} }
void init_N_TA_offset(PHY_VARS_NR_UE *ue){ void init_N_TA_offset(PHY_VARS_NR_UE *ue)
{
NR_DL_FRAME_PARMS *fp = &ue->frame_parms; NR_DL_FRAME_PARMS *fp = &ue->frame_parms;
// No timing offset for Sidelink, refer to 3GPP 38.211 Section 8.5 // No timing offset for Sidelink, refer to 3GPP 38.211 Section 8.5
if (fp->frame_type == FDD || ue->sl_mode == 2) { if (fp->frame_type == FDD || ue->sl_mode == 2) {
ue->N_TA_offset = 0; ue->N_TA_offset = 0;
} else { } else {
int N_TA_offset = fp->ul_CarrierFreq < 6e9 ? 400 : 431; // reference samples for 25600Tc @ 30.72 Ms/s for FR1, same @ 61.44 Ms/s for FR2 // reference samples for 25600Tc @ 30.72 Ms/s for FR1, same @ 61.44 Ms/s for FR2
int N_TA_offset = fp->ul_CarrierFreq < 6e9 ? 400 : 431;
double factor = 1.0; double factor = 1.0;
switch (fp->numerology_index) { switch (fp->numerology_index) {
...@@ -538,7 +539,9 @@ void init_N_TA_offset(PHY_VARS_NR_UE *ue){ ...@@ -538,7 +539,9 @@ void init_N_TA_offset(PHY_VARS_NR_UE *ue){
ue->ta_frame = -1; ue->ta_frame = -1;
ue->ta_slot = -1; ue->ta_slot = -1;
LOG_I(PHY,"UE %d Setting N_TA_offset to %d samples (factor %f, UL Freq %lu, N_RB %d, mu %d)\n", ue->Mod_id, ue->N_TA_offset, factor, fp->ul_CarrierFreq, fp->N_RB_DL, fp->numerology_index); LOG_I(PHY,
"UE %d Setting N_TA_offset to %d samples (factor %f, UL Freq %lu, N_RB %d, mu %d)\n",
ue->Mod_id, ue->N_TA_offset, factor, fp->ul_CarrierFreq, fp->N_RB_DL, fp->numerology_index);
} }
} }
......
...@@ -224,42 +224,6 @@ void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx) { ...@@ -224,42 +224,6 @@ void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx) {
stop_meas(&ru->precoding_stats); stop_meas(&ru->precoding_stats);
} }
void nr_fep_full(RU_t *ru, int slot) {
RU_proc_t *proc = &ru->proc;
int l, aa;
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
// if ((fp->frame_type == TDD) &&
// (subframe_select(fp,proc->tti_rx) != NR_UPLINK_SLOT)) return;
LOG_D(PHY,"In fep_full for slot = %d\n", proc->tti_rx);
start_meas(&ru->ofdm_demod_stats);
if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX, 1 );
// remove_7_5_kHz(ru,proc->tti_rx<<1);
// remove_7_5_kHz(ru,1+(proc->tti_rx<<1));
int offset = (proc->tti_rx % RU_RX_SLOT_DEPTH) * (fp->symbols_per_slot * fp->ofdm_symbol_size);
for (l = 0; l < fp->symbols_per_slot; l++) {
for (aa = 0; aa < fp->nb_antennas_rx; aa++) {
nr_slot_fep_ul(fp,
ru->common.rxdata[aa],
&ru->common.rxdataF[aa][offset],
l,
proc->tti_rx,
ru->N_TA_offset);
}
}
if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX, 0 );
stop_meas(&ru->ofdm_demod_stats);
}
// core routine for FEP TX, called from threads in RU TX thread-pool // core routine for FEP TX, called from threads in RU TX thread-pool
void nr_feptx(void *arg) { void nr_feptx(void *arg) {
...@@ -363,8 +327,8 @@ void nr_feptx_tp(RU_t *ru, int frame_tx, int slot) { ...@@ -363,8 +327,8 @@ void nr_feptx_tp(RU_t *ru, int frame_tx, int slot) {
} }
// core RX FEP routine, called by threads in RU thread-pool // core RX FEP routine, called by threads in RU thread-pool
void nr_fep(void* arg) { void nr_fep(void* arg)
{
feprx_cmd_t *feprx_cmd = (feprx_cmd_t *)arg; feprx_cmd_t *feprx_cmd = (feprx_cmd_t *)arg;
RU_t *ru = feprx_cmd->ru; RU_t *ru = feprx_cmd->ru;
......
...@@ -40,10 +40,8 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_ ...@@ -40,10 +40,8 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_
void nr_feptx_ofdm(RU_t *ru,int frame_tx,int tti_tx); void nr_feptx_ofdm(RU_t *ru,int frame_tx,int tti_tx);
void nr_feptx0(RU_t *ru,int tti_tx,int first_symbol, int num_symbols, int aa); void nr_feptx0(RU_t *ru,int tti_tx,int first_symbol, int num_symbols, int aa);
void fep_full(RU_t *ru,int slot);
void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx); void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx);
void nr_feptx_prec_control(RU_t *ru,int frame,int tti_tx); void nr_feptx_prec_control(RU_t *ru,int frame,int tti_tx);
void nr_fep_full(RU_t *ru, int slot);
void nr_fep_tp(RU_t *ru, int slot); void nr_fep_tp(RU_t *ru, int slot);
void nr_feptx_tp(RU_t *ru, int frame_tx, int slot); void nr_feptx_tp(RU_t *ru, int frame_tx, int slot);
void feptx_prec(RU_t *ru,int frame_tx,int tti_tx); void feptx_prec(RU_t *ru,int frame_tx,int tti_tx);
......
...@@ -328,7 +328,6 @@ static void configure_dlsch(NR_UE_DLSCH_t *dlsch0, ...@@ -328,7 +328,6 @@ static void configure_dlsch(NR_UE_DLSCH_t *dlsch0,
static void configure_ta_command(PHY_VARS_NR_UE *ue, fapi_nr_ta_command_pdu *ta_command_pdu) static void configure_ta_command(PHY_VARS_NR_UE *ue, fapi_nr_ta_command_pdu *ta_command_pdu)
{ {
/* Time Alignment procedure /* Time Alignment procedure
// - UE processing capability 1 // - UE processing capability 1
// - Setting the TA update to be applied after the reception of the TA command // - Setting the TA update to be applied after the reception of the TA command
...@@ -369,7 +368,7 @@ static void configure_ta_command(PHY_VARS_NR_UE *ue, fapi_nr_ta_command_pdu *ta_ ...@@ -369,7 +368,7 @@ static void configure_ta_command(PHY_VARS_NR_UE *ue, fapi_nr_ta_command_pdu *ta_
/* Time alignment procedure */ /* Time alignment procedure */
// N_t_1 + N_t_2 + N_TA_max must be in msec // N_t_1 + N_t_2 + N_TA_max must be in msec
const double t_subframe = 1.0; // subframe duration of 1 msec const double t_subframe = 1.0; // subframe duration of 1 msec
const int ul_tx_timing_adjustment = 1 + (int)ceil(slots_per_subframe*(N_t_1 + N_t_2 + N_TA_max + 0.5)/t_subframe); const int ul_tx_timing_adjustment = 1 + (int)ceil(slots_per_subframe * (N_t_1 + N_t_2 + N_TA_max + 0.5) / t_subframe);
if (ta_command_pdu->is_rar) { if (ta_command_pdu->is_rar) {
ue->ta_slot = ta_command_pdu->ta_slot; ue->ta_slot = ta_command_pdu->ta_slot;
...@@ -383,7 +382,8 @@ static void configure_ta_command(PHY_VARS_NR_UE *ue, fapi_nr_ta_command_pdu *ta_ ...@@ -383,7 +382,8 @@ static void configure_ta_command(PHY_VARS_NR_UE *ue, fapi_nr_ta_command_pdu *ta_
ue->ta_frame = ta_command_pdu->ta_frame; ue->ta_frame = ta_command_pdu->ta_frame;
ue->ta_command = ta_command_pdu->ta_command; ue->ta_command = ta_command_pdu->ta_command;
} }
LOG_D(PHY,"TA command received in Frame.Slot %d.%d -- Starting UL time alignment procedures. TA update will be applied at frame %d slot %d\n", LOG_D(PHY,
"TA command received in %d.%d Starting UL time alignment procedures. TA update will be applied at frame %d slot %d\n",
ta_command_pdu->ta_frame, ta_command_pdu->ta_slot, ue->ta_frame, ue->ta_slot); ta_command_pdu->ta_frame, ta_command_pdu->ta_slot, ue->ta_frame, ue->ta_slot);
} }
......
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