Commit e7aa071e authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/develop' into merging-2019-w51-to-develop-nr

parents 6c3d5cf0 c256932f
......@@ -5,6 +5,10 @@
cmake_targets/log/
cmake_targets/*/build/
cmake_targets/ran_build/
cmake_targets/nas_sim_tools/build/
log/
lte_build_oai/
targets/bin/
# vscode
.vscode
......@@ -93,3 +93,4 @@ v0.4 -> Merge of feature-131-new-license. It closes issue#131 and changes the li
v0.3 -> Last stable commit on develop branch before the merge of feature-131-new-license. This is the last commit with GPL License
v0.2 -> Merge of enhancement-10-harmony to include NGFI RRH + New Interface for RF/BBU
v0.1 -> Last stable commit on develop branch before enhancement-10-harmony
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!--
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
-->
<testCaseList>
<htmlTabRef>test-05-tm1-mbms-nos1-tunnel</htmlTabRef>
<htmlTabName>Test-05MHz-MBMS-TM1-noS1-tunnel</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
030201 090109
030103 000001 090103 000002 040605 000001 090109 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>15</idle_sleep_time_in_sec>
</testCase>
<testCase id="000003">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>60</idle_sleep_time_in_sec>
</testCase>
<testCase id="030103">
<class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/5MHz/MBMS)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band17.tm1.mbms.25PRB.usrpb210.conf --noS1 --eNBs.[0].rrc_inactivity_threshold 0 --nokrnmod 1 --eNBs.[0].component_carriers.[0].eutra_band 7 --eNBs.[0].component_carriers.[0].downlink_frequency 2680000000 --eNBs.[0].component_carriers.[0].uplink_frequency_offset -120000000</Initialize_eNB_args>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="090103">
<class>Initialize_OAI_UE</class>
<desc>Initialize OAI UE (FDD/Band7/5MHz/MBMS)</desc>
<Initialize_OAI_UE_args>-C 2680000000 -r 25 --ue-rxgain 120 --ue-txgain 0 --ue-max-power 0 --ue-scan-carrier --nokrnmod 1 --noS1</Initialize_OAI_UE_args>
</testCase>
<testCase id="090109">
<class>Terminate_OAI_UE</class>
<desc>Terminate OAI UE</desc>
</testCase>
<testCase id="040605">
<class>Iperf</class>
<desc>iperf (5MHz - DL/1.5Mbps/UDP/MBMS-sink)(20 sec)</desc>
<iperf_args>-c 10.0.2.2 -u -b 1.5M -t 20 -i 1 -fm -B 10.0.2.1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_options>sink</iperf_options>
</testCase>
</testCaseList>
This diff is collapsed.
......@@ -41,11 +41,13 @@ typedef enum {
ngran_ng_eNB_CU = 4,
ngran_gNB_CU = 5,
ngran_eNB_DU = 6,
ngran_gNB_DU = 7
ngran_gNB_DU = 7,
ngran_eNB_MBMS_STA = 8
} ngran_node_t;
#define NODE_IS_MONOLITHIC(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB || (nOdE_TyPe) == ngran_ng_eNB || (nOdE_TyPe) == ngran_gNB)
#define NODE_IS_CU(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB_CU || (nOdE_TyPe) == ngran_ng_eNB_CU || (nOdE_TyPe) == ngran_gNB_CU)
#define NODE_IS_DU(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB_DU || (nOdE_TyPe) == ngran_gNB_DU)
#define NODE_IS_MBMS(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB_MBMS_STA)
#endif
......@@ -418,6 +418,8 @@ int logInit (void)
register_log_component("eRAL","",RAL_ENB);
register_log_component("mRAL","",RAL_UE);
register_log_component("ENB_APP","log",ENB_APP);
register_log_component("MCE_APP","log",MCE_APP);
register_log_component("MME_APP","log",MME_APP);
register_log_component("FLEXRAN_AGENT","log",FLEXRAN_AGENT);
register_log_component("PROTO_AGENT","log",PROTO_AGENT);
register_log_component("TMR","",TMR);
......@@ -431,6 +433,8 @@ int logInit (void)
register_log_component("GTPV1U","",GTPU);
register_log_component("S1AP","",S1AP);
register_log_component("F1AP","",F1AP);
register_log_component("M2AP","",M2AP);
register_log_component("M3AP","",M3AP);
register_log_component("SCTP","",SCTP);
register_log_component("X2AP","",X2AP);
register_log_component("LOADER","log",LOADER);
......
......@@ -215,6 +215,8 @@ typedef enum {
RAL_ENB,
RAL_UE,
ENB_APP,
MCE_APP,
MME_APP,
FLEXRAN_AGENT,
TMR,
USIM,
......@@ -222,6 +224,8 @@ typedef enum {
PROTO_AGENT,
F1U,
X2AP,
M2AP,
M3AP,
GNB_APP,
NR_RRC,
NR_MAC,
......
......@@ -470,6 +470,8 @@ const char* eurecomFunctionsNames[] = {
"pdcp_fifo_read_buffer",
"pdcp_fifo_flush",
"pdcp_fifo_flush_buffer",
"pdcp_mbms_fifo_read",
"pdcp_mbms_fifo_read_buffer",
/* RRC signals */
"rrc_rx_tx",
"rrc_mac_config_req",
......
......@@ -454,6 +454,8 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER,
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_FLUSH,
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_FLUSH_BUFFER,
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_MBMS_FIFO_READ,
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_MBMS_FIFO_READ_BUFFER,
/* RRC signals */
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_RX_TX,
......
......@@ -73,7 +73,7 @@ typedef struct {
} T_cache_t;
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_FUNCTIONS (245)
#define VCD_NUM_FUNCTIONS (247)
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES (186)
......
......@@ -405,6 +405,48 @@ ID = LEGACY_X2AP_TRACE
GROUP = ALL:LEGACY_X2AP:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_M2AP_INFO
DESC = M2AP legacy logs - info level
GROUP = ALL:LEGACY_M2AP:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_M2AP_ERROR
DESC = M2AP legacy logs - error level
GROUP = ALL:LEGACY_M2AP:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_M2AP_WARNING
DESC = M2AP legacy logs - warning level
GROUP = ALL:LEGACY_M2AP:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_M2AP_DEBUG
DESC = M2AP legacy logs - debug level
GROUP = ALL:LEGACY_M2AP:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_M2AP_TRACE
DESC = M2AP legacy logs - trace level
GROUP = ALL:LEGACY_M2AP:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_M3AP_INFO
DESC = M3AP legacy logs - info level
GROUP = ALL:LEGACY_M3AP:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_M3AP_ERROR
DESC = M3AP legacy logs - error level
GROUP = ALL:LEGACY_M3AP:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_M3AP_WARNING
DESC = M3AP legacy logs - warning level
GROUP = ALL:LEGACY_M3AP:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_M3AP_DEBUG
DESC = M3AP legacy logs - debug level
GROUP = ALL:LEGACY_M3AP:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_M3AP_TRACE
DESC = M3AP legacy logs - trace level
GROUP = ALL:LEGACY_M3AP:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_RRC_INFO
DESC = RRC legacy logs - info level
GROUP = ALL:LEGACY_RRC:LEGACY_GROUP_INFO:LEGACY
......@@ -529,6 +571,47 @@ ID = LEGACY_GNB_APP_DEBUG
ID = LEGACY_GNB_APP_TRACE
DESC = GNB_APP legacy logs - trace level
GROUP = ALL:LEGACY_GNB_APP:LEGACY_GROUP_TRACE:LEGACY
ID = LEGACY_MCE_APP_INFO
DESC = MCE_APP legacy logs - info level
GROUP = ALL:LEGACY_MCE_APP:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_MCE_APP_ERROR
DESC = MCE_APP legacy logs - error level
GROUP = ALL:LEGACY_MCE_APP:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_MCE_APP_WARNING
DESC = MCE_APP legacy logs - warning level
GROUP = ALL:LEGACY_MCE_APP:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_MCE_APP_DEBUG
DESC = MCE_APP legacy logs - debug level
GROUP = ALL:LEGACY_MCE_APP:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_MCE_APP_TRACE
DESC = MCE_APP legacy logs - trace level
GROUP = ALL:LEGACY_MCE_APP:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_MME_APP_INFO
DESC = MME_APP legacy logs - info level
GROUP = ALL:LEGACY_MME_APP:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_MME_APP_ERROR
DESC = MME_APP legacy logs - error level
GROUP = ALL:LEGACY_MME_APP:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_MME_APP_WARNING
DESC = MME_APP legacy logs - warning level
GROUP = ALL:LEGACY_MME_APP:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_MME_APP_DEBUG
DESC = MME_APP legacy logs - debug level
GROUP = ALL:LEGACY_MME_APP:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_MME_APP_TRACE
DESC = MME_APP legacy logs - trace level
GROUP = ALL:LEGACY_MME_APP:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_FLEXRAN_AGENT_INFO
......@@ -3098,6 +3181,16 @@ ID = VCD_FUNCTION_PDCP_FIFO_FLUSH_BUFFER
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = pdcp_fifo_flush_buffer
ID = VCD_FUNCTION_PDCP_MBMS_FIFO_READ
DESC = VCD function PDCP_MBMS_FIFO_READ
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = pdcp_mbms_fifo_read
ID = VCD_FUNCTION_PDCP_MBMS_FIFO_READ_BUFFER
DESC = VCD function PDCP_MBMS_FIFO_READ_BUFFER
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = pdcp_mbms_fifo_read_buffer
ID = VCD_FUNCTION_RRC_RX_TX
DESC = VCD function RRC_RX_TX
GROUP = ALL:VCD:ENB:VCD_FUNCTION
......
......@@ -9,6 +9,8 @@
#endif
#include "openair2/COMMON/s1ap_messages_def.h"
#include "openair2/COMMON/x2ap_messages_def.h"
#include "openair2/COMMON/m2ap_messages_def.h"
#include "openair2/COMMON/m3ap_messages_def.h"
#include "openair2/COMMON/sctp_messages_def.h"
#include "openair2/COMMON/udp_messages_def.h"
#include "openair2/COMMON/gtpv1_u_messages_def.h"
......
......@@ -206,6 +206,8 @@ typedef struct IttiMsgText_s {
#endif
#include <openair2/COMMON/s1ap_messages_types.h>
#include <openair2/COMMON/x2ap_messages_types.h>
#include <openair2/COMMON/m2ap_messages_types.h>
#include <openair2/COMMON/m3ap_messages_types.h>
#include <openair2/COMMON/sctp_messages_types.h>
#include <openair2/COMMON/udp_messages_types.h>
#include <openair2/COMMON/gtpv1_u_messages_types.h>
......@@ -231,6 +233,7 @@ typedef struct IttiMsgText_s {
#include <openair3/NAS/UE/user_defs.h>
#include <openair3/NAS/UE/nas_ue_task.h>
#include <openair3/S1AP/s1ap_eNB.h>
#include <openair3/MME_APP/mme_app.h>
//#include <proto.h>
#include <openair3/GTPV1-U/gtpv1u_eNB_task.h>
......@@ -290,9 +293,16 @@ typedef struct {
TASK_DEF(TASK_RAL_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_X2AP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_M2AP_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_M2AP_MCE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_M3AP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_M3AP_MME, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_M3AP_MCE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_ENB_APP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_GNB_APP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MCE_APP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MME_APP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_FLEXRAN_AGENT,TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PHY_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MAC_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
......
......@@ -44,10 +44,14 @@ uint8_t pulls32(uint8_t **in, int32_t *out, uint8_t *end);
uint32_t pullarray8(uint8_t **in, uint8_t out[], uint32_t max_len, uint32_t len, uint8_t *end);
uint32_t pullarray16(uint8_t **in, uint16_t out[], uint32_t max_len, uint32_t len, uint8_t *end);
uint32_t pullarrays16(uint8_t **in, int16_t out[], uint32_t max_len, uint32_t len, uint8_t *end);
uint32_t pullarray32(uint8_t **in, uint32_t out[], uint32_t max_len, uint32_t len, uint8_t *end);
uint32_t pullarrays32(uint8_t **in, int32_t out[], uint32_t max_len, uint32_t len, uint8_t *end);
uint32_t pusharray8(uint8_t in[], uint32_t max_len, uint32_t len, uint8_t **out, uint8_t *end);
uint32_t pusharray16(uint16_t in[], uint32_t max_len, uint32_t len, uint8_t **out, uint8_t *end);
uint32_t pusharrays16(int16_t in[], uint32_t max_len, uint32_t len, uint8_t **out, uint8_t *end);
uint32_t pusharray32(uint32_t in[], uint32_t max_len, uint32_t len, uint8_t **out, uint8_t *end);
uint32_t pusharrays32(int32_t in[], uint32_t max_len, uint32_t len, uint8_t **out, uint8_t *end);
typedef uint8_t (*pack_array_elem_fn)(void* elem, uint8_t **ppWritePackedMsg, uint8_t *end);
uint8_t packarray(void* array, uint16_t elem_size, uint16_t max_count, uint16_t count, uint8_t **ppWritePackedMsg, uint8_t *end, pack_array_elem_fn fn);
......
......@@ -735,6 +735,23 @@ typedef struct {
#define NFAPI_PUCCH_CONFIG_N_AN_CS_TAG 0x003E
#define NFAPI_PUCCH_CONFIG_N1_PUCCH_AN_TAG 0x003F
typedef struct{
nfapi_uint8_tlv_t mbsfn_area_idx;
nfapi_uint16_tlv_t mbsfn_area_id_r9;
} nfapi_embms_sib13_config_t;
#define NFAPI_EMBMS_MBSFN_CONFIG_AREA_IDX_TAG 0x0039
#define NFAPI_EMBMS_MBSFN_CONFIG_AREA_IDR9_TAG 0x0040
typedef struct {
nfapi_tl_t tl;
uint16_t num_mbsfn_config;
uint16_t radioframe_allocation_period[8];
uint16_t radioframe_allocation_offset[8];
uint8_t fourframes_flag[8];
int32_t mbsfn_subframeconfig[8];
} nfapi_embms_mbsfn_config_t;
#define NFAPI_EMBMS_MBSFN_CONFIG_TAG 0x0041
typedef struct {
nfapi_uint8_tlv_t radioframe_allocation_period;
nfapi_uint8_tlv_t radioframe_allocation_offset;
......@@ -1143,6 +1160,9 @@ typedef struct {
nfapi_prach_config_t prach_config;
nfapi_pusch_config_t pusch_config;
nfapi_pucch_config_t pucch_config;
// addition nfpai tlvs for embms MBSFN config //TOBE REVIEWED
nfapi_embms_sib13_config_t embms_sib13_config;
nfapi_embms_mbsfn_config_t embms_mbsfn_config;
nfapi_fembms_config_t fembms_config;
nfapi_srs_config_t srs_config;
nfapi_uplink_reference_signal_config_t uplink_reference_signal_config;
......@@ -1165,6 +1185,9 @@ typedef struct {
nfapi_prach_config_t prach_config;
nfapi_pusch_config_t pusch_config;
nfapi_pucch_config_t pucch_config;
// addition nfpai tlvs for embms MBSFN config //TOBE REVIEWED
nfapi_embms_sib13_config_t embms_sib13_config;
nfapi_embms_mbsfn_config_t embms_mbsfn_config;
nfapi_fembms_config_t fembms_config;
nfapi_srs_config_t srs_config;
nfapi_uplink_reference_signal_config_t uplink_reference_signal_config;
......
......@@ -405,7 +405,116 @@ uint32_t pusharrays16(int16_t in[], uint32_t max_len, uint32_t len, uint8_t **ou
return 0;
}
}
uint32_t pullarray32(uint8_t **in, uint32_t out[], uint32_t max_len, uint32_t len, uint8_t *end)
{
if(len == 0)
return 1;
if(len > max_len)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s exceed array size (%d > %d)\n", __FUNCTION__, len, max_len);
return 0;
}
if((end - (*in)) >= sizeof(uint32_t) * len)
{
uint32_t idx;
for(idx = 0; idx < len; ++idx)
{
if(!pull32(in, &out[idx], end))
return 0;
}
return sizeof(uint32_t) * len;
}
else
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s no space in buffer\n", __FUNCTION__);
return 0;
}
}
uint32_t pullarrays32(uint8_t **in, int32_t out[], uint32_t max_len, uint32_t len, uint8_t *end)
{
if(len == 0)
return 1;
if(len > max_len)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s exceed array size (%d > %d)\n", __FUNCTION__, len, max_len);
return 0;
}
if((end - (*in)) >= sizeof(uint32_t) * len)
{
uint32_t idx;
for(idx = 0; idx < len; ++idx)
{
if(!pulls32(in, &out[idx], end))
return 0;
}
return sizeof(uint32_t) * len;
}
else
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s no space in buffer\n", __FUNCTION__);
return 0;
}
}
uint32_t pusharray32(uint32_t in[], uint32_t max_len, uint32_t len, uint8_t **out, uint8_t *end)
{
if(len == 0)
return 1;
if(len > max_len)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s exceed array size (%d > %d)\n", __FUNCTION__, len, max_len);
return 0;
}
if((end - (*out)) >= sizeof(uint32_t) * len)
{
uint32_t idx;
for(idx = 0; idx < len; ++idx)
{
if(!push32(in[idx], out, end))
return 0;
}
return sizeof(uint32_t) * len;
}
else
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s no space in buffer\n", __FUNCTION__);
return 0;
}
}
uint32_t pusharrays32(int32_t in[], uint32_t max_len, uint32_t len, uint8_t **out, uint8_t *end)
{
if(len == 0)
return 1;
if(len > max_len)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s exceed array size (%d > %d)\n", __FUNCTION__, len, max_len);
return 0;
}
if((end - (*out)) >= sizeof(uint32_t) * len)
{
uint32_t idx;
for(idx = 0; idx < len; ++idx)
{
pushs32(in[idx], out, end);
}
return sizeof(uint32_t) * len;
}
else
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s no space in buffer\n", __FUNCTION__);
return 0;
}
}
uint32_t pullarray8(uint8_t **in, uint8_t out[], uint32_t max_len, uint32_t len, uint8_t *end)
{
if(len == 0)
......
......@@ -404,7 +404,26 @@ static uint8_t unpack_nmm_frequency_bands_value(void* tlv, uint8_t **ppReadPacke
return ( pull16(ppReadPackedMsg, &value->number_of_rf_bands, end) &&
pullarray16(ppReadPackedMsg, value->bands, NFAPI_MAX_NMM_FREQUENCY_BANDS, value->number_of_rf_bands, end));
}
static uint8_t pack_embms_mbsfn_config_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end)
{
nfapi_embms_mbsfn_config_t* value = (nfapi_embms_mbsfn_config_t*)tlv;
return ( push16(value->num_mbsfn_config, ppWritePackedMsg, end) &&
pusharray16(value->radioframe_allocation_period, 8,value->num_mbsfn_config ,ppWritePackedMsg, end) &&
pusharray16(value->radioframe_allocation_offset, 8,value->num_mbsfn_config ,ppWritePackedMsg, end) &&
pusharray8(value->fourframes_flag, 8,value->num_mbsfn_config,ppWritePackedMsg, end) &&
pusharrays32(value->mbsfn_subframeconfig, 8, value->num_mbsfn_config, ppWritePackedMsg, end));
}
//static uint8_t unpack_embms_mbsfn_config_value(void* tlv, uint8_t **ppReadPackedMsg, uint8_t* end)
//{
// nfapi_embms_mbsfn_config_t* value = (nfapi_embms_mbsfn_config_t*)tlv;
//
// return ( pull16(ppReadPackedMsg, &value->num_mbsfn_config, end) &&
// pull16(ppReadPackedMsg, &value->radioframe_allocation_period, end) &&
// pull16(ppReadPackedMsg, &value->radioframe_allocation_offset, end) &&
// pull8(ppReadPackedMsg, &value->fourframes_flag, end) &&
// pullarrays32(ppReadPackedMsg, value->mbsfn_subframeconfig, 8, value->num_mbsfn_config, end));
//}
static uint8_t pack_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t* config)
{
nfapi_param_response_t *pNfapiMsg = (nfapi_param_response_t*)msg;
......@@ -461,6 +480,11 @@ static uint8_t pack_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_
pack_tlv(NFAPI_PUCCH_CONFIG_N_AN_CS_TAG, &(pNfapiMsg->pucch_config.n_an_cs), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
pack_tlv(NFAPI_PUCCH_CONFIG_N1_PUCCH_AN_TAG, &(pNfapiMsg->pucch_config.n1_pucch_an), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
pack_tlv(NFAPI_EMBMS_MBSFN_CONFIG_AREA_IDX_TAG, &(pNfapiMsg->embms_sib13_config.mbsfn_area_idx), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
pack_tlv(NFAPI_EMBMS_MBSFN_CONFIG_AREA_IDR9_TAG, &(pNfapiMsg->embms_sib13_config.mbsfn_area_id_r9), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
pack_tlv(NFAPI_EMBMS_MBSFN_CONFIG_TAG, &(pNfapiMsg->embms_mbsfn_config), ppWritePackedMsg, end, &pack_embms_mbsfn_config_value) &&
pack_tlv(NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_PERIOD_TAG, &(pNfapiMsg->fembms_config.radioframe_allocation_period), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
pack_tlv(NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_OFFSET_TAG, &(pNfapiMsg->fembms_config.radioframe_allocation_offset), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
pack_tlv(NFAPI_FEMBMS_CONFIG_NON_MBSFN_FLAG_TAG, &(pNfapiMsg->fembms_config.non_mbsfn_config_flag), ppWritePackedMsg, end, &pack_uint8_tlv_value) &&
......
......@@ -69,6 +69,9 @@ l1_north_init_eNB () {
LOG_I(PHY,"%s() RC.eNB[%d][%d] installing callbacks\n", __FUNCTION__, i, j);
RC.eNB[i][j]->if_inst->PHY_config_req = phy_config_request;
RC.eNB[i][j]->if_inst->schedule_response = schedule_response;
RC.eNB[i][j]->if_inst->PHY_config_update_sib2_req = phy_config_update_sib2_request;
RC.eNB[i][j]->if_inst->PHY_config_update_sib13_req = phy_config_update_sib13_request;
}
}
} else {
......@@ -283,7 +286,53 @@ void phy_config_request(PHY_Config_t *phy_config) {
LOG_I (PHY, "eNB %d/%d configured\n", Mod_id, CC_id);
}
void phy_config_update_sib2_request(PHY_Config_t *phy_config) {
uint8_t Mod_id = phy_config->Mod_id;
int CC_id = phy_config->CC_id;
int i;
nfapi_config_request_t *cfg = phy_config->cfg;
LOG_I(PHY,"Configure sib2 Mod_id(%d), CC_id(%d) cfg %p\n",Mod_id,CC_id,cfg);
LTE_DL_FRAME_PARMS *fp = &RC.eNB[Mod_id][CC_id]->frame_parms;
fp->num_MBSFN_config = cfg->embms_mbsfn_config.num_mbsfn_config;
for( i=0; i < cfg->embms_mbsfn_config.num_mbsfn_config; i++){
fp->MBSFN_config[i].radioframeAllocationPeriod = cfg->embms_mbsfn_config.radioframe_allocation_period[i];
fp->MBSFN_config[i].radioframeAllocationOffset = cfg->embms_mbsfn_config.radioframe_allocation_offset[i];
fp->MBSFN_config[i].fourFrames_flag = cfg->embms_mbsfn_config.fourframes_flag[i];
fp->MBSFN_config[i].mbsfn_SubframeConfig = cfg->embms_mbsfn_config.mbsfn_subframeconfig[i]; // 6-bit subframe configuration
LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %x\n", i,
fp->MBSFN_config[i].mbsfn_SubframeConfig);
}
}
void phy_config_update_sib13_request(PHY_Config_t *phy_config) {
uint8_t Mod_id = phy_config->Mod_id;
int CC_id = phy_config->CC_id;
nfapi_config_request_t *cfg = phy_config->cfg;
LOG_I(PHY,"configure sib3 Mod_id(%d), CC_id(%d) cfg %p\n",Mod_id,CC_id,cfg);
LTE_DL_FRAME_PARMS *fp = &RC.eNB[Mod_id][CC_id]->frame_parms;
LOG_I (PHY, "[eNB%d] Applying MBSFN_Area_id %d for index %d\n", Mod_id, (uint16_t)cfg->embms_sib13_config.mbsfn_area_id_r9.value, (uint8_t)cfg->embms_sib13_config.mbsfn_area_idx.value);
//cfg->embms_sib13_config.mbsfn_area_idx;
//cfg->embms_sib13_config.mbsfn_area_id_r9;
AssertFatal((uint8_t)cfg->embms_sib13_config.mbsfn_area_idx.value == 0, "Fix me: only called when mbsfn_Area_idx == 0\n");
if (cfg->embms_sib13_config.mbsfn_area_idx.value == 0) {
fp->Nid_cell_mbsfn = (uint16_t)cfg->embms_sib13_config.mbsfn_area_id_r9.value;
LOG_I(PHY,"Fix me: only called when mbsfn_Area_idx == 0)\n");
}
lte_gold_mbsfn (fp, RC.eNB[Mod_id][CC_id]->lte_gold_mbsfn_table, fp->Nid_cell_mbsfn);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
lte_gold_mbsfn_khz_1dot25 (fp, RC.eNB[Mod_id][CC_id]->lte_gold_mbsfn_khz_1dot25_table, fp->Nid_cell_mbsfn);
#endif
}
void phy_config_sib13_eNB(module_id_t Mod_id,int CC_id,int mbsfn_Area_idx,
long mbsfn_AreaId_r9) {
......
......@@ -154,6 +154,42 @@ void phy_config_sib2_ue(module_id_t Mod_id,int CC_id,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2, VCD_FUNCTION_OUT);
}
void phy_config_mbsfn_list_ue(module_id_t Mod_id,
int CC_id,
struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList){
// MBSFN
PHY_VARS_UE *ue = PHY_vars_UE_g[Mod_id][CC_id];
LTE_DL_FRAME_PARMS *fp = &ue->frame_parms;
int i;
if (mbsfn_SubframeConfigList != NULL) {
fp->num_MBSFN_config = mbsfn_SubframeConfigList->list.count;
for (i=0; i<mbsfn_SubframeConfigList->list.count; i++) {
fp->MBSFN_config[i].radioframeAllocationPeriod = mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationPeriod;
fp->MBSFN_config[i].radioframeAllocationOffset = mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationOffset;
if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) {
fp->MBSFN_config[i].fourFrames_flag = 0;
fp->MBSFN_config[i].mbsfn_SubframeConfig = mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]; // 6-bit subframe configuration
LOG_I(PHY, "[CONFIG] LTE_MBSFN_SubframeConfig[%d] pattern is %d\n", i,
fp->MBSFN_config[i].mbsfn_SubframeConfig);
} else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == LTE_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration
fp->MBSFN_config[i].fourFrames_flag = 1;
fp->MBSFN_config[i].mbsfn_SubframeConfig =
mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]|
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[1]<<8)|
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]<<16);
LOG_I(PHY, "[CONFIG] LTE_MBSFN_SubframeConfig[%d] pattern is %x\n", i,
fp->MBSFN_config[i].mbsfn_SubframeConfig);
}
}
}
}
void phy_config_sib13_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_Area_idx,
long mbsfn_AreaId_r9) {
LTE_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[Mod_id][CC_id]->frame_parms;
......@@ -578,7 +614,8 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
LTE_UE_PDSCH **const pdsch_vars_SI = ue->pdsch_vars_SI;
LTE_UE_PDSCH **const pdsch_vars_ra = ue->pdsch_vars_ra;
LTE_UE_PDSCH **const pdsch_vars_p = ue->pdsch_vars_p;
LTE_UE_PDSCH **const pdsch_vars_mch = ue->pdsch_vars_MCH;
//LTE_UE_PDSCH **const pdsch_vars_mch = ue->pdsch_vars_MCH;
LTE_UE_PDSCH* (*pdsch_vars_MCH_th)[][NUMBER_OF_CONNECTED_eNB_MAX] = &ue->pdsch_vars_MCH;
LTE_UE_PDSCH* (*pdsch_vars_th)[][NUMBER_OF_CONNECTED_eNB_MAX+1] = &ue->pdsch_vars;
LTE_UE_PDCCH* (*pdcch_vars_th)[][NUMBER_OF_CONNECTED_eNB_MAX] = &ue->pdcch_vars;
LTE_UE_PBCH **const pbch_vars = ue->pbch_vars;
......@@ -660,6 +697,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
for (eNB_id=0; eNB_id<ue->n_connected_eNB; eNB_id++) {
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
(*pdsch_vars_th)[th_id][eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
(*pdsch_vars_MCH_th)[th_id][eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
}
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
......@@ -669,12 +707,13 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
pdsch_vars_SI[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
pdsch_vars_ra[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
pdsch_vars_p[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
pdsch_vars_mch[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
//pdsch_vars_mch[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
prach_vars[eNB_id] = (LTE_UE_PRACH *)malloc16_clear(sizeof(LTE_UE_PRACH));
pbch_vars[eNB_id] = (LTE_UE_PBCH *)malloc16_clear(sizeof(LTE_UE_PBCH));
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
phy_init_lte_ue__PDSCH( (*pdsch_vars_th)[th_id][eNB_id], fp );
phy_init_lte_ue__PDSCH( (*pdsch_vars_MCH_th)[th_id][eNB_id], fp );
}
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
......@@ -683,16 +722,25 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
(*pdsch_vars_th)[th_id][eNB_id]->llr[1] = (int16_t *)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
(*pdsch_vars_th)[th_id][eNB_id]->llr128_2ndstream = (int16_t **)malloc16_clear( sizeof(int16_t *) );
(*pdsch_vars_th)[th_id][eNB_id]->rho = (int32_t **)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t *) );
(*pdsch_vars_MCH_th)[th_id][eNB_id]->llr_shifts = (uint8_t *)malloc16_clear(7*2*fp->N_RB_DL*12);
(*pdsch_vars_MCH_th)[th_id][eNB_id]->llr_shifts_p = (*pdsch_vars_th)[0][eNB_id]->llr_shifts;
(*pdsch_vars_MCH_th)[th_id][eNB_id]->llr[1] = (int16_t *)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
(*pdsch_vars_MCH_th)[th_id][eNB_id]->llr128_2ndstream = (int16_t **)malloc16_clear( sizeof(int16_t *) );
(*pdsch_vars_MCH_th)[th_id][eNB_id]->rho = (int32_t **)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t *) );
}
for (int i=0; i<fp->nb_antennas_rx; i++) {
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
(*pdsch_vars_th)[th_id][eNB_id]->rho[i] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
(*pdsch_vars_MCH_th)[th_id][eNB_id]->rho[i] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
}
}
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
(*pdsch_vars_th)[th_id][eNB_id]->dl_ch_rho2_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
(*pdsch_vars_MCH_th)[th_id][eNB_id]->dl_ch_rho2_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
}
for (i=0; i<fp->nb_antennas_rx; i++)
......@@ -702,6 +750,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
(*pdsch_vars_th)[th_id][eNB_id]->dl_ch_rho2_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
(*pdsch_vars_MCH_th)[th_id][eNB_id]->dl_ch_rho2_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
}
}
......@@ -713,6 +762,11 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
(*pdsch_vars_th)[th_id][eNB_id]->dl_ch_rho_ext[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
(*pdsch_vars_th)[th_id][eNB_id]->dl_ch_mag1[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
(*pdsch_vars_th)[th_id][eNB_id]->dl_ch_magb1[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
(*pdsch_vars_MCH_th)[th_id][eNB_id]->rxdataF_comp1[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
(*pdsch_vars_MCH_th)[th_id][eNB_id]->dl_ch_rho_ext[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
(*pdsch_vars_MCH_th)[th_id][eNB_id]->dl_ch_mag1[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
(*pdsch_vars_MCH_th)[th_id][eNB_id]->dl_ch_magb1[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
}
for (int i=0; i<fp->nb_antennas_rx; i++)
......@@ -724,6 +778,11 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
(*pdsch_vars_th)[th_id][eNB_id]->rxdataF_comp1[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
(*pdsch_vars_th)[th_id][eNB_id]->dl_ch_mag1[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
(*pdsch_vars_th)[th_id][eNB_id]->dl_ch_magb1[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
(*pdsch_vars_MCH_th)[th_id][eNB_id]->dl_ch_rho_ext[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
(*pdsch_vars_MCH_th)[th_id][eNB_id]->rxdataF_comp1[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
(*pdsch_vars_MCH_th)[th_id][eNB_id]->dl_ch_mag1[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
(*pdsch_vars_MCH_th)[th_id][eNB_id]->dl_ch_magb1[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
}
}
}
......@@ -732,7 +791,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
phy_init_lte_ue__PDSCH( pdsch_vars_SI[eNB_id], fp );
phy_init_lte_ue__PDSCH( pdsch_vars_ra[eNB_id], fp );
phy_init_lte_ue__PDSCH( pdsch_vars_p[eNB_id], fp );
phy_init_lte_ue__PDSCH( pdsch_vars_mch[eNB_id], fp );
//phy_init_lte_ue__PDSCH( pdsch_vars_mch[eNB_id], fp );
// 100 PRBs * 12 REs/PRB * 4 PDCCH SYMBOLS * 2 LLRs/RE
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
......@@ -770,7 +829,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
phy_init_lte_ue__PDSCH( pdsch_vars_SI[eNB_id], fp );
phy_init_lte_ue__PDSCH( pdsch_vars_ra[eNB_id], fp );
phy_init_lte_ue__PDSCH( pdsch_vars_p[eNB_id], fp );
phy_init_lte_ue__PDSCH( pdsch_vars_mch[eNB_id], fp );
//phy_init_lte_ue__PDSCH( pdsch_vars_mch[eNB_id], fp );
// 100 PRBs * 12 REs/PRB * 4 PDCCH SYMBOLS * 2 LLRs/RE
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
......
......@@ -178,6 +178,18 @@ void phy_config_sib2_ue(module_id_t Mod_id,
LTE_AdditionalSpectrumEmission_t *additionalSpectrumEmission,
struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList);
/*!
\fn void phy_config_mbsfn_list_ue(module_id_t Mod_id,uint8_t CC_id
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList)
\brief Configure LTE_DL_FRAME_PARMS with components derived after reception of MBSFN config list from SIB2 (at UE).
@param Mod_id Instance id
@param CC_id
@param mbsfn_SubframeConfigList MBSFN subframe configuration
*/
void phy_config_mbsfn_list_ue(module_id_t Mod_id,
int CC_id,
struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList);
/*!
\fn phy_config_afterHO_ue
......@@ -374,6 +386,9 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
void phy_cleanup(void);
void phy_config_request(PHY_Config_t *phy_config);
void phy_config_update_sib2_request(PHY_Config_t *phy_config);
void phy_config_update_sib13_request(PHY_Config_t *phy_config);
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf);
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
......
......@@ -1946,11 +1946,11 @@ int allocate_REs_in_RB_MCH(int32_t **txdataF,
case 2: //QPSK
// LOG_I(PHY,"%d : %d,%d => ",tti_offset,((int16_t*)&txdataF[0][tti_offset])[0],((int16_t*)&txdataF[0][tti_offset])[1]);
((int16_t*)&txdataF[4][tti_offset])[0] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //I //b_i
((int16_t*)&txdataF[0][tti_offset])[0] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //I //b_i
*jj = *jj + 1;
((int16_t*)&txdataF[4][tti_offset])[1] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //Q //b_{i+1}
((int16_t*)&txdataF[0][tti_offset])[1] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //Q //b_{i+1}
*jj = *jj + 1;
......@@ -1989,8 +1989,8 @@ int allocate_REs_in_RB_MCH(int32_t **txdataF,
*jj=*jj+1;
((int16_t *)&txdataF[4][tti_offset])[0]=qam_table_s[qam16_table_offset_re];//(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
((int16_t *)&txdataF[4][tti_offset])[1]=qam_table_s[qam16_table_offset_im];//(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
((int16_t *)&txdataF[0][tti_offset])[0]=qam_table_s[qam16_table_offset_re];//(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s[qam16_table_offset_im];//(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
break;
......@@ -2029,8 +2029,8 @@ int allocate_REs_in_RB_MCH(int32_t **txdataF,
*jj=*jj+1;
((int16_t *)&txdataF[4][tti_offset])[0]=qam_table_s[qam64_table_offset_re];//(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
((int16_t *)&txdataF[4][tti_offset])[1]=qam_table_s[qam64_table_offset_im];//(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
((int16_t *)&txdataF[0][tti_offset])[0]=qam_table_s[qam64_table_offset_re];//(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s[qam64_table_offset_im];//(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
break;
default:
......
......@@ -96,13 +96,17 @@ void generate_mch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,uint8_t *a)
get_Qm(eNB->dlsch_MCH->harq_processes[0]->mcs),1,
2,proc->frame_tx,subframe,0);
eNB->dlsch_MCH->harq_processes[0]->Qm = get_Qm(eNB->dlsch_MCH->harq_processes[0]->mcs);
generate_mbsfn_pilot(eNB,proc,
eNB->common_vars.txdataF,
AMP);
AssertFatal(eNB->dlsch_MCH->harq_processes[0]->pdu != NULL, "attempt to encode a NULL harq PDU\n");
AssertFatal(dlsch_encoding(eNB,
a,
// a,
eNB->dlsch_MCH->harq_processes[0]->pdu,
1,
eNB->dlsch_MCH,
proc->frame_tx,
......
......@@ -57,10 +57,10 @@ void dump_mch(PHY_VARS_UE *ue,uint8_t eNB_id,uint16_t coded_bits_per_codeword,in
#define NSYMB_PMCH 12
sprintf(fname,"mch_rxF_ext0.m");
sprintf(vname,"pmch_rxF_ext0");
LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->rxdataF_ext[0],12*(ue->frame_parms.N_RB_DL)*12,1,1);
LOG_M(fname,vname,ue->pdsch_vars_MCH[ue->current_thread_id[subframe]][eNB_id]->rxdataF_ext[0],12*(ue->frame_parms.N_RB_DL)*12,1,1);
sprintf(fname,"mch_ch_ext00.m");
sprintf(vname,"pmch_ch_ext00");
LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->dl_ch_estimates_ext[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
LOG_M(fname,vname,ue->pdsch_vars_MCH[ue->current_thread_id[subframe]][eNB_id]->dl_ch_estimates_ext[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
/*
LOG_M("dlsch%d_ch_ext01.m","dl01_ch0_ext",pdsch_vars[eNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*NSYMB_PMCH,1,1);
LOG_M("dlsch%d_ch_ext10.m","dl10_ch0_ext",pdsch_vars[eNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*NSYMB_PMCH,1,1);
......@@ -69,16 +69,16 @@ void dump_mch(PHY_VARS_UE *ue,uint8_t eNB_id,uint16_t coded_bits_per_codeword,in
*/
sprintf(fname,"mch_rxF_comp0.m");
sprintf(vname,"pmch_rxF_comp0");
LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->rxdataF_comp0[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
LOG_M(fname,vname,ue->pdsch_vars_MCH[ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp0[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
sprintf(fname,"mch_rxF_llr.m");
sprintf(vname,"pmch_llr");
LOG_M(fname,vname, ue->pdsch_vars_MCH[eNB_id]->llr[0],coded_bits_per_codeword,1,0);
LOG_M(fname,vname, ue->pdsch_vars_MCH[ue->current_thread_id[subframe]][eNB_id]->llr[0],coded_bits_per_codeword,1,0);
sprintf(fname,"mch_mag1.m");
sprintf(vname,"pmch_mag1");
LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->dl_ch_mag0[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
LOG_M(fname,vname,ue->pdsch_vars_MCH[ue->current_thread_id[subframe]][eNB_id]->dl_ch_mag0[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
sprintf(fname,"mch_mag2.m");
sprintf(vname,"pmch_mag2");
LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->dl_ch_magb0[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
LOG_M(fname,vname,ue->pdsch_vars_MCH[ue->current_thread_id[subframe]][eNB_id]->dl_ch_magb0[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
LOG_M("mch00_ch0.m","pmch00_ch0",
&(ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][0][0]),
ue->frame_parms.ofdm_symbol_size*12,1,1);
......@@ -96,6 +96,7 @@ void dump_mch(PHY_VARS_UE *ue,uint8_t eNB_id,uint16_t coded_bits_per_codeword,in
void fill_UE_dlsch_MCH(PHY_VARS_UE *ue,int mcs,int ndi,int rvidx,int eNB_id) {
LTE_UE_DLSCH_t *dlsch = ue->dlsch_MCH[eNB_id];
LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
dlsch->Mdlharq = 1;
// dlsch->rnti = M_RNTI;
dlsch->harq_processes[0]->mcs = mcs;
dlsch->harq_processes[0]->rvidx = rvidx;
......@@ -242,15 +243,16 @@ void mch_channel_level(int **dl_ch_estimates_ext,
for (i=0; i<(nre>>2); i++) {
#if defined(__x86_64__) || defined(__i386__)
avg128 = _mm_add_epi32(avg128,_mm_madd_epi16(dl_ch128[0],dl_ch128[0]));
avg128 = _mm_add_epi32(avg128,_mm_srai_epi32(_mm_madd_epi16(dl_ch128[0],dl_ch128[0]),log2_approx(nre>>2)-1));
#elif defined(__arm__)
#endif
}
avg[aarx] = (((int *)&avg128)[0] +
((int *)&avg128)[1] +
((int *)&avg128)[2] +
((int *)&avg128)[3])/nre;
avg[aarx] = (((((int*)&avg128)[0] +
((int*)&avg128)[1] +
((int*)&avg128)[2] +
((int*)&avg128)[3])/(nre>>factor2(nre)))*(1<<(log2_approx(nre>>2)-1-factor2(nre))));
// printf("Channel level : %d\n",avg[(aatx<<1)+aarx]);
}
......@@ -289,16 +291,21 @@ void mch_channel_level_khz_1dot25(int **dl_ch_estimates_ext,
for (i=0; i<(nre>>2); i++) {
#if defined(__x86_64__) || defined(__i386__)
avg128 = _mm_add_epi32(avg128,_mm_madd_epi16(dl_ch128[0],dl_ch128[0]));
//avg128 = _mm_add_epi32(avg128,_mm_madd_epi16(dl_ch128[0],dl_ch128[0]));
avg128 = _mm_add_epi32(avg128,_mm_srai_epi32(_mm_madd_epi16(dl_ch128[0],dl_ch128[0]),log2_approx(nre>>2)-1));
#elif defined(__arm__)
#endif
}
avg[aarx] = (((int *)&avg128)[0] +
((int *)&avg128)[1] +
((int *)&avg128)[2] +
((int *)&avg128)[3])/nre;
//printf("Channel level : %d\n",avg[(aatx<<1)+aarx]);
// avg[aarx] = (((int*)&avg128)[0] +
// ((int*)&avg128)[1] +
// ((int*)&avg128)[2] +
// ((int*)&avg128)[3])/nre;
avg[aarx] = (((((int*)&avg128)[0] +
((int*)&avg128)[1] +
((int*)&avg128)[2] +
((int*)&avg128)[3])/(nre>>factor2(nre)))*(1<<(log2_approx(nre>>2)-1-factor2(nre))));
//printf("Channel level : %d\n",avg[(aatx<<1)+aarx]);
}
#if defined(__x86_64__) || defined(__i386__)
......@@ -1215,7 +1222,7 @@ int rx_pmch(PHY_VARS_UE *ue,
uint8_t subframe,
unsigned char symbol) {
LTE_UE_COMMON *common_vars = &ue->common_vars;
LTE_UE_PDSCH **pdsch_vars = &ue->pdsch_vars_MCH[eNB_id];
LTE_UE_PDSCH **pdsch_vars = &ue->pdsch_vars_MCH[ue->current_thread_id[subframe]][eNB_id];
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
LTE_UE_DLSCH_t **dlsch = &ue->dlsch_MCH[eNB_id];
int avgs,aarx;
......@@ -1301,7 +1308,7 @@ int rx_pmch_khz_1dot25(PHY_VARS_UE *ue,
,int mcs) { // currently work around TOFIX
//unsigned int symbol;
LTE_UE_COMMON *common_vars = &ue->common_vars;
LTE_UE_PDSCH **pdsch_vars = &ue->pdsch_vars_MCH[eNB_id];
LTE_UE_PDSCH **pdsch_vars = &ue->pdsch_vars_MCH[ue->current_thread_id[subframe]][eNB_id];
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
//LTE_UE_DLSCH_t **dlsch = &ue->dlsch_MCH[eNB_id];
int avgs,aarx;
......
......@@ -617,7 +617,9 @@ typedef enum {
RRU_sync_ok=6,
RRU_frame_resynch=7,
RRU_MSG_max_num=8,
RRU_check_sync = 9
RRU_check_sync = 9,
RRU_config_update=10,
RRU_config_update_ok=11
} rru_config_msg_type_t;
......@@ -711,6 +713,10 @@ typedef struct RRU_config_s {
time_stats_t ru_arrival_time;
/// mask for RUs serving eNB (PRACH)
int RU_mask_prach;
/// embms mbsfn sf config
int num_MBSFN_config;
/// embms mbsfn sf config
MBSFN_config_t MBSFN_config[8];
} RRU_config_t;
#endif //__PHY_DEFS_RU__H__
......@@ -671,7 +671,7 @@ typedef struct {
LTE_UE_PDSCH *pdsch_vars_SI[NUMBER_OF_CONNECTED_eNB_MAX+1];
LTE_UE_PDSCH *pdsch_vars_ra[NUMBER_OF_CONNECTED_eNB_MAX+1];
LTE_UE_PDSCH *pdsch_vars_p[NUMBER_OF_CONNECTED_eNB_MAX+1];
LTE_UE_PDSCH *pdsch_vars_MCH[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_PDSCH *pdsch_vars_MCH[RX_NB_TH_MAX][NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_PBCH *pbch_vars[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_PDCCH *pdcch_vars[RX_NB_TH_MAX][NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_eNB_MAX];
......
......@@ -72,7 +72,6 @@
#define MAX_NUM_RU_PER_eNB 64
#define MAX_NUM_RX_PRACH_PREAMBLES 4
typedef struct {
/// \brief Pointers (dynamic) to the received data in the time domain.
/// - first index: rx antenna [0..nb_antennas_rx[
......
......@@ -137,7 +137,6 @@ void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
// adjust transmit amplitude here based on NFAPI info
}
extern uint32_t localRIV2alloc_LUT6[32];
extern uint32_t localRIV2alloc_LUT25[512];
extern uint32_t localRIV2alloc_LUT50_0[1600];
......@@ -147,6 +146,52 @@ extern uint32_t localRIV2alloc_LUT100_1[6000];
extern uint32_t localRIV2alloc_LUT100_2[6000];
extern uint32_t localRIV2alloc_LUT100_3[6000];
void handle_nfapi_mch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
nfapi_dl_config_request_pdu_t *dl_config_pdu,
uint8_t *sdu){
nfapi_dl_config_mch_pdu_rel8_t *rel8 = &dl_config_pdu->mch_pdu.mch_pdu_rel8;
LTE_eNB_DLSCH_t *dlsch = eNB->dlsch_MCH;
LTE_DL_FRAME_PARMS *frame_parms=&eNB->frame_parms;
// dlsch->rnti = M_RNTI;
dlsch->harq_processes[0]->mcs = rel8->modulation;
// dlsch->harq_processes[0]->Ndi = ndi;
dlsch->harq_processes[0]->rvidx = 0;//rvidx;
dlsch->harq_processes[0]->Nl = 1;
dlsch->harq_processes[0]->TBS = TBStable[get_I_TBS(dlsch->harq_processes[0]->mcs)][frame_parms->N_RB_DL-1];
// dlsch->harq_ids[subframe] = 0;
dlsch->harq_processes[0]->nb_rb = frame_parms->N_RB_DL;
switch(frame_parms->N_RB_DL) {
case 6:
dlsch->harq_processes[0]->rb_alloc[0] = 0x3f;
break;
case 25:
dlsch->harq_processes[0]->rb_alloc[0] = 0x1ffffff;
break;
case 50:
dlsch->harq_processes[0]->rb_alloc[0] = 0xffffffff;
dlsch->harq_processes[0]->rb_alloc[1] = 0x3ffff;
break;
case 100:
dlsch->harq_processes[0]->rb_alloc[0] = 0xffffffff;
dlsch->harq_processes[0]->rb_alloc[1] = 0xffffffff;
dlsch->harq_processes[0]->rb_alloc[2] = 0xffffffff;
dlsch->harq_processes[0]->rb_alloc[3] = 0xf;
break;
}
dlsch->harq_ids[proc->frame_tx%2][proc->subframe_tx] = 0;
dlsch->harq_processes[0]->pdu = sdu;
dlsch->active = 1;
}
void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
nfapi_dl_config_request_pdu_t *dl_config_pdu,
......@@ -807,8 +852,30 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
break;
case NFAPI_DL_CONFIG_MCH_PDU_TYPE:
case NFAPI_DL_CONFIG_MCH_PDU_TYPE:{
// handle_nfapi_mch_dl_pdu(eNB,dl_config_pdu);
//AssertFatal(1==0,"OK\n");
nfapi_dl_config_mch_pdu_rel8_t *mch_pdu_rel8 = &dl_config_pdu->mch_pdu.mch_pdu_rel8;
uint16_t pdu_index = mch_pdu_rel8->pdu_index;
uint16_t tx_pdus = TX_req->tx_request_body.number_of_pdus;
uint16_t invalid_pdu = pdu_index == -1;
uint8_t *sdu = invalid_pdu ? NULL : pdu_index >= tx_pdus ? NULL : TX_req->tx_request_body.tx_pdu_list[pdu_index].segments[0].segment_data;
LOG_D(PHY,"%s() [PDU:%d] NFAPI_DL_CONFIG_MCH_PDU_TYPE SFN/SF:%04d%d TX:%d/%d RX:%d/%d pdu_index:%d sdu:%p\n",
__FUNCTION__, i,
NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),
proc->frame_tx, proc->subframe_tx,
proc->frame_rx, proc->subframe_rx,
pdu_index, sdu);
if (sdu) { //sdu != NULL)
if (NFAPI_MODE!=NFAPI_MODE_VNF)
handle_nfapi_mch_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu, sdu);
} else {
dont_send=1;
LOG_E(MAC,"%s() NFAPI_DL_CONFIG_MCH_PDU_TYPE sdu is NULL DL_CFG:SFN/SF:%d:pdu_index:%d TX_REQ:SFN/SF:%d:pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(DL_req->sfn_sf), pdu_index,
NFAPI_SFNSF2DEC(TX_req->sfn_sf), tx_pdus);
}
do_oai=1;
}
break;
case NFAPI_DL_CONFIG_DLSCH_PDU_TYPE: {
......
......@@ -53,6 +53,11 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
nfapi_dl_config_request_pdu_t *dl_config_pdu,
uint8_t codeword_index,
uint8_t *sdu);
void handle_nfapi_mch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
nfapi_dl_config_request_pdu_t *dl_config_pdu,
uint8_t *sdu);
void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
nfapi_ul_config_request_pdu_t *ul_config_pdu,
uint16_t frame,uint8_t subframe,uint8_t srs_present);
......
......@@ -48,6 +48,8 @@
#include "intertask_interface.h"
#define MBMS_NFAPI_SCHEDULER
nfapi_ue_release_request_body_t release_rntis;
int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *eNB,uint16_t UE_id,uint8_t harq_pid, uint8_t bw_factor) {
......@@ -118,11 +120,21 @@ lte_subframe_t get_subframe_direction(uint8_t Mod_id,uint8_t CC_id,uint8_t subfr
return(subframe_select(&RC.eNB[Mod_id][CC_id]->frame_parms,subframe));
}
#ifdef MBMS_NFAPI_SCHEDULER
void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
int subframe = proc->subframe_tx;
// This is DL-Cell spec pilots in Control region
generate_pilots_slot (eNB, eNB->common_vars.txdataF, AMP, subframe << 1, 1);
if(eNB->dlsch_MCH->active==1)
generate_mch (eNB, proc,NULL/*, eNB->dlsch_MCH->harq_processes[0]->pdu*/);
eNB->dlsch_MCH->active = 0;
}
#else
void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
MCH_PDU *mch_pduP=NULL;
// uint8_t sync_area=255;
int subframe = proc->subframe_tx;
AssertFatal (1 == 0, "pmch not tested for the moment, exiting\n");
AssertFatal (1 == 1, "pmch not tested for the moment, exiting\n");
// This is DL-Cell spec pilots in Control region
generate_pilots_slot (eNB, eNB->common_vars.txdataF, AMP, subframe << 1, 1);
......@@ -134,6 +146,7 @@ void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
proc->frame_tx,
subframe);
*/
mch_pduP= &RC.mac[eNB->Mod_id]->common_channels[eNB->CC_id].MCH_pdu;
if ((mch_pduP->Pdu_size > 0) && (mch_pduP->sync_area == 0)) // TEST: only transmit mcch for sync area 0
LOG_D(PHY,"[eNB%"PRIu8"] Frame %d subframe %d : Got MCH pdu for MBSFN (MCS %"PRIu8", TBS %d) \n",
eNB->Mod_id,proc->frame_tx,subframe,mch_pduP->mcs,
......@@ -147,12 +160,15 @@ void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
if (mch_pduP) {
fill_eNB_dlsch_MCH (eNB, mch_pduP->mcs, 1, 0);
eNB->dlsch_MCH->harq_ids[proc->frame_tx%2][subframe] = 0;
eNB->dlsch_MCH->harq_processes[0]->pdu=(uint8_t *) mch_pduP->payload;
// Generate PMCH
generate_mch (eNB, proc, (uint8_t *) mch_pduP->payload);
generate_mch (eNB, proc, NULL/*(uint8_t *) mch_pduP->payload*/);
} else {
LOG_D (PHY, "[eNB/RN] Frame %d subframe %d: MCH not generated \n", proc->frame_tx, subframe);
}
}
#endif
void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe) {
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
......
......@@ -150,7 +150,7 @@ void prach_procedures(PHY_VARS_eNB *eNB,
} else {
if ((eNB->prach_energy_counter == 100) &&
(max_preamble_energy[0] > eNB->measurements.prach_I0+eNB->prach_DTX_threshold)) {
LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n",
LOG_D(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n",
eNB->Mod_id,
eNB->CC_id,
frame,
......
......@@ -83,42 +83,66 @@ void feptx0(RU_t *ru,
//LOG_D(PHY,"SFN/SF:RU:TX:%d/%d Generating slot %d\n",ru->proc.frame_tx, ru->proc.subframe_tx,slot);
for (aa=0; aa<ru->nb_tx; aa++) {
if (fp->Ncp == EXTENDED) PHY_ofdm_mod(&ru->common.txdataF_BF[aa][(slot&1)*slot_sizeF],
(int*)&ru->common.txdata[aa][slot_offset],
fp->ofdm_symbol_size,
6,
fp->nb_prefix_samples,
CYCLIC_PREFIX);
else {
/* AssertFatal(ru->generate_dmrs_sync==1 && (fp->frame_type != TDD || ru->is_slave == 1),
"ru->generate_dmrs_sync should not be set, frame_type %d, is_slave %d\n",
fp->frame_type,ru->is_slave);
*/
int num_symb = 7;
if (subframe_select(fp,subframe) == SF_S) num_symb=fp->dl_symbols_in_S_subframe+1;
if (ru->generate_dmrs_sync == 1 && slot == 0 && subframe == 1 && aa==0) {
//int32_t dmrs[ru->frame_parms.ofdm_symbol_size*14] __attribute__((aligned(32)));
//int32_t *dmrsp[2] ={dmrs,NULL}; //{&dmrs[(3-ru->frame_parms.Ncp)*ru->frame_parms.ofdm_symbol_size],NULL};
generate_drs_pusch((PHY_VARS_UE *)NULL,
(UE_rxtx_proc_t*)NULL,
fp,
ru->common.txdataF_BF,
0,
AMP,
0,
0,
fp->N_RB_DL,
aa);
}
normal_prefix_mod(&ru->common.txdataF_BF[aa][(slot&1)*slot_sizeF],
(int*)&ru->common.txdata[aa][slot_offset],
num_symb,
fp);
if (fp->Ncp == EXTENDED) {
PHY_ofdm_mod(&ru->common.txdataF_BF[aa][(slot&1)*slot_sizeF],
(int*)&ru->common.txdata[aa][slot_offset],
fp->ofdm_symbol_size,
6,
fp->nb_prefix_samples,
CYCLIC_PREFIX);
} else {
if(is_pmch_subframe(ru->proc.frame_tx,subframe,fp)){
if (slot == 0) {//just use one slot chance
normal_prefix_mod(&ru->common.txdataF_BF[aa][slot*slot_sizeF],
(int*)&ru->common.txdata[aa][slot_offset],
2,
fp);
PHY_ofdm_mod(&ru->common.txdataF_BF[aa][slot*slot_sizeF+fp->ofdm_symbol_size*2],
(int*)&ru->common.txdata[aa][slot_offset+((fp->ofdm_symbol_size>>2)*2+fp->ofdm_symbol_size*2)],
fp->ofdm_symbol_size,
10,
fp->ofdm_symbol_size>>2,
CYCLIC_PREFIX);
LOG_D(PHY,"SFN/SF:RU:TX:%d/%d Generating slot %d F(%d) t(%d) IS PMCH(%d)\n",
ru->proc.frame_tx,
ru->proc.subframe_tx,
slot,
slot*slot_sizeF+fp->ofdm_symbol_size*2,
slot_offset+((fp->ofdm_symbol_size>>2)*2+fp->ofdm_symbol_size*2),
is_pmch_subframe(ru->proc.frame_tx,subframe,fp));
}
} else {
/* AssertFatal(ru->generate_dmrs_sync==1 && (fp->frame_type != TDD || ru->is_slave == 1),
"ru->generate_dmrs_sync should not be set, frame_type %d, is_slave %d\n",
fp->frame_type,ru->is_slave);
*/
int num_symb = 7;
if (subframe_select(fp,subframe) == SF_S)
num_symb = fp->dl_symbols_in_S_subframe+1;
if (ru->generate_dmrs_sync == 1 && slot == 0 && subframe == 1 && aa==0) {
//int32_t dmrs[ru->frame_parms.ofdm_symbol_size*14] __attribute__((aligned(32)));
//int32_t *dmrsp[2] ={dmrs,NULL}; //{&dmrs[(3-ru->frame_parms.Ncp)*ru->frame_parms.ofdm_symbol_size],NULL};
generate_drs_pusch((PHY_VARS_UE *)NULL,
(UE_rxtx_proc_t*)NULL,
fp,
ru->common.txdataF_BF,
0,
AMP,
0,
0,
fp->N_RB_DL,
aa);
}
normal_prefix_mod(&ru->common.txdataF_BF[aa][(slot&1)*slot_sizeF],
(int*)&ru->common.txdata[aa][slot_offset],
num_symb,
fp);
}
}
/*
len = fp->samples_per_tti>>1;
......@@ -152,10 +176,10 @@ void feptx0(RU_t *ru,
tx_offset = (int)slot_offset+i-ru->N_TA_offset/2;
if (tx_offset<0)
tx_offset += LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti;
if (tx_offset>=(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti))
tx_offset -= LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti;
ru->common.txdata[aa][tx_offset] = 0x00000000;
}
}*/
......@@ -237,7 +261,7 @@ void feptx_ofdm_2thread(RU_t *ru,
exit_fun( "ERROR pthread_cond_signal" );
return;
}
//start_meas(&ru->ofdm_mod_wakeup_stats);
//start_meas(&ru->ofdm_mod_wakeup_stats);
pthread_mutex_unlock( &proc->mutex_feptx );
}
......@@ -297,16 +321,29 @@ void feptx_ofdm(RU_t *ru,
fp->nb_prefix_samples,
CYCLIC_PREFIX);
} else {
if(is_pmch_subframe(ru->proc.frame_tx,subframe,fp)/*subframe==1*/){
normal_prefix_mod(&ru->common.txdataF_BF[aa][0],
dummy_tx_b,
2,
fp);
PHY_ofdm_mod(&ru->common.txdataF_BF[aa][fp->ofdm_symbol_size*2],
dummy_tx_b+((fp->ofdm_symbol_size>>2)*2+fp->ofdm_symbol_size*2),
fp->ofdm_symbol_size,
10,
fp->ofdm_symbol_size>>2,
CYCLIC_PREFIX);
}else{
normal_prefix_mod(&ru->common.txdataF_BF[aa][slot_offset_F],
dummy_tx_b,
7,
fp);
// if S-subframe generate first slot only
// if S-subframe generate first slot only
if (subframe_select(fp,subframe) == SF_DL)
normal_prefix_mod(&ru->common.txdataF_BF[aa][slot_offset_F+slot_sizeF],
dummy_tx_b+(fp->samples_per_tti>>1),
7,
fp);
}
}
// if S-subframe generate first slot only
......
......@@ -2957,7 +2957,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue,
dlsch_unscrambling(&ue->frame_parms,1,ue->dlsch_MCH[0],
ue->dlsch_MCH[0]->harq_processes[0]->G,
ue->pdsch_vars_MCH[0]->llr[0],0,subframe_rx<<1);
ue->pdsch_vars_MCH[ue->current_thread_id[subframe_rx]][0]->llr[0],0,subframe_rx<<1);
LOG_D(PHY,"start turbo decode for MCH %d.%d --> nb_rb %d \n", frame_rx, subframe_rx, ue->dlsch_MCH[0]->harq_processes[0]->nb_rb);
LOG_D(PHY,"start turbo decode for MCH %d.%d --> rb_alloc_even %x \n", frame_rx, subframe_rx, (unsigned int)((intptr_t)ue->dlsch_MCH[0]->harq_processes[0]->rb_alloc_even));
LOG_D(PHY,"start turbo decode for MCH %d.%d --> Qm %d \n", frame_rx, subframe_rx, ue->dlsch_MCH[0]->harq_processes[0]->Qm);
......@@ -2965,7 +2965,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue,
LOG_D(PHY,"start turbo decode for MCH %d.%d --> G %d \n", frame_rx, subframe_rx, ue->dlsch_MCH[0]->harq_processes[0]->G);
LOG_D(PHY,"start turbo decode for MCH %d.%d --> Kmimo %d \n", frame_rx, subframe_rx, ue->dlsch_MCH[0]->Kmimo);
ret = dlsch_decoding(ue,
ue->pdsch_vars_MCH[0]->llr[0],
ue->pdsch_vars_MCH[ue->current_thread_id[subframe_rx]][0]->llr[0],
&ue->frame_parms,
ue->dlsch_MCH[0],
ue->dlsch_MCH[0]->harq_processes[0],
......
......@@ -58,6 +58,8 @@ struct iovec nas_iov_rx = {nl_rx_buf, sizeof(nl_rx_buf)};
int nas_sock_fd[MAX_MOBILES_PER_ENB];
int nas_sock_mbms_fd[8];
struct msghdr nas_msg_tx;
struct msghdr nas_msg_rx;
......@@ -92,6 +94,64 @@ static int tun_alloc(char *dev) {
return fd;
}
int netlink_init_mbms_tun(char *ifprefix, int num_if) {
int ret;
char ifname[64];
int i= num_if-1;
sprintf(ifname, "oaitun_%.3s%d",ifprefix,i+1);
nas_sock_mbms_fd[i] = tun_alloc(ifname);
if (nas_sock_mbms_fd[i] == -1) {
printf("[NETLINK] Error opening socket %s (%d:%s)\n",ifname,errno, strerror(errno));
exit(1);
}
printf("[NETLINK]Opened socket %s with fd %d\n",ifname,nas_sock_mbms_fd[i]);
ret = fcntl(nas_sock_mbms_fd[i],F_SETFL,O_NONBLOCK);
if (ret == -1) {
printf("[NETLINK] Error fcntl (%d:%s)\n",errno, strerror(errno));
if (LINK_ENB_PDCP_TO_IP_DRIVER) {
exit(1);
}
}
memset(&nas_src_addr, 0, sizeof(nas_src_addr));
nas_src_addr.nl_family = AF_NETLINK;
nas_src_addr.nl_pid = 1;//getpid(); /* self pid */
nas_src_addr.nl_groups = 0; /* not in mcast groups */
ret = bind(nas_sock_mbms_fd[i], (struct sockaddr *)&nas_src_addr, sizeof(nas_src_addr));
memset(&nas_dest_addr, 0, sizeof(nas_dest_addr));
nas_dest_addr.nl_family = AF_NETLINK;
nas_dest_addr.nl_pid = 0; /* For Linux Kernel */
nas_dest_addr.nl_groups = 0; /* unicast */
// TX PART
nas_nlh_tx=(struct nlmsghdr *)malloc(NLMSG_SPACE(NL_MAX_PAYLOAD));
memset(nas_nlh_tx, 0, NLMSG_SPACE(NL_MAX_PAYLOAD));
/* Fill the netlink message header */
nas_nlh_tx->nlmsg_len = NLMSG_SPACE(NL_MAX_PAYLOAD);
nas_nlh_tx->nlmsg_pid = 1;//getpid(); /* self pid */
nas_nlh_tx->nlmsg_flags = 0;
nas_iov_tx.iov_base = (void *)nas_nlh_tx;
nas_iov_tx.iov_len = nas_nlh_tx->nlmsg_len;
memset(&nas_msg_tx,0,sizeof(nas_msg_tx));
nas_msg_tx.msg_name = (void *)&nas_dest_addr;
nas_msg_tx.msg_namelen = sizeof(nas_dest_addr);
nas_msg_tx.msg_iov = &nas_iov_tx;
nas_msg_tx.msg_iovlen = 1;
// RX PART
memset(&nas_msg_rx,0,sizeof(nas_msg_rx));
nas_msg_rx.msg_name = (void *)&nas_src_addr;
nas_msg_rx.msg_namelen = sizeof(nas_src_addr);
nas_msg_rx.msg_iov = &nas_iov_rx;
nas_msg_rx.msg_iovlen = 1;
return 1;
}
int netlink_init_tun(char *ifprefix, int num_if) {
int ret;
char ifname[64];
......
......@@ -63,5 +63,6 @@ void clear_eNB_transport_info(uint8_t);
void clear_UE_transport_info(uint8_t);
int netlink_init(void);
int netlink_init_tun(char *ifsuffix, int num_if);
int netlink_init_mbms_tun(char *ifsuffix, int num_if);
#endif /* EMU_PROTO_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
*/
/* eNB application layer -> M2AP messages */
/* ITTI LOG messages */
/* ENCODER */
MESSAGE_DEF(M2AP_RESET_REQUST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , m2ap_reset_request_log)
MESSAGE_DEF(M2AP_RESOURCE_STATUS_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , m2ap_resource_status_response_log)
MESSAGE_DEF(M2AP_RESOURCE_STATUS_FAILURE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , m2ap_resource_status_failure_log)
/* Messages for M2AP logging */
MESSAGE_DEF(M2AP_SETUP_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , m2ap_setup_request_log)
/* eNB application layer -> M2AP messages */
MESSAGE_DEF(M2AP_REGISTER_ENB_REQ , MESSAGE_PRIORITY_MED, m2ap_register_enb_req_t , m2ap_register_enb_req)
MESSAGE_DEF(M2AP_SUBFRAME_PROCESS , MESSAGE_PRIORITY_MED, m2ap_subframe_process_t , m2ap_subframe_process)
/* M2AP -> eNB application layer messages */
MESSAGE_DEF(M2AP_REGISTER_ENB_CNF , MESSAGE_PRIORITY_MED, m2ap_register_enb_cnf_t , m2ap_register_enb_cnf)
MESSAGE_DEF(M2AP_DEREGISTERED_ENB_IND , MESSAGE_PRIORITY_MED, m2ap_deregistered_enb_ind_t , m2ap_deregistered_enb_ind)
/* handover messages M2AP <-> RRC */
//MESSAGE_DEF(M2AP_HANDOVER_REQ , MESSAGE_PRIORITY_MED, m2ap_handover_req_t , m2ap_handover_req)
//MESSAGE_DEF(M2AP_HANDOVER_REQ_ACK , MESSAGE_PRIORITY_MED, m2ap_handover_req_ack_t , m2ap_handover_req_ack)
//MESSAGE_DEF(M2AP_HANDOVER_CANCEL , MESSAGE_PRIORITY_MED, m2ap_handover_cancel_t , m2ap_handover_cancel)
/* handover messages M2AP <-> S1AP */
//MESSAGE_DEF(M2AP_UE_CONTEXT_RELEASE , MESSAGE_PRIORITY_MED, m2ap_ue_context_release_t , m2ap_ue_context_release)
/* M2AP -> SCTP */
MESSAGE_DEF(M2AP_MCE_SCTP_REQ , MESSAGE_PRIORITY_MED, m2ap_mce_sctp_req_t , m2ap_mce_sctp_req)
//MESSAGE_DEF(M2AP_ENB_SCTP_REQ , MESSAGE_PRIORITY_MED, m2ap_enb_setup_req_t , f1ap_enb_setup_req)
/* eNB_DU application layer -> M2AP messages or CU M2AP -> RRC*/
MESSAGE_DEF(M2AP_SETUP_REQ , MESSAGE_PRIORITY_MED, m2ap_setup_req_t , m2ap_setup_req)
MESSAGE_DEF(M2AP_SETUP_RESP , MESSAGE_PRIORITY_MED, m2ap_setup_resp_t , m2ap_setup_resp)
MESSAGE_DEF(M2AP_SETUP_FAILURE , MESSAGE_PRIORITY_MED, m2ap_setup_failure_t , m2ap_setup_failure)
MESSAGE_DEF(M2AP_RESET , MESSAGE_PRIORITY_MED, m2ap_reset_t , m2ap_reset)
MESSAGE_DEF(M2AP_REGISTER_MCE_REQ , MESSAGE_PRIORITY_MED, m2ap_register_mce_req_t , m2ap_register_mce_req)
MESSAGE_DEF(M2AP_MBMS_SCHEDULING_INFORMATION , MESSAGE_PRIORITY_MED, m2ap_mbms_scheduling_information_t , m2ap_mbms_scheduling_information)
MESSAGE_DEF(M2AP_MBMS_SCHEDULING_INFORMATION_RESP , MESSAGE_PRIORITY_MED, m2ap_mbms_scheduling_information_resp_t , m2ap_mbms_scheduling_information_resp)
MESSAGE_DEF(M2AP_MBMS_SESSION_START_REQ , MESSAGE_PRIORITY_MED, m2ap_session_start_req_t ,m2ap_session_start_req )
MESSAGE_DEF(M2AP_MBMS_SESSION_START_RESP , MESSAGE_PRIORITY_MED, m2ap_session_start_resp_t ,m2ap_session_start_resp )
MESSAGE_DEF(M2AP_MBMS_SESSION_START_FAILURE , MESSAGE_PRIORITY_MED, m2ap_session_start_failure_t ,m2ap_session_start_failure )
MESSAGE_DEF(M2AP_MBMS_SESSION_STOP_REQ , MESSAGE_PRIORITY_MED, m2ap_session_stop_req_t ,m2ap_session_stop_req )
MESSAGE_DEF(M2AP_MBMS_SESSION_STOP_RESP , MESSAGE_PRIORITY_MED, m2ap_session_stop_resp_t ,m2ap_session_stop_resp )
MESSAGE_DEF(M2AP_ENB_CONFIGURATION_UPDATE , MESSAGE_PRIORITY_MED, m2ap_enb_configuration_update_t, m2ap_enb_configuration_update )
MESSAGE_DEF(M2AP_ENB_CONFIGURATION_UPDATE_ACK , MESSAGE_PRIORITY_MED, m2ap_enb_configuration_update_ack_t, m2ap_enb_configuration_update_ack )
MESSAGE_DEF(M2AP_ENB_CONFIGURATION_UPDATE_FAILURE , MESSAGE_PRIORITY_MED, m2ap_enb_configuration_update_failure_t, m2ap_enb_configuration_update_failure )
MESSAGE_DEF(M2AP_MCE_CONFIGURATION_UPDATE , MESSAGE_PRIORITY_MED, m2ap_mce_configuration_update_t, m2ap_mce_configuration_update )
MESSAGE_DEF(M2AP_MCE_CONFIGURATION_UPDATE_ACK , MESSAGE_PRIORITY_MED, m2ap_mce_configuration_update_ack_t, m2ap_mce_configuration_update_ack )
MESSAGE_DEF(M2AP_MCE_CONFIGURATION_UPDATE_FAILURE , MESSAGE_PRIORITY_MED, m2ap_mce_configuration_update_failure_t, m2ap_mce_configuration_update_failure )
MESSAGE_DEF(M2AP_ERROR_INDICATION , MESSAGE_PRIORITY_MED, m2ap_error_indication_t, m2ap_error_indication )
MESSAGE_DEF(M2AP_MBMS_SESSION_UPDATE_REQ , MESSAGE_PRIORITY_MED, m2ap_mbms_session_update_req_t, m2ap_mbms_session_update_req )
MESSAGE_DEF(M2AP_MBMS_SESSION_UPDATE_RESP , MESSAGE_PRIORITY_MED, m2ap_mbms_session_update_resp_t, m2ap_mbms_session_update_resp )
MESSAGE_DEF(M2AP_MBMS_SESSION_UPDATE_FAILURE , MESSAGE_PRIORITY_MED, m2ap_mbms_session_update_failure_t, m2ap_mbms_session_update_failure )
MESSAGE_DEF(M2AP_MBMS_SERVICE_COUNTING_REPORT , MESSAGE_PRIORITY_MED, m2ap_mbms_service_counting_report_t, m2ap_mbms_service_counting_report )
MESSAGE_DEF(M2AP_MBMS_OVERLOAD_NOTIFICATION , MESSAGE_PRIORITY_MED, m2ap_mbms_overload_notification_t, m2ap_mbms_overload_notification )
MESSAGE_DEF(M2AP_MBMS_SERVICE_COUNTING_REQ , MESSAGE_PRIORITY_MED, m2ap_mbms_service_counting_req_t, m2ap_mbms_service_counting_req )
MESSAGE_DEF(M2AP_MBMS_SERVICE_COUNTING_RESP , MESSAGE_PRIORITY_MED, m2ap_mbms_service_counting_resp_t, m2ap_mbms_service_counting_resp )
MESSAGE_DEF(M2AP_MBMS_SERVICE_COUNTING_FAILURE , MESSAGE_PRIORITY_MED, m2ap_mbms_service_counting_failure_t, m2ap_mbms_service_counting_failure )
This diff is collapsed.
/*
* 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
*/
/* eNB application layer -> M3AP messages */
/* ITTI LOG messages */
/* ENCODER */
MESSAGE_DEF(M3AP_RESET_REQUST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , m3ap_reset_request_log)
MESSAGE_DEF(M3AP_RESOURCE_STATUS_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , m3ap_resource_status_response_log)
MESSAGE_DEF(M3AP_RESOURCE_STATUS_FAILURE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , m3ap_resource_status_failure_log)
/* Messages for M3AP logging */
MESSAGE_DEF(M3AP_SETUP_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , m3ap_setup_request_log)
/* eNB application layer -> M3AP messages */
MESSAGE_DEF(M3AP_REGISTER_MCE_REQ , MESSAGE_PRIORITY_MED, m3ap_register_mce_req_t , m3ap_register_mce_req)
MESSAGE_DEF(M3AP_SUBFRAME_PROCESS , MESSAGE_PRIORITY_MED, m3ap_subframe_process_t , m3ap_subframe_process)
/* M3AP -> eNB application layer messages */
MESSAGE_DEF(M3AP_REGISTER_MCE_CNF , MESSAGE_PRIORITY_MED, m3ap_register_mce_cnf_t , m3ap_register_mce_cnf)
MESSAGE_DEF(M3AP_DEREGISTERED_MCE_IND , MESSAGE_PRIORITY_MED, m3ap_deregistered_mce_ind_t , m3ap_deregistered_mce_ind)
/* handover messages M3AP <-> RRC */
//MESSAGE_DEF(M3AP_HANDOVER_REQ , MESSAGE_PRIORITY_MED, m3ap_handover_req_t , m3ap_handover_req)
//MESSAGE_DEF(M3AP_HANDOVER_REQ_ACK , MESSAGE_PRIORITY_MED, m3ap_handover_req_ack_t , m3ap_handover_req_ack)
//MESSAGE_DEF(M3AP_HANDOVER_CANCEL , MESSAGE_PRIORITY_MED, m3ap_handover_cancel_t , m3ap_handover_cancel)
/* handover messages M3AP <-> S1AP */
//MESSAGE_DEF(M3AP_UE_CONTEXT_RELEASE , MESSAGE_PRIORITY_MED, m3ap_ue_context_release_t , m3ap_ue_context_release)
MESSAGE_DEF(M3AP_MME_SCTP_REQ , MESSAGE_PRIORITY_MED, m3ap_mme_sctp_req_t , m3ap_mme_sctp_req)
MESSAGE_DEF(M3AP_MBMS_SESSION_START_REQ , MESSAGE_PRIORITY_MED ,m3ap_session_start_req_t ,m3ap_session_start_req)
MESSAGE_DEF(M3AP_MBMS_SESSION_START_RESP , MESSAGE_PRIORITY_MED ,m3ap_session_start_resp_t ,m3ap_session_start_resp)
MESSAGE_DEF(M3AP_MBMS_SESSION_START_FAILURE , MESSAGE_PRIORITY_MED ,m3ap_session_start_failure_t ,m3ap_session_start_failure)
MESSAGE_DEF(M3AP_MBMS_SESSION_STOP_REQ , MESSAGE_PRIORITY_MED ,m3ap_session_stop_req_t ,m3ap_session_stop_req)
MESSAGE_DEF(M3AP_MBMS_SESSION_STOP_RESP , MESSAGE_PRIORITY_MED ,m3ap_session_stop_resp_t ,m3ap_session_stop_resp)
MESSAGE_DEF(M3AP_MBMS_SESSION_STOP_FAILURE , MESSAGE_PRIORITY_MED ,m3ap_session_stop_failure_t ,m3ap_session_stop_failure)
MESSAGE_DEF(M3AP_ERROR_INDICATION , MESSAGE_PRIORITY_MED ,m3ap_error_indication_t ,m3ap_error_indication)
MESSAGE_DEF(M3AP_RESET , MESSAGE_PRIORITY_MED ,m3ap_reset_t ,m3ap_reset)
MESSAGE_DEF(M3AP_RESET_ACK , MESSAGE_PRIORITY_MED ,m3ap_reset_ack_t ,m3ap_reset_ack)
MESSAGE_DEF(M3AP_MBMS_SESSION_UPDATE_REQ , MESSAGE_PRIORITY_MED ,m3ap_mbms_session_update_req_t ,m3ap_mbms_session_update_req)
MESSAGE_DEF(M3AP_MBMS_SESSION_UPDATE_RESP , MESSAGE_PRIORITY_MED ,m3ap_mbms_session_update_resp_t ,m3ap_mbms_session_update_resp)
MESSAGE_DEF(M3AP_MBMS_SESSION_UPDATE_FAILURE , MESSAGE_PRIORITY_MED ,m3ap_mbms_session_update_failure_t ,m3ap_mbms_session_update_failure)
MESSAGE_DEF(M3AP_SETUP_REQ , MESSAGE_PRIORITY_MED ,m3ap_setup_req_t ,m3ap_setup_req)
MESSAGE_DEF(M3AP_SETUP_RESP , MESSAGE_PRIORITY_MED ,m3ap_setup_resp_t ,m3ap_setup_resp)
MESSAGE_DEF(M3AP_SETUP_FAILURE , MESSAGE_PRIORITY_MED ,m3ap_setup_failure_t ,m3ap_setup_failure)
MESSAGE_DEF(M3AP_MCE_CONFIGURATION_UPDATE , MESSAGE_PRIORITY_MED ,m3ap_mce_configuration_update_t ,m3ap_mce_configuration_update)
MESSAGE_DEF(M3AP_MCE_CONFIGURATION_UPDATE_ACK , MESSAGE_PRIORITY_MED ,m3ap_mce_configuration_update_ack_t ,m3ap_mce_configuration_update_ack)
MESSAGE_DEF(M3AP_MCE_CONFIGURATION_UPDATE_FAILURE, MESSAGE_PRIORITY_MED ,m3ap_mce_configuration_update_failure_t ,m3ap_mce_configuration_update_failure)
This diff is collapsed.
......@@ -45,3 +45,6 @@ MESSAGE_DEF(RRC_MAC_MCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacMcchDat
MESSAGE_DEF(RRC_MAC_MCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacMcchDataInd, rrc_mac_mcch_data_ind)
MESSAGE_DEF(RRC_MAC_PCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacPcchDataReq, rrc_mac_pcch_data_req)
/* RRC configures DRX context (MAC timers) of a UE */
MESSAGE_DEF(RRC_MAC_DRX_CONFIG_REQ, MESSAGE_PRIORITY_MED, rrc_mac_drx_config_req_t, rrc_mac_drx_config_req)
\ No newline at end of file
......@@ -29,6 +29,8 @@
#ifndef MAC_MESSAGES_TYPES_H_
#define MAC_MESSAGES_TYPES_H_
#include <LTE_DRX-Config.h>
//-------------------------------------------------------------------------------------------//
// Defines to access message fields.
#define RRC_MAC_IN_SYNC_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_in_sync_ind
......@@ -48,6 +50,8 @@
#define RRC_MAC_MCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_mcch_data_ind
#define RRC_MAC_PCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_pcch_data_req
#define RRC_MAC_DRX_CONFIG_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_drx_config_req
// Some constants from "LAYER2/MAC/defs.h"
#define BCCH_SDU_SIZE (512)
#define BCCH_SDU_MBMS_SIZE (512)
......@@ -145,4 +149,14 @@ typedef struct RrcMacPcchDataReq_s {
uint8_t sdu[PCCH_SDU_SIZE];
uint8_t enb_index;
} RrcMacPcchDataReq;
/* RRC configures DRX context (MAC timers) of a UE */
typedef struct rrc_mac_drx_config_req_s {
/* UE RNTI to configure */
rnti_t rnti;
/* DRX configuration from MacMainConfig to configure UE's local timers */
LTE_DRX_Config_t * drx_Configuration;
} rrc_mac_drx_config_req_t;
#endif /* MAC_MESSAGES_TYPES_H_ */
......@@ -36,6 +36,8 @@
#include "s1ap_messages_def.h"
#include "f1ap_messages_def.h"
#include "x2ap_messages_def.h"
#include "m2ap_messages_def.h"
#include "m3ap_messages_def.h"
#include "sctp_messages_def.h"
#include "udp_messages_def.h"
#include "gtpv1_u_messages_def.h"
......
......@@ -115,7 +115,8 @@
#define NB_RAB_MAX LTE_maxDRB /* was 8, now 11 */
#define RAB_SHIFT1 9
#define RAB_SHIFT2 3
#define RAB_OFFSET 0x0007
//#define RAB_OFFSET 0x0007
#define RAB_OFFSET 0x000F
#define RAB_OFFSET1 0x7E00
#define RAB_OFFSET2 0x01F8
#define DIR_OFFSET 0x8000
......
......@@ -194,6 +194,7 @@ typedef struct RrcConfigurationReq_s {
int16_t N_RB_DL[MAX_NUM_CCs];// for testing, change later
int nb_antenna_ports[MAX_NUM_CCs];
int eMBMS_configured;
int eMBMS_M2_configured;
int eMTC_configured;
int SL_configured;
......
......@@ -50,6 +50,15 @@ TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000)
TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200)
TASK_DEF(TASK_CU_F1, TASK_PRIORITY_MED, 200)
TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200)
/// M3ap task, acts as both source and target
TASK_DEF(TASK_M3AP, TASK_PRIORITY_MED, 200)
/// M3ap task, acts as both source and target
TASK_DEF(TASK_M3AP_MME, TASK_PRIORITY_MED, 200)
/// M3ap task, acts as both source and target
TASK_DEF(TASK_M3AP_MCE, TASK_PRIORITY_MED, 200)
/// M2ap task, acts as both source and target
TASK_DEF(TASK_M2AP_MCE, TASK_PRIORITY_MED, 200)
TASK_DEF(TASK_M2AP_ENB, TASK_PRIORITY_MED, 200)
/// X2ap task, acts as both source and target
TASK_DEF(TASK_X2AP, TASK_PRIORITY_MED, 200)
/// Sctp task (Used by both S1AP and X2AP)
......
This diff is collapsed.
This diff is collapsed.
......@@ -116,6 +116,7 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i);
void read_config_and_init(void);
int RCconfig_X2(MessageDef *msg_p, uint32_t i);
int RCconfig_M2(MessageDef *msg_p, uint32_t i);
void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int cell_idx,int cc_idx,char *config_fname);
void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, int cell_idx,int cc_idx,char *config_fname,char *brparamspath);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -175,7 +175,7 @@ void *F1AP_DU_task(void *arg) {
&received_msg->ittiMsg.sctp_data_ind);
break;
case F1AP_UL_RRC_MESSAGE: // from rrc
case F1AP_UL_RRC_MESSAGE: // to rrc
LOG_I(F1AP, "DU Task Received F1AP_UL_RRC_MESSAGE\n");
DU_send_UL_RRC_MESSAGE_TRANSFER(ITTI_MESSAGE_GET_INSTANCE(received_msg),
&F1AP_UL_RRC_MESSAGE(received_msg));
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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