Commit edce7881 authored by Florian Kaltenberger's avatar Florian Kaltenberger

Merge remote-tracking branch 'origin/develop-nr' into nr-cfo-estimation

parents 5c1c45df 8f96cd50
...@@ -212,7 +212,7 @@ pipeline { ...@@ -212,7 +212,7 @@ pipeline {
steps { steps {
gitlabCommitStatus(name: "Build eNb-ethernet") { gitlabCommitStatus(name: "Build eNb-ethernet") {
timeout (time: 20, unit: 'MINUTES') { timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
} }
} }
} }
...@@ -221,7 +221,7 @@ pipeline { ...@@ -221,7 +221,7 @@ pipeline {
steps { steps {
gitlabCommitStatus(name: "Build UE-ethernet") { gitlabCommitStatus(name: "Build UE-ethernet") {
timeout (time: 20, unit: 'MINUTES') { timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
} }
} }
} }
......
...@@ -197,8 +197,8 @@ MACRLCs = ( ...@@ -197,8 +197,8 @@ MACRLCs = (
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
phy_test_mode = 0; phy_test_mode = 0;
puSch10xSnr = 200; puSch10xSnr = 160;
puCch10xSnr = 200; puCch10xSnr = 160;
} }
); );
...@@ -227,7 +227,7 @@ RUs = ( ...@@ -227,7 +227,7 @@ RUs = (
THREAD_STRUCT = ( THREAD_STRUCT = (
{ {
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE"; worker_config = "WORKER_ENABLE";
} }
......
...@@ -197,8 +197,8 @@ MACRLCs = ( ...@@ -197,8 +197,8 @@ MACRLCs = (
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
phy_test_mode = 0; phy_test_mode = 0;
puSch10xSnr = 200; puSch10xSnr = 160;
puCch10xSnr = 200; puCch10xSnr = 160;
} }
); );
...@@ -218,7 +218,7 @@ RUs = ( ...@@ -218,7 +218,7 @@ RUs = (
att_rx = 0; att_rx = 0;
bands = [7]; bands = [7];
max_pdschReferenceSignalPower = -27; max_pdschReferenceSignalPower = -27;
max_rxgain = 115; max_rxgain = 125;
eNB_instances = [0]; eNB_instances = [0];
} }
...@@ -227,7 +227,7 @@ RUs = ( ...@@ -227,7 +227,7 @@ RUs = (
THREAD_STRUCT = ( THREAD_STRUCT = (
{ {
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE"; worker_config = "WORKER_ENABLE";
} }
......
...@@ -197,8 +197,8 @@ MACRLCs = ( ...@@ -197,8 +197,8 @@ MACRLCs = (
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
phy_test_mode = 0; phy_test_mode = 0;
puSch10xSnr = 200; puSch10xSnr = 160;
puCch10xSnr = 200; puCch10xSnr = 160;
} }
); );
...@@ -218,7 +218,7 @@ RUs = ( ...@@ -218,7 +218,7 @@ RUs = (
att_rx = 0; att_rx = 0;
bands = [7]; bands = [7];
max_pdschReferenceSignalPower = -27; max_pdschReferenceSignalPower = -27;
max_rxgain = 115; max_rxgain = 120;
eNB_instances = [0]; eNB_instances = [0];
} }
...@@ -227,7 +227,7 @@ RUs = ( ...@@ -227,7 +227,7 @@ RUs = (
THREAD_STRUCT = ( THREAD_STRUCT = (
{ {
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE"; worker_config = "WORKER_ENABLE";
} }
......
...@@ -200,8 +200,8 @@ MACRLCs = ( ...@@ -200,8 +200,8 @@ MACRLCs = (
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
phy_test_mode = 0; phy_test_mode = 0;
puSch10xSnr = 200; puSch10xSnr = 160;
puCch10xSnr = 200; puCch10xSnr = 160;
} }
); );
...@@ -234,7 +234,7 @@ RUs = ( ...@@ -234,7 +234,7 @@ RUs = (
THREAD_STRUCT = ( THREAD_STRUCT = (
{ {
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE"; worker_config = "WORKER_ENABLE";
} }
......
...@@ -200,8 +200,8 @@ MACRLCs = ( ...@@ -200,8 +200,8 @@ MACRLCs = (
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
phy_test_mode = 0; phy_test_mode = 0;
puSch10xSnr = 200; puSch10xSnr = 160;
puCch10xSnr = 200; puCch10xSnr = 160;
} }
); );
...@@ -234,7 +234,7 @@ RUs = ( ...@@ -234,7 +234,7 @@ RUs = (
THREAD_STRUCT = ( THREAD_STRUCT = (
{ {
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE"; worker_config = "WORKER_ENABLE";
} }
......
...@@ -200,8 +200,8 @@ MACRLCs = ( ...@@ -200,8 +200,8 @@ MACRLCs = (
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
phy_test_mode = 0; phy_test_mode = 0;
puSch10xSnr = 200; puSch10xSnr = 160;
puCch10xSnr = 200; puCch10xSnr = 160;
} }
); );
...@@ -234,7 +234,7 @@ RUs = ( ...@@ -234,7 +234,7 @@ RUs = (
THREAD_STRUCT = ( THREAD_STRUCT = (
{ {
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE"; worker_config = "WORKER_ENABLE";
} }
......
...@@ -20,7 +20,7 @@ RUs = ( ...@@ -20,7 +20,7 @@ RUs = (
THREAD_STRUCT = ( THREAD_STRUCT = (
{ {
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE"; worker_config = "WORKER_ENABLE";
} }
......
...@@ -1504,7 +1504,8 @@ class SSHConnection(): ...@@ -1504,7 +1504,8 @@ class SSHConnection():
return ENB_PROCESS_ASSERTION return ENB_PROCESS_ASSERTION
if foundRealTimeIssue: if foundRealTimeIssue:
logging.debug('\u001B[1;37;41m eNB faced real time issues! \u001B[0m') logging.debug('\u001B[1;37;41m eNB faced real time issues! \u001B[0m')
return ENB_PROCESS_REALTIME_ISSUE self.htmleNBFailureMsg += 'eNB faced real time issues!\n'
#return ENB_PROCESS_REALTIME_ISSUE
return 0 return 0
def TerminateeNB(self): def TerminateeNB(self):
......
...@@ -252,7 +252,7 @@ case $key in ...@@ -252,7 +252,7 @@ case $key in
VM_NAME=ci-phy-sim VM_NAME=ci-phy-sim
ARCHIVES_LOC=phy_sim ARCHIVES_LOC=phy_sim
LOG_PATTERN=.Rel15.txt LOG_PATTERN=.Rel15.txt
NB_PATTERN_FILES=7 NB_PATTERN_FILES=8
BUILD_OPTIONS="--phy_simulators" BUILD_OPTIONS="--phy_simulators"
RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b" RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b"
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
...@@ -330,7 +330,7 @@ case $key in ...@@ -330,7 +330,7 @@ case $key in
VM_NAME=ci-phy-sim VM_NAME=ci-phy-sim
ARCHIVES_LOC=phy_sim ARCHIVES_LOC=phy_sim
LOG_PATTERN=.Rel15.txt LOG_PATTERN=.Rel15.txt
NB_PATTERN_FILES=7 NB_PATTERN_FILES=8
BUILD_OPTIONS="--phy_simulators" BUILD_OPTIONS="--phy_simulators"
RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b" RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b"
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
......
...@@ -165,6 +165,10 @@ function check_on_vm_build { ...@@ -165,6 +165,10 @@ function check_on_vm_build {
fi fi
done done
if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]; then STATUS=-1; fi if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]
then
echo "Expecting $NB_PATTERN_FILES log files and found $NB_FOUND_FILES"
STATUS=-1
fi
} }
...@@ -1065,12 +1065,12 @@ ...@@ -1065,12 +1065,12 @@
<pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec> <pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
<pre_exec_args></pre_exec_args> <pre_exec_args></pre_exec_args>
<main_exec> $OPENAIR_DIR/targets/bin/nr_pbchsim.Rel15</main_exec> <main_exec> $OPENAIR_DIR/targets/bin/nr_pbchsim.Rel15</main_exec>
<main_exec_args>-s-11 -S-10 -n1000 -R106 <main_exec_args>-s0 -S1 -n1000 -R106
-s-11 -S-10 -n10 -I -R106 -s0 -S1 -n10 -I -R106
-s-11 -S-10 -n1000 -R217 -N10 -s0 -S1 -n1000 -R217 -N10
-s-11 -S-10 -n10 -I -R217 -N10 -s0 -S1 -n10 -I -R217 -N10
-s-11 -S-10 -n1000 -R273 -N20 -s0 -S1 -n1000 -R273 -N20
-s-11 -S-10 -n10 -I -R273 -N20</main_exec_args> -s0 -S1 -n10 -I -R273 -N20</main_exec_args>
<tags>nr_pbchsim.test1 nr_pbchsim.test2</tags> <tags>nr_pbchsim.test1 nr_pbchsim.test2</tags>
<search_expr_true>PBCH test OK</search_expr_true> <search_expr_true>PBCH test OK</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false> <search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
......
...@@ -696,7 +696,7 @@ function main() { ...@@ -696,7 +696,7 @@ function main() {
echo_info "Compiling unitary tests simulators" echo_info "Compiling unitary tests simulators"
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim # TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
#simlist="dlsim_tm4 dlsim ulsim pucchsim prachsim pdcchsim pbchsim mbmssim" #simlist="dlsim_tm4 dlsim ulsim pucchsim prachsim pdcchsim pbchsim mbmssim"
simlist="dlsim ulsim polartest ldpctest nr_pbchsim nr_dlschsim" simlist="dlsim ulsim polartest ldpctest nr_pbchsim nr_dlschsim nr_dlsim"
for f in $simlist ; do for f in $simlist ; do
compilations \ compilations \
phy_simulators $f \ phy_simulators $f \
......
...@@ -197,10 +197,11 @@ typedef struct { ...@@ -197,10 +197,11 @@ typedef struct {
} fapi_nr_rx_indication_body_t; } fapi_nr_rx_indication_body_t;
/// ///
#define NFAPI_RX_IND_MAX_PDU 100
typedef struct { typedef struct {
uint32_t sfn_slot; uint32_t sfn_slot;
uint16_t number_pdus; uint16_t number_pdus;
fapi_nr_rx_indication_body_t *rx_indication_body; fapi_nr_rx_indication_body_t rx_indication_body[NFAPI_RX_IND_MAX_PDU];
} fapi_nr_rx_indication_t; } fapi_nr_rx_indication_t;
typedef struct { typedef struct {
......
...@@ -51,8 +51,8 @@ uint16_t nr_pbch_extract(int **rxdataF, ...@@ -51,8 +51,8 @@ uint16_t nr_pbch_extract(int **rxdataF,
int **rxdataF_ext, int **rxdataF_ext,
int **dl_ch_estimates_ext, int **dl_ch_estimates_ext,
uint32_t symbol, uint32_t symbol,
uint32_t s_offset,
uint32_t high_speed_flag, uint32_t high_speed_flag,
int is_synchronized,
NR_DL_FRAME_PARMS *frame_parms) NR_DL_FRAME_PARMS *frame_parms)
{ {
...@@ -65,18 +65,15 @@ uint16_t nr_pbch_extract(int **rxdataF, ...@@ -65,18 +65,15 @@ uint16_t nr_pbch_extract(int **rxdataF,
unsigned int rx_offset = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier; //and unsigned int rx_offset = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier; //and
if (rx_offset>= frame_parms->ofdm_symbol_size) rx_offset-=frame_parms->ofdm_symbol_size; if (rx_offset>= frame_parms->ofdm_symbol_size) rx_offset-=frame_parms->ofdm_symbol_size;
int s_offset=0;
AssertFatal(symbol>=1 && symbol<5, AssertFatal(symbol>=1 && symbol<5,
"symbol %d illegal for PBCH extraction\n", "symbol %d illegal for PBCH extraction\n",
symbol); symbol);
if (is_synchronized==1) s_offset=4;
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
rxF = &rxdataF[aarx][(symbol+s_offset)*frame_parms->ofdm_symbol_size]; rxF = &rxdataF[aarx][(symbol+s_offset)*frame_parms->ofdm_symbol_size];
rxF_ext = &rxdataF_ext[aarx][(symbol+s_offset)*(20*12)]; rxF_ext = &rxdataF_ext[aarx][symbol*20*12];
#ifdef DEBUG_PBCH #ifdef DEBUG_PBCH
printf("extract_rbs (nushift %d): rx_offset=%d, symbol %d\n",frame_parms->nushift, printf("extract_rbs (nushift %d): rx_offset=%d, symbol %d\n",frame_parms->nushift,
(rx_offset + ((symbol+s_offset)*(frame_parms->ofdm_symbol_size))),symbol); (rx_offset + ((symbol+s_offset)*(frame_parms->ofdm_symbol_size))),symbol);
...@@ -143,7 +140,7 @@ uint16_t nr_pbch_extract(int **rxdataF, ...@@ -143,7 +140,7 @@ uint16_t nr_pbch_extract(int **rxdataF,
//printf("dl_ch0 addr %p\n",dl_ch0); //printf("dl_ch0 addr %p\n",dl_ch0);
dl_ch0_ext = &dl_ch_estimates_ext[aarx][(symbol+s_offset)*(20*12)]; dl_ch0_ext = &dl_ch_estimates_ext[aarx][symbol*20*12];
for (rb=0; rb<20; rb++) { for (rb=0; rb<20; rb++) {
j=0; j=0;
...@@ -268,8 +265,7 @@ void nr_pbch_channel_compensation(int **rxdataF_ext, ...@@ -268,8 +265,7 @@ void nr_pbch_channel_compensation(int **rxdataF_ext,
int **dl_ch_estimates_ext, int **dl_ch_estimates_ext,
int **rxdataF_comp, int **rxdataF_comp,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
uint8_t symbol, uint32_t symbol,
int is_synchronized,
uint8_t output_shift) uint8_t output_shift)
{ {
...@@ -290,14 +286,11 @@ void nr_pbch_channel_compensation(int **rxdataF_ext, ...@@ -290,14 +286,11 @@ void nr_pbch_channel_compensation(int **rxdataF_ext,
#endif #endif
AssertFatal((symbol > 0 && symbol < 4 && is_synchronized == 0) || AssertFatal((symbol > 0 && symbol < 4),
(symbol > 4 && symbol < 8 && is_synchronized == 1), "symbol %d is illegal for PBCH DM-RS\n",
"symbol %d is illegal for PBCH DM-RS (is_synchronized %d)\n", symbol);
symbol,is_synchronized);
if (symbol == 2 || symbol == 6) nb_re = 72; if (symbol == 2) nb_re = 72;
// printf("comp: symbol %d : nb_re %d\n",symbol,nb_re); // printf("comp: symbol %d : nb_re %d\n",symbol,nb_re);
...@@ -559,31 +552,35 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -559,31 +552,35 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
// clear LLR buffer // clear LLR buffer
memset(nr_ue_pbch_vars->llr,0,NR_POLAR_PBCH_E); memset(nr_ue_pbch_vars->llr,0,NR_POLAR_PBCH_E);
int first_symbol=1; int symbol_offset=1;
if (ue->is_synchronized > 0) first_symbol+=4; if (ue->is_synchronized > 0)
symbol_offset=4;
else
symbol_offset=0;
#ifdef DEBUG_PBCH #ifdef DEBUG_PBCH
//printf("address dataf %p",nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF); //printf("address dataf %p",nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF);
write_output("rxdataF0_pbch.m","rxF0pbch", write_output("rxdataF0_pbch.m","rxF0pbch",
&nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF[0][first_symbol*frame_parms->ofdm_symbol_size],frame_parms->ofdm_symbol_size*3,1,1); &nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF[0][(symbol_offset+1)*frame_parms->ofdm_symbol_size],frame_parms->ofdm_symbol_size*3,1,1);
#endif #endif
for (symbol=first_symbol; symbol<(first_symbol+3); symbol++) { // symbol refers to symbol within SSB. symbol_offset is the offset of the SSB wrt start of slot
for (symbol=1; symbol<4; symbol++) {
nr_pbch_extract(nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF, nr_pbch_extract(nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF,
nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].dl_ch_estimates[eNB_id], nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].dl_ch_estimates[eNB_id],
nr_ue_pbch_vars->rxdataF_ext, nr_ue_pbch_vars->rxdataF_ext,
nr_ue_pbch_vars->dl_ch_estimates_ext, nr_ue_pbch_vars->dl_ch_estimates_ext,
symbol-first_symbol+1, symbol,
symbol_offset,
high_speed_flag, high_speed_flag,
ue->is_synchronized,
frame_parms); frame_parms);
#ifdef DEBUG_PBCH #ifdef DEBUG_PBCH
LOG_I(PHY,"[PHY] PBCH Symbol %d ofdm size %d\n",symbol, frame_parms->ofdm_symbol_size ); LOG_I(PHY,"[PHY] PBCH Symbol %d ofdm size %d\n",symbol, frame_parms->ofdm_symbol_size );
LOG_I(PHY,"[PHY] PBCH starting channel_level\n"); LOG_I(PHY,"[PHY] PBCH starting channel_level\n");
#endif #endif
if (symbol == 1 || symbol == 5) { if (symbol == 1) {
max_h = nr_pbch_channel_level(nr_ue_pbch_vars->dl_ch_estimates_ext, max_h = nr_pbch_channel_level(nr_ue_pbch_vars->dl_ch_estimates_ext,
frame_parms, frame_parms,
symbol); symbol);
...@@ -599,7 +596,6 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -599,7 +596,6 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
nr_ue_pbch_vars->rxdataF_comp, nr_ue_pbch_vars->rxdataF_comp,
frame_parms, frame_parms,
symbol, symbol,
ue->is_synchronized,
nr_ue_pbch_vars->log2_maxh); // log2_maxh+I0_shift nr_ue_pbch_vars->log2_maxh); // log2_maxh+I0_shift
/*if (frame_parms->nb_antennas_rx > 1) /*if (frame_parms->nb_antennas_rx > 1)
...@@ -615,7 +611,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -615,7 +611,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
return(-1); return(-1);
} }
*/ */
if (symbol==(first_symbol+1)) { if (symbol==1) {
nr_pbch_quantize(pbch_e_rx, nr_pbch_quantize(pbch_e_rx,
(short*)&(nr_ue_pbch_vars->rxdataF_comp[0][symbol*240]), (short*)&(nr_ue_pbch_vars->rxdataF_comp[0][symbol*240]),
144); 144);
...@@ -633,7 +629,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -633,7 +629,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
} }
#ifdef DEBUG_PBCH #ifdef DEBUG_PBCH
write_output("rxdataF_comp.m","rxFcomp",&nr_ue_pbch_vars->rxdataF_comp[0][240*first_symbol],240*3,1,1); write_output("rxdataF_comp.m","rxFcomp",&nr_ue_pbch_vars->rxdataF_comp[0][240],240*3,1,1);
#endif #endif
...@@ -644,7 +640,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -644,7 +640,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
#ifdef DEBUG_PBCH #ifdef DEBUG_PBCH
//pbch_e_rx = &nr_ue_pbch_vars->llr[0]; //pbch_e_rx = &nr_ue_pbch_vars->llr[0];
short *p = (short *)&(nr_ue_pbch_vars->rxdataF_comp[0][first_symbol*20*12]); short *p = (short *)&(nr_ue_pbch_vars->rxdataF_comp[0][20*12]);
for (int cnt = 0; cnt < 864 ; cnt++) for (int cnt = 0; cnt < 864 ; cnt++)
printf("pbch rx llr %d\n",*(pbch_e_rx+cnt)); printf("pbch rx llr %d\n",*(pbch_e_rx+cnt));
...@@ -720,14 +716,13 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -720,14 +716,13 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
ue->dl_indication.rx_ind = &ue->rx_ind; // hang on rx_ind instance ue->dl_indication.rx_ind = &ue->rx_ind; // hang on rx_ind instance
//ue->rx_ind.sfn_slot = 0; //should be set by higher-1-layer, i.e. clean_and_set_if_instance() //ue->rx_ind.sfn_slot = 0; //should be set by higher-1-layer, i.e. clean_and_set_if_instance()
ue->rx_ind.number_pdus = ue->rx_ind.number_pdus + 1; ue->rx_ind.rx_indication_body[0].pdu_type = FAPI_NR_RX_PDU_TYPE_MIB;
ue->rx_ind.rx_indication_body = (fapi_nr_rx_indication_body_t *)malloc(sizeof(fapi_nr_rx_indication_body_t)); ue->rx_ind.rx_indication_body[0].mib_pdu.pdu = &decoded_output[0];
ue->rx_ind.rx_indication_body->pdu_type = FAPI_NR_RX_PDU_TYPE_MIB; ue->rx_ind.rx_indication_body[0].mib_pdu.additional_bits = xtra_byte;
ue->rx_ind.rx_indication_body->mib_pdu.pdu = &decoded_output[0]; ue->rx_ind.rx_indication_body[0].mib_pdu.ssb_index = ssb_index; // confirm with TCL
ue->rx_ind.rx_indication_body->mib_pdu.additional_bits = xtra_byte; ue->rx_ind.rx_indication_body[0].mib_pdu.ssb_length = Lmax; // confirm with TCL
ue->rx_ind.rx_indication_body->mib_pdu.ssb_index = ssb_index; // confirm with TCL ue->rx_ind.rx_indication_body[0].mib_pdu.cell_id = frame_parms->Nid_cell; // confirm with TCL
ue->rx_ind.rx_indication_body->mib_pdu.ssb_length = Lmax; // confirm with TCL ue->rx_ind.number_pdus = 1;
ue->rx_ind.rx_indication_body->mib_pdu.cell_id = frame_parms->Nid_cell; // confirm with TCL
if (ue->if_inst && ue->if_inst->dl_indication) if (ue->if_inst && ue->if_inst->dl_indication)
ue->if_inst->dl_indication(&ue->dl_indication); ue->if_inst->dl_indication(&ue->dl_indication);
......
...@@ -254,3 +254,4 @@ int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config){ ...@@ -254,3 +254,4 @@ int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config){
return 0; return 0;
} }
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
//#define DEBUG_PHY_PROC //#define DEBUG_PHY_PROC
#define NR_PDCCH_SCHED #define NR_PDCCH_SCHED
//#define NR_PDCCH_SCHED_DEBUG #define NR_PDCCH_SCHED_DEBUG
//#define NR_PUCCH_SCHED //#define NR_PUCCH_SCHED
//#define NR_PUCCH_SCHED_DEBUG //#define NR_PUCCH_SCHED_DEBUG
...@@ -3350,14 +3350,14 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t * ...@@ -3350,14 +3350,14 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
ue->dci_ind.dci_list[i].dci_format = dci_alloc_rx[i].format; ue->dci_ind.dci_list[i].dci_format = dci_alloc_rx[i].format;
ue->dci_ind.dci_list[i].n_CCE = dci_alloc_rx[i].firstCCE; ue->dci_ind.dci_list[i].n_CCE = dci_alloc_rx[i].firstCCE;
ue->dci_ind.dci_list[i].N_CCE = (int)dci_alloc_rx[i].L; ue->dci_ind.dci_list[i].N_CCE = (int)dci_alloc_rx[i].L;
ue->dci_ind.number_of_dcis = ue->dci_ind.number_of_dcis + 1; memcpy(&ue->dci_ind.dci_list[i].dci, &nr_dci_info_extracted, sizeof(fapi_nr_dci_pdu_rel15_t) );
memcpy(&ue->dci_ind.dci_list[i].dci, &nr_dci_info_extracted, sizeof(fapi_nr_dci_pdu_rel15_t) );
// TODO: check where should we send up this message.
// ue->if_inst->dl_indication(&ue->dl_indication);
} // end for loop dci_cnt } // end for loop dci_cnt
// TODO: check where should we send up this message.
ue->if_inst->dl_indication(&ue->dl_indication);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->dlsch_rx_pdcch_stats); stop_meas(&ue->dlsch_rx_pdcch_stats);
#endif #endif
...@@ -5106,7 +5106,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -5106,7 +5106,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
} }
//set active for testing, to be removed //set active for testing, to be removed
ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->active = 1; ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->active = 0;
} }
else else
ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->active = 0; ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->active = 0;
......
...@@ -395,7 +395,7 @@ int main(int argc, char **argv) ...@@ -395,7 +395,7 @@ int main(int argc, char **argv)
frame_parms->N_RB_UL = N_RB_DL; frame_parms->N_RB_UL = N_RB_DL;
// stub to configure frame_parms // stub to configure frame_parms
nr_phy_config_request_sim(gNB,N_RB_DL,N_RB_DL,mu); nr_phy_config_request_sim(gNB,N_RB_DL,N_RB_DL,mu,Nid_cell);
// call MAC to configure common parameters // call MAC to configure common parameters
phy_init_nr_gNB(gNB,0,0); phy_init_nr_gNB(gNB,0,0);
...@@ -622,7 +622,7 @@ int main(int argc, char **argv) ...@@ -622,7 +622,7 @@ int main(int argc, char **argv)
uint32_t number_of_search_space_per_slot=1; uint32_t number_of_search_space_per_slot=1;
uint32_t first_symbol_index=0; uint32_t first_symbol_index=0;
uint32_t search_space_duration; // element of search space uint32_t search_space_duration=0; // element of search space
uint32_t coreset_duration; // element of coreset uint32_t coreset_duration; // element of coreset
coreset_duration = num_symbols * number_of_search_space_per_slot; coreset_duration = num_symbols * number_of_search_space_per_slot;
......
...@@ -364,6 +364,7 @@ int main(int argc, char **argv) ...@@ -364,6 +364,7 @@ int main(int argc, char **argv)
frame_parms->nb_antennas_rx = n_rx; frame_parms->nb_antennas_rx = n_rx;
frame_parms->N_RB_DL = N_RB_DL; frame_parms->N_RB_DL = N_RB_DL;
frame_parms->N_RB_UL = N_RB_DL; frame_parms->N_RB_UL = N_RB_DL;
frame_parms->Nid_cell = Nid_cell;
nr_phy_config_request_sim(gNB,N_RB_DL,N_RB_DL,mu,Nid_cell); nr_phy_config_request_sim(gNB,N_RB_DL,N_RB_DL,mu,Nid_cell);
phy_init_nr_gNB(gNB,0,0); phy_init_nr_gNB(gNB,0,0);
...@@ -537,9 +538,9 @@ int main(int argc, char **argv) ...@@ -537,9 +538,9 @@ int main(int argc, char **argv)
//multipath_channel(gNB2UE,s_re,s_im,r_re,r_im,frame_length_complex_samples,0); //multipath_channel(gNB2UE,s_re,s_im,r_re,r_im,frame_length_complex_samples,0);