Commit 77b155c3 authored by yilmazt's avatar yilmazt

Debug changes1

parent 76b1ee89
...@@ -204,28 +204,21 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars, ...@@ -204,28 +204,21 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars,
/// DCI payload processing /// DCI payload processing
//channel coding //channel coding
#ifdef DEBUG_POLAR_PARAMS #ifdef DEBUG_POLAR_PARAMS
dci_alloc.dci_pdu[1]=0xffffffff;
uint8_t *encoderInput = malloc(sizeof(uint8_t) * dci_alloc.size);
printf("[TY]DCI PDU: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n",
dci_alloc.dci_pdu[0], dci_alloc.dci_pdu[1], dci_alloc.dci_pdu[2], dci_alloc.dci_pdu[3]);
nr_bit2byte(dci_alloc.dci_pdu, dci_alloc.size, encoderInput);
for (int i=0;i<dci_alloc.size;i++)
printf("encoderInput[%d]=%d\n",i,encoderInput[i]);
nr_byte2bit(encoderInput,dci_alloc.size,dci_alloc.dci_pdu);
printf("[TY]DCI PDU: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n",
dci_alloc.dci_pdu[0], dci_alloc.dci_pdu[1], dci_alloc.dci_pdu[2], dci_alloc.dci_pdu[3]);
return (0);
nr_polar_init(&nrPolar_params, NR_POLAR_DCI_MESSAGE_TYPE, dci_alloc.size, pdcch_params.aggregation_level); nr_polar_init(&nrPolar_params, NR_POLAR_DCI_MESSAGE_TYPE, dci_alloc.size, pdcch_params.aggregation_level);
t_nrPolar_paramsPtr currentPtr = nr_polar_params(nrPolar_params, t_nrPolar_paramsPtr currentPtr = nr_polar_params(nrPolar_params,
NR_POLAR_DCI_MESSAGE_TYPE, NR_POLAR_DCI_MESSAGE_TYPE,
dci_alloc.size); dci_alloc.size);
uint8_t *encoderInput = malloc(sizeof(uint8_t) * dci_alloc.size);
uint8_t *encoderOutput = malloc(sizeof(uint8_t) * currentPtr->encoderLength); uint8_t *encoderOutput = malloc(sizeof(uint8_t) * currentPtr->encoderLength);
printf("[TY]DCI PDU: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n",
dci_alloc.dci_pdu[0], dci_alloc.dci_pdu[1], dci_alloc.dci_pdu[2], dci_alloc.dci_pdu[3]);
nr_bit2byte_uint32_8_t(dci_alloc.dci_pdu,dci_alloc.size,encoderInput);
polar_encoder(encoderInput, encoderOutput, currentPtr); polar_encoder(encoderInput, encoderOutput, currentPtr);
uint32_t encoded_payload[4]; uint32_t encoded_payload[4];
nr_byte2bit(encoderOutput,currentPtr->encoderLength,encoded_payload); nr_byte2bit_uint8_32_t(encoderOutput, currentPtr->encoderLength, encoded_payload);
printf("[TY]Encoded Payload: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n",
encoded_payload[0], encoded_payload[1], encoded_payload[2], encoded_payload[3]);
return (0); return (0);
#endif #endif
...@@ -233,7 +226,7 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars, ...@@ -233,7 +226,7 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars,
uint32_t scrambled_payload[NR_MAX_DCI_SIZE_DWORD]; uint32_t scrambled_payload[NR_MAX_DCI_SIZE_DWORD];
uint32_t Nid = (pdcch_params.search_space_type == NFAPI_NR_SEARCH_SPACE_TYPE_UE_SPECIFIC)? pdcch_params.scrambling_id : config.sch_config.physical_cell_id.value; uint32_t Nid = (pdcch_params.search_space_type == NFAPI_NR_SEARCH_SPACE_TYPE_UE_SPECIFIC)? pdcch_params.scrambling_id : config.sch_config.physical_cell_id.value;
uint32_t n_RNTI = (pdcch_params.search_space_type == NFAPI_NR_SEARCH_SPACE_TYPE_UE_SPECIFIC)? pdcch_params.rnti : 0; uint32_t n_RNTI = (pdcch_params.search_space_type == NFAPI_NR_SEARCH_SPACE_TYPE_UE_SPECIFIC)? pdcch_params.rnti : 0;
nr_pdcch_scrambling(dci_alloc.dci_pdu, dci_alloc.size, Nid, n_RNTI, scrambled_payload); nr_pdcch_scrambling(encoded_payload, dci_alloc.size, Nid, n_RNTI, scrambled_payload);
// QPSK modulation // QPSK modulation
int16_t mod_dci[NR_MAX_DCI_SIZE>>1]; int16_t mod_dci[NR_MAX_DCI_SIZE>>1];
......
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