Commit 8da1c4b5 authored by Raymond Knopp's avatar Raymond Knopp

Note: this commit is work in progress. Contains initial integration of NFAPI...

Note: this commit is work in progress. Contains initial integration of NFAPI data structures which are tested for TX path. RX path to follow.
parent d23697ae
......@@ -27,6 +27,7 @@ cmake_minimum_required (VERSION 2.8)
# Base directories, compatible with legacy OAI building
################################################
set (OPENAIR_DIR $ENV{OPENAIR_DIR})
set (NFAPI_DIR $ENV{NFAPI_DIR})
set (OPENAIR1_DIR ${OPENAIR_DIR}/openair1)
set (OPENAIR2_DIR ${OPENAIR_DIR}/openair2)
set (OPENAIR3_DIR ${OPENAIR_DIR}/openair3)
......@@ -725,6 +726,7 @@ else()
include_directories("${OPENAIR2_DIR}/UTIL")
include_directories("${OPENAIR2_DIR}/UTIL/LOG")
endif()
include_directories("${NFAPI_DIR}")
include_directories("${OPENAIR1_DIR}")
include_directories("${OPENAIR2_DIR}/NAS")
include_directories("${OPENAIR2_DIR}")
......@@ -958,7 +960,7 @@ set(SCHED_SRC
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_ue.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c
${OPENAIR1_DIR}/SCHED/ru_procedures.c
${OPENAIR1_DIR}/SCHED/phy_mac_stub.c
# ${OPENAIR1_DIR}/SCHED/phy_mac_stub.c
${OPENAIR1_DIR}/SCHED/pucch_pc.c
${OPENAIR1_DIR}/SCHED/pusch_pc.c
${OPENAIR1_DIR}/SCHED/srs_pc.c
......@@ -1070,6 +1072,7 @@ add_library(PHY ${PHY_SRC})
#Layer 2 library
#####################
set(MAC_DIR ${OPENAIR2_DIR}/LAYER2/MAC)
set(PHY_INTERFACE_DIR ${OPENAIR2_DIR}/PHY_INTERFACE)
set(RLC_DIR ${OPENAIR2_DIR}/LAYER2/RLC)
set(RLC_UM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0)
set(RLC_AM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/AM_v9.3.0)
......@@ -1120,7 +1123,7 @@ set(L2_SRC
${RRC_DIR}/L2_interface.c
)
set (MAC_SRC
${MAC_DIR}/lte_transport_init.c
${PHY_INTERFACE_DIR}/IF_Module.c
${MAC_DIR}/main.c
${MAC_DIR}/ue_procedures.c
${MAC_DIR}/ra_procedures.c
......@@ -1555,6 +1558,7 @@ ${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_tv_channel.c
${OPENAIR1_DIR}/SIMULATION/RF/rf.c
${OPENAIR1_DIR}/SIMULATION/RF/dac.c
${OPENAIR1_DIR}/SIMULATION/RF/adc.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
)
add_library(SIMU_ETH
......@@ -1843,7 +1847,7 @@ add_executable(oaisim
target_include_directories(oaisim PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
target_link_libraries (oaisim
-Wl,-ldl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} LIB_NAS_UE SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} LIB_NAS_UE SIMU SECU_OSA ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
target_link_libraries (oaisim ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
......@@ -1884,7 +1888,7 @@ add_executable(oaisim_nos1
target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
target_link_libraries (oaisim_nos1
-Wl,--start-group
RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SECU_OSA ${ITTI_LIB} ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
-Wl,--end-group )
target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
......@@ -2001,7 +2005,7 @@ if (${T_TRACER})
oai_eth_transpro
FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO SECU_OSA
SECU_CN SCHED_LIB PHY L2 default_sched remote_sched RAL MIH CN_UTILS
GTPV1U SCTP_CLIENT UDP LIB_NAS_UE LFDS LFDS7 SIMU SIMU_ETH OPENAIR0_LIB)
GTPV1U SCTP_CLIENT UDP LIB_NAS_UE LFDS LFDS7 SIMU OPENAIR0_LIB)
if (TARGET ${i})
add_dependencies(${i} generate_T)
endif()
......
......@@ -50,11 +50,17 @@
typedef struct {
/// RAN context config file name
char *config_file_name;
/// Number of eNB instances in this node
/// Number of RRC instances in this node
int nb_inst;
/// Number of Component Carriers per instance in this node
int *nb_CC;
/// Number of radio units
/// Number of MACRLC instances in this node
int nb_macrlc_inst;
/// Number of L1 instances in this node
int nb_L1_inst;
/// Number of Component Carriers per instance in this node
int *nb_L1_CC;
/// Number of RU instances in this node
int nb_RU;
/// eNB context variables
struct PHY_VARS_eNB_s ***eNB;
......
......@@ -39,6 +39,13 @@
* @{
*/
/*!
\fn int l1_top_init_eNB(void)
\brief Initialize north interface for L1
@returns 0 on success
*/
int l1_north_init_eNB(void);
/*!
\fn int phy_init_top(LTE_DL_FRAME_PARMS *frame_parms)
\brief Allocate and Initialize the PHY variables after receiving static configuration
......@@ -347,6 +354,7 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
\brief Cleanup the PHY variables*/
void phy_cleanup(void);
void phy_config_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);
......
This diff is collapsed.
......@@ -55,8 +55,7 @@ void lte_param_init(unsigned char N_tx_port_eNB,
UE = malloc(sizeof(PHY_VARS_UE));
memset((void*)eNB,0,sizeof(PHY_VARS_eNB));
memset((void*)UE,0,sizeof(PHY_VARS_UE));
//PHY_config = malloc(sizeof(PHY_CONFIG));
mac_xface = malloc(sizeof(MAC_xface));
srand(0);
randominit(0);
......
......@@ -204,7 +204,7 @@ void lte_ue_measurements_emul(PHY_VARS_UE *phy_vars_ue,uint8_t last_slot,uint8_t
@returns Path loss in dB
*/
int16_t get_PL(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
uint32_t get_RSRP(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
double get_RSRP(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
uint32_t get_RSRQ(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
uint8_t get_n_adj_cells(module_id_t Mod_id,uint8_t CC_id);
uint32_t get_rx_total_gain_dB(module_id_t Mod_id,uint8_t CC_id);
......
......@@ -114,15 +114,20 @@ uint32_t get_RSSI (uint8_t Mod_id,uint8_t CC_id)
return 0xFFFFFFFF;
}
uint32_t get_RSRP(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index)
double get_RSRP(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index)
{
AssertFatal(PHY_vars_UE_g!=NULL,"PHY_vars_UE_g is null\n");
AssertFatal(PHY_vars_UE_g[Mod_id]!=NULL,"PHY_vars_UE_g[%d] is null\n",Mod_id);
AssertFatal(PHY_vars_UE_g[Mod_id][CC_id]!=NULL,"PHY_vars_UE_g[%d][%d] is null\n",Mod_id,CC_id);
PHY_VARS_UE *ue = PHY_vars_UE_g[Mod_id][CC_id];
if (ue)
return ue->measurements.rsrp[eNB_index];
return 0xFFFFFFFF;
return ((dB_fixed_times10(ue->measurements.rsrp[eNB_index]))/10.0-
get_rx_total_gain_dB(Mod_id,0) -
10*log10(ue->frame_parms.N_RB_DL*12));
return -140.0;
}
uint32_t get_RSRQ(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index)
......
......@@ -2037,8 +2037,7 @@ uint8_t get_num_pdcch_symbols(uint8_t num_dci,
return(0);
}
uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
uint8_t num_common_dci,
uint8_t generate_dci_top(uint8_t num_dci,
DCI_ALLOC_t *dci_alloc,
uint32_t n_rnti,
int16_t amp,
......@@ -2094,9 +2093,8 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
break;
}
num_pdcch_symbols = get_num_pdcch_symbols(num_ue_spec_dci+num_common_dci,dci_alloc,frame_parms,subframe);
// printf("subframe %d in generate_dci_top num_pdcch_symbols = %d, num_dci %d\n",
// subframe,num_pdcch_symbols,num_ue_spec_dci+num_common_dci);
num_pdcch_symbols = get_num_pdcch_symbols(num_dci,dci_alloc,frame_parms,subframe);
generate_pcfich(num_pdcch_symbols,
amp,
frame_parms,
......@@ -2118,15 +2116,15 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
// generate DCIs in order of decreasing aggregation level, then common/ue spec
// MAC is assumed to have ordered the UE spec DCI according to the RNTI-based randomization
for (L=3; L>=0; L--) {
for (i=0; i<num_common_dci; i++) {
for (i=0; i<num_dci; i++) {
if (dci_alloc[i].L == (uint8_t)L) {
#ifdef DEBUG_DCI_ENCODING
LOG_I(PHY,"Generating common DCI %d/%d (nCCE %d) of length %d, aggregation %d (%x)\n",i,num_common_dci,dci_alloc[i].firstCCE,dci_alloc[i].dci_length,1<<dci_alloc[i].L,
//#ifdef DEBUG_DCI_ENCODING
LOG_I(PHY,"Generating DCI %d/%d (nCCE %d) of length %d, aggregation %d (%x)\n",i,num_dci,dci_alloc[i].firstCCE,dci_alloc[i].dci_length,1<<dci_alloc[i].L,
*(unsigned int*)dci_alloc[i].dci_pdu);
dump_dci(frame_parms,&dci_alloc[i]);
#endif
//#endif
if (dci_alloc[i].firstCCE>=0) {
e_ptr = generate_dci0(dci_alloc[i].dci_pdu,
......@@ -2137,29 +2135,6 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
}
}
}
for (; i<num_ue_spec_dci + num_common_dci; i++) {
if (dci_alloc[i].L == (uint8_t)L) {
#ifdef DEBUG_DCI_ENCODING
printf(" Generating UE (rnti %x) (nCCE %d) specific DCI %d of length %d, aggregation %d, format %d (%x)\n",dci_alloc[i].rnti,dci_alloc[i].firstCCE,i,dci_alloc[i].dci_length,1<<dci_alloc[i].L,dci_alloc[i].format,
dci_alloc[i].dci_pdu);
dump_dci(frame_parms,&dci_alloc[i]);
#endif
if (dci_alloc[i].firstCCE >= 0) {
e_ptr = generate_dci0(dci_alloc[i].dci_pdu,
e+(72*dci_alloc[i].firstCCE),
dci_alloc[i].dci_length,
dci_alloc[i].L,
dci_alloc[i].rnti);
}
else {
}
}
}
}
// Scrambling
......@@ -2367,84 +2342,6 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
return(num_pdcch_symbols);
}
#ifdef PHY_ABSTRACTION
uint8_t generate_dci_top_emul(PHY_VARS_eNB *phy_vars_eNB,
uint8_t num_ue_spec_dci,
uint8_t num_common_dci,
DCI_ALLOC_t *dci_alloc,
uint8_t subframe)
{
int n_dci, n_dci_dl;
uint8_t ue_id;
LTE_eNB_DLSCH_t *dlsch_eNB;
uint8_t num_pdcch_symbols = get_num_pdcch_symbols(num_ue_spec_dci+num_common_dci,
dci_alloc,
&phy_vars_eNB->frame_parms,
subframe);
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].cntl.cfi=num_pdcch_symbols;
memcpy(phy_vars_eNB->dci_alloc[subframe&1],dci_alloc,sizeof(DCI_ALLOC_t)*(num_ue_spec_dci+num_common_dci));
phy_vars_eNB->num_ue_spec_dci[subframe&1]=num_ue_spec_dci;
phy_vars_eNB->num_common_dci[subframe&1]=num_common_dci;
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_ue_spec_dci = num_ue_spec_dci;
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_common_dci = num_common_dci;
LOG_D(PHY,"[eNB %d][DCI][EMUL] CC id %d: num spec dci %d num comm dci %d num PMCH %d \n",
phy_vars_eNB->Mod_id, phy_vars_eNB->CC_id, num_ue_spec_dci,num_common_dci,
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_pmch);
if (eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].cntl.pmch_flag == 1 )
n_dci_dl = eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_pmch;
else
n_dci_dl = 0;
for (n_dci =0 ;
n_dci < (eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_ue_spec_dci+ eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_common_dci);
n_dci++) {
if (dci_alloc[n_dci].format > 0) { // exclude the uplink dci
if (dci_alloc[n_dci].rnti == SI_RNTI) {
dlsch_eNB = RC.eNB[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]->dlsch_SI;
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].dlsch_type[n_dci_dl] = 0;//SI;
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].harq_pid[n_dci_dl] = 0;
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].tbs[n_dci_dl] = dlsch_eNB->harq_processes[0]->TBS>>3;
LOG_D(PHY,"[DCI][EMUL]SI tbs is %d and dci index %d harq pid is %d \n",eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].tbs[n_dci_dl],n_dci_dl,
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].harq_pid[n_dci_dl]);
} else if (dci_alloc[n_dci_dl].ra_flag == 1) {
dlsch_eNB = RC.eNB[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]->dlsch_ra;
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].dlsch_type[n_dci_dl] = 1;//RA;
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].harq_pid[n_dci_dl] = 0;
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].tbs[n_dci_dl] = dlsch_eNB->harq_processes[0]->TBS>>3;
LOG_D(PHY,"[DCI][EMUL] RA tbs is %d and dci index %d harq pid is %d \n",eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].tbs[n_dci_dl],n_dci_dl,
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].harq_pid[n_dci_dl]);
} else {
ue_id = find_ue(dci_alloc[n_dci_dl].rnti,RC.eNB[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]);
DevAssert( ue_id != (uint8_t)-1 );
dlsch_eNB = RC.eNB[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]->dlsch[ue_id][0];
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].dlsch_type[n_dci_dl] = 2;//TB0;
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].harq_pid[n_dci_dl] = dlsch_eNB->current_harq_pid;
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].ue_id[n_dci_dl] = ue_id;
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].tbs[n_dci_dl] = dlsch_eNB->harq_processes[dlsch_eNB->current_harq_pid]->TBS>>3;
LOG_D(PHY,"[DCI][EMUL] TB1 tbs is %d and dci index %d harq pid is %d \n",eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].tbs[n_dci_dl],n_dci_dl,
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].harq_pid[n_dci_dl]);
// check for TB1 later
}
}
n_dci_dl++;
}
memcpy((void *)&eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].dci_alloc,
(void *)dci_alloc,
n_dci*sizeof(DCI_ALLOC_t));
return(num_pdcch_symbols);
}
#endif
void dci_decoding(uint8_t DCI_LENGTH,
uint8_t aggregation_level,
......@@ -2768,9 +2665,8 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
else if (CCEind<96)
CCEmap = CCEmap2;
else {
LOG_E(PHY,"Illegal CCEind %d (Yk %d, m %d, nCCE %d, L2 %d\n",CCEind,Yk,m,nCCE,L2);
mac_xface->macphy_exit("Illegal CCEind\n");
return; // not reached
AssertFatal(1==0,
"Illegal CCEind %d (Yk %d, m %d, nCCE %d, L2 %d\n",CCEind,Yk,m,nCCE,L2);
}
switch (L2) {
......@@ -2791,9 +2687,8 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
break;
default:
LOG_E( PHY, "Illegal L2 value %d\n", L2 );
mac_xface->macphy_exit( "Illegal L2\n" );
return; // not reached
AssertFatal(1==0,
"Illegal L2 value %d\n", L2 );
}
CCEmap_cand = (*CCEmap)&CCEmap_mask;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -32,6 +32,7 @@
#ifndef __LTE_TRANSPORT_DEFS__H__
#define __LTE_TRANSPORT_DEFS__H__
#include "PHY/defs.h"
#include "PHY/impl_defs_lte.h"
#include "dci.h"
#include "uci.h"
#ifndef STANDALONE_COMPILE
......@@ -90,6 +91,8 @@
#define PMI_2A_R1_11 1
#define PMI_2A_R1_1j 2
typedef enum { SEARCH_EXIST=0,
SEARCH_EXIST_OR_FREE} find_type_t;
typedef enum {
SCH_IDLE,
......@@ -104,6 +107,8 @@ typedef struct {
SCH_status_t status;
/// Transport block size
uint32_t TBS;
/// pointer to pdu from MAC interface (this is "a" in 36.212)
uint8_t *pdu;
/// The payload + CRC size in bits, "B" from 36-212
uint32_t B;
/// Pointer to the payload
......@@ -253,12 +258,12 @@ typedef struct {
uint16_t rnti;
/// Active flag for baseband transmitter processing
uint8_t active;
/// HARQ process mask, indicates which processes are currently active
uint16_t harq_mask;
/// Indicator of TX activation per subframe. Used during PUCCH detection for ACK/NAK.
uint8_t subframe_tx[10];
/// First CCE of last PDSCH scheduling per subframe. Again used during PUCCH detection for ACK/NAK.
uint8_t nCCE[10];
/// Current HARQ process id
uint8_t current_harq_pid;
/// Process ID's per subframe. Used to associate received ACKs on PUSCH/PUCCH to DLSCH harq process ids
uint8_t harq_ids[10];
/// Window size (in outgoing transport blocks) for fine-grain rate adaptation
......@@ -482,6 +487,8 @@ typedef struct {
} LTE_UL_eNB_HARQ_t;
typedef struct {
/// HARQ process mask, indicates which processes are currently active
uint16_t harq_mask;
/// Pointers to 8 HARQ processes for the ULSCH
LTE_UL_eNB_HARQ_t *harq_processes[8];
/// Maximum number of HARQ rounds
......@@ -738,22 +745,7 @@ typedef struct {
int8_t g_pucch;
} LTE_UE_DLSCH_t;
typedef enum {format0,
format1,
format1A,
format1B,
format1C,
format1D,
format1E_2A_M10PRB,
format2,
format2A,
format2B,
format2C,
format2D,
format3,
format3A,
format4
} DCI_format_t;
typedef enum {
SI_PDSCH=0,
......@@ -782,22 +774,6 @@ typedef enum {
} PUCCH_FMT_t;
typedef struct {
/// Length of DCI in bits
uint8_t dci_length;
/// Aggregation level
uint8_t L;
/// Position of first CCE of the dci
int firstCCE;
/// flag to indicate that this is a RA response
boolean_t ra_flag;
/// rnti
rnti_t rnti;
/// Format
DCI_format_t format;
/// DCI pdu
uint8_t dci_pdu[8];
} DCI_ALLOC_t;
/**@}*/
......
......@@ -274,9 +274,10 @@ int dlsch_encoding_2threads0(te_params *tep) {
LTE_eNB_DLSCH_t *dlsch = tep->dlsch;
unsigned int G = tep->G;
unsigned char harq_pid = tep->harq_pid;
unsigned short iind;
unsigned char harq_pid = dlsch->current_harq_pid;
unsigned short nb_rb = dlsch->harq_processes[harq_pid]->nb_rb;
unsigned int Kr=0,Kr_bytes,r,r_offset=0;
unsigned short m=dlsch->harq_processes[harq_pid]->mcs;
......@@ -394,7 +395,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
unsigned int crc=1;
unsigned short iind;
unsigned char harq_pid = dlsch->current_harq_pid;
unsigned char harq_pid = dlsch->harq_ids[subframe];
unsigned short nb_rb = dlsch->harq_processes[harq_pid]->nb_rb;
unsigned int A;
unsigned char mod_order;
......@@ -446,6 +447,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
proc->tep.eNB = eNB;
proc->tep.dlsch = dlsch;
proc->tep.G = G;
proc->tep.harq_pid = harq_pid;
// wakeup worker to do second half segments
if (pthread_cond_signal(&proc->cond_te) != 0) {
......@@ -577,7 +579,7 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
unsigned short iind;
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
unsigned char harq_pid = dlsch->current_harq_pid;
unsigned char harq_pid = dlsch->harq_ids[subframe];
unsigned short nb_rb = dlsch->harq_processes[harq_pid]->nb_rb;
unsigned int A;
unsigned char mod_order;
......@@ -739,22 +741,22 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
int dlsch_encoding_SIC(PHY_VARS_UE *ue,
unsigned char *a,
uint8_t num_pdcch_symbols,
LTE_eNB_DLSCH_t *dlsch,
int frame,
uint8_t subframe,
time_stats_t *rm_stats,
time_stats_t *te_stats,
time_stats_t *i_stats)
unsigned char *a,
uint8_t num_pdcch_symbols,
LTE_eNB_DLSCH_t *dlsch,
int frame,
uint8_t subframe,
time_stats_t *rm_stats,
time_stats_t *te_stats,
time_stats_t *i_stats)
{
unsigned int G;
unsigned int crc=1;
unsigned short iind;
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
unsigned char harq_pid = dlsch->current_harq_pid;
unsigned char harq_pid = ue->dlsch[subframe&2][0][0]->rnti;
unsigned short nb_rb = dlsch->harq_processes[harq_pid]->nb_rb;
unsigned int A;
unsigned char mod_order;
......@@ -917,39 +919,4 @@ int dlsch_encoding_SIC(PHY_VARS_UE *ue,
#ifdef PHY_ABSTRACTION
void dlsch_encoding_emul(PHY_VARS_eNB *phy_vars_eNB,
uint8_t *DLSCH_pdu,
LTE_eNB_DLSCH_t *dlsch)
{
//int payload_offset = 0;
unsigned char harq_pid = dlsch->current_harq_pid;
unsigned short i;
// if (dlsch->harq_processes[harq_pid]->Ndi == 1) {
if (dlsch->harq_processes[harq_pid]->round == 0) {
memcpy(dlsch->harq_processes[harq_pid]->b,
DLSCH_pdu,
dlsch->harq_processes[harq_pid]->TBS>>3);
LOG_D(PHY, "eNB %d dlsch_encoding_emul, tbs is %d harq pid %d \n",
phy_vars_eNB->Mod_id,
dlsch->harq_processes[harq_pid]->TBS>>3,
harq_pid);
for (i=0; i<dlsch->harq_processes[harq_pid]->TBS>>3; i++)
LOG_T(PHY,"%x.",DLSCH_pdu[i]);
LOG_T(PHY,"\n");
memcpy(&eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].transport_blocks[eNB_transport_info_TB_index[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]],
// memcpy(&eNB_transport_info[phy_vars_eNB->Mod_id].transport_blocks[payload_offset],
DLSCH_pdu,
dlsch->harq_processes[harq_pid]->TBS>>3);
}
eNB_transport_info_TB_index[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]+=dlsch->harq_processes[harq_pid]->TBS>>3;
//payload_offset +=dlsch->harq_processes[harq_pid]->TBS>>3;
}
#endif
......@@ -864,6 +864,7 @@ int dlsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint32_t rb_alloc[4], ui
#endif
}
/*
uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
uint8_t subframe,
PDSCH_t dlsch_id,
......@@ -886,10 +887,8 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break;
}
if (eNB_id2==NB_eNB_INST) {
LOG_E(PHY,"FATAL : Could not find attached eNB for DLSCH emulation !!!!\n");
mac_xface->macphy_exit("Could not find attached eNB for DLSCH emulation");
}
AssertFatal(eNB_id2!=NB_eNB_INST,
"FATAL : Could not find attached eNB for DLSCH emulation !!!!\n");
LOG_D(PHY,"[UE] dlsch_decoding_emul : subframe %d, eNB_id %d, dlsch_id %d\n",subframe,eNB_id2,dlsch_id);
......@@ -1008,10 +1007,10 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
printf("\n");
#endif
/*
if (dlsch_abstraction_MIESM(phy_vars_ue->sinr_dB, phy_vars_ue->transmission_mode[eNB_id], dlsch_eNB->rb_alloc,
dlsch_eNB->harq_processes[0]->mcs,RC.eNB[eNB_id]->mu_mimo_mode[ue_id].dl_pow_off) == 1) {
*/
// if (dlsch_abstraction_MIESM(phy_vars_ue->sinr_dB, phy_vars_ue->transmission_mode[eNB_id], dlsch_eNB->rb_alloc,
// dlsch_eNB->harq_processes[0]->mcs,RC.eNB[eNB_id]->mu_mimo_mode[ue_id].dl_pow_off) == 1) {
if (1) {
// reset HARQ
dlsch_ue->harq_processes[0]->status = SCH_IDLE;
......@@ -1038,5 +1037,6 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
LOG_E(PHY,"[FATAL] dlsch_decoding.c: Should never exit here ...\n");
return(0);
}
}*/
#endif
......@@ -2062,7 +2062,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
if ((dlsch0 != NULL) && (dlsch1 != NULL)){
harq_pid = dlsch0->current_harq_pid;
harq_pid = dlsch0->harq_ids[subframe_offset];
dlsch0_harq = dlsch0->harq_processes[harq_pid];
mimo_mode = dlsch0_harq->mimo_mode;
mod_order0 = get_Qm(dlsch0_harq->mcs);
......@@ -2079,7 +2079,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
}else if ((dlsch0 != NULL) && (dlsch1 == NULL)){
harq_pid = dlsch0->current_harq_pid;
harq_pid = dlsch0->harq_ids[subframe_offset];
dlsch0_harq = dlsch0->harq_processes[harq_pid];
mimo_mode = dlsch0_harq->mimo_mode;
mod_order0 = get_Qm(dlsch0_harq->mcs);
......@@ -2096,7 +2096,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
}else if ((dlsch0 == NULL) && (dlsch1 != NULL)){
harq_pid = dlsch1->current_harq_pid;
harq_pid = dlsch1->harq_ids[subframe_offset];
dlsch1_harq = dlsch1->harq_processes[harq_pid];
mimo_mode = dlsch1_harq->mimo_mode;
mod_order0 = get_Qm(dlsch1_harq->mcs);
......@@ -2454,7 +2454,7 @@ int dlsch_modulation_SIC(int32_t **sic_buffer,
int G)
{
uint8_t harq_pid = dlsch0->current_harq_pid;
uint8_t harq_pid = -1;//dlsch0->current_harq_pid;
LTE_DL_eNB_HARQ_t *dlsch0_harq = dlsch0->harq_processes[harq_pid];
uint32_t i,jj,re_allocated=0;
uint8_t mod_order0 = get_Qm(dlsch0_harq->mcs);
......
......@@ -71,6 +71,7 @@ static inline unsigned int lte_gold_scram(unsigned int *x1, unsigned int *x2, un
void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
int mbsfn_flag,
LTE_eNB_DLSCH_t *dlsch,
int harq_pid,
int G,
uint8_t q,
uint8_t Ns)
......@@ -79,7 +80,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
int i;
// uint8_t reset;
uint32_t x1, x2, s=0;
uint8_t *dlsch_e=dlsch->harq_processes[dlsch->current_harq_pid]->e;
uint8_t *dlsch_e=dlsch->harq_processes[harq_pid]->e;
uint8_t *e=dlsch_e;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN);
......
......@@ -489,7 +489,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
if (ue->mac_enabled==1) {
LOG_I(PHY,"[UE%d] Sending synch status to higher layers\n",ue->Mod_id);
//mac_resynch();
mac_xface->dl_phy_sync_success(ue->Mod_id,ue->proc.proc_rxtx[0].frame_rx,0,1);//ue->common_vars.eNb_id);
dl_phy_sync_success(ue->Mod_id,ue->proc.proc_rxtx[0].frame_rx,0,1);//ue->common_vars.eNb_id);
ue->UE_mode[0] = PRACH;
}
else {
......
......@@ -113,13 +113,8 @@ uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb)
uint32_t TBS;
if ((nb_rb > 0) && (mcs < 29)) {
#ifdef TBS_FIX
TBS = 3*TBStable[get_I_TBS(mcs)][nb_rb-1]/4;
TBS = TBS>>3;
#else
TBS = TBStable[get_I_TBS(mcs)][nb_rb-1];
TBS = TBS>>3;
#endif
return(TBS);
} else {
return(uint32_t)0;
......@@ -132,13 +127,8 @@ uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb)
uint32_t TBS = 0;
if ((nb_rb > 0) && (mcs < 29)) {
#ifdef TBS_FIX
TBS = 3*TBStable[get_I_TBS_UL(mcs)][nb_rb-1]/4;
TBS = TBS>>3;
#else
TBS = TBStable[get_I_TBS_UL(mcs)][nb_rb-1];
TBS = TBS>>3;
#endif
return(TBS);
} else {
return(uint32_t)0;
......
......@@ -46,9 +46,6 @@
//#define DEBUG_PBCH_ENCODING
//#define INTERFERENCE_MITIGATION 1
#ifdef OPENAIR2
#include "PHY_INTERFACE/defs.h"
#endif
#define PBCH_A 24
......@@ -210,12 +207,12 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch,
// pbch_data[i] = ((char*) &crc)[0];
// pbch_data[i+1] = ((char*) &crc)[1];
#ifdef DEBUG_PBCH
//#ifdef DEBUG_PBCH
for (i=0; i<(PBCH_A>>3); i++)
LOG_D(PHY,"[PBCH] pbch_data[%d] = %x\n",i,pbch_a[i]);
LOG_I(PHY,"[PBCH] pbch_data[%d] = %x\n",i,pbch_a[i]);
#endif
//#endif
if (frame_parms->nb_antenna_ports_eNB == 1)
amask = 0x0000;
......
......@@ -318,17 +318,17 @@ void generate_phich_reg_mapping(LTE_DL_FRAME_PARMS *frame_parms)
Ngroup_PHICH<<=1;
}
#ifdef DEBUG_PHICH
printf("Ngroup_PHICH %d (phich_config_common.phich_resource %d,phich_config_common.phich_duration %s, NidCell %d,Ncp %d, frame_type %d), smallest pcfich REG %d, n0 %d, n1 %d (first PHICH REG %d)\n",
((frame_parms->Ncp == NORMAL)?Ngroup_PHICH:(Ngroup_PHICH>>1)),
frame_parms->phich_config_common.phich_resource,
frame_parms->phich_config_common.phich_duration==normal?"normal":"extended",
frame_parms->Nid_cell,frame_parms->Ncp,frame_parms->frame_type,
pcfich_reg[frame_parms->pcfich_first_reg_idx],
n0,
n1,
((frame_parms->Nid_cell))%n0);
#endif
// #ifdef DEBUG_PHICH
LOG_I(PHY,"Ngroup_PHICH %d (phich_config_common.phich_resource %d,phich_config_common.phich_duration %s, NidCell %d,Ncp %d, frame_type %d), smallest pcfich REG %d, n0 %d, n1 %d (first PHICH REG %d)\n",
((frame_parms->Ncp == NORMAL)?Ngroup_PHICH:(Ngroup_PHICH>>1)),
frame_parms->phich_config_common.phich_resource,
frame_parms->phich_config_common.phich_duration==normal?"normal":"extended",
frame_parms->Nid_cell,frame_parms->Ncp,frame_parms->frame_type,
pcfich_reg[frame_parms->pcfich_first_reg_idx],
n0,
n1,
((frame_parms->Nid_cell))%n0);
//#endif
// This is the algorithm from Section 6.9.3 in 36-211, it works only for normal PHICH duration for now ...
......@@ -1394,7 +1394,7 @@ void rx_phich(PHY_VARS_UE *ue,
if (ulsch->harq_processes[harq_pid]->round>=ue->frame_parms.maxHARQ_Msg3Tx) {
ulsch->harq_processes[harq_pid]->subframe_scheduling_flag =0;
ulsch->harq_processes[harq_pid]->status = IDLE;
ulsch->harq_processes[harq_pid]->status = SCH_IDLE;
// inform MAC that Msg3 transmission has failed
ue->ulsch_Msg3_active[eNB_id] = 0;
}
......@@ -1423,7 +1423,7 @@ void rx_phich(PHY_VARS_UE *ue,
ulsch->uci_format = HLC_subband_cqi_nopmi;
// disable phich decoding since it is the last retransmission
ulsch->harq_processes[harq_pid]->status = IDLE;
ulsch->harq_processes[harq_pid]->status = SCH_IDLE;
//ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 0;
//ulsch->harq_processes[harq_pid]->round = 0;
......@@ -1474,7 +1474,7 @@ void rx_phich(PHY_VARS_UE *ue,
//ulsch->harq_processes[8] = ulsch->harq_processes[harq_pid];
ulsch->harq_processes[harq_pid]->subframe_scheduling_flag =0;
ulsch->harq_processes[harq_pid]->status = IDLE;
ulsch->harq_processes[harq_pid]->status = SCH_IDLE;
ulsch->harq_processes[harq_pid]->round = 0;
// inform MAC?
ue->ulsch_Msg3_active[eNB_id] = 0;
......
......@@ -196,7 +196,7 @@ void fill_eNB_dlsch_MCH(PHY_VARS_eNB *eNB,int mcs,int ndi,int rvidx)
dlsch->harq_processes[0]->rvidx = 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->current_harq_pid = 0;
// dlsch->harq_ids[subframe] = 0;
dlsch->harq_processes[0]->nb_rb = frame_parms->N_RB_DL;
switch(frame_parms->N_RB_DL) {
......@@ -313,7 +313,7 @@ void generate_mch(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t *a)
AMP);
if (dlsch_encoding(eNB,
AssertFatal(dlsch_encoding(eNB,
a,
1,
eNB->dlsch_MCH,
......@@ -321,11 +321,10 @@ void generate_mch(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t *a)
subframe,
&eNB->dlsch_rate_matching_stats,
&eNB->dlsch_turbo_encoding_stats,
&eNB->dlsch_interleaving_stats
)<0)
mac_xface->macphy_exit("problem in dlsch_encoding");
&eNB->dlsch_interleaving_stats)==0,
"problem in dlsch_encoding");
dlsch_scrambling(&eNB->frame_parms,1,eNB->dlsch_MCH,G,0,subframe<<1);
dlsch_scrambling(&eNB->frame_parms,1,eNB->dlsch_MCH,0,G,0,subframe<<1);
mch_modulation(eNB->common_vars.txdataF,
......
......@@ -393,16 +393,16 @@ void fill_du(uint8_t prach_fmt)
}
uint8_t get_num_prach_tdd(LTE_DL_FRAME_PARMS *frame_parms)
uint8_t get_num_prach_tdd(module_id_t Mod_id)
{
return(tdd_preamble_map[frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex][frame_parms->tdd_config].num_prach);
LTE_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[Mod_id][0]->frame_parms;
return(tdd_preamble_map[fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex][fp->tdd_config].num_prach);
}
uint8_t get_fid_prach_tdd(LTE_DL_FRAME_PARMS *frame_parms,uint8_t tdd_map_index)
uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index)
{
return(tdd_preamble_map[frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex][frame_parms->tdd_config].map[tdd_map_index].f_ra);
LTE_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[Mod_id][0]->frame_parms;
return(tdd_preamble_map[fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex][fp->tdd_config].map[tdd_map_index].f_ra);
}
uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type)
......@@ -656,20 +656,12 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
// First compute physical root sequence
if (restricted_set == 0) {
if (Ncs_config > 15) {
LOG_E( PHY, "[PHY] FATAL, Illegal Ncs_config for unrestricted format %"PRIu8"\n", Ncs_config );
mac_xface->macphy_exit("PRACH: Illegal Ncs_config for unrestricted format");
return 0; // not reached
}
AssertFatal(Ncs_config <= 15,
"[PHY] FATAL, Illegal Ncs_config for unrestricted format %"PRIu8"\n", Ncs_config );
NCS = NCS_unrestricted[Ncs_config];
} else {
if (Ncs_config > 14) {
LOG_E( PHY, "[PHY] FATAL, Illegal Ncs_config for restricted format %"PRIu8"\n", Ncs_config );
mac_xface->macphy_exit("PRACH: Illegal Ncs_config for restricted format");
return 0; // not reached
}
AssertFatal(Ncs_config <= 14,
"[PHY] FATAL, Illegal Ncs_config for restricted format %"PRIu8"\n", Ncs_config );
NCS = NCS_restricted[Ncs_config];
}
......@@ -1036,47 +1028,44 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
//LOG_D(PHY,"prach_len=%d\n",prach_len);
if (prach_fmt==4) {
LOG_E( PHY, "prach_fmt4 not fully implemented" );
mac_xface->macphy_exit("prach_fmt4 not fully implemented");
return 0; // not reached
} else {
AssertFatal(prach_fmt<4,
"prach_fmt4 not fully implemented" );
#if defined(EXMIMO) || defined(OAI_USRP)
int j;
int overflow = prach_start + prach_len - LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*ue->frame_parms.samples_per_tti;
LOG_D( PHY, "prach_start=%d, overflow=%d\n", prach_start, overflow );
for (i=prach_start,j=0; i<min(ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME,prach_start+prach_len); i++,j++) {
((int16_t*)ue->common_vars.txdata[0])[2*i] = prach[2*j]<<4;
((int16_t*)ue->common_vars.txdata[0])[2*i+1] = prach[2*j+1]<<4;
}
for (i=0; i<overflow; i++,j++) {
((int16_t*)ue->common_vars.txdata[0])[2*i] = prach[2*j]<<4;
((int16_t*)ue->common_vars.txdata[0])[2*i+1] = prach[2*j+1]<<4;
}
int j;
int overflow = prach_start + prach_len - LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*ue->frame_parms.samples_per_tti;
LOG_D( PHY, "prach_start=%d, overflow=%d\n", prach_start, overflow );
for (i=prach_start,j=0; i<min(ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME,prach_start+prach_len); i++,j++) {
((int16_t*)ue->common_vars.txdata[0])[2*i] = prach[2*j]<<4;
((int16_t*)ue->common_vars.txdata[0])[2*i+1] = prach[2*j+1]<<4;
}
for (i=0; i<overflow; i++,j++) {
((int16_t*)ue->common_vars.txdata[0])[2*i] = prach[2*j]<<4;
((int16_t*)ue->common_vars.txdata[0])[2*i+1] = prach[2*j+1]<<4;
}
#if defined(EXMIMO)
// handle switch before 1st TX subframe, guarantee that the slot prior to transmission is switch on
for (k=prach_start - (ue->frame_parms.samples_per_tti>>1) ; k<prach_start ; k++) {
if (k<0)
ue->common_vars.txdata[0][k+ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] &= 0xFFFEFFFE;
else if (k>(ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME))
ue->common_vars.txdata[0][k-ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] &= 0xFFFEFFFE;
else
ue->common_vars.txdata[0][k] &= 0xFFFEFFFE;
}
// handle switch before 1st TX subframe, guarantee that the slot prior to transmission is switch on
for (k=prach_start - (ue->frame_parms.samples_per_tti>>1) ; k<prach_start ; k++) {
if (k<0)
ue->common_vars.txdata[0][k+ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] &= 0xFFFEFFFE;
else if (k>(ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME))
ue->common_vars.txdata[0][k-ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] &= 0xFFFEFFFE;
else
ue->common_vars.txdata[0][k] &= 0xFFFEFFFE;
}
#endif
#else
for (i=0; i<prach_len; i++) {
((int16_t*)(&ue->common_vars.txdata[0][prach_start]))[2*i] = prach[2*i];
((int16_t*)(&ue->common_vars.txdata[0][prach_start]))[2*i+1] = prach[2*i+1];
}
#endif
for (i=0; i<prach_len; i++) {
((int16_t*)(&ue->common_vars.txdata[0][prach_start]))[2*i] = prach[2*i];
((int16_t*)(&ue->common_vars.txdata[0][prach_start]))[2*i+1] = prach[2*i+1];
}
#endif
#if 0
write_output("prach_txF0.m","prachtxF0",prachF,prach_len-Ncp,1,1);
write_output("prach_tx0.m","prachtx0",prach+(Ncp<<1),prach_len-Ncp,1,1);
......@@ -1184,20 +1173,12 @@ void rx_prach(PHY_VARS_eNB *eNB,
// First compute physical root sequence
if (restricted_set == 0) {
if (Ncs_config>15) {
LOG_E(PHY,"FATAL, Illegal Ncs_config for unrestricted format %d\n",Ncs_config);
mac_xface->macphy_exit("PRACH Illegal Ncs_config for unrestricted format");
return; // not reached
}
AssertFatal(Ncs_config<=15,
"Illegal Ncs_config for unrestricted format %d\n",Ncs_config);
NCS = NCS_unrestricted[Ncs_config];
} else {
if (Ncs_config>14) {
LOG_E(PHY,"FATAL, Illegal Ncs_config for restricted format %d\n",Ncs_config);
mac_xface->macphy_exit("PRACH Illegal Ncs_config for restricted format");
return; // not reached
}
AssertFatal(Ncs_config<=14,
"FATAL, Illegal Ncs_config for restricted format %d\n",Ncs_config);
NCS = NCS_restricted[Ncs_config];
}
......@@ -1654,12 +1635,8 @@ void compute_prach_seq(PRACH_CONFIG_COMMON *prach_config_common,
LOG_I(PHY,"compute_prach_seq: NCS_config %d, prach_fmt %d\n",prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig, prach_fmt);
#endif
if (prach_fmt>=4) {
LOG_E( PHY, "PRACH sequence is only precomputed for prach_fmt<4 (have %"PRIu8")\n", prach_fmt );
mac_xface->macphy_exit("PRACH sequence is only precomputed for prach_fmt<4");
return; // not reached
}
AssertFatal(prach_fmt<4,
"PRACH sequence is only precomputed for prach_fmt<4 (have %"PRIu8")\n", prach_fmt );
N_ZC = (prach_fmt < 4) ? 839 : 139;
//init_prach_tables(N_ZC); //moved to phy_init_lte_ue/eNB, since it takes to long in real-time
......@@ -1681,13 +1658,9 @@ void compute_prach_seq(PRACH_CONFIG_COMMON *prach_config_common,
LOG_I(PHY,"Low speed prach : NCS_config %d\n",prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig);
#endif
if (prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig>15) {
LOG_E( PHY, "FATAL, Illegal Ncs_config for unrestricted format %"PRIu8"\n", prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig );
mac_xface->macphy_exit("PRACH Illegal Ncs_config for unrestricted format");
return; // not reached
} else {
NCS = NCS_unrestricted[prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig];
}
AssertFatal(prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig<=15,
"FATAL, Illegal Ncs_config for unrestricted format %"PRIu8"\n", prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig );
NCS = NCS_unrestricted[prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig];
num_preambles = (NCS==0) ? 64 : ((64*NCS)/N_ZC);
......@@ -1700,14 +1673,10 @@ void compute_prach_seq(PRACH_CONFIG_COMMON *prach_config_common,
LOG_I( PHY, "high speed prach : NCS_config %"PRIu8"\n", prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig );
#endif
if (prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig>14) {
LOG_E( PHY, "FATAL, Illegal Ncs_config for restricted format %"PRIu8"\n", prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig );
mac_xface->macphy_exit("PRACH Illegal Ncs_config for restricted format");
return; // not reached
} else {
NCS = NCS_restricted[prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig];
fill_du(prach_fmt);
}
AssertFatal(prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig<=14,
"FATAL, Illegal Ncs_config for restricted format %"PRIu8"\n", prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig );
NCS = NCS_restricted[prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig];
fill_du(prach_fmt);
num_preambles = 64; // compute ZC sequence for 64 possible roots
// find first non-zero shift root (stored in preamble_offset)
......
......@@ -33,6 +33,7 @@
#define __LTE_TRANSPORT_PROTO__H__
#include "PHY/defs.h"
#include <math.h>
#include "nfapi_interface.h"
// Functions below implement 36-211 and 36-212
......@@ -1402,8 +1403,7 @@ void dci_encoding(uint8_t *a,
uint16_t rnti);
/*! \brief Top-level DCI entry point. This routine codes an set of DCI PDUs and performs PDCCH modulation, interleaving and mapping.
\param num_ue_spec_dci Number of UE specific DCI pdus to encode
\param num_common_dci Number of Common DCI pdus to encode
\param num_dci Number of DCI pdus to encode
\param dci_alloc Allocation vectors for each DCI pdu
\param n_rnti n_RNTI (see )
\param amp Amplitude of QPSK symbols
......@@ -1412,8 +1412,7 @@ void dci_encoding(uint8_t *a,
\param sub_frame_offset subframe offset in frame
@returns Number of PDCCH symbols
*/
uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
uint8_t num_common_dci,
uint8_t generate_dci_top(uint8_t num_dci,
DCI_ALLOC_t *dci_alloc,
uint32_t n_rnti,
int16_t amp,
......@@ -1655,6 +1654,17 @@ int generate_ue_dlsch_params_from_dci(int frame,
uint8_t beamforming_mode,
uint16_t tc_rnti);
int fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc,
DCI_ALLOC_t *dci_alloc,
nfapi_dl_config_dci_dl_pdu *pdu);
int fill_dci_and_ulsch(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc,
DCI_ALLOC_t *dci_alloc,
nfapi_hi_dci0_dci_pdu *pdu);
int32_t generate_eNB_dlsch_params_from_dci(int frame,
uint8_t subframe,
void *dci_pdu,
......@@ -1959,6 +1969,7 @@ void pdcch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
int mbsfn_flag,
LTE_eNB_DLSCH_t *dlsch,
int hard_pid,
int G,
uint8_t q,
uint8_t Ns);
......@@ -2076,7 +2087,7 @@ void rx_prach(PHY_VARS_eNB *phy_vars_eNB,RU_t *ru,uint16_t *preamble_energy_list
@param frame_parms Pointer to LTE_DL_FRAME_PARMS structure
@returns 0-5 depending on number of available prach
*/
uint8_t get_num_prach_tdd(LTE_DL_FRAME_PARMS *frame_parms);
uint8_t get_num_prach_tdd(module_id_t Mod_id);
/*!
\brief Return the PRACH format as a function of the Configuration Index and Frame type.
......@@ -2091,7 +2102,7 @@ uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type);
@param frame_parms Pointer to LTE_DL_FRAME_PARMS structure
@returns 0-5 depending on number of available prach
*/
uint8_t get_fid_prach_tdd(LTE_DL_FRAME_PARMS *frame_parms,uint8_t tdd_map_index);
uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index);
/*!
\brief Comp ute DFT of PRACH ZC sequences. Used for generation of prach in UE and reception of PRACH in eNB.
......@@ -2161,5 +2172,10 @@ uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms, uint8_t tdd_mapind
uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t n);
int8_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type);
int8_t find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type);
/**@}*/
#endif
......@@ -314,10 +314,10 @@ int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *ue,
// initialize power control based on PRACH power
ulsch->f_pusch = delta_PUSCH_msg2[ulsch->harq_processes[harq_pid]->TPC] +
mac_xface->get_deltaP_rampup(ue->Mod_id,ue->CC_id);
get_deltaP_rampup(ue->Mod_id,ue->CC_id);
LOG_D(PHY,"[UE %d][PUSCH PC] Initializing f_pusch to %d dB, TPC %d (delta_PUSCH_msg2 %d dB), deltaP_rampup %d dB\n",
ue->Mod_id,ulsch->f_pusch,ulsch->harq_processes[harq_pid]->TPC,delta_PUSCH_msg2[ulsch->harq_processes[harq_pid]->TPC],
mac_xface->get_deltaP_rampup(ue->Mod_id,ue->CC_id));
get_deltaP_rampup(ue->Mod_id,ue->CC_id));
//#ifdef DEBUG_RAR
......
......@@ -954,21 +954,18 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
sumKr += Kr;
}
if (sumKr==0) {
LOG_N(PHY,"[eNB %d] ulsch_decoding.c: FATAL sumKr is 0!\n",eNB->Mod_id);
LOG_D(PHY,"ulsch_decoding (Nid_cell %d, rnti %x, x2 %x): harq_pid %d round %d, RV %d, mcs %d, O_RI %d, O_ACK %d, G %d, subframe %d\n",
frame_parms->Nid_cell,ulsch->rnti,x2,
harq_pid,
ulsch_harq->round,
ulsch_harq->rvidx,
ulsch_harq->mcs,
ulsch_harq->O_RI,
ulsch_harq->O_ACK,
G,
subframe);
mac_xface->macphy_exit("ulsch_decoding.c: FATAL sumKr is 0!");
return(-1);
}
AssertFatal(sumKr>0,
"[eNB %d] ulsch_decoding.c: FATAL sumKr is 0! (Nid_cell %d, rnti %x, x2 %x): harq_pid %d round %d, RV %d, mcs %d, O_RI %d, O_ACK %d, G %d, subframe %d\n",
frame_parms->Nid_cell,ulsch->rnti,x2,
harq_pid,
ulsch_harq->round,
ulsch_harq->rvidx,
ulsch_harq->mcs,
ulsch_harq->O_RI,
ulsch_harq->O_ACK,
G,
subframe);
// Compute Q_ri
Qprime = ulsch_harq->O_RI*ulsch_harq->Msc_initial*ulsch_harq->Nsymb_initial * ulsch->beta_offset_ri_times8;
......
......@@ -57,6 +57,8 @@
#include "common_lib.h"
#include "msc.h"
#include "openair2/PHY_INTERFACE/IF_Module.h"
//#include <complex.h>
#include "assertions.h"
#ifdef MEX
......@@ -270,6 +272,7 @@ typedef struct {
struct PHY_VARS_eNB_s *eNB;
LTE_eNB_DLSCH_t *dlsch;
int G;
int harq_pid;
} te_params;
typedef struct RU_proc_t_s {
......@@ -805,6 +808,10 @@ typedef struct PHY_VARS_eNB_s {
int abstraction_flag;
int num_RU;
RU_t *RU_list[MAX_NUM_RU_PER_eNB];
/// Ethernet parameters for northbound midhaul interface
eth_params_t eth_params_n;
/// Ethernet parameters for fronthaul interface
eth_params_t eth_params;
int rx_total_gain_dB;
// void (*do_prach)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame, int subframe);
int (*td)(struct PHY_VARS_eNB_s *eNB,int UE_id,int harq_pid,int llr8_flag);
......@@ -817,7 +824,11 @@ typedef struct PHY_VARS_eNB_s {
// void (*fh_asynch)(struct PHY_VARS_eNB_s *eNB,int *frame, int *subframe);
uint8_t local_flag;
LTE_DL_FRAME_PARMS frame_parms;
PHY_MEASUREMENTS_eNB measurements;
PHY_MEASUREMENTS_eNB measurements;
IF_Module_t *if_inst;
UL_IND_t UL_INFO;
Sched_Rsp_t Sched_INFO;
LTE_eNB_PDCCH pdcch_vars[2];
LTE_eNB_COMMON common_vars;
LTE_eNB_SRS srs_vars[NUMBER_OF_UE_MAX];
LTE_eNB_PBCH pbch;
......@@ -825,7 +836,7 @@ typedef struct PHY_VARS_eNB_s {
LTE_eNB_PRACH prach_vars;
LTE_eNB_DLSCH_t *dlsch[NUMBER_OF_UE_MAX][2]; // Nusers times two spatial streams
LTE_eNB_ULSCH_t *ulsch[NUMBER_OF_UE_MAX+1]; // Nusers + number of RA
LTE_eNB_DLSCH_t *dlsch_SI,*dlsch_ra;
LTE_eNB_DLSCH_t *dlsch_SI,*dlsch_ra,*dlsch_p;
LTE_eNB_DLSCH_t *dlsch_MCH;
LTE_eNB_UE_stats UE_stats[NUMBER_OF_UE_MAX];
LTE_eNB_UE_stats *UE_stats_ptr[NUMBER_OF_UE_MAX];
......@@ -844,6 +855,7 @@ typedef struct PHY_VARS_eNB_s {
uint32_t X_u[64][839];
uint8_t pbch_configured;
uint8_t pbch_pdu[4]; //PBCH_PDU_SIZE
char eNB_generate_rar;
......@@ -876,10 +888,6 @@ typedef struct PHY_VARS_eNB_s {
/// if ==0 enables phy only test mode
int mac_enabled;
/// For emulation only (used by UE abstraction to retrieve DCI)
uint8_t num_common_dci[2]; // num_dci in even/odd subframes
uint8_t num_ue_spec_dci[2]; // num_dci in even/odd subframes
DCI_ALLOC_t dci_alloc[2][NUM_DCI_MAX]; // dci_alloc from even/odd subframes
// PDSCH Varaibles
......
......@@ -23,7 +23,6 @@
#define __PHY_EXTERN_H__
#include "PHY/defs.h"
#include "PHY_INTERFACE/defs.h"
#include "common/ran_context.h"
extern char* namepointer_chMag ;
......@@ -53,9 +52,6 @@ extern PHY_VARS_UE * PHY_vars_UE_g[MAX_UE][MAX_NUM_CCs];
extern PHY_VARS_eNB * PHY_vars_eNB_g[MAX_eNB][MAX_NUM_CCs];
#endif
extern MAC_xface *mac_xface;
extern short primary_synch0[144];
extern short primary_synch1[144];
extern short primary_synch2[144];
......
......@@ -36,6 +36,7 @@
#include "types.h"
//#include "defs.h"
#include "openair2/COMMON/platform_types.h"
#define LTE_NUMBER_OF_SUBFRAMES_PER_FRAME 10
#define LTE_SLOTS_PER_FRAME 20
......@@ -658,6 +659,59 @@ typedef struct {
int32_t **tdd_calib_coeffs;
} RU_COMMON;
typedef enum {format0,
format1,
format1A,
format1B,
format1C,
format1D,
format1E_2A_M10PRB,
format2,
format2A,
format2B,
format2C,
format2D,
format3,
format3A,
format4
} DCI_format_t;
typedef struct {
/// Length of DCI in bits
uint8_t dci_length;
/// Aggregation level
uint8_t L;
/// Position of first CCE of the dci
int firstCCE;
/// flag to indicate that this is a RA response
boolean_t ra_flag;
/// rnti
rnti_t rnti;
/// harq_pid
rnti_t harq_pid;
/// Format
DCI_format_t format;
/// DCI pdu
uint8_t dci_pdu[8];
} DCI_ALLOC_t;
typedef struct {
uint8_t num_dci;
uint8_t num_pdcch_symbols;
DCI_ALLOC_t dci_alloc[32];
} LTE_eNB_PDCCH;
/*
typedef struct {
} LTE_eNB_ePDCCH;
typedef struct {
} LTE_eNB_MPDCCH;
*/
typedef struct {
/// \brief Hold the channel estimates in frequency domain based on SRS.
/// - first index: rx antenna id [0..nb_antennas_rx[
......
......@@ -29,7 +29,7 @@
#define __openair_SCHED_H__
#include "PHY/defs.h"
#include "PHY_INTERFACE/defs.h"
enum THREAD_INDEX { OPENAIR_THREAD_INDEX = 0,
TOP_LEVEL_SCHEDULER_THREAD_INDEX,
......@@ -373,9 +373,11 @@ uint32_t pdcch_alloc2ul_frame(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, ui
uint16_t get_Np(uint8_t N_RB_DL,uint8_t nCCE,uint8_t plus1);
int8_t find_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
int mac_phy_remove_ue(module_id_t Mod_idP,rnti_t rnti);
int8_t find_ue_dlsch(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
int8_t find_ue_ulsch(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
//int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
//int mac_phy_remove_ue(module_id_t Mod_idP,rnti_t rnti);
void process_timing_advance(module_id_t Mod_id,uint8_t CC_id,int16_t timing_advance);
void process_timing_advance_rar(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint16_t timing_advance);
......@@ -480,17 +482,8 @@ void get_cqipmiri_params(PHY_VARS_UE *ue,uint8_t eNB_id);
int8_t get_PHR(uint8_t Mod_id, uint8_t CC_id, uint8_t eNB_index);
#ifdef LOCALIZATION
/*! \brief This function collects eNB_UE stats and aggregate them in lists for localization
@param phy_vars_ue PHY variables
@param UE_id Index of UE
@param frame Index of frame
@param subframe Index of subframe
@param UE_tx_power_dB estimated UE Tx power
@returns -1 if updated list, 0 if calculated median
*/
double aggregate_eNB_UE_localization_stats(PHY_VARS_eNB *phy_vars_eNB, int8_t UE_id, frame_t frameP, sub_frame_t subframeP, int32_t UE_tx_power_dB);
#endif
void schedule_response(Sched_Rsp_t *Sched_INFO);
LTE_eNB_UE_stats* get_UE_stats(uint8_t Mod_id, uint8_t CC_id,uint16_t rnti);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -98,7 +98,7 @@ int16_t get_hundred_times_delta_IF_mac(module_id_t module_idP, uint8_t CC_id, rn
return -1;
}
UE_id = find_ue( rnti, RC.eNB[module_idP][CC_id] );
UE_id = find_ulsch( rnti, RC.eNB[module_idP][CC_id],SEARCH_EXIST);
if (UE_id == -1) {
// not found
......@@ -161,11 +161,11 @@ void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_
if(ue->ulsch_Msg3_active[eNB_id] == 1) { // Msg3 PUSCH
ue->ulsch[eNB_id]->Po_PUSCH += (mac_xface->get_Po_NOMINAL_PUSCH(ue->Mod_id,0) + PL);
ue->ulsch[eNB_id]->Po_PUSCH += (get_Po_NOMINAL_PUSCH(ue->Mod_id,0) + PL);
LOG_I(PHY,"[UE %d][RAPROC] frame %d, subframe %d: Msg3 Po_PUSCH %d dBm (%d,%d,100*PL=%d,%d,%d)\n",
ue->Mod_id,proc->frame_tx,proc->subframe_tx,ue->ulsch[eNB_id]->Po_PUSCH,
100*mac_xface->get_Po_NOMINAL_PUSCH(ue->Mod_id,0),
100*get_Po_NOMINAL_PUSCH(ue->Mod_id,0),
hundred_times_log10_NPRB[nb_rb-1],
100*PL,
get_hundred_times_delta_IF(ue,eNB_id,harq_pid),
......
......@@ -92,13 +92,6 @@ result could be based on an event-driven measurement report.
#define RRC_RACH_ASS_REQ 0
#define MAC_RACH_BW_REQ 1
typedef enum {
RRC_OK=0,
RRC_ConnSetup_failed,
RRC_PHY_RESYNCH,
RRC_Handover_failed,
RRC_HO_STARTED
} RRC_status_t;
/*! MAC/PHY Measurement Structure*/
......@@ -225,17 +218,7 @@ typedef struct {
/*! \brief MAC Logical Channel Descriptor
*/
typedef struct {
unsigned short transport_block_size; /*!< \brief Minimum PDU size in bytes provided by RLC to MAC layer interface */
unsigned short max_transport_blocks; /*!< \brief Maximum PDU size in bytes provided by RLC to MAC layer interface */
unsigned long Guaranteed_bit_rate; /*!< \brief Guaranteed Bit Rate (average) to be offered by MAC layer scheduling*/
unsigned long Max_bit_rate; /*!< \brief Maximum Bit Rate that can be offered by MAC layer scheduling*/
uint8_t Delay_class; /*!< \brief Delay class offered by MAC layer scheduling*/
uint8_t Target_bler; /*!< \brief Target Average Transport Block Error rate*/
uint8_t Lchan_t; /*!< \brief Logical Channel Type (BCCH,CCCH,DCCH,DTCH_B,DTCH,MRBCH)*/
} __attribute__ ((__packed__)) LCHAN_DESC;
#define LCHAN_DESC_SIZE sizeof(LCHAN_DESC)
/*!\brief This primitive indicates to RRC that a particular logical channel has been established and that successful transmission has
been received. The parameter passed is the logical channel id.
......
......@@ -100,6 +100,7 @@ typedef struct RrcConfigurationReq_s {
uint8_t tdd_config[MAX_NUM_CCs];
uint8_t tdd_config_s[MAX_NUM_CCs];
lte_prefix_type_t prefix_type[MAX_NUM_CCs];
uint8_t pbch_repetition[MAX_NUM_CCs];
int16_t eutra_band[MAX_NUM_CCs];
uint32_t downlink_frequency[MAX_NUM_CCs];
int32_t uplink_frequency_offset[MAX_NUM_CCs];
......
......@@ -303,16 +303,22 @@ void *eNB_app_task(void *args_p)
long enb_register_retry_timer_id;
# endif
uint32_t enb_id;
MessageDef *msg_p = NULL;
const char *msg_name = NULL;
MessageDef *msg_p = NULL;
const char *msg_name = NULL;
instance_t instance;
int result;
int j;
/* for no gcc warnings */
(void)instance;
itti_mark_task_ready (TASK_ENB_APP);
RCconfig_L1();
RCconfig_macrlc();
if (RC.nb_L1_inst>0) AssertFatal(l1_north_init_eNB()==0,"could not initialize L1 north interface\n");
# if defined(ENABLE_ITTI)
# if defined(OAI_EMU)
enb_nb = oai_emulation.info.nb_enb_local;
......@@ -337,10 +343,10 @@ void *eNB_app_task(void *args_p)
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
// configure_phy(enb_id);//
RC.rrc[enb_id] = (eNB_RRC_INST*)malloc(sizeof(eNB_RRC_INST));
configure_rrc(enb_id);//
}
#if defined (FLEXRAN_AGENT_SB_IF)
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
......@@ -348,6 +354,8 @@ void *eNB_app_task(void *args_p)
flexran_agent_start(enb_id, enb_properties_p);
}
#endif
# if defined(ENABLE_USE_MME)
/* Try to register each eNB */
......
This diff is collapsed.
This diff is collapsed.
......@@ -52,7 +52,6 @@
#include "PHY/defs.h"
#include "PHY/LTE_TRANSPORT/defs.h"
#include "COMMON/platform_constants.h"
#include "COMMON/mac_rrc_primitives.h"
#include "BCCH-BCH-Message.h"
#include "RadioResourceConfigCommon.h"
#include "RadioResourceConfigDedicated.h"
......@@ -68,9 +67,8 @@
#include "SCellToAddMod-r10.h"
#endif
//#ifdef PHY_EMUL
//#include "SIMULATION/PHY_EMULATION/impl_defs.h"
//#endif
#include "nfapi_interface.h"
#include "PHY_INTERFACE/IF_Module.h"
/** @defgroup _mac MAC
* @ingroup _oai2
......@@ -80,6 +78,7 @@
#define BCCH_PAYLOAD_SIZE_MAX 128
#define CCCH_PAYLOAD_SIZE_MAX 128
#define PCCH_PAYLOAD_SIZE_MAX 128
#define RAR_PAYLOAD_SIZE_MAX 128
#define SCH_PAYLOAD_SIZE_MAX 4096
/// Logical channel ids from 36-311 (Note BCCH is not specified in 36-311, uses the same as first DRB)
......@@ -259,14 +258,10 @@ typedef struct {
uint8_t R:2;
} __attribute__((__packed__))POWER_HEADROOM_CMD;
/*!\brief DCI PDU filled by MAC for the PHY */
/*! \brief MIB payload */
typedef struct {
uint8_t Num_ue_spec_dci ;
uint8_t Num_common_dci ;
// uint32_t nCCE;
uint32_t num_pdcch_symbols;
DCI_ALLOC_t dci_alloc[NUM_DCI_MAX] ;
} DCI_PDU;
uint8_t payload[3] ;
} __attribute__((__packed__))MIB_PDU;
/*! \brief CCCH payload */
typedef struct {
uint8_t payload[CCCH_PAYLOAD_SIZE_MAX] ;
......@@ -275,6 +270,10 @@ typedef struct {
typedef struct {
uint8_t payload[BCCH_PAYLOAD_SIZE_MAX] ;
} __attribute__((__packed__))BCCH_PDU;
/*! \brief RAR payload */
typedef struct {
uint8_t payload[RAR_PAYLOAD_SIZE_MAX];
} __attribute__ ((__packed__)) RAR_PDU;
/*! \brief BCCH payload */
typedef struct {
uint8_t payload[PCCH_PAYLOAD_SIZE_MAX] ;
......@@ -305,10 +304,12 @@ typedef struct {
#endif
/*! \brief Values of CCCH LCID for DLSCH */
#define CCCH_LCHANID 0
/*!\brief Values of BCCH logical channel */
/*!\brief Values of BCCH logical channel (fake)*/
#define BCCH 3 // SI
/*!\brief Values of PCCH logical channel */
/*!\brief Values of PCCH logical channel (fake)*/
#define PCCH 4 // Paging
/*!\brief Values of PCCH logical channel (fake) */
#define MIBCH 5 // MIB
/*!\brief Value of CCCH / SRB0 logical channel */
#define CCCH 0 // srb0
/*!\brief DCCH / SRB1 logical channel */
......@@ -363,10 +364,11 @@ typedef struct {
/*! \brief Downlink SCH PDU Structure */
typedef struct {
int8_t payload[8][SCH_PAYLOAD_SIZE_MAX];
uint8_t payload[8][SCH_PAYLOAD_SIZE_MAX];
uint16_t Pdu_size[8];
} __attribute__ ((__packed__)) DLSCH_PDU;
/*! \brief MCH PDU Structure */
typedef struct {
int8_t payload[SCH_PAYLOAD_SIZE_MAX];
......@@ -562,6 +564,12 @@ typedef struct {
/// RX
/// PUCCH1a/b power (dBm)
int32_t Po_PUCCH_dBm;
/// Indicator that Po_PUCCH has been updated by PHY
int32_t Po_PUCCH_update;
/// Uplink measured RSSI
int32_t UL_rssi;
/// preassigned mcs after rate adaptation
uint8_t ulsch_mcs1;
/// adjusted mcs
......@@ -626,6 +634,10 @@ typedef struct {
rnti_t rnti;
/// NDI from last scheduling
uint8_t oldNDI[8];
/// mcs1 from last scheduling
uint8_t oldmcs1[8];
/// mcs2 from last scheduling
uint8_t oldmcs2[8];
/// NDI from last UL scheduling
uint8_t oldNDI_UL[8];
/// Flag to indicate UL has been scheduled at least once
......@@ -641,26 +653,18 @@ typedef struct {
// PHY interface info
/// DCI format for DLSCH
uint16_t DLSCH_dci_fmt;
/// Current Aggregation Level for DCI
uint8_t DCI_aggregation_min;
/// size of DLSCH size in bit
uint8_t DLSCH_dci_size_bits;
/// DCI buffer for DLSCH
/* rounded to 32 bits unit (actual value should be 8 due to the logic
* of the function generate_dci0) */
uint8_t DLSCH_DCI[8][(((MAX_DCI_SIZE_BITS)+31)>>5)*4];
/// Number of Allocated RBs for DL after scheduling (prior to frequency allocation)
uint16_t nb_rb[8]; // num_max_harq
/// Number of Allocated RBs for UL after scheduling (prior to frequency allocation)
/// Number of Allocated RBs for UL after scheduling
uint16_t nb_rb_ul[8]; // num_max_harq
/// Number of Allocated RBs for UL after scheduling
uint16_t first_rb_ul[8]; // num_max_harq
/// Cyclic shift for DMRS after scheduling
uint16_t cshift[8]; // num_max_harq
/// Number of Allocated RBs by the ulsch preprocessor
uint8_t pre_allocated_nb_rb_ul;
......@@ -676,11 +680,6 @@ typedef struct {
/// assigned MCS by the ulsch scheduler
uint8_t assigned_mcs_ul;
/// DCI buffer for ULSCH
/* rounded to 32 bits unit (actual value should be 8 due to the logic
* of the function generate_dci0) */
uint8_t ULSCH_DCI[8][(((MAX_DCI_SIZE_BITS)+31)>>5)*4];
/// DL DAI
uint8_t DAI;
......@@ -777,6 +776,7 @@ typedef struct {
// resource scheduling information
uint8_t harq_pid[MAX_NUM_CCs];
uint8_t round[MAX_NUM_CCs];
uint8_t round_UL[MAX_NUM_CCs];
uint8_t dl_pow_off[MAX_NUM_CCs];
uint16_t pre_nb_available_rbs[MAX_NUM_CCs];
unsigned char rballoc_sub_UE[MAX_NUM_CCs][N_RBG_MAX];
......@@ -846,6 +846,7 @@ typedef struct {
} SBMAP_CONF;
/*! \brief UE list used by eNB to order UEs/CC for scheduling*/
typedef struct {
/// Dedicated information for UEs
struct PhysicalConfigDedicated *physicalConfigDedicated[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
/// DLSCH pdu
DLSCH_PDU DLSCH_pdu[MAX_NUM_CCs][2][NUMBER_OF_UE_MAX];
......@@ -867,7 +868,6 @@ typedef struct {
eNB_UE_STATS eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
/// scheduling control info
UE_sched_ctrl UE_sched_ctrl[NUMBER_OF_UE_MAX];
int next[NUMBER_OF_UE_MAX];
int head;
int next_ul[NUMBER_OF_UE_MAX];
......@@ -886,19 +886,23 @@ typedef struct {
uint32_t dl_CarrierFreq;
BCCH_BCH_Message_t *mib;
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR;
TDD_Config_t *tdd_Config;
uint8_t SIwindowsize;
uint16_t SIperiod;
ARFCN_ValueEUTRA_t ul_CarrierFreq;
long ul_Bandwidth;
/// Outgoing DCI for PHY generated by eNB scheduler
DCI_PDU DCI_pdu;
/// Outgoing MIB PDU for PHY
MIB_PDU MIB_pdu;
/// Outgoing BCCH pdu for PHY
BCCH_PDU BCCH_pdu;
/// Outgoing BCCH DCI allocation
uint32_t BCCH_alloc_pdu;
/// Outgoing CCCH pdu for PHY
CCCH_PDU CCCH_pdu;
/// Outgoing RAR pdu for PHY
RAR_PDU RAR_pdu;
/// Template for RA computations
RA_TEMPLATE RA_template[NB_RA_PROC_MAX];
/// VRB map for common channels
uint8_t vrb_map[100];
......@@ -928,25 +932,44 @@ typedef struct {
/// Outgoing MCH pdu for PHY
MCH_PDU MCH_pdu;
#endif
#ifdef CBA
/// number of CBA groups
uint8_t num_active_cba_groups;
/// RNTI for each CBA group
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
/// MCS for each CBA group
uint8_t group_mcs[NUM_MAX_CBA_GROUP];
#endif
} COMMON_channels_t;
/*! \brief top level eNB MAC structure */
typedef struct eNB_MAC_INST_s {
/// Ethernet parameters for northbound midhaul interface
eth_params_t eth_params_n;
/// Ethernet parameters for fronthaul interface
eth_params_t eth_params_s;
///
uint16_t Node_id;
/// frame counter
frame_t frame;
/// subframe counter
sub_frame_t subframe;
/// Pointer to IF module instance for PHY
IF_Module_t *if_inst;
/// Common cell resources
COMMON_channels_t common_channels[MAX_NUM_CCs];
/// current PDU index (BCH,MCH,DLSCH)
int pdu_index[MAX_NUM_CCs];
/// NFAPI Config Request Structure
nfapi_config_request_t config[MAX_NUM_CCs];
/// Preallocated DL pdu list
nfapi_dl_config_request_pdu_t dl_config_pdu_list[MAX_NUM_CCs][MAX_NUM_DL_PDU];
/// NFAPI DL Config Request Structure
nfapi_dl_config_request_body_t DL_req[MAX_NUM_CCs];
/// Preallocated UL pdu list
nfapi_ul_config_request_pdu_t ul_config_pdu_list[MAX_NUM_CCs][MAX_NUM_UL_PDU];
/// NFAPI UL Config Request Structure
nfapi_ul_config_request_body_t UL_req[MAX_NUM_CCs];
/// Preallocated HI_DCI0 pdu list
nfapi_hi_dci0_request_pdu_t hi_dci0_pdu_list[MAX_NUM_CCs][MAX_NUM_HI_DCI0_PDU];
/// NFAPI HI/DCI0 Config Request Structure
nfapi_hi_dci0_request_body_t HI_DCI0_req[MAX_NUM_CCs];
/// Prealocated TX pdu list
nfapi_tx_request_pdu_t tx_request_pdu[MAX_NUM_CCs][MAX_NUM_TX_REQUEST_PDU];
/// NFAPI DL PDU structure
nfapi_tx_request_body_t TX_req[MAX_NUM_CCs];
UE_list_t UE_list;
......@@ -1095,8 +1118,10 @@ typedef struct {
UE_SCHEDULING_INFO scheduling_info;
/// Outgoing CCCH pdu for PHY
CCCH_PDU CCCH_pdu;
/// Outgoing RAR pdu for PHY
RAR_PDU RAR_pdu;
/// Incoming DLSCH pdu for PHY
//DLSCH_PDU DLSCH_pdu[NUMBER_OF_UE_MAX][2];
DLSCH_PDU DLSCH_pdu[NUMBER_OF_UE_MAX][2];
/// number of attempt for rach
uint8_t RA_attempt_number;
/// Random-access procedure flag
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -468,7 +468,7 @@ int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_fra
}
}
TBS = mac_xface->get_TBS_DL(cc->MCH_pdu.mcs, to_prb(cc->mib->message.dl_Bandwidth));
TBS = get_TBS_DL(cc->MCH_pdu.mcs, to_prb(cc->mib->message.dl_Bandwidth));
#if defined(Rel10) || defined(Rel14)
// do not let mcch and mtch multiplexing when relaying is active
// for sync area 1, so not transmit data
......
This diff is collapsed.
......@@ -38,11 +38,7 @@
#endif //USER_MODE
#include "PHY/defs.h"
#include "defs.h"
#include "COMMON/mac_rrc_primitives.h"
#ifdef PHY_EMUL
//#include "SIMULATION/simulation_defs.h"
#endif //PHY_EMUL
#include "PHY_INTERFACE/defs.h"
#include "RRC/LITE/defs.h"
extern const uint32_t BSR_TABLE[BSR_TABLE_SIZE];
......@@ -58,7 +54,6 @@ extern const uint8_t cqi2fmt2x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE];
extern UE_RRC_INST *UE_rrc_inst;
extern UE_MAC_INST *UE_mac_inst;
extern MAC_RLC_XFACE *Mac_rlc_xface;
extern uint8_t Is_rrc_registered;
extern eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
......@@ -66,13 +61,8 @@ extern eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_U
//#ifndef USER_MODE
extern MAC_xface *mac_xface;
extern RRC_XFACE *Rrc_xface;
extern uint8_t Is_rrc_registered;
#ifndef PHY_EMUL
#ifndef PHYSIM
#define NB_INST 1
#else
......@@ -82,10 +72,6 @@ extern unsigned char NB_eNB_INST;
extern unsigned char NB_UE_INST;
extern unsigned char NB_RN_INST;
extern unsigned short NODE_ID[1];
extern void* bigphys_malloc(int);
#else
extern EMULATION_VARS *Emul_vars;
#endif //PHY_EMUL
extern int cqi_to_mcs[16];
......
......@@ -38,20 +38,12 @@ int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP,uint8_t CC_id)
{
RACH_ConfigCommon_t *rach_ConfigCommon = NULL;
if (CC_id>0) {
LOG_E(MAC,"Transmission on secondary CCs is not supported yet\n");
//mac_xface->macphy_exit("MAC FATAL CC_id>0");
return 0;
}
AssertFatal(CC_id==0,
"Transmission on secondary CCs is not supported yet\n");
AssertFatal(UE_mac_inst[module_idP].radioResourceConfigCommon!=NULL,
"[UE %d] CCid %d FATAL radioResourceConfigCommon is NULL !!!\n",module_idP,CC_id);
if (UE_mac_inst[module_idP].radioResourceConfigCommon) {
rach_ConfigCommon = &UE_mac_inst[module_idP].radioResourceConfigCommon->rach_ConfigCommon;
}
else {
LOG_E(MAC,"[UE %d] CCid %d FATAL radioResourceConfigCommon is NULL !!!\n",module_idP,CC_id);
//mac_xface->macphy_exit("FATAL radioResourceConfigCommon is NULL");
return 0;
}
rach_ConfigCommon = &UE_mac_inst[module_idP].radioResourceConfigCommon->rach_ConfigCommon;
return(-120 + (rach_ConfigCommon->powerRampingParameters.preambleInitialReceivedTargetPower<<1) +
get_DELTA_PREAMBLE(module_idP,CC_id));
......@@ -60,11 +52,8 @@ int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP,uint8_t CC_id)
int8_t get_deltaP_rampup(module_id_t module_idP,uint8_t CC_id)
{
if (CC_id>0) {
LOG_E(MAC,"Transmission on secondary CCs is not supported yet\n");
mac_xface->macphy_exit("MAC FATAL CC_id>0");
return 0; // not reached
}
AssertFatal(CC_id==0,
"Transmission on secondary CCs is not supported yet\n");
LOG_D(MAC,"[PUSCH]%d dB\n",UE_mac_inst[module_idP].RA_PREAMBLE_TRANSMISSION_COUNTER<<1);
return((int8_t)(UE_mac_inst[module_idP].RA_PREAMBLE_TRANSMISSION_COUNTER<<1));
......
This diff is collapsed.
This diff is collapsed.
......@@ -33,13 +33,6 @@
* @{
*/
/** \fn void add_ue_spec_dci(DCI_PDU *DCI_pdu,void *pdu,rnti_t rnti,unsigned char dci_size_bytes,unsigned char aggregation,unsigned char dci_size_bits,unsigned char dci_fmt,uint8_t ra_flag);
\brief
*/
void add_ue_spec_dci(DCI_PDU *DCI_pdu,void *pdu,rnti_t rnti,unsigned char dci_size_bytes,unsigned char aggregation,unsigned char dci_size_bits,unsigned char dci_fmt,uint8_t ra_flag);
//LG commented cause compilation error for RT eNB extern inline unsigned int taus(void);
/** \fn void schedule_RA(module_id_t module_idP,frame_t frameP,sub_frame_t subframe,uint8_t Msg3_subframe,unsigned int *nprb);
\brief First stage of Random-Access Scheduling. Loops over the RA_templates and checks if RAR, Msg3 or its retransmission are to be scheduled in the subframe. It returns the total number of PRB used for RA SDUs. For Msg3 it retrieves the L3msg from RRC and fills the appropriate buffers. For the others it just computes the number of PRBs. Each DCI uses 3 PRBs (format 1A)
......@@ -142,11 +135,9 @@ int8_t get_DELTA_PREAMBLE(module_id_t module_idP,int CC_id);
*/
int8_t get_deltaP_rampup(module_id_t module_idP,uint8_t CC_id);
//main.c
void chbch_phy_sync_success(module_id_t module_idP,frame_t frameP,uint8_t eNB_index);
uint16_t mac_computeRIV(uint16_t N_RB_DL,uint16_t RBstart,uint16_t Lcrbs);
void mrbch_phy_sync_failure(module_id_t module_idP, frame_t frameP,uint8_t free_eNB_index);
//main.c
int mac_top_init(int eMBMS_active, char *uecap_xer,uint8_t cba_group_active, uint8_t HO_active);
......@@ -201,8 +192,7 @@ void dlsch_scheduler_pre_processor_allocate (module_id_t Mod_id,
unsigned char MIMO_mode_indicator[MAX_NUM_CCs][N_RBG_MAX]);
/* \brief Function to trigger the eNB scheduling procedure. It is called by PHY at the beginning of each subframe, \f$n$\f
and generates all DLSCH allocations for subframe \f$n\f$ and ULSCH allocations for subframe \f$n+k$\f. The resultant DCI_PDU is
ready after returning from this call.
and generates all DLSCH allocations for subframe \f$n\f$ and ULSCH allocations for subframe \f$n+k$\f.
@param Mod_id Instance ID of eNB
@param cooperation_flag Flag to indicated that this cell has cooperating nodes (i.e. that there are collaborative transport channels that
can be scheduled.
......@@ -211,15 +201,6 @@ can be scheduled.
*/
void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, uint8_t cooperation_flag, frame_t frameP, sub_frame_t subframeP);//, int calibration_flag);
/* \brief Function to retrieve result of scheduling (DCI) in current subframe. Can be called an arbitrary numeber of times after eNB_dlsch_ulsch_scheduler
in a given subframe.
@param Mod_id Instance ID of eNB
@param CC_id Component Carrier Index
@param subframe Index of current subframe
@returns Pointer to generated DCI for subframe
*/
DCI_PDU *get_dci_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframe);
/* \brief Function to indicate a received preamble on PRACH. It initiates the RA procedure.
@param Mod_id Instance ID of eNB
@param preamble_index index of the received RA request
......@@ -687,7 +668,7 @@ int dump_eNB_l2_stats(char *buffer, int length);
double uniform_rngen(int min, int max);
/*
void add_common_dci(DCI_PDU *DCI_pdu,
void *pdu,
rnti_t rnti,
......@@ -696,6 +677,7 @@ void add_common_dci(DCI_PDU *DCI_pdu,
unsigned char dci_size_bits,
unsigned char dci_fmt,
uint8_t ra_flag);
*/
uint32_t allocate_prbs_sub(int nb_rb, int N_RB_DL, int N_RBG, uint8_t *rballoc);
......@@ -734,7 +716,7 @@ unsigned char generate_dlsch_header(unsigned char *mac_header,
@param CC_id Component Carrier of the eNB
@param mib Pointer to MIB
@param radioResourceConfigCommon Structure from SIB2 for common radio parameters (if NULL keep existing configuration)
@param physcialConfigDedicated Structure from RRCConnectionSetup or RRCConnectionReconfiguration for dedicated PHY parameters (if NULL keep existing configuration)
@param physicalConfigDedicated Structure from RRCConnectionSetup or RRCConnectionReconfiguration for dedicated PHY parameters (if NULL keep existing configuration)
@param measObj Structure from RRCConnectionReconfiguration for UE measurement procedures
@param mac_MainConfig Structure from RRCConnectionSetup or RRCConnectionReconfiguration for dedicated MAC parameters (if NULL keep existing configuration)
@param logicalChannelIdentity Logical channel identity index of corresponding logical channel config
......@@ -757,8 +739,14 @@ int rrc_mac_config_req_eNB(module_id_t module_idP,
int Ncp,
int eutra_band,
uint32_t dl_CarrierFreq,
#ifdef Rel14
int pbch_repetition,
#endif
BCCH_BCH_Message_t *mib,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
#ifdef Rel14
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR,
#endif
struct PhysicalConfigDedicated *physicalConfigDedicated,
#if defined(Rel10) || defined(Rel14)
SCellToAddMod_r10_t *sCellToAddMod_r10,
......@@ -847,20 +835,9 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
#endif
);
/** \brief get the estimated UE distance from the PHY->MAC layer.
@param Mod_id Instance ID of eNB
@param UE_id Index of UE if this is an eNB configuration
@param CC_id Component Carrier Index
@param loc_type localization type: time-based or power-based
@return the estimated distance in meters
*/
double
rrc_get_estimated_ue_distance(
const protocol_ctxt_t * const ctxt_pP,
const int CC_idP,
const uint8_t loc_typeP);
uint16_t getRIV(uint16_t N_RB_DL,uint16_t RBstart,uint16_t Lcrbs);
void fill_dci(DCI_PDU *DCI_pdu, PHY_VARS_eNB *phy_vars_eNB,eNB_rxtx_proc_t *proc);
int get_subbandsize(uint8_t dl_bandwidth);
#endif
/** @}*/
This diff is collapsed.
......@@ -99,7 +99,7 @@ unsigned short fill_rar(
RC.mac[module_idP]->common_channels[CC_id].RA_template[ra_idx].timing_offset /= 16; //T_A = N_TA/16, where N_TA should be on a 30.72Msps
rar[0] = (uint8_t)(RC.mac[module_idP]->common_channels[CC_id].RA_template[ra_idx].timing_offset>>(2+4)); // 7 MSBs of timing advance + divide by 4
rar[1] = (uint8_t)(RC.mac[module_idP]->common_channels[CC_id].RA_template[ra_idx].timing_offset<<(4-2))&0xf0; // 4 LSBs of timing advance + divide by 4
rballoc = mac_xface->computeRIV(N_RB_UL,26,1); // first PRB only for UL Grant
rballoc = mac_computeRIV(N_RB_UL,26,1); // first PRB only for UL Grant
rar[1] |= (rballoc>>7)&7; // Hopping = 0 (bit 3), 3 MSBs of rballoc
rar[2] = ((uint8_t)(rballoc&0xff))<<1; // 7 LSBs of rballoc
mcs = 10;
......
This diff is collapsed.
This diff is collapsed.
......@@ -118,13 +118,8 @@ boolean_t pdcp_data_req(
/*
* XXX MAX_IP_PACKET_SIZE is 4096, shouldn't this be MAX SDU size, which is 8188 bytes?
*/
if (sdu_buffer_sizeP > MAX_IP_PACKET_SIZE) {
LOG_E(PDCP, "Requested SDU size (%d) is bigger than that can be handled by PDCP (%u)!\n",
AssertFatal(sdu_buffer_sizeP<= MAX_IP_PACKET_SIZE,"Requested SDU size (%d) is bigger than that can be handled by PDCP (%u)!\n",
sdu_buffer_sizeP, MAX_IP_PACKET_SIZE);
// XXX What does following call do?
mac_xface->macphy_exit("PDCP sdu buffer size > MAX_IP_PACKET_SIZE");
}
if (modeP == PDCP_TRANSMISSION_MODE_TRANSPARENT) {
AssertError (rb_idP < NB_RB_MBMS_MAX, return FALSE, "RB id is too high (%u/%d) %u %u!\n", rb_idP, NB_RB_MBMS_MAX, ctxt_pP->module_id, ctxt_pP->rnti);
......
This diff is collapsed.
......@@ -262,7 +262,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
MSC_AS_TIME_ARGS(ctxt_pP),
((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id,
((pdcp_data_ind_header_t *)(sdu_p->data))->data_size);
mac_xface->macphy_exit("sendmsg failed for nas_sock_fd\n");
AssertFatal(1==0,"sendmsg failed for nas_sock_fd\n");
break;
} else {
MSC_LOG_TX_MESSAGE(
......
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