P5 message UL/DL BWP Common/Dedicated finish, primitibes of MIB RX/RRC decode done
This commit is contained in:
@@ -30,97 +30,100 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "mac_proto.h"
|
||||
|
||||
int
|
||||
nr_rrc_mac_config_req_ue(
|
||||
module_id_t Mod_idP,
|
||||
int CC_idP,
|
||||
uint8_t eNB_index,
|
||||
MAC_CellGroupConfig_t *mac_cell_group_config,
|
||||
PhysicalCellGroupConfig_t *phy_cell_group_config,
|
||||
SpCellConfig_t *spcell_config){
|
||||
module_id_t module_id,
|
||||
int CC_idP,
|
||||
uint8_t gNB_index,
|
||||
NR_MIB_t *mibP,
|
||||
NR_MAC_CellGroupConfig_t *mac_cell_group_configP,
|
||||
NR_PhysicalCellGroupConfig_t *phy_cell_group_configP,
|
||||
NR_SpCellConfig_t *spcell_configP ){
|
||||
|
||||
NR_UE_MAC_INST *mac = get_mac_inst(Mod_idP);
|
||||
NR_UE_MAC_INST *mac = get_mac_inst(module_id);
|
||||
|
||||
ServingCellConfig_t *serving_cell_config = spcell_config->spCellConfigDedicated;
|
||||
// TODO do something FAPI-like P5 L1/L2 config interface in config_si, config_mib, etc.
|
||||
|
||||
if(mac_cell_group_config != (MAC_CellGroupConfig_t *)0){
|
||||
if(mac_cell_group_config->drx_Config != (drx_Config_t *)0 ){
|
||||
mac->drx_Config = mac_cell_group_config->drx_Config;
|
||||
if(mib != NULL){
|
||||
|
||||
}
|
||||
|
||||
if(mac_cell_group_configP != NULL){
|
||||
if(mac_cell_group_configP->drx_Config != NULL ){
|
||||
mac->drx_Config = mac_cell_group_configP->drx_Config;
|
||||
}
|
||||
|
||||
if(mac_cell_group_config->SchedulingRequestConfig != (SchedulingRequestConfig_t *)0 ){
|
||||
mac->SchedulingRequestConfig = mac_cell_group_config->SchedulingRequestConfig;
|
||||
if(mac_cell_group_configP->SchedulingRequestConfig != NULL ){
|
||||
mac->SchedulingRequestConfig = mac_cell_group_configP->SchedulingRequestConfig;
|
||||
}
|
||||
|
||||
if(mac_cell_group_config->BSR_Config != (BSR_Config_t *)0 ){
|
||||
mac->BSR_Config = mac_cell_group_config->BSR_Config;
|
||||
if(mac_cell_group_configP->BSR_Config != NULL ){
|
||||
mac->BSR_Config = mac_cell_group_configP->BSR_Config;
|
||||
}
|
||||
|
||||
if(mac_cell_group_config->TAG_Config != (TAG_Config_t *)0 ){
|
||||
mac->TAG_Config = mac_cell_group_config->TAG_Config;
|
||||
if(mac_cell_group_configP->TAG_Config != NULL ){
|
||||
mac->TAG_Config = mac_cell_group_configP->TAG_Config;
|
||||
}
|
||||
|
||||
if(mac_cell_group_config->phr_Config != (phr_Config_t *)0 ){
|
||||
mac->phr_Config = mac_cell_group_config->phr_Config;
|
||||
if(mac_cell_group_configP->phr_Config != NULL ){
|
||||
mac->phr_Config = mac_cell_group_configP->phr_Config;
|
||||
}
|
||||
|
||||
if(mac_cell_group_config->cs_RNTI != (cs_RNTI_t *)0 ){
|
||||
mac->cs_RNTI = mac_cell_group_config->cs_RNTI;
|
||||
if(mac_cell_group_configP->cs_RNTI != NULL ){
|
||||
mac->cs_RNTI = mac_cell_group_configP->cs_RNTI;
|
||||
}
|
||||
}
|
||||
|
||||
if(phy_cell_group_config != (PhysicalCellGroupConfig_t *)0){
|
||||
config_phy(phy_cell_group_config, NULL);
|
||||
if(phy_cell_group_configP != NULL ){
|
||||
//config_phy(phy_cell_group_config, NULL);
|
||||
}
|
||||
|
||||
if(serving_cell_config_config != (SpCellConfig_t *)0){
|
||||
config_phy(NULL, spcell_config);
|
||||
// TODO check
|
||||
/*
|
||||
if(serving_cell_config_configP != NULL ){
|
||||
//config_phy(NULL, spcell_config);
|
||||
mac->servCellIndex = spcell_config->servCellIndex;
|
||||
}
|
||||
|
||||
|
||||
if(serving_cell_config != (spCellConfigDedicated_t *)0){
|
||||
if(serving_cell_config->tdd_UL_DL_ConfigurationDedicated != (TDD_UL_DL_ConfigDedicated_t *)0){
|
||||
if(serving_cell_config != NULL ){
|
||||
if(serving_cell_config->tdd_UL_DL_ConfigurationDedicated != NULL ){
|
||||
mac->tdd_UL_DL_ConfigurationDedicated = serving_cell_config->tdd_UL_DL_ConfigurationDedicated;
|
||||
}
|
||||
|
||||
if(spcell_config->initialDownlinkBWP != (BWP_DownlinkDedicated_t *)0){
|
||||
if(spcell_config->initialDownlinkBWP != NULL ){
|
||||
mac->init_DL_BWP = spcell_config->initialDownlinkBWP;
|
||||
}
|
||||
|
||||
// storage list of DL BWP config. TODO should be modify to maintain(add/release) a list inside MAC instance, this implementation just use for one-shot RRC configuration setting.
|
||||
if(spcell_config->downlinkBWP_ToAddModList != (struct ServingCellConfig__downlinkBWP_ToAddModList *)0){
|
||||
if(spcell_config->downlinkBWP_ToAddModList != NULL ){
|
||||
mac->BWP_Downlink_list = spcell_config->downlinkBWP_ToAddModList->list;
|
||||
mac->BWP_Downlink_count = spcell_config->downlinkBWP_ToAddModList->count;
|
||||
}
|
||||
|
||||
if(spcell_config->bwp_InactivityTimer != (long *)0){
|
||||
if(spcell_config->bwp_InactivityTimer != NULL ){
|
||||
mac->bwp_InactivityTimer = spcell_config->bwp_InactivityTimer;
|
||||
}
|
||||
|
||||
if(spcell_config->defaultDownlinkBWP_Id != (BWP_Id_t *)0){
|
||||
if(spcell_config->defaultDownlinkBWP_Id != NULL ){
|
||||
mac->defaultDownlinkBWP_Id = spcell_config->defaultDownlinkBWP_Id;
|
||||
}
|
||||
|
||||
if(spcell_config->pdsch_ServingCellConfig != (PDSCH_ServingCellConfig_t *)0){
|
||||
if(spcell_config->pdsch_ServingCellConfig != NULL ){
|
||||
mac->pdsch_ServingCellConfig = spcell_config->pdsch_ServingCellConfig;
|
||||
}
|
||||
|
||||
if(spcell_config->csi_MeasConfig != (CSI_MeasConfig_t *)0){
|
||||
if(spcell_config->csi_MeasConfig != NULL ){
|
||||
mac->csi_MeasConfig = spcell_config->csi_MeasConfig;
|
||||
}
|
||||
|
||||
spcell_config->tag_Id = spcell_config.tag_Id;
|
||||
}
|
||||
|
||||
*/
|
||||
//scell config not yet
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* 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 LAYER2/MAC/defs.h
|
||||
* \brief MAC data structures, constant, and function prototype
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2011
|
||||
* \version 0.5
|
||||
* \email navid.nikaein@eurecom.fr
|
||||
|
||||
*/
|
||||
/** @defgroup _oai2 openair2 Reference Implementation
|
||||
* @ingroup _ref_implementation_
|
||||
* @{
|
||||
*/
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifndef __LAYER2_MAC_DEFS_H__
|
||||
#define __LAYER2_MAC_DEFS_H__
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "BCCH-BCH-Message.h"
|
||||
#include "RadioResourceConfigCommon.h"
|
||||
#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "MeasGapConfig.h"
|
||||
#include "SchedulingInfoList.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "RACH-ConfigCommon.h"
|
||||
#include "MeasObjectToAddModList.h"
|
||||
#include "MobilityControlInfo.h"
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#include "MBSFN-AreaInfoList-r9.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "PMCH-InfoList-r9.h"
|
||||
#include "SCellToAddMod-r10.h"
|
||||
#endif
|
||||
#ifdef Rel14
|
||||
#include "SystemInformationBlockType1-v1310-IEs.h"
|
||||
#endif
|
||||
|
||||
#include "nfapi_interface.h"
|
||||
#include "PHY_INTERFACE/IF_Module.h"
|
||||
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
|
||||
#include "PHY/defs_common.h" // for PRACH_RESOURCES_t
|
||||
|
||||
#include "targets/ARCH/COMMON/common_lib.h"
|
||||
|
||||
//solve implicit declaration
|
||||
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_proto.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
|
||||
|
||||
/** @defgroup _mac MAC
|
||||
* @ingroup _oai2
|
||||
* @{
|
||||
*/
|
||||
|
||||
/*!\brief Values of BCCH logical channel (fake)*/
|
||||
#define NR_BCCH_DL_SCH 3 // SI
|
||||
|
||||
/*!\brief Values of PCCH logical channel (fake) */
|
||||
#define NR_BCCH_BCH 5 // MIB
|
||||
/*@}*/
|
||||
#endif /*__LAYER2_MAC_DEFS_H__ */
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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 LAYER2/MAC/proto.h
|
||||
* \brief MAC functions prototypes for eNB and UE
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2010 - 2014
|
||||
* \email navid.nikaein@eurecom.fr
|
||||
* \version 1.0
|
||||
*/
|
||||
#ifndef __LAYER2_MAC_PROTO_H__
|
||||
#define __LAYER2_MAC_PROTO_H__
|
||||
|
||||
#include "mac_defs.h"
|
||||
|
||||
/**\brief decode mib pdu in NR_UE, from if_module ul_ind with P7 tx_ind message
|
||||
\param module_id module id
|
||||
\param CC_id component carrier id
|
||||
\param gNB_index gNB index
|
||||
\param extra_bits extra bits for frame calculation
|
||||
\param ssb_index SSB index for frame calculation
|
||||
\param frameP pointer to frame for revising after frame calculation
|
||||
\param pduP pointer to pdu
|
||||
\param pdu_length length of pdu*/
|
||||
void nr_ue_decode_mib(module_id_t module_id, int CC_id, uint8_t gNB_index, uint8_t extra_bits, uint32_t ssb_index, uint32_t *frameP, void *pduP, uint16_t pdu_len);
|
||||
|
||||
|
||||
/**\brief primitive from RRC layer to MAC layer for configuration L1/L2, now supported 4 rrc messages: MIB, cell_group_config for MAC/PHY, spcell_config(serving cell config)
|
||||
\param module_id module id
|
||||
\param CC_id component carrier id
|
||||
\param gNB_index gNB index
|
||||
\param mibP pointer to RRC message MIB
|
||||
\param mac_cell_group_configP pointer to RRC message MAC-related in cell group config
|
||||
\param phy_cell_group_configP pointer to RRC message PHY-related in cell group config
|
||||
\param spcell_configP pointer to RRC message serving cell config*/
|
||||
int nr_rrc_mac_config_req_ue( module_id_t module_id, int CC_id, uint8_t gNB_index, NR_MIB_t *mibP, NR_MAC_CellGroupConfig_t *mac_cell_group_configP, NR_PhysicalCellGroupConfig_t *phy_cell_group_configP, NR_SpCellConfig_t *spcell_configP ){
|
||||
|
||||
#endif
|
||||
/** @}*/
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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 ue_procedures.c
|
||||
* \brief procedures related to UE
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2010 - 2014
|
||||
* \version 1
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
#include "mac_proto.h"
|
||||
#include "RRC/NR_UE/proto.h"
|
||||
|
||||
void
|
||||
nr_ue_decode_mib(
|
||||
module_id_t module_id,
|
||||
int CC_id,
|
||||
uint8_t gNB_index,
|
||||
uint8_t extra_bits,
|
||||
uint32_t ssb_index,
|
||||
uint32_t *frameP,
|
||||
void *pduP,
|
||||
uint16_t pdu_len){
|
||||
|
||||
nr_mac_rrc_data_ind_ue( module_id, CC_id, gNB_index, frameP,
|
||||
NR_BCCH_BCH, (uint8_t *) pduP, pdu_len );
|
||||
|
||||
// frame calculation
|
||||
}
|
||||
Reference in New Issue
Block a user