Fix CMakeLists.txt for lte-softmodem
This commit is contained in:
@@ -967,7 +967,7 @@ add_library(SECU_CN ${SECU_CN_SRC})
|
||||
set(SCHED_SRC
|
||||
${OPENAIR1_DIR}/SCHED/fapi_l1.c
|
||||
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_eNb.c
|
||||
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_ue.c
|
||||
#${OPENAIR1_DIR}/SCHED/phy_procedures_lte_ue.c
|
||||
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c
|
||||
${OPENAIR1_DIR}/SCHED/prach_procedures.c
|
||||
${OPENAIR1_DIR}/SCHED/ru_procedures.c
|
||||
@@ -1066,10 +1066,7 @@ set(PHY_SRC
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots_mbsfn.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_coding.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_modulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_demodulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/power_control.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_decoding.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_scrambling.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/uci_tools.c
|
||||
@@ -1085,10 +1082,7 @@ set(PHY_SRC
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pch.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/group_hopping.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/srs_modulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/drs_modulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_modulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_demodulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_coding.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_decoding.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/rar_tools.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/print_stats.c
|
||||
@@ -1130,7 +1124,6 @@ set(PHY_SRC
|
||||
${OPENAIR1_DIR}/PHY/CODING/viterbi_lte.c
|
||||
${OPENAIR1_DIR}/PHY/INIT/lte_init.c
|
||||
${OPENAIR1_DIR}/PHY/INIT/lte_init_ru.c
|
||||
${OPENAIR1_DIR}/PHY/INIT/lte_init_ue.c
|
||||
${OPENAIR1_DIR}/PHY/INIT/init_top.c
|
||||
${OPENAIR1_DIR}/PHY/INIT/lte_parms.c
|
||||
${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c
|
||||
@@ -1152,41 +1145,49 @@ set(PHY_SRC_UE
|
||||
# depend on code generation from asn1c
|
||||
${RRC_FULL_DIR}/asn1_constants.h
|
||||
# actual source
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pss.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots_mbsfn.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_coding.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_modulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_demodulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/power_control.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_decoding.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_scrambling.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/uci_tools.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_mcs.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pbch.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/edci.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/phich.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pcfich.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pucch.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pch.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/group_hopping.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/srs_modulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/drs_modulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_modulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_demodulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_coding.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_decoding.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/rar_tools.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/print_stats.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/initial_sync.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if4_tools.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if5_tools.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pss.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots_mbsfn.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_coding.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_modulation.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/power_control.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_scrambling.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/uci_tools.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_mcs.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pbch.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/edci.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/phich.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pcfich.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pucch.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pch.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/group_hopping.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/srs_modulation.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_demodulation.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_decoding.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/rar_tools.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/print_stats.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/initial_sync.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if4_tools.c
|
||||
#${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if5_tools.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dci_ue.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/drs_modulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/pbch_ue.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/pcfich_ue.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/pch_ue.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/phich_ue.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/pmch_ue.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/ulsch_coding.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c
|
||||
${OPENAIR1_DIR}/PHY/MODULATION/ofdm_mod.c
|
||||
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep.c
|
||||
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_mbsfn.c
|
||||
@@ -1197,7 +1198,7 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/freq_equalization.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_time.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_timefreq.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync_ue.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
|
||||
@@ -1245,8 +1246,7 @@ if (${SMBV})
|
||||
endif (${SMBV})
|
||||
|
||||
if (${COMPILATION_AVX2} STREQUAL "True")
|
||||
set(PHY_SRC ${PHY_SRC} ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.c)
|
||||
set(PHY_SRC_UE ${PHY_SRC_UE} ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.c)
|
||||
set(PHY_SRC_UE ${PHY_SRC_UE} ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c)
|
||||
endif ()
|
||||
|
||||
add_library(PHY ${PHY_SRC})
|
||||
@@ -1352,12 +1352,12 @@ set(L2_SRC_UE
|
||||
set (MAC_SRC
|
||||
${PHY_INTERFACE_DIR}/IF_Module.c
|
||||
${MAC_DIR}/main.c
|
||||
${MAC_DIR}/main_ue.c
|
||||
${MAC_DIR}/ue_procedures.c
|
||||
${MAC_DIR}/ra_procedures.c
|
||||
#${MAC_DIR}/main_ue.c
|
||||
#${MAC_DIR}/ue_procedures.c
|
||||
#${MAC_DIR}/ra_procedures.c
|
||||
${MAC_DIR}/l1_helpers.c
|
||||
${MAC_DIR}/rar_tools.c
|
||||
${MAC_DIR}/rar_tools_ue.c
|
||||
#${MAC_DIR}/rar_tools_ue.c
|
||||
${MAC_DIR}/eNB_scheduler.c
|
||||
${MAC_DIR}/eNB_scheduler_dlsch.c
|
||||
${MAC_DIR}/eNB_scheduler_ulsch.c
|
||||
@@ -1367,7 +1367,7 @@ set (MAC_SRC
|
||||
${MAC_DIR}/eNB_scheduler_RA.c
|
||||
${MAC_DIR}/pre_processor.c
|
||||
${MAC_DIR}/config.c
|
||||
${MAC_DIR}/config_ue.c
|
||||
#${MAC_DIR}/config_ue.c
|
||||
)
|
||||
|
||||
set (MAC_SRC_UE
|
||||
|
||||
@@ -27,115 +27,6 @@
|
||||
|
||||
#define DEBUG_PHY
|
||||
|
||||
// Adjust location synchronization point to account for drift
|
||||
// The adjustment is performed once per frame based on the
|
||||
// last channel estimate of the receiver
|
||||
|
||||
void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
PHY_VARS_UE *ue,
|
||||
unsigned char eNB_id,
|
||||
uint8_t subframe,
|
||||
unsigned char clear,
|
||||
short coef)
|
||||
{
|
||||
|
||||
static int max_pos_fil = 0;
|
||||
static int count_max_pos_ok = 0;
|
||||
static int first_time = 1;
|
||||
int temp = 0, i, aa, max_val = 0, max_pos = 0;
|
||||
int diff;
|
||||
short Re,Im,ncoef;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_IN);
|
||||
|
||||
ncoef = 32767 - coef;
|
||||
|
||||
#ifdef DEBUG_PHY
|
||||
LOG_D(PHY,"AbsSubframe %d.%d: rx_offset (before) = %d\n",ue->proc.proc_rxtx[0].frame_rx%1024,subframe,ue->rx_offset);
|
||||
#endif //DEBUG_PHY
|
||||
|
||||
|
||||
// we only use channel estimates from tx antenna 0 here
|
||||
for (i = 0; i < frame_parms->nb_prefix_samples; i++) {
|
||||
temp = 0;
|
||||
|
||||
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
|
||||
Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[(i<<2)];
|
||||
Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)];
|
||||
temp += (Re*Re/2) + (Im*Im/2);
|
||||
}
|
||||
|
||||
if (temp > max_val) {
|
||||
max_pos = i;
|
||||
max_val = temp;
|
||||
}
|
||||
}
|
||||
|
||||
// filter position to reduce jitter
|
||||
if (clear == 1)
|
||||
max_pos_fil = max_pos;
|
||||
else
|
||||
max_pos_fil = ((max_pos_fil * coef) + (max_pos * ncoef)) >> 15;
|
||||
|
||||
// do not filter to have proactive timing adjustment
|
||||
max_pos_fil = max_pos;
|
||||
|
||||
if(subframe == 6)
|
||||
{
|
||||
diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3);
|
||||
|
||||
if ( abs(diff) < SYNCH_HYST )
|
||||
ue->rx_offset = 0;
|
||||
else
|
||||
ue->rx_offset = diff;
|
||||
|
||||
if(abs(diff)<5)
|
||||
count_max_pos_ok ++;
|
||||
else
|
||||
count_max_pos_ok = 0;
|
||||
|
||||
if(count_max_pos_ok > 10 && first_time == 1)
|
||||
{
|
||||
first_time = 0;
|
||||
ue->time_sync_cell = 1;
|
||||
if (ue->mac_enabled==1) {
|
||||
LOG_I(PHY,"[UE%d] Sending synch status to higher layers\n",ue->Mod_id);
|
||||
//mac_resynch();
|
||||
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 {
|
||||
ue->UE_mode[0] = PUSCH;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ue->rx_offset < 0 )
|
||||
ue->rx_offset += FRAME_LENGTH_COMPLEX_SAMPLES;
|
||||
|
||||
if ( ue->rx_offset >= FRAME_LENGTH_COMPLEX_SAMPLES )
|
||||
ue->rx_offset -= FRAME_LENGTH_COMPLEX_SAMPLES;
|
||||
|
||||
|
||||
|
||||
#ifdef DEBUG_PHY
|
||||
LOG_D(PHY,"AbsSubframe %d.%d: ThreadId %d diff =%i rx_offset (final) = %i : clear %d,max_pos = %d,max_pos_fil = %d (peak %d) max_val %d target_pos %d \n",
|
||||
ue->proc.proc_rxtx[ue->current_thread_id[subframe]].frame_rx,
|
||||
subframe,
|
||||
ue->current_thread_id[subframe],
|
||||
diff,
|
||||
ue->rx_offset,
|
||||
clear,
|
||||
max_pos,
|
||||
max_pos_fil,
|
||||
temp,max_val,
|
||||
(frame_parms->nb_prefix_samples>>3));
|
||||
#endif //DEBUG_PHY
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_OUT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
LTE_eNB_SRS *lte_eNB_srs,
|
||||
unsigned int *eNB_id,
|
||||
|
||||
@@ -392,3 +392,29 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch,
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
void pbch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t *pbch_e,
|
||||
uint32_t length)
|
||||
{
|
||||
int i;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
|
||||
reset = 1;
|
||||
// x1 is set in lte_gold_generic
|
||||
x2 = frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.6.1
|
||||
// msg("pbch_scrambling: Nid_cell = %d\n",x2);
|
||||
|
||||
for (i=0; i<length; i++) {
|
||||
if ((i&0x1f)==0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
// printf("lte_gold[%d]=%x\n",i,s);
|
||||
reset = 0;
|
||||
}
|
||||
|
||||
pbch_e[i] = (pbch_e[i]&1) ^ ((s>>(i&0x1f))&1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,52 @@ int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP, uint8_t CC_id)
|
||||
1) + get_DELTA_PREAMBLE(module_idP, CC_id));
|
||||
}
|
||||
|
||||
int8_t get_DELTA_PREAMBLE(module_id_t module_idP, int CC_id)
|
||||
{
|
||||
|
||||
AssertFatal(CC_id == 0,
|
||||
"Transmission on secondary CCs is not supported yet\n");
|
||||
uint8_t prachConfigIndex =
|
||||
UE_mac_inst[module_idP].radioResourceConfigCommon->
|
||||
prach_Config.prach_ConfigInfo.prach_ConfigIndex;
|
||||
uint8_t preambleformat;
|
||||
|
||||
if (UE_mac_inst[module_idP].tdd_Config) { // TDD
|
||||
if (prachConfigIndex < 20) {
|
||||
preambleformat = 0;
|
||||
} else if (prachConfigIndex < 30) {
|
||||
preambleformat = 1;
|
||||
} else if (prachConfigIndex < 40) {
|
||||
preambleformat = 2;
|
||||
} else if (prachConfigIndex < 48) {
|
||||
preambleformat = 3;
|
||||
} else {
|
||||
preambleformat = 4;
|
||||
}
|
||||
} else { // FDD
|
||||
preambleformat = prachConfigIndex >> 2;
|
||||
}
|
||||
|
||||
switch (preambleformat) {
|
||||
case 0:
|
||||
case 1:
|
||||
return (0);
|
||||
|
||||
case 2:
|
||||
case 3:
|
||||
return (-3);
|
||||
|
||||
case 4:
|
||||
return (8);
|
||||
|
||||
default:
|
||||
AssertFatal(1 == 0,
|
||||
"[UE %d] ue_procedures.c: FATAL, Illegal preambleformat %d, prachConfigIndex %d\n",
|
||||
module_idP, preambleformat, prachConfigIndex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int8_t get_deltaP_rampup(module_id_t module_idP, uint8_t CC_id)
|
||||
{
|
||||
|
||||
|
||||
@@ -49,53 +49,6 @@
|
||||
|
||||
#include "SIMULATION/TOOLS/defs.h" // for taus
|
||||
|
||||
int8_t get_DELTA_PREAMBLE(module_id_t module_idP, int CC_id)
|
||||
{
|
||||
|
||||
AssertFatal(CC_id == 0,
|
||||
"Transmission on secondary CCs is not supported yet\n");
|
||||
uint8_t prachConfigIndex =
|
||||
UE_mac_inst[module_idP].radioResourceConfigCommon->
|
||||
prach_Config.prach_ConfigInfo.prach_ConfigIndex;
|
||||
uint8_t preambleformat;
|
||||
|
||||
if (UE_mac_inst[module_idP].tdd_Config) { // TDD
|
||||
if (prachConfigIndex < 20) {
|
||||
preambleformat = 0;
|
||||
} else if (prachConfigIndex < 30) {
|
||||
preambleformat = 1;
|
||||
} else if (prachConfigIndex < 40) {
|
||||
preambleformat = 2;
|
||||
} else if (prachConfigIndex < 48) {
|
||||
preambleformat = 3;
|
||||
} else {
|
||||
preambleformat = 4;
|
||||
}
|
||||
} else { // FDD
|
||||
preambleformat = prachConfigIndex >> 2;
|
||||
}
|
||||
|
||||
switch (preambleformat) {
|
||||
case 0:
|
||||
case 1:
|
||||
return (0);
|
||||
|
||||
case 2:
|
||||
case 3:
|
||||
return (-3);
|
||||
|
||||
case 4:
|
||||
return (8);
|
||||
|
||||
default:
|
||||
AssertFatal(1 == 0,
|
||||
"[UE %d] ue_procedures.c: FATAL, Illegal preambleformat %d, prachConfigIndex %d\n",
|
||||
module_idP, preambleformat, prachConfigIndex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// This routine implements Section 5.1.2 (UE Random Access Resource Selection) from 36.321
|
||||
void
|
||||
get_prach_resources(module_id_t module_idP,
|
||||
|
||||
@@ -130,10 +130,11 @@
|
||||
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&UE_scan_carrier, defintval:0, TYPE_INT, 0}, \
|
||||
{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \
|
||||
{"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT8, 0}, \
|
||||
{"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
|
||||
}
|
||||
|
||||
#define DEFAULT_DLF 2680000000
|
||||
extern int16_t dlsch_demod_shift;
|
||||
//extern int16_t dlsch_demod_shift;
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters common to eNodeB and UE */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
@@ -153,7 +154,6 @@ extern int16_t dlsch_demod_shift;
|
||||
{"threadThreeSubframe", NULL, 0, iptr:&(threads.three), defintval:1, TYPE_INT, 0}, \
|
||||
{"threadSlot1ProcOne", NULL, 0, iptr:&(threads.slot1_proc_one), defintval:1, TYPE_INT, 0}, \
|
||||
{"threadSlot1ProcTwo", NULL, 0, iptr:&(threads.slot1_proc_two), defintval:1, TYPE_INT, 0}, \
|
||||
{"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
|
||||
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
|
||||
{"C" , CONFIG_HLP_DLF, 0, uptr:&(downlink_frequency[0][0]), defuintval:DEFAULT_DLF, TYPE_UINT, 0}, \
|
||||
{"a" , CONFIG_HLP_CHOFF, 0, iptr:&chain_offset, defintval:0, TYPE_INT, 0}, \
|
||||
|
||||
Reference in New Issue
Block a user