minor fixes
This commit is contained 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 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#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,36 +129,36 @@ 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 ) );
|
||||||
" time_domain_assignment = %05d = %#010x\n"
|
#ifdef DEBUG_NFAPI_NR_RNTI_RA
|
||||||
" vrb_to_prb_mapping = %05d = %#010x\n"
|
printf("frequency_domain_assignment = %05d = %#010x\n"
|
||||||
" MCS = %05d = %#010x\n"
|
" time_domain_assignment = %05d = %#010x\n"
|
||||||
" tb_scaling = %05d = %#010x\n",
|
" vrb_to_prb_mapping = %05d = %#010x\n"
|
||||||
pdu_rel15->frequency_domain_assignment,pdu_rel15->frequency_domain_assignment,
|
" MCS = %05d = %#010x\n"
|
||||||
pdu_rel15->time_domain_assignment,pdu_rel15->time_domain_assignment,
|
" tb_scaling = %05d = %#010x\n"
|
||||||
pdu_rel15->vrb_to_prb_mapping,pdu_rel15->vrb_to_prb_mapping,
|
" N_RB = %05d = %#010x\n"
|
||||||
pdu_rel15->mcs,pdu_rel15->mcs,pdu_rel15->tb_scaling,pdu_rel15->tb_scaling);
|
" fsize = %05d = %#010x\n",
|
||||||
#endif
|
pdu_rel15->frequency_domain_assignment,pdu_rel15->frequency_domain_assignment,
|
||||||
// Freq domain assignment
|
pdu_rel15->time_domain_assignment,pdu_rel15->time_domain_assignment,
|
||||||
fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) );
|
pdu_rel15->vrb_to_prb_mapping,pdu_rel15->vrb_to_prb_mapping,
|
||||||
printf("N_RB=%d & fsize=%d\n\n",N_RB,fsize);
|
pdu_rel15->mcs,pdu_rel15->mcs,pdu_rel15->tb_scaling,pdu_rel15->tb_scaling,
|
||||||
for (int i=0; i<fsize; i++)
|
N_RB,N_RB,fsize,fsize);
|
||||||
*dci_pdu |= ((pdu_rel15->frequency_domain_assignment>>(fsize-i-1))&1)<<pos++;
|
#endif
|
||||||
// Time domain assignment
|
for (int i=0; i<fsize; i++)
|
||||||
for (int i=0; i<4; i++)
|
*dci_pdu |= ((pdu_rel15->frequency_domain_assignment>>(fsize-i-1))&1)<<pos++;
|
||||||
*dci_pdu |= ((pdu_rel15->time_domain_assignment>>(3-i))&1)<<pos++;
|
// Time domain assignment
|
||||||
// VRB to PRB mapping
|
for (int i=0; i<4; i++)
|
||||||
*dci_pdu |= (pdu_rel15->vrb_to_prb_mapping&1)<<pos++;
|
*dci_pdu |= ((pdu_rel15->time_domain_assignment>>(3-i))&1)<<pos++;
|
||||||
// MCS
|
// VRB to PRB mapping
|
||||||
for (int i=0; i<5; i++)
|
*dci_pdu |= (pdu_rel15->vrb_to_prb_mapping&1)<<pos++;
|
||||||
*dci_pdu |= ((pdu_rel15->mcs>>(4-i))&1)<<pos++;
|
// MCS
|
||||||
// TB scaling
|
for (int i=0; i<5; i++)
|
||||||
for (int i=0; i<2; i++)
|
*dci_pdu |= ((pdu_rel15->mcs>>(4-i))&1)<<pos++;
|
||||||
*dci_pdu |= ((pdu_rel15->tb_scaling>>(1-i))&1)<<pos++;
|
// TB scaling
|
||||||
|
for (int i=0; i<2; i++)
|
||||||
break;
|
*dci_pdu |= ((pdu_rel15->tb_scaling>>(1-i))&1)<<pos++;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user