Commit 022211cd authored by Guy De Souza's avatar Guy De Souza

Coreset and search space params

parent b4e3a041
......@@ -22,6 +22,7 @@
#include "PHY/defs_gNB.h"
#include "SCHED/sched_eNB.h"
#include "PHY/phy_extern.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "RadioResourceConfigCommonSIB.h"
......
......@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
#include "defs.h"
#include "nr_refsig.h"
void nr_init_pbch_dmrs(PHY_VARS_gNB* gNB)
{
......
......@@ -21,8 +21,9 @@
/* Definitions for LTE Reference signals */
/* Author R. Knopp / EURECOM / OpenAirInterface.org */
#ifndef __NR_REFSIG_DEFS__H__
#define __NR_REFSIG_DEFS__H__
#ifndef __NR_REFSIG__H__
#define __NR_REFSIG__H__
#include "PHY/defs_gNB.h"
......
......@@ -20,7 +20,7 @@
*/
/*! \file PHY/NR_TRANSPORT/nr_dci.c
* \brief Implements DCI encoding/decoding (38.212/38.213/38.214). Current NR compliance V15.1 2018-06.
* \brief Implements DCI encoding/decoding and PDCCH TX/RX procedures (38.212/38.213/38.214). V15.1 2018-06.
* \author Guy De Souza
* \date 2018
* \version 0.1
......@@ -35,7 +35,7 @@
uint8_t nr_get_dci_size(nr_dci_format_e format,
nr_rnti_type_e rnti,
NR_BWP_PARMS* bwp,
nfapi_nr_config_request_t* config)
nfapi_config_request_t* config)
{
uint8_t size = 0;
uint16_t N_RB = bwp->N_RB;
......@@ -125,7 +125,6 @@ uint8_t nr_get_dci_size(nr_dci_format_e format,
return size;
}
uint8_t nr_generate_dci_top(NR_DCI_ALLOC_t dci_alloc,
int32_t** txdataF,
int16_t amp,
......
......@@ -21,7 +21,7 @@
#ifndef __PHY_NR_TRANSPORT_DCI__H
#define __PHY_NR_TRANSPORT_DCI__H
#include "defs_gNB.h"
#include "PHY/defs_gNB.h"
typedef enum {
......@@ -44,6 +44,41 @@ typedef enum {
nr_rnti_type_P_RNTI
} nr_rnti_type_e;
// PDCCH search space types css: common, uss: ue specific
typedef enum {
nr_pdcch_css_type_0=0,
nr_pdcch_css_type_0_A,
nr_pdcch_css_type_1,
nr_pdcch_css_type_2,
nr_pdcch_css_type_3,
nr_pdcch_uss_type
} nr_pdcch_ss_type_e;
typedef enum {
nr_pdcch_mux_pattern_type_1=0,
nr_pdcch_mux_pattern_type_2,
nr_pdcch_mux_pattern_type_3
} nr_pdcch_mux_pattern_type_e;
typedef struct {
uint8_t param_O;
uint8_t param_M;
uint8_t nb_ss_sets_per_slot;
uint8_t first_symbol_idx;
nr_pdcch_ss_type_e ss_type;
} nr_pdcch_ss_params_t;
typedef struct {
uint8_t n_rb;
uint8_t n_symb;
uint8_t rb_offset;
nr_pdcch_mux_pattern_type_e mux_pattern;
} nr_pdcch_coreset_params_t;
typedef struct {
nr_pdcch_ss_params_t ss_params;
nr_pdcch_coreset_params_t coreset_params;
} nr_pdcch_params_t;
typedef struct {
/// Length of DCI in bits
......@@ -66,12 +101,12 @@ typedef struct {
uint8_t nr_get_dci_size(nr_dci_format_e format,
nr_rnti_type_e rnti,
NR_BWP_PARMS bwp,
nfapi_nr_config_request_t* config);
nfapi_config_request_t* config);
uint8_t nr_generate_dci_top(NR_DCI_ALLOC_t dci_alloc,
int32_t** txdataF,
int16_t amp,
NR_DL_FRAME_PARMS* frame_parms,
nfapi_config_request_t* config)
nfapi_config_request_t* config);
#endif //__PHY_NR_TRANSPORT_DCI__H
/*
* 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_pdcch.c
* \brief Implements PDCCH physical channel TX/RX procedures (38.211). Current NR compliance V15.1 2018-06.
* \author Guy De Souza
* \date 2018
* \version 0.1
* \company Eurecom
* \email: desouza@eurecom.fr
* \note
* \warning
*/
#include "nr_dci.h"
......@@ -238,7 +238,7 @@ void nr_feptx_ofdm(RU_t *ru) {
}
// if S-subframe generate first slot only
if (nr_subframe_select(fp,subframe) == SF_S)
if (nr_subframe_select(cfg,subframe) == SF_S)
len = fp->samples_per_subframe / fp->slots_per_subframe;
else
len = fp->samples_per_subframe;
......
......@@ -29,15 +29,65 @@
* \note
* \warning
*/
#include "PHY/defs_gNB.h"
#include "PHY/phy_extern.h"
#include "sched_nr.h"
/// LUT for the number of symbols in the coreset indexed by SSB index
uint8_t nr_coreset_nsymb_pdcch_type_0[16] = {2,2,2,2,2,3,3,3,3,3,1,1,1,2,2,2};
/// LUT for the number of RBs in the coreset indexed by SSB index
uint8_t nr_coreset_rb_offset_pdcch_type_0[16] = {0,1,2,3,4,0,1,2,3,4,12,14,16,12,14,16};
/// LUT for monitoring occasions param O indexed by SSB index
uint8_t nr_ss_param_O_type_0_mux1_FR1[16] = {0,0,2,2,5,5,7,7,0,5,0,0,2,2,5,5};
/// LUT for number of SS sets per slot indexed by SSB index
uint8_t nr_ss_sets_per_slot_type_0_FR1[16] = {1,2,1,2,1,2,1,2,1,1,1,1,1,1,1,1};
/// LUT for monitoring occasions param M indexed by SSB index
uint8_t nr_ss_param_M_type_0_mux1_FR1[16] = {1,0.5,1,0.5,1,0.5,1,0.5,2,2,1,1,1,1,1,1};
/// LUT for SS first symbol index indexed by SSB index
uint8_t nr_ss_first_symb_idx_type_0_mux1_FR1[8] = {0,0,1,2,1,2,1,2};
nr_subframe_t nr_subframe_select(nfapi_config_request_t *cfg,unsigned char subframe)
{
if (cfg->subframe_config.duplex_mode.value == FDD)
return(SF_DL);
else
return SF_DL;
}
void nr_fill_pdcch_params(nr_pdcch_params_t *pdcch_params,
nfapi_config_request_t* config,
uint8_t ssb_idx)
{
nr_pdcch_coreset_params_t *coreset_params = &pdcch_params->coreset_params;
nr_pdcch_ss_params_t *ss_params = &pdcch_params->ss_params;
// the switch case below assumes that only the cases where the SSB and the PDCCH have the same SCS are supported along with type 1 PDCCH/ mux pattern 1 and FR1
switch(config->subframe_config.numerology_index_mu.value) {
case NR_MU_0:
break;
case NR_MU_1:
coreset_params->mux_pattern = nr_pdcch_mux_pattern_type_1;
coreset_params->n_rb = (ssb_idx < 10)? 24 : 48;
coreset_params->n_symb = nr_coreset_nsymb_pdcch_type_0[ssb_idx];
coreset_params->rb_offset = nr_coreset_rb_offset_pdcch_type_0[ssb_idx];
ss_params->ss_type = nr_pdcch_css_type_1;
ss_params->param_O = nr_ss_param_O_type_0_mux1_FR1[ssb_idx];
ss_params->nb_ss_sets_per_slot = nr_ss_sets_per_slot_type_0_FR1[ssb_idx];
ss_params->param_M = nr_ss_param_M_type_0_mux1_FR1[ssb_idx];
ss_params->first_symbol_idx = (ssb_idx < 8)? ( (ssb_idx&1)? coreset_params->n_symb : 0 ) : nr_ss_first_symb_idx_type_0_mux1_FR1[ssb_idx - 8];
break;
case NR_MU_2:
break;
case NR_MU_3:
break;
default:
AssertFatal(1==0,"Invalid PDCCH numerology index %d", config->subframe_config.numerology_index_mu.value);
}
}
......@@ -31,6 +31,7 @@
#include "PHY/defs_gNB.h"
#include "PHY_INTERFACE/phy_interface.h"
#include "SCHED/sched_eNB.h"
#include "PHY/NR_TRANSPORT/nr_dci.h"
lte_subframe_t nr_subframe_select (nfapi_config_request_t *cfg, unsigned char subframe);
void nr_set_ssb_first_subcarrier(nfapi_config_request_t *cfg, NR_DL_FRAME_PARMS *fp);
......@@ -40,4 +41,8 @@ void nr_feptx_ofdm(RU_t *ru);
void nr_feptx_ofdm_2thread(RU_t *ru);
void nr_feptx0(RU_t *ru,int slot);
void nr_fill_pdcch_params(nr_pdcch_params_t *pdcch_params,
nfapi_config_request_t* config,
uint8_t ssb_idx);
#endif
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