Commit edcb1b2b authored by francescomani's avatar francescomani Committed by Robert Schmidt

workaround for pbchsim

parent 79586c03
...@@ -177,7 +177,7 @@ int main(int argc, char **argv) ...@@ -177,7 +177,7 @@ int main(int argc, char **argv)
int ssb_subcarrier_offset = 0; int ssb_subcarrier_offset = 0;
channel_desc_t *gNB2UE; channel_desc_t *gNB2UE;
get_softmodem_params()->sa = 0; get_softmodem_params()->sa = 1;
//uint8_t extended_prefix_flag=0; //uint8_t extended_prefix_flag=0;
//int8_t interf1=-21,interf2=-21; //int8_t interf1=-21,interf2=-21;
...@@ -464,6 +464,7 @@ int main(int argc, char **argv) ...@@ -464,6 +464,7 @@ int main(int argc, char **argv)
frame_parms->Nid_cell = Nid_cell; frame_parms->Nid_cell = Nid_cell;
frame_parms->nushift = Nid_cell%4; frame_parms->nushift = Nid_cell%4;
frame_parms->ssb_type = nr_ssb_type_C; frame_parms->ssb_type = nr_ssb_type_C;
frame_parms->freq_range = mu<2 ? nr_FR1 : nr_FR2;
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);
...@@ -588,9 +589,12 @@ int main(int argc, char **argv) ...@@ -588,9 +589,12 @@ int main(int argc, char **argv)
for (i=0; i<frame_parms->Lmax; i++) { for (i=0; i<frame_parms->Lmax; i++) {
if((SSB_positions >> i) & 0x01) { if((SSB_positions >> i) & 0x01) {
const int sc_offset = frame_parms->freq_range == nr_FR1 ? ssb_subcarrier_offset<<mu : ssb_subcarrier_offset;
const int prb_offset = frame_parms->freq_range == nr_FR1 ? gNB->gNB_config.ssb_table.ssb_offset_point_a.value<<mu : gNB->gNB_config.ssb_table.ssb_offset_point_a.value << (mu - 2);
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; msgDataTx.ssb[i].ssb_pdu.ssb_pdu_rel15.SsbSubcarrierOffset = sc_offset;
msgDataTx.ssb[i].ssb_pdu.ssb_pdu_rel15.ssbOffsetPointA = prb_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