Merge remote-tracking branch 'origin/develop' into NR_RRC_harmonization_after_BWP
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef LINEAR_ALLOC_H
|
||||
#define LINEAR_ALLOC_H
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
typedef unsigned int uid_t;
|
||||
#define UID_LINEAR_ALLOCATOR_SIZE 1024
|
||||
#define UID_LINEAR_ALLOCATOR_BITMAP_SIZE (((UID_LINEAR_ALLOCATOR_SIZE/8)/sizeof(unsigned int)) + 1)
|
||||
typedef struct uid_linear_allocator_s {
|
||||
unsigned int bitmap[UID_LINEAR_ALLOCATOR_BITMAP_SIZE];
|
||||
} uid_allocator_t;
|
||||
|
||||
static inline void uid_linear_allocator_init(uid_allocator_t *uia) {
|
||||
memset(uia, 0, sizeof(uid_allocator_t));
|
||||
}
|
||||
|
||||
static inline uid_t uid_linear_allocator_new(uid_allocator_t *uia) {
|
||||
unsigned int bit_index = 1;
|
||||
uid_t uid = 0;
|
||||
|
||||
for (unsigned int i = 0; i < UID_LINEAR_ALLOCATOR_BITMAP_SIZE; i++) {
|
||||
if (uia->bitmap[i] != UINT_MAX) {
|
||||
bit_index = 1;
|
||||
uid = 0;
|
||||
|
||||
while ((uia->bitmap[i] & bit_index) == bit_index) {
|
||||
bit_index = bit_index << 1;
|
||||
uid += 1;
|
||||
}
|
||||
|
||||
uia->bitmap[i] |= bit_index;
|
||||
return uid + (i*sizeof(unsigned int)*8);
|
||||
}
|
||||
}
|
||||
|
||||
return UINT_MAX;
|
||||
}
|
||||
|
||||
|
||||
static inline void uid_linear_allocator_free(uid_allocator_t *uia, uid_t uid) {
|
||||
const unsigned int i = uid/sizeof(unsigned int)/8;
|
||||
const unsigned int bit = uid % (sizeof(unsigned int) * 8);
|
||||
const unsigned int value = ~(1 << bit);
|
||||
|
||||
if (i < UID_LINEAR_ALLOCATOR_BITMAP_SIZE) {
|
||||
uia->bitmap[i] &= value;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LINEAR_ALLOC_H */
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef UTILS_CONFIG_H_ASN1
|
||||
#define UTILS_CONFIG_H_ASN1
|
||||
|
||||
// This is hard coded file name "config.h" and HAVE_CONFIG_H_ in asn1c skeletons
|
||||
|
||||
/*
|
||||
* This file "config.h" will be used by asn1c if HAVE_CONFIG_H_ is defined and
|
||||
* included. This logs asn1c encoder and decoder traces at execution time using
|
||||
* the regular OAI logging system, i.e., LOG_I(ASN...);
|
||||
*
|
||||
* As it is very verbose, note that you can change the log level per module in
|
||||
* source or in gdb, e.g., to only activate it for a short time.
|
||||
*
|
||||
* In code:
|
||||
* ```
|
||||
* set_log(ASN, OAI_INFO); // enable logging
|
||||
* // do your encoding here
|
||||
* set_log(ASN, OAI_ERR); // disable logging
|
||||
* ```
|
||||
*
|
||||
* in gdb:
|
||||
* ```
|
||||
* gdb> p set_log(ASN, 1) // disable log, 1 == OAI_ERR
|
||||
* gdb> p set_log(ASN, 5) // enable log, 5 == OAI_INFO
|
||||
* ```
|
||||
*/
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
#if DEBUG_ASN1C
|
||||
#define ASN_DEBUG(x...) do{ LOG_I(ASN,x);LOG_I(ASN,"\n"); } while(false)
|
||||
#else
|
||||
#define ASN_DEBUG(x...)
|
||||
#endif
|
||||
|
||||
#endif /* UTILS_CONFIG_H_ASN1 */
|
||||
@@ -472,6 +472,236 @@ int get_subband_size(int NPRB,int size) {
|
||||
|
||||
}
|
||||
|
||||
void get_samplerate_and_bw(int mu,
|
||||
int n_rb,
|
||||
int8_t threequarter_fs,
|
||||
double *sample_rate,
|
||||
unsigned int *samples_per_frame,
|
||||
double *tx_bw,
|
||||
double *rx_bw) {
|
||||
|
||||
if (mu == 0) {
|
||||
switch(n_rb) {
|
||||
case 270:
|
||||
if (threequarter_fs) {
|
||||
*sample_rate=92.16e6;
|
||||
*samples_per_frame = 921600;
|
||||
*tx_bw = 50e6;
|
||||
*rx_bw = 50e6;
|
||||
} else {
|
||||
*sample_rate=61.44e6;
|
||||
*samples_per_frame = 614400;
|
||||
*tx_bw = 50e6;
|
||||
*rx_bw = 50e6;
|
||||
}
|
||||
case 216:
|
||||
if (threequarter_fs) {
|
||||
*sample_rate=46.08e6;
|
||||
*samples_per_frame = 460800;
|
||||
*tx_bw = 40e6;
|
||||
*rx_bw = 40e6;
|
||||
}
|
||||
else {
|
||||
*sample_rate=61.44e6;
|
||||
*samples_per_frame = 614400;
|
||||
*tx_bw = 40e6;
|
||||
*rx_bw = 40e6;
|
||||
}
|
||||
break;
|
||||
case 160: //30 MHz
|
||||
case 133: //25 MHz
|
||||
if (threequarter_fs) {
|
||||
AssertFatal(1==0,"N_RB %d cannot use 3/4 sampling\n",n_rb);
|
||||
}
|
||||
else {
|
||||
*sample_rate=30.72e6;
|
||||
*samples_per_frame = 307200;
|
||||
*tx_bw = 20e6;
|
||||
*rx_bw = 20e6;
|
||||
}
|
||||
case 106:
|
||||
if (threequarter_fs) {
|
||||
*sample_rate=23.04e6;
|
||||
*samples_per_frame = 230400;
|
||||
*tx_bw = 20e6;
|
||||
*rx_bw = 20e6;
|
||||
}
|
||||
else {
|
||||
*sample_rate=30.72e6;
|
||||
*samples_per_frame = 307200;
|
||||
*tx_bw = 20e6;
|
||||
*rx_bw = 20e6;
|
||||
}
|
||||
break;
|
||||
case 52:
|
||||
if (threequarter_fs) {
|
||||
*sample_rate=11.52e6;
|
||||
*samples_per_frame = 115200;
|
||||
*tx_bw = 10e6;
|
||||
*rx_bw = 10e6;
|
||||
}
|
||||
else {
|
||||
*sample_rate=15.36e6;
|
||||
*samples_per_frame = 153600;
|
||||
*tx_bw = 10e6;
|
||||
*rx_bw = 10e6;
|
||||
}
|
||||
case 25:
|
||||
if (threequarter_fs) {
|
||||
*sample_rate=5.76e6;
|
||||
*samples_per_frame = 57600;
|
||||
*tx_bw = 5e6;
|
||||
*rx_bw = 5e6;
|
||||
}
|
||||
else {
|
||||
*sample_rate=7.68e6;
|
||||
*samples_per_frame = 76800;
|
||||
*tx_bw = 5e6;
|
||||
*rx_bw = 5e6;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",n_rb,mu);
|
||||
}
|
||||
} else if (mu == 1) {
|
||||
switch(n_rb) {
|
||||
|
||||
case 273:
|
||||
if (threequarter_fs) {
|
||||
*sample_rate=184.32e6;
|
||||
*samples_per_frame = 1843200;
|
||||
*tx_bw = 100e6;
|
||||
*rx_bw = 100e6;
|
||||
} else {
|
||||
*sample_rate=122.88e6;
|
||||
*samples_per_frame = 1228800;
|
||||
*tx_bw = 100e6;
|
||||
*rx_bw = 100e6;
|
||||
}
|
||||
break;
|
||||
case 217:
|
||||
if (threequarter_fs) {
|
||||
*sample_rate=92.16e6;
|
||||
*samples_per_frame = 921600;
|
||||
*tx_bw = 80e6;
|
||||
*rx_bw = 80e6;
|
||||
} else {
|
||||
*sample_rate=122.88e6;
|
||||
*samples_per_frame = 1228800;
|
||||
*tx_bw = 80e6;
|
||||
*rx_bw = 80e6;
|
||||
}
|
||||
break;
|
||||
case 162 :
|
||||
if (threequarter_fs) {
|
||||
AssertFatal(1==0,"N_RB %d cannot use 3/4 sampling\n",n_rb);
|
||||
}
|
||||
else {
|
||||
*sample_rate=61.44e6;
|
||||
*samples_per_frame = 614400;
|
||||
*tx_bw = 60e6;
|
||||
*rx_bw = 60e6;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 133 :
|
||||
if (threequarter_fs) {
|
||||
AssertFatal(1==0,"N_RB %d cannot use 3/4 sampling\n",n_rb);
|
||||
}
|
||||
else {
|
||||
*sample_rate=61.44e6;
|
||||
*samples_per_frame = 614400;
|
||||
*tx_bw = 50e6;
|
||||
*rx_bw = 50e6;
|
||||
}
|
||||
|
||||
break;
|
||||
case 106:
|
||||
if (threequarter_fs) {
|
||||
*sample_rate=46.08e6;
|
||||
*samples_per_frame = 460800;
|
||||
*tx_bw = 40e6;
|
||||
*rx_bw = 40e6;
|
||||
}
|
||||
else {
|
||||
*sample_rate=61.44e6;
|
||||
*samples_per_frame = 614400;
|
||||
*tx_bw = 40e6;
|
||||
*rx_bw = 40e6;
|
||||
}
|
||||
break;
|
||||
case 51:
|
||||
if (threequarter_fs) {
|
||||
*sample_rate=23.04e6;
|
||||
*samples_per_frame = 230400;
|
||||
*tx_bw = 20e6;
|
||||
*rx_bw = 20e6;
|
||||
}
|
||||
else {
|
||||
*sample_rate=30.72e6;
|
||||
*samples_per_frame = 307200;
|
||||
*tx_bw = 20e6;
|
||||
*rx_bw = 20e6;
|
||||
}
|
||||
break;
|
||||
case 24:
|
||||
if (threequarter_fs) {
|
||||
*sample_rate=11.52e6;
|
||||
*samples_per_frame = 115200;
|
||||
*tx_bw = 10e6;
|
||||
*rx_bw = 10e6;
|
||||
}
|
||||
else {
|
||||
*sample_rate=15.36e6;
|
||||
*samples_per_frame = 153600;
|
||||
*tx_bw = 10e6;
|
||||
*rx_bw = 10e6;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",n_rb,mu);
|
||||
}
|
||||
} else if (mu == 3) {
|
||||
switch(n_rb) {
|
||||
case 66:
|
||||
if (threequarter_fs) {
|
||||
*sample_rate=184.32e6;
|
||||
*samples_per_frame = 1843200;
|
||||
*tx_bw = 100e6;
|
||||
*rx_bw = 100e6;
|
||||
} else {
|
||||
*sample_rate = 122.88e6;
|
||||
*samples_per_frame = 1228800;
|
||||
*tx_bw = 100e6;
|
||||
*rx_bw = 100e6;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 32:
|
||||
if (threequarter_fs) {
|
||||
*sample_rate=92.16e6;
|
||||
*samples_per_frame = 921600;
|
||||
*tx_bw = 50e6;
|
||||
*rx_bw = 50e6;
|
||||
} else {
|
||||
*sample_rate=61.44e6;
|
||||
*samples_per_frame = 614400;
|
||||
*tx_bw = 50e6;
|
||||
*rx_bw = 50e6;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",n_rb,mu);
|
||||
}
|
||||
} else {
|
||||
AssertFatal(0 == 1,"Numerology %d not supported for the moment\n",mu);
|
||||
}
|
||||
}
|
||||
|
||||
// from start symbol index and nb or symbols to symbol occupation bitmap in a slot
|
||||
uint16_t SL_to_bitmap(int startSymbolIndex, int nrOfSymbols) {
|
||||
return ((1<<nrOfSymbols)-1)<<startSymbolIndex;
|
||||
|
||||
@@ -83,6 +83,13 @@ uint16_t SL_to_bitmap(int startSymbolIndex, int nrOfSymbols);
|
||||
int get_nb_periods_per_frame(uint8_t tdd_period);
|
||||
int get_supported_band_index(int scs, int band, int n_rbs);
|
||||
long rrc_get_max_nr_csrs(uint8_t max_rbs, long b_SRS);
|
||||
void get_samplerate_and_bw(int mu,
|
||||
int n_rb,
|
||||
int8_t threequarter_fs,
|
||||
double *sample_rate,
|
||||
unsigned int *samples_per_frame,
|
||||
double *tx_bw,
|
||||
double *rx_bw);
|
||||
|
||||
#define CEILIDIV(a,b) ((a+b-1)/b)
|
||||
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
|
||||
|
||||
@@ -17,7 +17,4 @@
|
||||
#include "openair2/COMMON/flexran_messages_def.h"
|
||||
#include "openair2/COMMON/f1ap_messages_def.h"
|
||||
#include "openair2/COMMON/ngap_messages_def.h"
|
||||
#if ITTI_SIM
|
||||
#include "openair2/COMMON/itti_sim_messages_def.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -262,10 +262,6 @@ void *rrc_enb_process_itti_msg(void *);
|
||||
#include <openair3/SCTP/sctp_eNB_task.h>
|
||||
#include <openair3/NGAP/ngap_gNB.h>
|
||||
|
||||
#ifdef ITTI_SIM
|
||||
#include <openair2/COMMON/itti_sim_messages_types.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
static const char *const messages_definition_xml = {
|
||||
#include <messages_xml.h>
|
||||
@@ -308,9 +304,11 @@ void *rrc_enb_process_msg(void *);
|
||||
TASK_DEF(TASK_BM, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
||||
TASK_DEF(TASK_PHY_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
||||
TASK_DEF(TASK_MAC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
||||
TASK_DEF(TASK_MAC_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
||||
TASK_DEF(TASK_RLC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
||||
TASK_DEF(TASK_RRC_ENB_NB_IoT, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
||||
TASK_DEF(TASK_PDCP_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
||||
TASK_DEF(TASK_PDCP_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
||||
TASK_DEF(TASK_DATA_FORWARDING, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
||||
TASK_DEF(TASK_END_MARKER, TASK_PRIORITY_MED, 200, NULL, NULL) \
|
||||
TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL,NULL)\
|
||||
|
||||
Reference in New Issue
Block a user