Skip to content
Snippets Groups Projects
Commit 09a481d9 authored by Guy De Souza's avatar Guy De Souza
Browse files

PBCH and modulation bugs

parent 109f6ef4
No related branches found
No related tags found
9 merge requests!1757Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c,!1493fix DL arq errors in UE,!1093Issue in generating NR PRACH for High Speed case,!1074PBCH test case support for non-zero bchpyload,!918Develop nfapi,!847Nr vcd,!782Oai ubuntu docker,!730Nr rlc,!463Nr polar encoder optimizations
......@@ -246,6 +246,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
uint16_t M;
uint8_t nushift;
uint32_t unscrambling_mask;
uint64_t a_reversed=0;
LOG_I(PHY, "PBCH generation started\n");
......@@ -300,8 +301,13 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
printf("pbch_a_prime: 0x%08x\n", pbch->pbch_a_prime);
#endif
// Encoder reversal
for (int i=0; i<NR_POLAR_PBCH_PAYLOAD_BITS; i++)
a_reversed |= (((uint64_t)pbch->pbch_a_prime>>i)&1)<<(31-i);
/// CRC, coding and rate matching
polar_encoder_fast (&pbch->pbch_a_prime, (uint32_t*)pbch->pbch_e, 0, polar_params);
polar_encoder_fast (&a_reversed, (uint32_t*)pbch->pbch_e, 0, polar_params);
#ifdef DEBUG_PBCH_ENCODING
printf("Channel coding:\n");
for (int i=0; i<NR_POLAR_PBCH_E_DWORD; i++)
......
......@@ -48,7 +48,7 @@ int nr_generate_pss( int16_t *d_pss,
for (i=0; i < NR_PSS_LENGTH; i++) {
m = (i + 43*Nid2)%(NR_PSS_LENGTH);
d_pss[i] = (1 - 2*x[m]) * 32767;
d_pss[i] = (1 - 2*x[m]) * 23170;
}
#ifdef NR_PSS_DEBUG
......
......@@ -57,7 +57,7 @@ int nr_generate_sss( int16_t *d_sss,
m1 = Nid1 % 112;
for (i = 0; i < NR_SSS_LENGTH ; i++) {
d_sss[i] = (1 - 2*x0[(i + m0) % NR_SSS_LENGTH] ) * (1 - 2*x1[(i + m1) % NR_SSS_LENGTH] ) * 32767;
d_sss[i] = (1 - 2*x0[(i + m0) % NR_SSS_LENGTH] ) * (1 - 2*x1[(i + m1) % NR_SSS_LENGTH] ) * 23170;
}
#ifdef NR_SSS_DEBUG
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment