Commit c7bb34aa authored by yilmazt's avatar yilmazt

changes for dci/does not compile

parent 45db11de
...@@ -224,7 +224,7 @@ typedef struct { ...@@ -224,7 +224,7 @@ typedef struct {
typedef struct { typedef struct {
nfapi_p4_p5_message_header_t header; nfapi_p4_p5_message_header_t header;
uint8_t num_tlv; uint8_t num_tlv;
nfapi_nr_subframe_config_t subframe_config; nfapi_nr_subframe_config_t subframe_config;
nfapi_nr_rf_config_t rf_config; nfapi_nr_rf_config_t rf_config;
nfapi_nr_sch_config_t sch_config; nfapi_nr_sch_config_t sch_config;
...@@ -241,7 +241,7 @@ typedef struct { ...@@ -241,7 +241,7 @@ typedef struct {
} nfapi_nr_config_request_t; } nfapi_nr_config_request_t;
typedef enum { typedef enum {
NFAPI_NR_DL_DCI_FORMAT_1_0=0, NFAPI_NR_DL_DCI_FORMAT_1_0 = 0,
NFAPI_NR_DL_DCI_FORMAT_1_1, NFAPI_NR_DL_DCI_FORMAT_1_1,
NFAPI_NR_DL_DCI_FORMAT_2_0, NFAPI_NR_DL_DCI_FORMAT_2_0,
NFAPI_NR_DL_DCI_FORMAT_2_1, NFAPI_NR_DL_DCI_FORMAT_2_1,
...@@ -252,7 +252,7 @@ typedef enum { ...@@ -252,7 +252,7 @@ typedef enum {
} nfapi_nr_dci_format_e; } nfapi_nr_dci_format_e;
typedef enum { typedef enum {
NFAPI_NR_RNTI_new=0, NFAPI_NR_RNTI_new = 0,
NFAPI_NR_RNTI_C, NFAPI_NR_RNTI_C,
NFAPI_NR_RNTI_RA, NFAPI_NR_RNTI_RA,
NFAPI_NR_RNTI_P, NFAPI_NR_RNTI_P,
...@@ -286,6 +286,7 @@ nfapi_tl_t tl; ...@@ -286,6 +286,7 @@ nfapi_tl_t tl;
uint8_t cce_idx; uint8_t cce_idx;
uint8_t aggregation_level; uint8_t aggregation_level;
uint16_t rnti; uint16_t rnti;
uint8_t rnti_type;
uint8_t dci_format; //1 bit uint8_t dci_format; //1 bit
uint16_t frequency_domain_resource_assignment; //up to 9 bits uint16_t frequency_domain_resource_assignment; //up to 9 bits
...@@ -325,6 +326,7 @@ nfapi_tl_t tl; ...@@ -325,6 +326,7 @@ nfapi_tl_t tl;
uint8_t cce_idx; uint8_t cce_idx;
uint8_t aggregation_level; uint8_t aggregation_level;
uint16_t rnti; uint16_t rnti;
uint8_t rnti_type;
uint8_t dci_format; //1 bit uint8_t dci_format; //1 bit
uint16_t frequency_domain_resource_assignment; //up to 9 bits uint16_t frequency_domain_resource_assignment; //up to 9 bits
...@@ -374,6 +376,9 @@ uint8_t *block_numbers; ...@@ -374,6 +376,9 @@ uint8_t *block_numbers;
} nfapi_nr_dl_config_dci_pdu_rel15_t; } nfapi_nr_dl_config_dci_pdu_rel15_t;
//#define NFAPI_NR_DL_CONFIG_REQUEST_DCI_DL_PDU_REL15_TAG 0x???? //#define NFAPI_NR_DL_CONFIG_REQUEST_DCI_DL_PDU_REL15_TAG 0x????
typedef struct {
nfapi_nr_dl_config_dci_pdu_rel15_t dci_dl_pdu_rel15;
} nfapi_dl_config_dci_dl_pdu;
typedef struct{ typedef struct{
nfapi_uint8_tlv_t coreset_id; nfapi_uint8_tlv_t coreset_id;
......
...@@ -224,7 +224,12 @@ void fill_pdcch_order(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_a ...@@ -224,7 +224,12 @@ void fill_pdcch_order(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_a
proc->frame_tx, proc->subframe_tx, rel8->rnti); proc->frame_tx, proc->subframe_tx, rel8->rnti);
} }
void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc,nfapi_dl_config_dci_dl_pdu *pdu) void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
int frame,
int subframe,
eNB_rxtx_proc_t *proc,
DCI_ALLOC_t *dci_alloc,
nfapi_dl_config_dci_dl_pdu *pdu)
{ {
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
uint8_t *dci_pdu = &dci_alloc->dci_pdu[0]; uint8_t *dci_pdu = &dci_alloc->dci_pdu[0];
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file PHY/NR_TRANSPORT/nr_dci_tools.c
* \brief
* \author
* \date 2018
* \version 0.1
* \company Eurecom
* \email:
* \note
* \warning
*/
#include "nfapi_nr_interface.h"
void nr_fill_dci_and_dlsch(PHY_VARS_gNB *gNB,
int frame,
int subframe,
gNB_rxtx_proc_t *proc,
NR_DCI_ALLOC_t *dci_alloc,
nfapi_nr_dl_config_dci_pdu_rel15_t *pdu)
{
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
uint8_t *dci_pdu = &dci_alloc->dci_pdu[0];
nfapi_nr_dl_config_dci_pdu_rel15_t *rel15 = &pdu->dci_dl_pdu_rel15;
nfapi_nr_config_request_t *cfg = &gNB->gNB_config;
dci_alloc->L = rel15->aggregation_level;
dci_alloc->firstCCE = rel15->cce_idx;
dci_alloc->rnti = rel15->rnti;
dci_alloc->ra_flag = 0;
//dci_alloc->search_space = ???
if (rel15->dci_format == NFAPI_NR_DL_DCI_FORMAT_1_0) {
dci_alloc->format = format1_0;
dci_alloc->dci_length = nr_get_dci_size(rel15->dci_format, rel15->rnti_type, &fp->initial_bwp_params_dl ,&cfg);
if (rel15->rnti_type == NFAPI_NR_RNTI_C
|| rel15->rnti_type == NFAPI_NR_RNTI_CS
|| rel15->rnti_type == NFAPI_NR_RNTI_new) {
} else if (rel15->rnti_type == NFAPI_NR_RNTI_P) {
} else if (rel15->rnti_type == NFAPI_NR_RNTI_SI) {
} else if (rel15->rnti_type == NFAPI_NR_RNTI_RA) {
dci_alloc->ra_flag = 1;
} else if (rel15->rnti_type == NFAPI_NR_RNTI_TC) {
} else {
AssertFatal(1==0, "[nr_fill_dci_and_dlsch] Incorrect DCI Format(%d) and RNTI Type(%d) combination",rel15->dci_format, rel15->rnti_type);
}
} else if (rel15->dci_format == NFAPI_NR_UL_DCI_FORMAT_0_0) {
dci_alloc->format = format0_0;
dci_alloc->dci_length = nr_get_dci_size(rel15->dci_format, rel15->rnti_type, &fp->initial_bwp_params_ul ,&cfg);
} else if (rel15->dci_format == NFAPI_NR_DL_DCI_FORMAT_1_1) {
dci_alloc->format = format1_1;
dci_alloc->dci_length = nr_get_dci_size(rel15->dci_format, rel15->rnti_type, &fp->initial_bwp_params_dl ,&cfg);
} else if (rel15->dci_format == NFAPI_NR_UL_DCI_FORMAT_0_1) {
dci_alloc->format = format0_1;
dci_alloc->dci_length = nr_get_dci_size(rel15->dci_format, rel15->rnti_type, &fp->initial_bwp_params_ul ,&cfg);
} else if (rel15->dci_format == NFAPI_NR_DL_DCI_FORMAT_2_0) {
dci_alloc->format = format2_0;
dci_alloc->dci_length = nr_get_dci_size(rel15->dci_format, rel15->rnti_type, &fp->initial_bwp_params_dl ,&cfg);
} else if (rel15->dci_format == NFAPI_NR_DL_DCI_FORMAT_2_1) {
dci_alloc->format = format2_1;
dci_alloc->dci_length = nr_get_dci_size(rel15->dci_format, rel15->rnti_type, &fp->initial_bwp_params_dl ,&cfg);
} else if (rel15->dci_format == NFAPI_NR_DL_DCI_FORMAT_2_2) {
dci_alloc->format = format2_2;
dci_alloc->dci_length = nr_get_dci_size(rel15->dci_format, rel15->rnti_type, &fp->initial_bwp_params_dl ,&cfg);
} else if (rel15->dci_format == NFAPI_NR_DL_DCI_FORMAT_2_3) {
dci_alloc->format = format2_3;
dci_alloc->dci_length = nr_get_dci_size(rel15->dci_format, rel15->rnti_type, &fp->initial_bwp_params_dl ,&cfg);
} else {
AssertFatal(1==0, "[nr_fill_dci_and_dlsch] Incorrect DCI Format(%d)",rel15->dci_format);
}
return;
}
This diff is collapsed.
...@@ -596,7 +596,7 @@ typedef struct PHY_VARS_eNB_s { ...@@ -596,7 +596,7 @@ typedef struct PHY_VARS_eNB_s {
unsigned char first_run_timing_advance[NUMBER_OF_UE_MAX]; unsigned char first_run_timing_advance[NUMBER_OF_UE_MAX];
unsigned char first_run_I0_measurements; unsigned char first_run_I0_measurements;
unsigned char is_secondary_eNB; // primary by default unsigned char is_secondary_eNB; // primary by default
unsigned char is_init_sync; /// Flag to tell if initial synchronization is performed. This affects how often the secondary eNB will listen to the PSS from the primary system. unsigned char is_init_sync; /// Flag to tell if initial synchronization is performed. This affects how often the secondary eNB will listen to the PSS from the primary system.
unsigned char has_valid_precoder; /// Flag to tell if secondary eNB has channel estimates to create NULL-beams from, and this B/F vector is created. unsigned char has_valid_precoder; /// Flag to tell if secondary eNB has channel estimates to create NULL-beams from, and this B/F vector is created.
...@@ -732,4 +732,3 @@ typedef struct PHY_VARS_eNB_s { ...@@ -732,4 +732,3 @@ typedef struct PHY_VARS_eNB_s {
} PHY_VARS_eNB; } PHY_VARS_eNB;
#endif // __PHY_DEFS_eNB_H__ #endif // __PHY_DEFS_eNB_H__
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
\note \note
\warning \warning
*/ */
#ifndef __PHY_DEFS_GNB__H__ #ifndef __PHY_DEFS_GNB__H__
#define __PHY_DEFS_GNB__H__ #define __PHY_DEFS_GNB__H__
...@@ -337,7 +338,7 @@ typedef struct PHY_VARS_gNB_s { ...@@ -337,7 +338,7 @@ typedef struct PHY_VARS_gNB_s {
unsigned char first_run_timing_advance[NUMBER_OF_UE_MAX]; unsigned char first_run_timing_advance[NUMBER_OF_UE_MAX];
unsigned char first_run_I0_measurements; unsigned char first_run_I0_measurements;
unsigned char is_secondary_gNB; // primary by default unsigned char is_secondary_gNB; // primary by default
unsigned char is_init_sync; /// Flag to tell if initial synchronization is performed. This affects how often the secondary eNB will listen to the PSS from the primary system. unsigned char is_init_sync; /// Flag to tell if initial synchronization is performed. This affects how often the secondary eNB will listen to the PSS from the primary system.
unsigned char has_valid_precoder; /// Flag to tell if secondary eNB has channel estimates to create NULL-beams from, and this B/F vector is created. unsigned char has_valid_precoder; /// Flag to tell if secondary eNB has channel estimates to create NULL-beams from, and this B/F vector is created.
...@@ -470,6 +471,4 @@ typedef struct PHY_VARS_gNB_s { ...@@ -470,6 +471,4 @@ typedef struct PHY_VARS_gNB_s {
int32_t pusch_stats_BO[NUMBER_OF_UE_MAX][10240]; int32_t pusch_stats_BO[NUMBER_OF_UE_MAX][10240];
} PHY_VARS_gNB; } PHY_VARS_gNB;
#endif #endif
...@@ -59,14 +59,14 @@ void handle_nfapi_nr_dci_dl_pdu(PHY_VARS_gNB *gNB, ...@@ -59,14 +59,14 @@ void handle_nfapi_nr_dci_dl_pdu(PHY_VARS_gNB *gNB,
gNB_rxtx_proc_t *proc, gNB_rxtx_proc_t *proc,
nfapi_nr_dl_config_request_pdu_t *dl_config_pdu) nfapi_nr_dl_config_request_pdu_t *dl_config_pdu)
{ {
int idx = subframe&1; int idx = subframe&1;
NR_gNB_PDCCH *pdcch_vars = &gNB->pdcch_vars; NR_gNB_PDCCH *pdcch_vars = &gNB->pdcch_vars;
nfapi_nr_dl_config_dci_pdu_rel15_t *pdu = &dl_config_pdu->dci_dl_pdu_rel15; nfapi_nr_dl_config_dci_pdu_rel15_t *pdu = &dl_config_pdu->dci_dl_pdu_rel15;
LOG_D(PHY,"Frame %d, Subframe %d: DCI processing - populating pdcch_vars->dci_alloc[%d] proc:subframe_tx:%d idx:%d pdcch_vars->num_dci:%d\n",frame,subframe, pdcch_vars->num_dci, proc->subframe_tx, idx, pdcch_vars->num_dci); LOG_D(PHY,"Frame %d, Subframe %d: DCI processing - populating pdcch_vars->dci_alloc[%d] proc:subframe_tx:%d idx:%d pdcch_vars->num_dci:%d\n",frame,subframe, pdcch_vars->num_dci, proc->subframe_tx, idx, pdcch_vars->num_dci);
// copy dci configuration into gNB structure // copy dci configuration into gNB structure
//nr_fill_dci_and_dlsch(eNB,frame,subframe,proc,&pdcch_vars->dci_alloc[pdcch_vars->num_dci],pdu); nr_fill_dci_and_dlsch(gNB,frame,subframe,proc,&pdcch_vars->dci_alloc[pdcch_vars->num_dci],pdu);
LOG_D(PHY,"Frame %d, Subframe %d: DCI processing - populated pdcch_vars->dci_alloc[%d] proc:subframe_tx:%d idx:%d pdcch_vars->num_dci:%d\n",proc->frame_tx,proc->subframe_tx, pdcch_vars->num_dci, proc->subframe_tx, idx, pdcch_vars->num_dci); LOG_D(PHY,"Frame %d, Subframe %d: DCI processing - populated pdcch_vars->dci_alloc[%d] proc:subframe_tx:%d idx:%d pdcch_vars->num_dci:%d\n",proc->frame_tx,proc->subframe_tx, pdcch_vars->num_dci, proc->subframe_tx, idx, pdcch_vars->num_dci);
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*! \file RRC/LITE/defs_NR.h /*! \file RRC/NR/nr_rrc_defs.h
* \brief NR RRC struct definitions and function prototypes * \brief NR RRC struct definitions and function prototypes
* \author Navid Nikaein, Raymond Knopp * \author Navid Nikaein, Raymond Knopp
* \date 2010 - 2014, 2018 * \date 2010 - 2014, 2018
......
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