Commit 42d70a90 authored by yilmazt's avatar yilmazt

minor fixes

parent 2e44c4c1
...@@ -133,6 +133,11 @@ void polar_encoder_dci(uint32_t *in, ...@@ -133,6 +133,11 @@ void polar_encoder_dci(uint32_t *in,
polarParams->nr_polar_B[polarParams->payloadBits+8+i] = polarParams->nr_polar_B[polarParams->payloadBits+8+i] =
( (((polarParams->crcBit)>>(23-i))&1) + ((n_RNTI>>(15-i))&1) ) % 2; ( (((polarParams->crcBit)>>(23-i))&1) + ((n_RNTI>>(15-i))&1) ) % 2;
} }
#ifdef DEBUG_POLAR_ENCODER_DCI
printf("[polar_encoder_dci] B: ");
for (int i = 0; i < polarParams->K; i++) printf("%d-", polarParams->nr_polar_B[i]);
printf("\n");
#endif
//Interleaving (c to c') //Interleaving (c to c')
nr_polar_interleaver(polarParams->nr_polar_B, nr_polar_interleaver(polarParams->nr_polar_B,
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
*/ */
#include "nr_dci.h" #include "nr_dci.h"
#define DEBUG_NFAPI_NR_RNTI_RA //#define DEBUG_NFAPI_NR_RNTI_RA
void nr_fill_cce_list(NR_gNB_DCI_ALLOC_t* dci_alloc, uint16_t n_shift, uint8_t m) { void nr_fill_cce_list(NR_gNB_DCI_ALLOC_t* dci_alloc, uint16_t n_shift, uint8_t m) {
...@@ -129,20 +129,22 @@ void nr_fill_dci_and_dlsch(PHY_VARS_gNB *gNB, ...@@ -129,20 +129,22 @@ void nr_fill_dci_and_dlsch(PHY_VARS_gNB *gNB,
case NFAPI_NR_DL_DCI_FORMAT_1_0: case NFAPI_NR_DL_DCI_FORMAT_1_0:
switch(params_rel15->rnti_type) { switch(params_rel15->rnti_type) {
case NFAPI_NR_RNTI_RA: case NFAPI_NR_RNTI_RA:
#ifdef DEBUG_NFAPI_NR_RNTI_RA // Freq domain assignment
printf("frequency_domain_assignment = %05d = %#010x\n" fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) );
#ifdef DEBUG_NFAPI_NR_RNTI_RA
printf("frequency_domain_assignment = %05d = %#010x\n"
" time_domain_assignment = %05d = %#010x\n" " time_domain_assignment = %05d = %#010x\n"
" vrb_to_prb_mapping = %05d = %#010x\n" " vrb_to_prb_mapping = %05d = %#010x\n"
" MCS = %05d = %#010x\n" " MCS = %05d = %#010x\n"
" tb_scaling = %05d = %#010x\n", " tb_scaling = %05d = %#010x\n"
" N_RB = %05d = %#010x\n"
" fsize = %05d = %#010x\n",
pdu_rel15->frequency_domain_assignment,pdu_rel15->frequency_domain_assignment, pdu_rel15->frequency_domain_assignment,pdu_rel15->frequency_domain_assignment,
pdu_rel15->time_domain_assignment,pdu_rel15->time_domain_assignment, pdu_rel15->time_domain_assignment,pdu_rel15->time_domain_assignment,
pdu_rel15->vrb_to_prb_mapping,pdu_rel15->vrb_to_prb_mapping, pdu_rel15->vrb_to_prb_mapping,pdu_rel15->vrb_to_prb_mapping,
pdu_rel15->mcs,pdu_rel15->mcs,pdu_rel15->tb_scaling,pdu_rel15->tb_scaling); pdu_rel15->mcs,pdu_rel15->mcs,pdu_rel15->tb_scaling,pdu_rel15->tb_scaling,
#endif N_RB,N_RB,fsize,fsize);
// Freq domain assignment #endif
fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) );
printf("N_RB=%d & fsize=%d\n\n",N_RB,fsize);
for (int i=0; i<fsize; i++) for (int i=0; i<fsize; i++)
*dci_pdu |= ((pdu_rel15->frequency_domain_assignment>>(fsize-i-1))&1)<<pos++; *dci_pdu |= ((pdu_rel15->frequency_domain_assignment>>(fsize-i-1))&1)<<pos++;
// Time domain assignment // Time domain assignment
...@@ -156,9 +158,7 @@ printf("frequency_domain_assignment = %05d = %#010x\n" ...@@ -156,9 +158,7 @@ printf("frequency_domain_assignment = %05d = %#010x\n"
// TB scaling // TB scaling
for (int i=0; i<2; i++) for (int i=0; i<2; i++)
*dci_pdu |= ((pdu_rel15->tb_scaling>>(1-i))&1)<<pos++; *dci_pdu |= ((pdu_rel15->tb_scaling>>(1-i))&1)<<pos++;
break; break;
} }
break; break;
......
...@@ -888,6 +888,7 @@ static void wait_nfapi_init(char *thread_name) { ...@@ -888,6 +888,7 @@ static void wait_nfapi_init(char *thread_name) {
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
crcTableInit();
int i; int i;
#if defined (XFORMS) #if defined (XFORMS)
//void *status; //void *status;
......
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