Commit c3bfdb77 authored by Melissa Elkadi's avatar Melissa Elkadi Committed by Robert Schmidt

Changing all sl-mode checks to be based on an enum.

Also, additional clean up. Basically, cherry-picked
commit #5f98c7c5
for MR 2204 comments.
parent 578fbfb9
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "PHY/NR_REFSIG/refsig_defs_ue.h" #include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "radio/COMMON/common_lib.h" #include "radio/COMMON/common_lib.h"
#include "LAYER2/nr_pdcp/nr_pdcp_oai_api.h" #include "LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
#include "openair1/PHY/NR_REFSIG/sss_nr.h"
/* /*
* NR SLOT PROCESSING SEQUENCE * NR SLOT PROCESSING SEQUENCE
...@@ -97,9 +98,10 @@ ...@@ -97,9 +98,10 @@
#define TX_JOB_ID 100 #define TX_JOB_ID 100
typedef enum { typedef enum {
pss = 0, SYNC_MODE_PSS = 0,
pbch = 1, SYNC_MODE_PBCH = 1,
si = 2 SYNC_MODE_SI = 2,
SYNC_MODE_PSBCH = 3,
} sync_mode_t; } sync_mode_t;
static void *NRUE_phy_stub_standalone_pnf_task(void *arg); static void *NRUE_phy_stub_standalone_pnf_task(void *arg);
...@@ -373,10 +375,15 @@ static void UE_synch(void *arg) { ...@@ -373,10 +375,15 @@ static void UE_synch(void *arg) {
syncData_t *syncD=(syncData_t *) arg; syncData_t *syncD=(syncData_t *) arg;
int i, hw_slot_offset; int i, hw_slot_offset;
PHY_VARS_NR_UE *UE = syncD->UE; PHY_VARS_NR_UE *UE = syncD->UE;
sync_mode_t sync_mode = pbch; sync_mode_t sync_mode = SYNC_MODE_PBCH;
//int CC_id = UE->CC_id; //int CC_id = UE->CC_id;
static int freq_offset=0; static int freq_offset=0;
UE->is_synchronized = 0; if (get_softmodem_params()->sl_mode == SL_MODE_2) {
UE->is_synchronized_sl = false;
sync_mode = SYNC_MODE_PSBCH;
} else {
UE->is_synchronized = false;
}
if (UE->UE_scan == 0) { if (UE->UE_scan == 0) {
...@@ -392,7 +399,6 @@ static void UE_synch(void *arg) { ...@@ -392,7 +399,6 @@ static void UE_synch(void *arg) {
} }
sync_mode = pbch;
} else { } else {
LOG_E(PHY,"Fixme!\n"); LOG_E(PHY,"Fixme!\n");
/* /*
...@@ -415,37 +421,7 @@ static void UE_synch(void *arg) { ...@@ -415,37 +421,7 @@ static void UE_synch(void *arg) {
} }
switch (sync_mode) { switch (sync_mode) {
/* case SYNC_MODE_PBCH:
case pss:
LOG_I(PHY,"[SCHED][UE] Scanning band %d (%d), freq %u\n",bands_to_scan.band_info[current_band].band, current_band,bands_to_scan.band_info[current_band].dl_min+current_offset);
//lte_sync_timefreq(UE,current_band,bands_to_scan.band_info[current_band].dl_min+current_offset);
current_offset += 20000000; // increase by 20 MHz
if (current_offset > bands_to_scan.band_info[current_band].dl_max-bands_to_scan.band_info[current_band].dl_min) {
current_band++;
current_offset=0;
}
if (current_band==bands_to_scan.nbands) {
current_band=0;
oai_exit=1;
}
for (i=0; i<openair0_cfg[UE->rf_map.card].rx_num_channels; i++) {
downlink_frequency[UE->rf_map.card][UE->rf_map.chain+i] = bands_to_scan.band_info[current_band].dl_min+current_offset;
uplink_frequency_offset[UE->rf_map.card][UE->rf_map.chain+i] = bands_to_scan.band_info[current_band].ul_min-bands_to_scan.band_info[0].dl_min + current_offset;
openair0_cfg[UE->rf_map.card].rx_freq[UE->rf_map.chain+i] = downlink_frequency[CC_id][i];
openair0_cfg[UE->rf_map.card].tx_freq[UE->rf_map.chain+i] = downlink_frequency[CC_id][i]+uplink_frequency_offset[CC_id][i];
openair0_cfg[UE->rf_map.card].rx_gain[UE->rf_map.chain+i] = UE->rx_total_gain_dB;
if (UE->UE_scan_carrier) {
openair0_cfg[UE->rf_map.card].autocal[UE->rf_map.chain+i] = 1;
}
}
break;
*/
case pbch:
LOG_I(PHY, "[UE thread Synch] Running Initial Synch \n"); LOG_I(PHY, "[UE thread Synch] Running Initial Synch \n");
uint64_t dl_carrier, ul_carrier; uint64_t dl_carrier, ul_carrier;
...@@ -491,7 +467,12 @@ static void UE_synch(void *arg) { ...@@ -491,7 +467,12 @@ static void UE_synch(void *arg) {
} }
break; break;
case si: case SYNC_MODE_SI:
break;
case SYNC_MODE_PSBCH:
break;
default: default:
break; break;
......
...@@ -330,7 +330,7 @@ void init_openair0(void) { ...@@ -330,7 +330,7 @@ void init_openair0(void) {
openair0_cfg[card].duplex_mode = duplex_mode_FDD; openair0_cfg[card].duplex_mode = duplex_mode_FDD;
openair0_cfg[card].Mod_id = 0; openair0_cfg[card].Mod_id = 0;
openair0_cfg[card].num_rb_dl = frame_parms->N_RB_DL; openair0_cfg[card].num_rb_dl = (get_softmodem_params()->sl_mode == SL_MODE_2) ? frame_parms->N_RB_SL : frame_parms->N_RB_DL;
openair0_cfg[card].clock_source = get_softmodem_params()->clock_source; openair0_cfg[card].clock_source = get_softmodem_params()->clock_source;
openair0_cfg[card].time_source = get_softmodem_params()->timing_source; openair0_cfg[card].time_source = get_softmodem_params()->timing_source;
openair0_cfg[card].tune_offset = get_softmodem_params()->tune_offset; openair0_cfg[card].tune_offset = get_softmodem_params()->tune_offset;
...@@ -348,7 +348,7 @@ void init_openair0(void) { ...@@ -348,7 +348,7 @@ void init_openair0(void) {
nr_rf_card_config_freq(&openair0_cfg[card], ul_carrier, dl_carrier, freq_off); nr_rf_card_config_freq(&openair0_cfg[card], ul_carrier, dl_carrier, freq_off);
if (get_softmodem_params()->sl_mode == 2) { if (get_softmodem_params()->sl_mode == SL_MODE_2) {
nr_get_carrier_frequencies_sl(PHY_vars_UE_g[0][0], &sl_carrier); nr_get_carrier_frequencies_sl(PHY_vars_UE_g[0][0], &sl_carrier);
nr_rf_card_config_freq(&openair0_cfg[card], sl_carrier, sl_carrier, freq_off); nr_rf_card_config_freq(&openair0_cfg[card], sl_carrier, sl_carrier, freq_off);
} }
......
...@@ -201,7 +201,7 @@ extern int usrp_tx_thread; ...@@ -201,7 +201,7 @@ extern int usrp_tx_thread;
{ .s5 = { NULL } }, \ { .s5 = { NULL } }, \
{ .s5 = { NULL } }, \ { .s5 = { NULL } }, \
{ .s5 = { NULL } }, \ { .s5 = { NULL } }, \
{ .s5 = { NULL } }, \ { .s2 = { config_check_intrange, {0,2} }},\
{ .s5 = { NULL } }, \ { .s5 = { NULL } }, \
{ .s5 = { NULL } }, \ { .s5 = { NULL } }, \
{ .s5 = { NULL } }, \ { .s5 = { NULL } }, \
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "PHY/MODULATION/nr_modulation.h" #include "PHY/MODULATION/nr_modulation.h"
#include "openair2/COMMON/prs_nr_paramdef.h" #include "openair2/COMMON/prs_nr_paramdef.h"
#include "SCHED_NR_UE/harq_nr.h" #include "SCHED_NR_UE/harq_nr.h"
#include "executables/softmodem-common.h"
void RCconfig_nrUE_prs(void *cfg) void RCconfig_nrUE_prs(void *cfg)
{ {
...@@ -306,8 +307,10 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) ...@@ -306,8 +307,10 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
common_vars->rxdataF[i] = malloc16_clear((2 * (fp->samples_per_frame) + fp->ofdm_symbol_size) * sizeof(c16_t)); common_vars->rxdataF[i] = malloc16_clear((2 * (fp->samples_per_frame) + fp->ofdm_symbol_size) * sizeof(c16_t));
} }
int N_RB = (get_softmodem_params()->sl_mode == SL_MODE_2) ? fp->N_RB_SL : fp->N_RB_DL;
// ceil(((NB_RB<<1)*3)/32) // 3 RE *2(QPSK) // ceil(((NB_RB<<1)*3)/32) // 3 RE *2(QPSK)
int pdcch_dmrs_init_length = (((fp->N_RB_DL<<1)*3)>>5)+1; int pdcch_dmrs_init_length = (((N_RB << 1) * 3) >> 5) + 1;
//PDCCH DMRS init (gNB offset = 0) //PDCCH DMRS init (gNB offset = 0)
ue->nr_gold_pdcch[0] = malloc16(fp->slots_per_frame * sizeof(uint32_t **)); ue->nr_gold_pdcch[0] = malloc16(fp->slots_per_frame * sizeof(uint32_t **));
uint32_t ***pdcch_dmrs = ue->nr_gold_pdcch[0]; uint32_t ***pdcch_dmrs = ue->nr_gold_pdcch[0];
...@@ -324,7 +327,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) ...@@ -324,7 +327,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
} }
// ceil(((NB_RB*6(k)*2(QPSK)/32) // 3 RE *2(QPSK) // ceil(((NB_RB*6(k)*2(QPSK)/32) // 3 RE *2(QPSK)
int pdsch_dmrs_init_length = ((fp->N_RB_DL*12)>>5)+1; int pdsch_dmrs_init_length = ((N_RB * 12) >> 5) + 1;
//PDSCH DMRS init (eNB offset = 0) //PDSCH DMRS init (eNB offset = 0)
ue->nr_gold_pdsch[0] = malloc16(fp->slots_per_frame * sizeof(uint32_t ***)); ue->nr_gold_pdsch[0] = malloc16(fp->slots_per_frame * sizeof(uint32_t ***));
...@@ -357,7 +360,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) ...@@ -357,7 +360,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
srs_vars[gNB_id]->active = false; srs_vars[gNB_id]->active = false;
// ceil((NB_RB*8(max allocation per RB)*2(QPSK))/32) // ceil((NB_RB*8(max allocation per RB)*2(QPSK))/32)
int csi_dmrs_init_length = ((fp->N_RB_DL<<4)>>5)+1; int csi_dmrs_init_length = ((N_RB << 4) >> 5) + 1;
ue->nr_csi_info = malloc16_clear(sizeof(nr_csi_info_t)); ue->nr_csi_info = malloc16_clear(sizeof(nr_csi_info_t));
ue->nr_csi_info->nr_gold_csi_rs = malloc16(fp->slots_per_frame * sizeof(uint32_t **)); ue->nr_csi_info->nr_gold_csi_rs = malloc16(fp->slots_per_frame * sizeof(uint32_t **));
AssertFatal(ue->nr_csi_info->nr_gold_csi_rs != NULL, "NR init: csi reference signal malloc failed\n"); AssertFatal(ue->nr_csi_info->nr_gold_csi_rs != NULL, "NR init: csi reference signal malloc failed\n");
......
...@@ -42,7 +42,7 @@ static const int nr_ssb_table[48][3] = { ...@@ -42,7 +42,7 @@ static const int nr_ssb_table[48][3] = {
{93, 15, nr_ssb_type_A}, {94, 15, nr_ssb_type_A}, {96, 30, nr_ssb_type_C}}; {93, 15, nr_ssb_type_A}, {94, 15, nr_ssb_type_A}, {96, 30, nr_ssb_type_C}};
void set_Lmax(NR_DL_FRAME_PARMS *fp) { void set_Lmax(NR_DL_FRAME_PARMS *fp) {
if (get_softmodem_params()->sl_mode == 2) { if (get_softmodem_params()->sl_mode == SL_MODE_2) {
int sl_NumSSB_WithinPeriod = 1; //TODO: Needs to be updated from RRC parameters int sl_NumSSB_WithinPeriod = 1; //TODO: Needs to be updated from RRC parameters
int sl_TimeOffsetSSB = 1; //TODO: Needs to be updated from RRC parameters int sl_TimeOffsetSSB = 1; //TODO: Needs to be updated from RRC parameters
int sl_TimeInterval = 1; //TODO: Needs to be updated from RRC parameters int sl_TimeInterval = 1; //TODO: Needs to be updated from RRC parameters
...@@ -165,7 +165,7 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, int N_RB_DL) ...@@ -165,7 +165,7 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, int N_RB_DL)
fp->first_carrier_offset = fp->ofdm_symbol_size - (N_RB_DL * 12 / 2); fp->first_carrier_offset = fp->ofdm_symbol_size - (N_RB_DL * 12 / 2);
// TODO: Temporarily setting fp->first_carrier_offset = 0 for SL until MAC is developed // TODO: Temporarily setting fp->first_carrier_offset = 0 for SL until MAC is developed
if (get_softmodem_params()->sl_mode == 2) if (get_softmodem_params()->sl_mode == SL_MODE_2)
fp->first_carrier_offset = 0; fp->first_carrier_offset = 0;
fp->nb_prefix_samples = fp->ofdm_symbol_size / 128 * 9; fp->nb_prefix_samples = fp->ofdm_symbol_size / 128 * 9;
fp->nb_prefix_samples0 = fp->ofdm_symbol_size / 128 * (9 + (1 << mu)); fp->nb_prefix_samples0 = fp->ofdm_symbol_size / 128 * (9 + (1 << mu));
...@@ -236,6 +236,9 @@ int nr_init_frame_parms(nfapi_nr_config_request_scf_t* cfg, ...@@ -236,6 +236,9 @@ int nr_init_frame_parms(nfapi_nr_config_request_scf_t* cfg,
fp->numerology_index = mu; fp->numerology_index = mu;
set_scs_parameters(fp, mu, fp->N_RB_DL); set_scs_parameters(fp, mu, fp->N_RB_DL);
if (get_softmodem_params()->sl_mode != SL_MODE_NONE) {
set_scs_parameters(fp, mu, fp->N_RB_SL);
}
fp->slots_per_frame = 10* fp->slots_per_subframe; fp->slots_per_frame = 10* fp->slots_per_subframe;
...@@ -299,7 +302,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp, ...@@ -299,7 +302,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
LOG_D(PHY,"dl_bw_kHz %lu\n",dl_bw_khz); LOG_D(PHY,"dl_bw_kHz %lu\n",dl_bw_khz);
LOG_D(PHY,"dl_CarrierFreq %lu\n",fp->dl_CarrierFreq); LOG_D(PHY,"dl_CarrierFreq %lu\n",fp->dl_CarrierFreq);
if (get_softmodem_params()->sl_mode == 2) { if (get_softmodem_params()->sl_mode == SL_MODE_2) {
uint64_t sl_bw_khz = (12 * config->carrier_config.sl_grid_size[config->ssb_config.scs_common]) * (15 << config->ssb_config.scs_common); uint64_t sl_bw_khz = (12 * config->carrier_config.sl_grid_size[config->ssb_config.scs_common]) * (15 << config->ssb_config.scs_common);
fp->sl_CarrierFreq = ((sl_bw_khz >> 1) + config->carrier_config.sl_frequency) * 1000; fp->sl_CarrierFreq = ((sl_bw_khz >> 1) + config->carrier_config.sl_frequency) * 1000;
} }
...@@ -329,7 +332,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp, ...@@ -329,7 +332,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
AssertFatal(fp->numerology_index == NR_MU_2,"Invalid cyclic prefix %d for numerology index %d\n", Ncp, fp->numerology_index); AssertFatal(fp->numerology_index == NR_MU_2,"Invalid cyclic prefix %d for numerology index %d\n", Ncp, fp->numerology_index);
fp->Ncp = Ncp; fp->Ncp = Ncp;
int N_RB = (get_softmodem_params()->sl_mode == 2) ? fp->N_RB_SL : fp->N_RB_DL; int N_RB = (get_softmodem_params()->sl_mode == SL_MODE_2) ? fp->N_RB_SL : fp->N_RB_DL;
set_scs_parameters(fp, fp->numerology_index, N_RB); set_scs_parameters(fp, fp->numerology_index, N_RB);
fp->slots_per_frame = 10* fp->slots_per_subframe; fp->slots_per_frame = 10* fp->slots_per_subframe;
...@@ -355,7 +358,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp, ...@@ -355,7 +358,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
fp->ssb_start_subcarrier = (12 * config->ssb_table.ssb_offset_point_a + sco); fp->ssb_start_subcarrier = (12 * config->ssb_table.ssb_offset_point_a + sco);
// TODO: Temporarily setting fp->ssb_start_subcarrier = 0 for SL until MAC is developed // TODO: Temporarily setting fp->ssb_start_subcarrier = 0 for SL until MAC is developed
if (get_softmodem_params()->sl_mode == 2) { if (get_softmodem_params()->sl_mode == SL_MODE_2) {
fp->ssb_start_subcarrier = 0; fp->ssb_start_subcarrier = 0;
} }
set_Lmax(fp); set_Lmax(fp);
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "nr_modulation.h" #include "nr_modulation.h"
#include "PHY/NR_REFSIG/nr_mod_table.h" #include "PHY/NR_REFSIG/nr_mod_table.h"
#include "executables/softmodem-common.h" #include "executables/softmodem-common.h"
#include "openair1/PHY/defs_nr_UE.h"
//Table 6.3.1.5-1 Precoding Matrix W 1 layer 2 antenna ports 'n' = -1 and 'o' = -j //Table 6.3.1.5-1 Precoding Matrix W 1 layer 2 antenna ports 'n' = -1 and 'o' = -j
const char nr_W_1l_2p[6][2][1] = { const char nr_W_1l_2p[6][2][1] = {
...@@ -614,7 +615,7 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) { ...@@ -614,7 +615,7 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) {
double f0 = f[ll]; double f0 = f[ll];
LOG_D(PHY, "Doing symbol rotation calculation for gNB TX/RX, f0 %f Hz, Nsymb %d\n", f0, nsymb); LOG_D(PHY, "Doing symbol rotation calculation for gNB TX/RX, f0 %f Hz, Nsymb %d\n", f0, nsymb);
c16_t *symbol_rotation = fp->symbol_rotation[ll]; c16_t *symbol_rotation = fp->symbol_rotation[ll];
if (get_softmodem_params()->sl_mode == 2) { if (get_softmodem_params()->sl_mode == SL_MODE_2) {
f0 = (double)sl_CarrierFreq; f0 = (double)sl_CarrierFreq;
symbol_rotation = fp->symbol_rotation[link_type_sl]; symbol_rotation = fp->symbol_rotation[link_type_sl];
} }
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "PHY/LTE_ESTIMATION/lte_estimation.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h" #include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
#include <common/utils/LOG/log.h> #include <common/utils/LOG/log.h>
#include "executables/softmodem-common.h"
//#define DEBUG_FEP //#define DEBUG_FEP
...@@ -48,7 +49,9 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue, ...@@ -48,7 +49,9 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
unsigned int nb_prefix_samples; unsigned int nb_prefix_samples;
unsigned int nb_prefix_samples0; unsigned int nb_prefix_samples0;
if (ue->is_synchronized) {
if ((get_softmodem_params()->sl_mode == SL_MODE_2 && ue->is_synchronized_sl)
|| (get_softmodem_params()->sl_mode != SL_MODE_2 && ue->is_synchronized)) {
nb_prefix_samples = frame_parms->nb_prefix_samples; nb_prefix_samples = frame_parms->nb_prefix_samples;
nb_prefix_samples0 = frame_parms->nb_prefix_samples0; nb_prefix_samples0 = frame_parms->nb_prefix_samples0;
} else { } else {
...@@ -130,11 +133,11 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue, ...@@ -130,11 +133,11 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
unsigned int nb_prefix_samples; unsigned int nb_prefix_samples;
unsigned int nb_prefix_samples0; unsigned int nb_prefix_samples0;
if (pbch_decoded) {
if (pbch_decoded || (get_softmodem_params()->sl_mode == SL_MODE_2 && ue->is_synchronized_sl)) {
nb_prefix_samples = frame_parms->nb_prefix_samples; nb_prefix_samples = frame_parms->nb_prefix_samples;
nb_prefix_samples0 = frame_parms->nb_prefix_samples0; nb_prefix_samples0 = frame_parms->nb_prefix_samples0;
} } else {
else {
nb_prefix_samples = frame_parms->nb_prefix_samples; nb_prefix_samples = frame_parms->nb_prefix_samples;
nb_prefix_samples0 = frame_parms->nb_prefix_samples; nb_prefix_samples0 = frame_parms->nb_prefix_samples;
} }
......
...@@ -89,10 +89,13 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms, ...@@ -89,10 +89,13 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
else else
sync_offset = 0; sync_offset = 0;
if ( abs(diff) < (SYNCH_HYST+sync_offset) ) if (abs(diff) < (SYNCH_HYST + sync_offset)) {
ue->rx_offset = 0; ue->rx_offset = 0;
else ue->rx_offset_sl = 0;
} else {
ue->rx_offset = diff; ue->rx_offset = diff;
ue->rx_offset_sl = diff;
}
const int sample_shift = -(ue->rx_offset>>1); const int sample_shift = -(ue->rx_offset>>1);
// reset IIR filter for next offset calculation // reset IIR filter for next offset calculation
......
...@@ -138,7 +138,8 @@ void generate_pss_nr(NR_DL_FRAME_PARMS *fp, int N_ID_2) ...@@ -138,7 +138,8 @@ void generate_pss_nr(NR_DL_FRAME_PARMS *fp, int N_ID_2)
* sample 0 is for continuous frequency which is used here * sample 0 is for continuous frequency which is used here
*/ */
unsigned int subcarrier_start = get_softmodem_params()->sl_mode == 0 ? PSS_SSS_SUB_CARRIER_START : PSS_SSS_SUB_CARRIER_START_SL; unsigned int subcarrier_start =
get_softmodem_params()->sl_mode == SL_MODE_NONE ? PSS_SSS_SUB_CARRIER_START : PSS_SSS_SUB_CARRIER_START_SL;
unsigned int k = fp->first_carrier_offset + fp->ssb_start_subcarrier + subcarrier_start; unsigned int k = fp->first_carrier_offset + fp->ssb_start_subcarrier + subcarrier_start;
if (k>= fp->ofdm_symbol_size) k-=fp->ofdm_symbol_size; if (k>= fp->ofdm_symbol_size) k-=fp->ofdm_symbol_size;
c16_t synchroF_tmp[fp->ofdm_symbol_size] __attribute__((aligned(32))); c16_t synchroF_tmp[fp->ofdm_symbol_size] __attribute__((aligned(32)));
...@@ -237,7 +238,7 @@ void generate_pss_nr(NR_DL_FRAME_PARMS *fp, int N_ID_2) ...@@ -237,7 +238,7 @@ void generate_pss_nr(NR_DL_FRAME_PARMS *fp, int N_ID_2)
static void init_context_pss_nr(NR_DL_FRAME_PARMS *frame_parms_ue) static void init_context_pss_nr(NR_DL_FRAME_PARMS *frame_parms_ue)
{ {
AssertFatal(frame_parms_ue->ofdm_symbol_size > 127, "illegal ofdm_symbol_size %d\n", frame_parms_ue->ofdm_symbol_size); AssertFatal(frame_parms_ue->ofdm_symbol_size > 127, "illegal ofdm_symbol_size %d\n", frame_parms_ue->ofdm_symbol_size);
int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL; int pss_sequence = get_softmodem_params()->sl_mode == SL_MODE_NONE ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL;
for (int i = 0; i < pss_sequence; i++) { for (int i = 0; i < pss_sequence; i++) {
primary_synchro_nr2[i] = malloc16_clear(LENGTH_PSS_NR * sizeof(int16_t)); primary_synchro_nr2[i] = malloc16_clear(LENGTH_PSS_NR * sizeof(int16_t));
AssertFatal(primary_synchro_nr2[i], "Fatal memory allocation problem \n"); AssertFatal(primary_synchro_nr2[i], "Fatal memory allocation problem \n");
...@@ -563,6 +564,9 @@ static int pss_search_time_nr(c16_t **rxdata, PHY_VARS_NR_UE *ue, int fo_flag, i ...@@ -563,6 +564,9 @@ static int pss_search_time_nr(c16_t **rxdata, PHY_VARS_NR_UE *ue, int fo_flag, i
{ {
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
int *nid2 = (int *)&ue->common_vars.nid2; int *nid2 = (int *)&ue->common_vars.nid2;
if (get_softmodem_params()->sl_mode == SL_MODE_2) {
nid2 = (int *)&ue->common_vars.sl_nid2;
}
int *f_off = (int *)&ue->common_vars.freq_offset; int *f_off = (int *)&ue->common_vars.freq_offset;
unsigned int n, ar, peak_position, pss_source; unsigned int n, ar, peak_position, pss_source;
int64_t peak_value; int64_t peak_value;
...@@ -584,7 +588,7 @@ static int pss_search_time_nr(c16_t **rxdata, PHY_VARS_NR_UE *ue, int fo_flag, i ...@@ -584,7 +588,7 @@ static int pss_search_time_nr(c16_t **rxdata, PHY_VARS_NR_UE *ue, int fo_flag, i
pss_source = 0; pss_source = 0;
int maxval=0; int maxval=0;
int max_size = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL; int max_size = get_softmodem_params()->sl_mode == SL_MODE_NONE ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL;
for (int j = 0; j < max_size; j++) for (int j = 0; j < max_size; j++)
for (int i = 0; i < frame_parms->ofdm_symbol_size; i++) { for (int i = 0; i < frame_parms->ofdm_symbol_size; i++) {
maxval = max(maxval, abs(primary_synchro_time_nr[j][i].r)); maxval = max(maxval, abs(primary_synchro_time_nr[j][i].r));
...@@ -597,7 +601,7 @@ static int pss_search_time_nr(c16_t **rxdata, PHY_VARS_NR_UE *ue, int fo_flag, i ...@@ -597,7 +601,7 @@ static int pss_search_time_nr(c16_t **rxdata, PHY_VARS_NR_UE *ue, int fo_flag, i
/* Correlation computation is based on a a dot product which is realized thank to SIMS extensions */ /* Correlation computation is based on a a dot product which is realized thank to SIMS extensions */
uint16_t pss_index_start = 0; uint16_t pss_index_start = 0;
uint16_t pss_index_end = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL; uint16_t pss_index_end = get_softmodem_params()->sl_mode == SL_MODE_NONE ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL;
if (ue->target_Nid_cell != -1) { if (ue->target_Nid_cell != -1) {
pss_index_start = GET_NID2(ue->target_Nid_cell); pss_index_start = GET_NID2(ue->target_Nid_cell);
pss_index_end = pss_index_start + 1; pss_index_end = pss_index_start + 1;
...@@ -612,17 +616,21 @@ static int pss_search_time_nr(c16_t **rxdata, PHY_VARS_NR_UE *ue, int fo_flag, i ...@@ -612,17 +616,21 @@ static int pss_search_time_nr(c16_t **rxdata, PHY_VARS_NR_UE *ue, int fo_flag, i
for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) { for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) {
/* perform correlation of rx data and pss sequence ie it is a dot product */ /* perform correlation of rx data and pss sequence ie it is a dot product */
int index = n + is * frame_parms->samples_per_frame;
const c32_t result =
dot_product(primary_synchro_time_nr[pss_index], &(rxdata[ar][index]), frame_parms->ofdm_symbol_size, shift);
const c64_t r64 = {.r = result.r, .i = result.i};
pss_corr_ue += squaredMod(r64);
if (get_softmodem_params()->sl_mode > SL_MODE_NONE) {
// non-coherentely combine repeition of PSS
int shift_for_pss1 = frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples;
const c32_t result = dot_product(primary_synchro_time_nr[pss_index], const c32_t result = dot_product(primary_synchro_time_nr[pss_index],
&(rxdata[ar][n + is * frame_parms->samples_per_frame]), &(rxdata[ar][index + shift_for_pss1]),
frame_parms->ofdm_symbol_size, frame_parms->ofdm_symbol_size,
shift); shift);
const c64_t r64 = {.r = result.r, .i = result.i}; const c64_t r64 = {.r = result.r, .i = result.i};
pss_corr_ue += squaredMod(r64); pss_corr_ue += squaredMod(r64);
//((short*)pss_corr_ue[pss_index])[2*n] += ((short*) &result)[0]; /* real part */ }
//((short*)pss_corr_ue[pss_index])[2*n+1] += ((short*) &result)[1]; /* imaginary part */
//((short*)&synchro_out)[0] += ((int*) &result)[0]; /* real part */
//((short*)&synchro_out)[1] += ((int*) &result)[1]; /* imaginary part */
} }
/* calculate the absolute value of sync_corr[n] */ /* calculate the absolute value of sync_corr[n] */
......
...@@ -78,7 +78,7 @@ void init_context_sss_nr(int amp) ...@@ -78,7 +78,7 @@ void init_context_sss_nr(int amp)
int16_t x1[LENGTH_SSS_NR]; int16_t x1[LENGTH_SSS_NR];
int16_t dss_current; int16_t dss_current;
int m0, m1; int m0, m1;
int nid_2_num = get_softmodem_params()->sl_mode == 0 ? N_ID_2_NUMBER : N_ID_2_NUMBER_SL; int nid_2_num = get_softmodem_params()->sl_mode == SL_MODE_NONE ? N_ID_2_NUMBER : N_ID_2_NUMBER_SL;
const int x0_initial[INITIAL_SSS_NR] = { 1, 0, 0, 0, 0, 0, 0 }; const int x0_initial[INITIAL_SSS_NR] = { 1, 0, 0, 0, 0, 0, 0 };
const int x1_initial[INITIAL_SSS_NR] = { 1, 0, 0, 0, 0, 0, 0 }; const int x1_initial[INITIAL_SSS_NR] = { 1, 0, 0, 0, 0, 0, 0 };
...@@ -270,9 +270,8 @@ static int do_pss_sss_extract_nr( ...@@ -270,9 +270,8 @@ static int do_pss_sss_extract_nr(
for (int aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) { for (int aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
int pss_symbol = 0; int pss_symbol = 0;
int sss_symbol = get_softmodem_params()->sl_mode == 0 ? int sss_symbol =
(SSS_SYMBOL_NB - PSS_SYMBOL_NB) : get_softmodem_params()->sl_mode == SL_MODE_NONE ? (SSS_SYMBOL_NB - PSS_SYMBOL_NB) : (SSS0_SL_SYMBOL_NB - PSS0_SL_SYMBOL_NB);
(SSS0_SL_SYMBOL_NB - PSS0_SL_SYMBOL_NB) ;
unsigned int ofdm_symbol_size = frame_parms->ofdm_symbol_size; unsigned int ofdm_symbol_size = frame_parms->ofdm_symbol_size;
c16_t *pss_rxF = rxdataF[aarx] + pss_symbol * ofdm_symbol_size; c16_t *pss_rxF = rxdataF[aarx] + pss_symbol * ofdm_symbol_size;
...@@ -281,11 +280,9 @@ static int do_pss_sss_extract_nr( ...@@ -281,11 +280,9 @@ static int do_pss_sss_extract_nr(
c16_t *pss_rxF_ext = pss_ext[aarx]; c16_t *pss_rxF_ext = pss_ext[aarx];
c16_t *sss_rxF_ext = sss_ext[aarx]; c16_t *sss_rxF_ext = sss_ext[aarx];
unsigned int k = frame_parms->first_carrier_offset + unsigned int k =
frame_parms->ssb_start_subcarrier + frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier
((get_softmodem_params()->sl_mode == 0) ? + ((get_softmodem_params()->sl_mode == SL_MODE_NONE) ? PSS_SSS_SUB_CARRIER_START : PSS_SSS_SUB_CARRIER_START_SL);
PSS_SSS_SUB_CARRIER_START :
PSS_SSS_SUB_CARRIER_START_SL);
if (k>= frame_parms->ofdm_symbol_size) k-=frame_parms->ofdm_symbol_size; if (k>= frame_parms->ofdm_symbol_size) k-=frame_parms->ofdm_symbol_size;
...@@ -371,7 +368,7 @@ bool rx_sss_nr(PHY_VARS_NR_UE *ue, ...@@ -371,7 +368,7 @@ bool rx_sss_nr(PHY_VARS_NR_UE *ue,
uint8_t i; uint8_t i;
c16_t pss_ext[NB_ANTENNAS_RX][LENGTH_PSS_NR]; c16_t pss_ext[NB_ANTENNAS_RX][LENGTH_PSS_NR];
c16_t sss_ext[NB_ANTENNAS_RX][LENGTH_SSS_NR]; c16_t sss_ext[NB_ANTENNAS_RX][LENGTH_SSS_NR];
uint8_t Nid2 = GET_NID2(ue->common_vars.nid2); uint8_t Nid2 = get_softmodem_params()->sl_mode == SL_MODE_NONE ? GET_NID2(ue->common_vars.nid2) : ue->common_vars.sl_nid2;
uint16_t Nid1; uint16_t Nid1;
uint8_t phase; uint8_t phase;
NR_DL_FRAME_PARMS *frame_parms=&ue->frame_parms; NR_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
......
...@@ -123,6 +123,8 @@ typedef enum { ...@@ -123,6 +123,8 @@ typedef enum {
NR_SSS_EST, NR_SSS_EST,
} NR_CHANNEL_EST_t; } NR_CHANNEL_EST_t;
typedef enum { SL_MODE_NONE = 0, SL_MODE_1, SL_MODE_2 } NR_SL_MODE_t;
#define debug_msg if (((mac_xface->frame%100) == 0) || (mac_xface->frame < 50)) msg #define debug_msg if (((mac_xface->frame%100) == 0) || (mac_xface->frame < 50)) msg
typedef struct { typedef struct {
...@@ -246,6 +248,7 @@ typedef struct { ...@@ -246,6 +248,7 @@ typedef struct {
int32_t freq_offset; int32_t freq_offset;
/// nid2 is the PSS value, the PCI (physical cell id) will be: 3*NID1 (SSS value) + NID2 (PSS value) /// nid2 is the PSS value, the PCI (physical cell id) will be: 3*NID1 (SSS value) + NID2 (PSS value)
int32_t nid2; int32_t nid2;
int32_t sl_nid2;
} NR_UE_COMMON; } NR_UE_COMMON;
#define NR_PRS_IDFT_OVERSAMP_FACTOR 1 // IDFT oversampling factor for NR PRS channel estimates in time domain, ALLOWED value 16x, and 1x is default(ie. IDFT size is frame_params->ofdm_symbol_size) #define NR_PRS_IDFT_OVERSAMP_FACTOR 1 // IDFT oversampling factor for NR PRS channel estimates in time domain, ALLOWED value 16x, and 1x is default(ie. IDFT size is frame_params->ofdm_symbol_size)
...@@ -395,7 +398,7 @@ typedef struct { ...@@ -395,7 +398,7 @@ typedef struct {
/// \brief Indicator that UE is synchronized to a gNB /// \brief Indicator that UE is synchronized to a gNB
int is_synchronized; int is_synchronized;
/// \brief Indicator that UE is synchronized to a SyncRef UE on Sidelink /// \brief Indicator that UE is synchronized to a SyncRef UE on Sidelink
int is_synchronized_sl; bool is_synchronized_sl;
/// \brief Target gNB Nid_cell when UE is resynchronizing /// \brief Target gNB Nid_cell when UE is resynchronizing
int target_Nid_cell; int target_Nid_cell;
/// \brief Indicator that UE is an SynchRef UE /// \brief Indicator that UE is an SynchRef UE
...@@ -534,6 +537,7 @@ typedef struct { ...@@ -534,6 +537,7 @@ typedef struct {
int ssb_offset; int ssb_offset;
uint16_t symbol_offset; /// offset in terms of symbols for detected ssb in sync uint16_t symbol_offset; /// offset in terms of symbols for detected ssb in sync
int rx_offset; /// Timing offset int rx_offset; /// Timing offset
int rx_offset_sl; /// Timing offset
int rx_offset_diff; /// Timing adjustment for ofdm symbol0 on HW USRP int rx_offset_diff; /// Timing adjustment for ofdm symbol0 on HW USRP
int64_t max_pos_fil; /// Timing offset IIR filter int64_t max_pos_fil; /// Timing offset IIR filter
bool apply_timing_offset; /// Do time sync for current frame bool apply_timing_offset; /// Do time sync for current frame
......
...@@ -141,7 +141,7 @@ int NB_UE_INST = 1; ...@@ -141,7 +141,7 @@ int NB_UE_INST = 1;
int main(int argc, char **argv){ int main(int argc, char **argv){
char c; char c;
get_softmodem_params()->sl_mode = 0; get_softmodem_params()->sl_mode = SL_MODE_NONE;
double sigma2, sigma2_dB = 0, SNR, snr0 = -2.0, snr1 = 0.0, ue_speed0 = 0.0, ue_speed1 = 0.0; double sigma2, sigma2_dB = 0, SNR, snr0 = -2.0, snr1 = 0.0, ue_speed0 = 0.0, ue_speed1 = 0.0;
double **s_re, **s_im, **r_re, **r_im, iqim = 0.0, delay_avg = 0, ue_speed = 0, fs=-1, bw; double **s_re, **s_im, **r_re, **r_im, iqim = 0.0, delay_avg = 0, ue_speed = 0, fs=-1, bw;
int i, l, aa, aarx, trial, n_frames = 1, prach_start, rx_prach_start; //, ntrials=1; int i, l, aa, aarx, trial, n_frames = 1, prach_start, rx_prach_start; //, ntrials=1;
......
...@@ -119,7 +119,7 @@ void test_synchro_pss_nr(PHY_VARS_NR_UE *PHY_VARS_NR_UE, int position_symbol, in ...@@ -119,7 +119,7 @@ void test_synchro_pss_nr(PHY_VARS_NR_UE *PHY_VARS_NR_UE, int position_symbol, in
/* search pss */ /* search pss */
synchro_position = pss_synchro_nr(PHY_VARS_NR_UE, rate_change); synchro_position = pss_synchro_nr(PHY_VARS_NR_UE, rate_change);
int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL; int pss_sequence = get_softmodem_params()->sl_mode == SL_MODE_NONE ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL;
if (pss_sequence_number < pss_sequence) { if (pss_sequence_number < pss_sequence) {
NID2_value = pss_sequence_number; NID2_value = pss_sequence_number;
...@@ -214,7 +214,7 @@ int main(int argc, char *argv[]) ...@@ -214,7 +214,7 @@ int main(int argc, char *argv[])
test_synchro_pss_nr(PHY_vars_UE, 0, INVALID_PSS_SEQUENCE, &test); test_synchro_pss_nr(PHY_vars_UE, 0, INVALID_PSS_SEQUENCE, &test);
#endif #endif
int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL; int pss_sequence = get_softmodem_params()->sl_mode == SL_MODE_NONE ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL;
for (int index_position = 0; index_position < size_test_position; index_position++) { for (int index_position = 0; index_position < size_test_position; index_position++) {
for (int number_pss_sequence = 0; number_pss_sequence < pss_sequence; number_pss_sequence++) { for (int number_pss_sequence = 0; number_pss_sequence < pss_sequence; number_pss_sequence++) {
......
...@@ -111,11 +111,11 @@ void phase_shift_samples(int16_t *samples, int length, int16_t phase_shift_re, i ...@@ -111,11 +111,11 @@ void phase_shift_samples(int16_t *samples, int length, int16_t phase_shift_re, i
void display_data(int pss_sequence_number, int16_t *rxdata, int position) { void display_data(int pss_sequence_number, int16_t *rxdata, int position) {
#ifdef DEBUG_TEST_PSS #ifdef DEBUG_TEST_PSS
int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL; int pss_sequence = get_softmodem_params()->sl_mode == SL_MODE_NONE ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL;
int16_t *pss_sequence[pss_sequence] = {primary_synch0_time, primary_synch1_time, primary_synch2_time}; int16_t *pss_sequence[pss_sequence] = {primary_synch0_time, primary_synch1_time, primary_synch2_time};
int16_t *pss_sequence_sl[pss_sequence] = {primary_synch0_time, primary_synch1_time}; int16_t *pss_sequence_sl[pss_sequence] = {primary_synch0_time, primary_synch1_time};
int16_t *pss_sequence_time = pss_sequence[pss_sequence_number];; int16_t *pss_sequence_time = pss_sequence[pss_sequence_number];;
if (get_softmodem_params()->sl_mode != 0) { if (get_softmodem_params()->sl_mode != SL_MODE_NONE) {
pss_sequence_time = pss_sequence_sl[pss_sequence_number]; pss_sequence_time = pss_sequence_sl[pss_sequence_number];
printf(" pss %6d data \n", pss_sequence_number); printf(" pss %6d data \n", pss_sequence_number);
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
...@@ -245,7 +245,7 @@ int init_test(unsigned char N_tx, unsigned char N_rx, unsigned char transmission ...@@ -245,7 +245,7 @@ int init_test(unsigned char N_tx, unsigned char N_rx, unsigned char transmission
int n_ssb_crb = 0; int n_ssb_crb = 0;
int ssb_subcarrier_offset = 0; int ssb_subcarrier_offset = 0;
nr_init_frame_parms_ue(frame_parms, mu, extended_prefix_flag, N_RB_DL, n_ssb_crb, ssb_subcarrier_offset); nr_init_frame_parms_ue(frame_parms, mu, extended_prefix_flag, N_RB_DL, n_ssb_crb, ssb_subcarrier_offset);
int nid_2_num = get_softmodem_params()->sl_mode == 0 ? N_ID_2_NUMBER : N_ID_2_NUMBER_SL; int nid_2_num = get_softmodem_params()->sl_mode == SL_MODE_NONE ? N_ID_2_NUMBER : N_ID_2_NUMBER_SL;
PHY_vars_UE->frame_parms.Nid_cell = (3 * N_ID_1_NUMBER) + nid_2_num; /* set to unvalid value */ PHY_vars_UE->frame_parms.Nid_cell = (3 * N_ID_1_NUMBER) + nid_2_num; /* set to unvalid value */
//phy_init_nr_top(frame_parms); //phy_init_nr_top(frame_parms);
...@@ -451,7 +451,7 @@ int set_pss_in_rx_buffer(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int p ...@@ -451,7 +451,7 @@ int set_pss_in_rx_buffer(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int p
printf("This pss sequence can not be fully written in the received window \n"); printf("This pss sequence can not be fully written in the received window \n");
return (-1); return (-1);
} }
int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL; int pss_sequence = get_softmodem_params()->sl_mode == SL_MODE_NONE ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL;
if ((pss_sequence_number >= pss_sequence) && (pss_sequence_number < 0)) { if ((pss_sequence_number >= pss_sequence) && (pss_sequence_number < 0)) {
printf("Unknow pss sequence %d \n", pss_sequence_number); printf("Unknow pss sequence %d \n", pss_sequence_number);
return (-1); return (-1);
...@@ -508,7 +508,7 @@ void set_sequence_pss(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int pss_ ...@@ -508,7 +508,7 @@ void set_sequence_pss(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int pss_
if (position_symbol < 0) { if (position_symbol < 0) {
set_pss_in_rx_buffer_from_external_buffer(PHY_vars_UE, input_buffer); set_pss_in_rx_buffer_from_external_buffer(PHY_vars_UE, input_buffer);
} }
int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL; int pss_sequence = get_softmodem_params()->sl_mode == SL_MODE_NONE ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL;
/* write pss sequence in received ue buffer */ /* write pss sequence in received ue buffer */
else if (pss_sequence_number < pss_sequence) { else if (pss_sequence_number < pss_sequence) {
if (position_symbol > (samples_for_frame - frame_parms->ofdm_symbol_size)) { if (position_symbol > (samples_for_frame - frame_parms->ofdm_symbol_size)) {
......
...@@ -227,7 +227,7 @@ int main(int argc, char *argv[]) ...@@ -227,7 +227,7 @@ int main(int argc, char *argv[])
Nid2 = GET_NID2(Nid_cell[index]); Nid2 = GET_NID2(Nid_cell[index]);
Nid1 = GET_NID1(Nid_cell[index]); Nid1 = GET_NID1(Nid_cell[index]);
int nid_2_num = get_softmodem_params()->sl_mode == 0 ? N_ID_2_NUMBER : N_ID_2_NUMBER_SL; int nid_2_num = get_softmodem_params()->sl_mode == SL_MODE_NONE ? N_ID_2_NUMBER : N_ID_2_NUMBER_SL;
for (int position = 0; position < size_test_position; position++) { for (int position = 0; position < size_test_position; position++) {
PHY_vars_UE->frame_parms.Nid_cell = (3 * N_ID_1_NUMBER) + nid_2_num; /* set to invalid value */ PHY_vars_UE->frame_parms.Nid_cell = (3 * N_ID_1_NUMBER) + nid_2_num; /* set to invalid value */
......
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