Debug changes
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
|
||||
#define DEBUG_POLAR_PARAMS
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
//Initiate timing. (Results depend on CPU Frequency. Therefore, might change due to performance variances during simulation.)
|
||||
@@ -125,6 +127,15 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
t_nrPolar_paramsPtr nrPolar_params = NULL;
|
||||
nr_polar_init(&nrPolar_params, polarMessageType, testLength, aggregation_level);
|
||||
#ifdef DEBUG_POLAR_PARAMS
|
||||
nr_polar_init(&nrPolar_params, polarMessageType, testLength, aggregation_level);
|
||||
nr_polar_init(&nrPolar_params, 1, 20, 1);
|
||||
nr_polar_init(&nrPolar_params, 1, 21, 1);
|
||||
nr_polar_init(&nrPolar_params, polarMessageType, testLength, aggregation_level);
|
||||
nr_polar_print_polarParams(nrPolar_params);
|
||||
return (0);
|
||||
#endif
|
||||
|
||||
t_nrPolar_paramsPtr currentPtr = nr_polar_params(nrPolar_params, polarMessageType, testLength);
|
||||
|
||||
// We assume no a priori knowledge available about the payload.
|
||||
|
||||
@@ -119,7 +119,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
// PBCH DMRS gold sequences generation
|
||||
nr_init_pbch_dmrs(gNB);
|
||||
// Polar encoder init for PBCH
|
||||
nr_polar_init(&fp->pbch_polar_params,
|
||||
nr_polar_init(&gNB->nrPolar_params,
|
||||
NR_POLAR_PBCH_MESSAGE_TYPE,
|
||||
NR_POLAR_PBCH_PAYLOAD_BITS,
|
||||
NR_POLAR_PBCH_AGGREGATION_LEVEL);
|
||||
|
||||
@@ -202,8 +202,14 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars,
|
||||
|
||||
/// DCI payload processing
|
||||
//channel coding
|
||||
/*uint8_t *encoderInput = malloc(sizeof(uint8_t) * dci_alloc.size);
|
||||
#ifdef DEBUG_POLAR_PARAMS
|
||||
uint8_t *encoderInput = malloc(sizeof(uint8_t) * dci_alloc.size);
|
||||
printf("\ndci_alloc.dci_pdu\n[0]=%d [1]=%d [2]=%d [3]=%d\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);
|
||||
printf("\ndci_alloc.dci_pdu\n[0]=%d [1]=%d [2]=%d [3]=%d\n",dci_alloc.dci_pdu[0],dci_alloc.dci_pdu[1],dci_alloc.dci_pdu[2],dci_alloc.dci_pdu[3]);
|
||||
for (int i=0;i<dci_alloc.size;i++)
|
||||
printf("encoderInput[%d]=%d\n",i,encoderInput[i]);
|
||||
return (0);
|
||||
|
||||
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,
|
||||
@@ -213,7 +219,9 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars,
|
||||
uint8_t *encoderOutput = malloc(sizeof(uint8_t) * currentPtr->encoderLength);
|
||||
polar_encoder(encoderInput, encoderOutput, currentPtr);
|
||||
uint32_t encoded_payload[4];
|
||||
nr_byte2bit(encoderOutput,currentPtr->encoderLength,encoded_payload);*/
|
||||
nr_byte2bit(encoderOutput,currentPtr->encoderLength,encoded_payload);
|
||||
return (0);
|
||||
#endif
|
||||
|
||||
// scrambling
|
||||
uint32_t scrambled_payload[NR_MAX_DCI_SIZE_DWORD];
|
||||
|
||||
@@ -283,15 +283,16 @@ typedef struct PHY_VARS_gNB_s {
|
||||
/// NFAPI PRACH information
|
||||
nfapi_preamble_pdu_t preamble_list[MAX_NUM_RX_PRACH_PREAMBLES];
|
||||
|
||||
Sched_Rsp_t Sched_INFO;
|
||||
Sched_Rsp_t Sched_INFO;
|
||||
NR_gNB_PDCCH pdcch_vars;
|
||||
NR_gNB_PBCH pbch;
|
||||
t_nrPolar_paramsPtr nrPolar_params;
|
||||
nfapi_nr_dl_config_pdcch_parameters_rel15_t pdcch_type0_params;
|
||||
LTE_eNB_PHICH phich_vars[2];
|
||||
LTE_eNB_PHICH phich_vars[2];
|
||||
|
||||
NR_gNB_COMMON common_vars;
|
||||
LTE_eNB_UCI uci_vars[NUMBER_OF_UE_MAX];
|
||||
LTE_eNB_SRS srs_vars[NUMBER_OF_UE_MAX];
|
||||
NR_gNB_PBCH pbch;
|
||||
LTE_eNB_PUSCH *pusch_vars[NUMBER_OF_UE_MAX];
|
||||
LTE_eNB_PRACH prach_vars;
|
||||
LTE_eNB_DLSCH_t *dlsch[NUMBER_OF_UE_MAX][2]; // Nusers times two spatial streams
|
||||
@@ -462,8 +463,6 @@ typedef struct PHY_VARS_gNB_s {
|
||||
int32_t pusch_stats_mcs[NUMBER_OF_UE_MAX][10240];
|
||||
int32_t pusch_stats_bsr[NUMBER_OF_UE_MAX][10240];
|
||||
int32_t pusch_stats_BO[NUMBER_OF_UE_MAX][10240];
|
||||
|
||||
t_nrPolar_paramsPtr nrPolar_params;
|
||||
} PHY_VARS_gNB;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -888,7 +888,6 @@ static void wait_nfapi_init(char *thread_name) {
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
printf( "HEREHERE");
|
||||
int i;
|
||||
#if defined (XFORMS)
|
||||
//void *status;
|
||||
|
||||
Reference in New Issue
Block a user