Apply clang-format
This commit is contained in:
@@ -786,38 +786,45 @@ int main(int argc, char **argv)
|
||||
int ssb_slot = (UE->symbol_offset/14)+(n_hf*(frame_parms->slots_per_frame>>1));
|
||||
proc.nr_slot_rx = ssb_slot;
|
||||
proc.gNB_id = 0;
|
||||
for (int i=UE->symbol_offset+1; i<UE->symbol_offset+4; i++) {
|
||||
nr_slot_fep(UE,
|
||||
frame_parms,
|
||||
&proc,
|
||||
i%frame_parms->symbols_per_slot,
|
||||
rxdataF, link_type_dl);
|
||||
|
||||
nr_pbch_channel_estimation(UE,&UE->frame_parms, estimateSz, dl_ch_estimates, dl_ch_estimates_time, &proc,
|
||||
i%frame_parms->symbols_per_slot,i-(UE->symbol_offset+1),
|
||||
ssb_index%8,n_hf,rxdataF,false,frame_parms->Nid_cell);
|
||||
for (int i = UE->symbol_offset + 1; i < UE->symbol_offset + 4; i++) {
|
||||
nr_slot_fep(UE, frame_parms, &proc, i % frame_parms->symbols_per_slot, rxdataF, link_type_dl);
|
||||
|
||||
nr_pbch_channel_estimation(UE,
|
||||
&UE->frame_parms,
|
||||
estimateSz,
|
||||
dl_ch_estimates,
|
||||
dl_ch_estimates_time,
|
||||
&proc,
|
||||
i % frame_parms->symbols_per_slot,
|
||||
i - (UE->symbol_offset + 1),
|
||||
ssb_index % 8,
|
||||
n_hf,
|
||||
rxdataF,
|
||||
false,
|
||||
frame_parms->Nid_cell);
|
||||
}
|
||||
fapiPbch_t result;
|
||||
fapiPbch_t result;
|
||||
ret = nr_rx_pbch(UE, &proc, estimateSz, dl_ch_estimates, frame_parms, ssb_index % 8, &result, rxdataF);
|
||||
|
||||
if (ret==0) {
|
||||
//UE->rx_ind.rx_indication_body->mib_pdu.ssb_index; //not yet detected automatically
|
||||
//UE->rx_ind.rx_indication_body->mib_pdu.ssb_length; //Lmax, not yet detected automatically
|
||||
uint8_t gNB_xtra_byte=0;
|
||||
for (int i=0; i<8; i++)
|
||||
gNB_xtra_byte |= ((gNB->pbch.pbch_a>>(31-i))&1)<<(7-i);
|
||||
|
||||
if (ret == 0) {
|
||||
// UE->rx_ind.rx_indication_body->mib_pdu.ssb_index; //not yet detected automatically
|
||||
// UE->rx_ind.rx_indication_body->mib_pdu.ssb_length; //Lmax, not yet detected automatically
|
||||
uint8_t gNB_xtra_byte = 0;
|
||||
for (int i = 0; i < 8; i++)
|
||||
gNB_xtra_byte |= ((gNB->pbch.pbch_a >> (31 - i)) & 1) << (7 - i);
|
||||
|
||||
payload_ret = (result.xtra_byte == gNB_xtra_byte);
|
||||
for (i=0;i<3;i++){
|
||||
payload_ret += (result.decoded_output[i] == ((msgDataTx.ssb[ssb_index].ssb_pdu.ssb_pdu_rel15.bchPayload>>(8*i)) & 0xff));
|
||||
}
|
||||
//printf("ret %d\n", payload_ret);
|
||||
if (payload_ret!=4)
|
||||
for (i = 0; i < 3; i++) {
|
||||
payload_ret +=
|
||||
(result.decoded_output[i] == ((msgDataTx.ssb[ssb_index].ssb_pdu.ssb_pdu_rel15.bchPayload >> (8 * i)) & 0xff));
|
||||
}
|
||||
// printf("ret %d\n", payload_ret);
|
||||
if (payload_ret != 4)
|
||||
n_errors_payload++;
|
||||
}
|
||||
|
||||
if (ret!=0) n_errors++;
|
||||
if (ret != 0)
|
||||
n_errors++;
|
||||
}
|
||||
} //noise trials
|
||||
printf("SNR %f: trials %d, n_errors_crc = %d, n_errors_payload %d\n", SNR,n_trials,n_errors,n_errors_payload);
|
||||
|
||||
Reference in New Issue
Block a user