Commit 45f224bb authored by Sakthivel Velumani's avatar Sakthivel Velumani

Merge branch 'runel-reverse-test' into runel

parents d92de894 56f1bf0f
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
#include "PHY/MODULATION/nr_modulation.h" #include "PHY/MODULATION/nr_modulation.h"
//#define DEBUG_PDCCH_DMRS //#define DEBUG_PDCCH_DMRS
//#define DEBUG_DCI #define DEBUG_DCI
//#define DEBUG_CHANNEL_CODING #define DEBUG_CHANNEL_CODING
uint16_t nr_get_dci_size(nfapi_nr_dci_format_e format, uint16_t nr_get_dci_size(nfapi_nr_dci_format_e format,
...@@ -212,6 +212,10 @@ uint8_t nr_generate_dci_top(NR_gNB_DCI_ALLOC_t dci_alloc, ...@@ -212,6 +212,10 @@ uint8_t nr_generate_dci_top(NR_gNB_DCI_ALLOC_t dci_alloc,
uint16_t Nid = (pdcch_params.search_space_type == NFAPI_NR_SEARCH_SPACE_TYPE_UE_SPECIFIC)? uint16_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; pdcch_params.scrambling_id : config.sch_config.physical_cell_id.value;
t_nrPolar_params *currentPtr = nr_polar_params(NR_POLAR_DCI_MESSAGE_TYPE, dci_alloc.size, dci_alloc.L); t_nrPolar_params *currentPtr = nr_polar_params(NR_POLAR_DCI_MESSAGE_TYPE, dci_alloc.size, dci_alloc.L);
printf("DCI PDU old: %lx\n",dci_alloc.dci_pdu[0]);
//dci_alloc.dci_pdu[0] = 0x90B478F0000; // To test runel DCI with UE
printf("DCI PDU new: %lx\n",dci_alloc.dci_pdu[0]);
// dci_alloc.dci_pdu[1] = 0x0;
polar_encoder_fast(dci_alloc.dci_pdu, encoder_output, pdcch_params.rnti, 1, currentPtr); polar_encoder_fast(dci_alloc.dci_pdu, encoder_output, pdcch_params.rnti, 1, currentPtr);
#ifdef DEBUG_CHANNEL_CODING #ifdef DEBUG_CHANNEL_CODING
printf("polar rnti %d\n",pdcch_params.rnti); printf("polar rnti %d\n",pdcch_params.rnti);
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
//#define NR_LTE_PDCCH_DCI_SWITCH //#define NR_LTE_PDCCH_DCI_SWITCH
#define NR_PDCCH_DCI_RUN // activates new nr functions #define NR_PDCCH_DCI_RUN // activates new nr functions
//#define NR_PDCCH_DCI_DEBUG // activates NR_PDCCH_DCI_DEBUG logs #define NR_PDCCH_DCI_DEBUG // activates NR_PDCCH_DCI_DEBUG logs
#ifdef NR_PDCCH_DCI_DEBUG #ifdef NR_PDCCH_DCI_DEBUG
#define LOG_DNL(a, ...) printf("\n\t\t<-NR_PDCCH_DCI_DEBUG (%s)-> " a, __func__, ##__VA_ARGS__ ) #define LOG_DNL(a, ...) printf("\n\t\t<-NR_PDCCH_DCI_DEBUG (%s)-> " a, __func__, ##__VA_ARGS__ )
#define LOG_DD(a, ...) printf("\t<-NR_PDCCH_DCI_DEBUG (%s)-> " a, __func__, ##__VA_ARGS__ ) #define LOG_DD(a, ...) printf("\t<-NR_PDCCH_DCI_DEBUG (%s)-> " a, __func__, ##__VA_ARGS__ )
...@@ -1352,14 +1352,14 @@ void nr_dci_decoding_procedure0(int s, ...@@ -1352,14 +1352,14 @@ void nr_dci_decoding_procedure0(int s,
*format_found=_format_1_0_found; *format_found=_format_1_0_found;
// LOG_DDD("a format1_0=%d and dci_cnt=%d\n",*format_found,*dci_cnt); // LOG_DDD("a format1_0=%d and dci_cnt=%d\n",*format_found,*dci_cnt);
} else { } else {
if ((dci_estimation[0]&1) == 0) { if ((dci_estimation[0]>>(sizeof_bits-1)) == 0) {
dci_alloc[*dci_cnt].format = format0_0; dci_alloc[*dci_cnt].format = format0_0;
*dci_cnt = *dci_cnt + 1; *dci_cnt = *dci_cnt + 1;
*format_found=_format_0_0_found; *format_found=_format_0_0_found;
// LOG_DDD("b format0_0=%d and dci_cnt=%d\n",*format_found,*dci_cnt); // LOG_DDD("b format0_0=%d and dci_cnt=%d\n",*format_found,*dci_cnt);
} }
if ((dci_estimation[0]&1) == 1) { if ((dci_estimation[0]>>(sizeof_bits-1)) == 1) {
dci_alloc[*dci_cnt].format = format1_0; dci_alloc[*dci_cnt].format = format1_0;
*dci_cnt = *dci_cnt + 1; *dci_cnt = *dci_cnt + 1;
*format_found=_format_1_0_found; *format_found=_format_1_0_found;
...@@ -2788,13 +2788,13 @@ uint8_t nr_dci_decoding_procedure(int s, ...@@ -2788,13 +2788,13 @@ uint8_t nr_dci_decoding_procedure(int s,
format_0_0_1_0_size_bits = nr_dci_format_size(ue,eNB_id,nr_tti_rx,p,_c_rnti,n_RB_ULBWP,n_RB_DLBWP,dci_fields_sizes,0); format_0_0_1_0_size_bits = nr_dci_format_size(ue,eNB_id,nr_tti_rx,p,_c_rnti,n_RB_ULBWP,n_RB_DLBWP,dci_fields_sizes,0);
format_0_0_1_0_size_bytes = (format_0_0_1_0_size_bits%8 == 0) ? (uint8_t)floor(format_0_0_1_0_size_bits/8) : (uint8_t)(floor(format_0_0_1_0_size_bits/8) + 1); format_0_0_1_0_size_bytes = (format_0_0_1_0_size_bits%8 == 0) ? (uint8_t)floor(format_0_0_1_0_size_bits/8) : (uint8_t)(floor(format_0_0_1_0_size_bits/8) + 1);
LOG_DD("calculating dci format size for UE-specific searchSpaces with format uss_dci_format=%d, format_0_0_1_0_size_bits=%d, format_0_0_1_0_size_bytes=%d\n", LOG_DD("calculating dci format size for UE-specific searchSpaces with format uss_dci_format=%d, format_0_0_1_0_size_bits=%d, format_0_0_1_0_size_bytes=%d\n",
css_dci_format,format_0_0_1_0_size_bits,format_0_0_1_0_size_bytes); uss_dci_format,format_0_0_1_0_size_bits,format_0_0_1_0_size_bytes);
for (int aggregationLevel = 0; aggregationLevel<5 ; aggregationLevel++) { // We fix aggregationLevel to 3 for testing=> nbr of CCE=8 for (int aggregationLevel = 0; aggregationLevel<5 ; aggregationLevel++) { // We fix aggregationLevel to 3 for testing=> nbr of CCE=8
//for (int aggregationLevel = 2; aggregationLevel<5 ; aggregationLevel++) { //for (int aggregationLevel = 2; aggregationLevel<5 ; aggregationLevel++) {
// for aggregation level aggregationLevel. The number of candidates (for L2= 2^aggregationLevel) will be calculated in function nr_dci_decoding_procedure0 // for aggregation level aggregationLevel. The number of candidates (for L2= 2^aggregationLevel) will be calculated in function nr_dci_decoding_procedure0
LOG_DD("common searchSpaces with format css_dci_format=%d and aggregation_level=%d\n", LOG_DD("UE-specific searchSpaces with format uss_dci_format=%d and aggregation_level=%d\n",
css_dci_format,(1<<aggregationLevel)); uss_dci_format,(1<<aggregationLevel));
old_dci_cnt = dci_cnt; old_dci_cnt = dci_cnt;
nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 0, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 0, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,
crc_scrambled_values, aggregationLevel, crc_scrambled_values, aggregationLevel,
......
...@@ -2834,7 +2834,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id, ...@@ -2834,7 +2834,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,
// Higher layers have updated the number of searchSpaces with are active in the current slot and this value is stored in variable nb_searchspace_total // Higher layers have updated the number of searchSpaces with are active in the current slot and this value is stored in variable nb_searchspace_total
int nb_searchspace_total = pdcch_vars2->nb_search_space; int nb_searchspace_total = pdcch_vars2->nb_search_space;
pdcch_vars[eNB_id]->crnti = 1000; //to be check how to set when using loop memory pdcch_vars[eNB_id]->crnti = 1000;// 0x1234; //to be check how to set when using loop memory
uint16_t c_rnti=pdcch_vars[eNB_id]->crnti; uint16_t c_rnti=pdcch_vars[eNB_id]->crnti;
uint16_t cs_rnti=0,new_rnti=0,tc_rnti=0; uint16_t cs_rnti=0,new_rnti=0,tc_rnti=0;
......
...@@ -164,7 +164,7 @@ int configure_fapi_dl_Tx(nfapi_nr_dl_config_request_body_t *dl_req, ...@@ -164,7 +164,7 @@ int configure_fapi_dl_Tx(nfapi_nr_dl_config_request_body_t *dl_req,
nfapi_nr_dl_config_request_pdu_t *dl_config_dci_pdu; nfapi_nr_dl_config_request_pdu_t *dl_config_dci_pdu;
nfapi_nr_dl_config_request_pdu_t *dl_config_dlsch_pdu; nfapi_nr_dl_config_request_pdu_t *dl_config_dlsch_pdu;
int TBS; int TBS;
uint16_t rnti = 0x1234; uint16_t rnti = 1000; //0x1234;
int dl_carrier_bandwidth = cfg->rf_config.dl_carrier_bandwidth.value; int dl_carrier_bandwidth = cfg->rf_config.dl_carrier_bandwidth.value;
dl_config_dci_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu]; dl_config_dci_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *)dl_config_dci_pdu,0,sizeof(nfapi_nr_dl_config_request_pdu_t)); memset((void *)dl_config_dci_pdu,0,sizeof(nfapi_nr_dl_config_request_pdu_t));
......
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