Commit c7e8002d authored by francescomani's avatar francescomani

adding CI test with subcarrier offset in pbchsim

parent 3b165473
...@@ -1062,7 +1062,8 @@ ...@@ -1062,7 +1062,8 @@
(Test3: PBCH-only, 217 PRB), (Test3: PBCH-only, 217 PRB),
(Test4: PBCH and synchronization, 217 RPB), (Test4: PBCH and synchronization, 217 RPB),
(Test5: PBCH-only, 273 PRB), (Test5: PBCH-only, 273 PRB),
(Test6: PBCH and synchronization, 273 PRB)</desc> (Test6: PBCH and synchronization, 273 PRB),
(Test7: PBCH and synchronization, 106PBR, SSB SC OFFSET 6)</desc>
<pre_compile_prog></pre_compile_prog> <pre_compile_prog></pre_compile_prog>
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog> <compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
<compile_prog_args> --phy_simulators -c </compile_prog_args> <compile_prog_args> --phy_simulators -c </compile_prog_args>
...@@ -1074,8 +1075,9 @@ ...@@ -1074,8 +1075,9 @@
-s-11 -S-8 -n10 -R217 -s-11 -S-8 -n10 -R217
-s-11 -S-8 -n10 -o8000 -I -R217 -s-11 -S-8 -n10 -o8000 -I -R217
-s-11 -S-8 -n10 -R273 -s-11 -S-8 -n10 -R273
-s-11 -S-8 -n10 -o8000 -I -R273</main_exec_args> -s-11 -S-8 -n10 -o8000 -I -R273
<tags>nr_pbchsim.test1 nr_pbchsim.test2 nr_pbchsim.test3 nr_pbchsim.test4 nr_pbchsim.test5 nr_pbchsim.test6</tags> -s-11 -S-8 -n10 -R106 -O6</main_exec_args>
<tags>nr_pbchsim.test1 nr_pbchsim.test2 nr_pbchsim.test3 nr_pbchsim.test4 nr_pbchsim.test5 nr_pbchsim.test6 nr_pbchsim.test7</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>
<nruns>3</nruns> <nruns>3</nruns>
......
...@@ -171,6 +171,7 @@ int main(int argc, char **argv) ...@@ -171,6 +171,7 @@ int main(int argc, char **argv)
uint8_t transmission_mode = 1,n_tx=1,n_rx=1; uint8_t transmission_mode = 1,n_tx=1,n_rx=1;
uint16_t Nid_cell=0; uint16_t Nid_cell=0;
uint64_t SSB_positions=0x01; uint64_t SSB_positions=0x01;
int ssb_subcarrier_offset = 0;
channel_desc_t *gNB2UE; channel_desc_t *gNB2UE;
...@@ -214,7 +215,7 @@ int main(int argc, char **argv) ...@@ -214,7 +215,7 @@ int main(int argc, char **argv)
exit_fun("[NR_PBCHSIM] Error, configuration module init failed\n"); exit_fun("[NR_PBCHSIM] Error, configuration module init failed\n");
} }
while ((c = getopt (argc, argv, "F:g:hIL:m:M:n:N:o:P:r:R:s:S:x:y:z:")) != -1) { while ((c = getopt (argc, argv, "F:g:hIL:m:M:n:N:o:O:P:r:R:s:S:x:y:z:")) != -1) {
switch (c) { switch (c) {
/*case 'f': /*case 'f':
write_output_file=1; write_output_file=1;
...@@ -312,6 +313,10 @@ int main(int argc, char **argv) ...@@ -312,6 +313,10 @@ int main(int argc, char **argv)
Nid_cell = atoi(optarg); Nid_cell = atoi(optarg);
break; break;
case 'O':
ssb_subcarrier_offset = atoi(optarg);
break;
case 'o': case 'o':
cfo = atof(optarg); cfo = atof(optarg);
#ifdef DEBUG_NR_PBCHSIM #ifdef DEBUG_NR_PBCHSIM
...@@ -414,6 +419,7 @@ int main(int argc, char **argv) ...@@ -414,6 +419,7 @@ int main(int argc, char **argv)
printf("-n Number of frames to simulate\n"); printf("-n Number of frames to simulate\n");
printf("-N Nid_cell\n"); printf("-N Nid_cell\n");
printf("-o Carrier frequency offset in Hz\n"); printf("-o Carrier frequency offset in Hz\n");
printf("-O SSB subcarrier offset\n");
//printf("-O oversampling factor (1,2,4,8,16)\n"); //printf("-O oversampling factor (1,2,4,8,16)\n");
//printf("-p Use extended prefix mode\n"); //printf("-p Use extended prefix mode\n");
printf("-P PBCH phase, allowed values 0-3\n"); printf("-P PBCH phase, allowed values 0-3\n");
...@@ -457,7 +463,7 @@ int main(int argc, char **argv) ...@@ -457,7 +463,7 @@ int main(int argc, char **argv)
nr_phy_config_request_sim_pbchsim(gNB,N_RB_DL,N_RB_DL,mu,Nid_cell,SSB_positions); nr_phy_config_request_sim_pbchsim(gNB,N_RB_DL,N_RB_DL,mu,Nid_cell,SSB_positions);
phy_init_nr_gNB(gNB,0,1); phy_init_nr_gNB(gNB,0,1);
frame_parms->ssb_start_subcarrier = 12 * gNB->gNB_config.ssb_table.ssb_offset_point_a.value; frame_parms->ssb_start_subcarrier = 12 * gNB->gNB_config.ssb_table.ssb_offset_point_a.value + ssb_subcarrier_offset;
uint8_t n_hf = 0; uint8_t n_hf = 0;
int cyclic_prefix_type = NFAPI_CP_NORMAL; int cyclic_prefix_type = NFAPI_CP_NORMAL;
...@@ -582,6 +588,7 @@ int main(int argc, char **argv) ...@@ -582,6 +588,7 @@ int main(int argc, char **argv)
msgDataTx.ssb[i].ssb_pdu.ssb_pdu_rel15.bchPayload = 0x55dd33; msgDataTx.ssb[i].ssb_pdu.ssb_pdu_rel15.bchPayload = 0x55dd33;
msgDataTx.ssb[i].ssb_pdu.ssb_pdu_rel15.SsbBlockIndex = i; msgDataTx.ssb[i].ssb_pdu.ssb_pdu_rel15.SsbBlockIndex = i;
msgDataTx.ssb[i].ssb_pdu.ssb_pdu_rel15.SsbSubcarrierOffset = ssb_subcarrier_offset;
start_symbol = nr_get_ssb_start_symbol(frame_parms,i); start_symbol = nr_get_ssb_start_symbol(frame_parms,i);
int slot = start_symbol/14; int slot = start_symbol/14;
......
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