mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
adding payload check to nr_pbchsim
This commit is contained in:
2
maketags
2
maketags
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
echo "building ctags for openair1 and openair2 ..."
|
||||
ctags -e -R --exclude=openair1/DOCS/ --exclude=openair2/DOCS/ --exclude=openair2/RRC/CELLULAR/ --exclude=openair2/NAS/DRIVER/CELLULAR/ --exclude=openair2/SIMULATION/ --exclude=targets/DOCS/ --exclude=targets/PROJECTS/ openair1 openair2 openair3 targets cmake_targets common
|
||||
ctags -e -R --exclude=openair1/DOCS/ --exclude=openair2/DOCS/ --exclude=openair2/RRC/CELLULAR/ --exclude=openair2/NAS/DRIVER/CELLULAR/ --exclude=openair2/SIMULATION/ --exclude=targets/DOCS/ --exclude=targets/PROJECTS/ openair1 openair2 openair3 targets cmake_targets common nfapi
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "PHY/sse_intrin.h"
|
||||
|
||||
//#define DEBUG_PBCH
|
||||
//#define DEBUG_PBCH_ENCODING
|
||||
#define DEBUG_PBCH_ENCODING
|
||||
//#define DEBUG_PBCH_DMRS
|
||||
|
||||
#include "PHY/NR_REFSIG/nr_mod_table.h"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "PHY/LTE_REFSIG/lte_refsig.h"
|
||||
|
||||
//#define DEBUG_PBCH 1
|
||||
//#define DEBUG_PBCH_ENCODING
|
||||
#define DEBUG_PBCH_ENCODING
|
||||
|
||||
#ifdef OPENAIR2
|
||||
//#include "PHY_INTERFACE/defs.h"
|
||||
@@ -673,7 +673,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
|
||||
M = (Lmax == 64)? (NR_POLAR_PBCH_PAYLOAD_BITS - 6) : (NR_POLAR_PBCH_PAYLOAD_BITS - 3);
|
||||
nushift = ((nr_ue_pbch_vars->pbch_a_prime>>24)&1) ^ (((nr_ue_pbch_vars->pbch_a_prime>>6)&1)<<1);
|
||||
nr_pbch_unscrambling(nr_ue_pbch_vars,frame_parms->Nid_cell,nushift,M,NR_POLAR_PBCH_PAYLOAD_BITS,1,unscrambling_mask);
|
||||
printf("nushift %d sfn 3rd %d 2nd %d", nushift,((nr_ue_pbch_vars->pbch_a_prime>>6)&1), ((nr_ue_pbch_vars->pbch_a_prime>>24)&1) );
|
||||
printf("nushift %d sfn 3rd %d 2nd %d\n", nushift,((nr_ue_pbch_vars->pbch_a_prime>>6)&1), ((nr_ue_pbch_vars->pbch_a_prime>>24)&1) );
|
||||
|
||||
//payload deinterleaving
|
||||
//uint32_t in=0;
|
||||
|
||||
@@ -47,6 +47,15 @@ typedef struct {
|
||||
uint32_t pbch_e[NR_POLAR_PBCH_E_DWORD];
|
||||
} NR_gNB_PBCH;
|
||||
|
||||
typedef struct {
|
||||
uint8_t ssb_start_symbol;
|
||||
uint8_t n_hf;
|
||||
uint8_t Lmax;
|
||||
uint8_t ssb_index;
|
||||
int32_t sfn;
|
||||
} NR_PBCH_parms_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
/// Length of DCI payload in bits
|
||||
uint16_t size;
|
||||
|
||||
@@ -567,6 +567,14 @@ int main(int argc, char **argv)
|
||||
SISO,
|
||||
UE->high_speed_flag);
|
||||
|
||||
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
|
||||
for (i=0;i<3;i++)
|
||||
printf("pdu byte %d gNB: 0x%02x UE: 0x%02x\n",i,((uint8_t*)&gNB->pbch.pbch_a)[i], UE->rx_ind.rx_indication_body->mib_pdu.pdu[i]);
|
||||
printf("xtra byte gNB: 0x%02x UE: 0x%02x\n",((uint8_t*)&gNB->pbch.pbch_a)[3], UE->rx_ind.rx_indication_body->mib_pdu.additional_bits);
|
||||
}
|
||||
|
||||
if (ret<0) n_errors++;
|
||||
}
|
||||
} //noise trials
|
||||
|
||||
Reference in New Issue
Block a user