...
 
Commits (19)
......@@ -765,6 +765,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/print_stats.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/initial_sync.c
${OPENAIR1_DIR}/PHY/MODULATION/ofdm_mod.c
${OPENAIR1_DIR}/PHY/MODULATION/ufmc_mod.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_mbsfn.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_ul.c
......@@ -776,6 +777,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ul_channel_estimation_ufmc.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_est_freq_offset.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ue_measurements.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
......@@ -804,12 +806,14 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/TOOLS/log2_approx.c
${OPENAIR1_DIR}/PHY/TOOLS/cmult_sv.c
${OPENAIR1_DIR}/PHY/TOOLS/cmult_vv.c
${OPENAIR1_DIR}/PHY/TOOLS/cadd_vv.c
${OPENAIR1_DIR}/PHY/TOOLS/cdot_prod.c
${OPENAIR1_DIR}/PHY/TOOLS/signal_energy.c
${OPENAIR1_DIR}/PHY/TOOLS/dB_routines.c
${OPENAIR1_DIR}/PHY/TOOLS/sqrt.c
${OPENAIR1_DIR}/PHY/TOOLS/time_meas.c
${OPENAIR1_DIR}/PHY/TOOLS/lut.c
${OPENAIR1_DIR}/PHY/TOOLS/ufmc_filter.c
)
if (${SMBV})
set(PHY_SRC "${PHY_SRC} ${OPENAIR1_DIR}/PHY/TOOLS/smbv.c")
......@@ -1846,7 +1850,7 @@ target_link_libraries (oaisim_nos1 forms)
# Unitary tests for each piece of L1: example, mbmssim is MBMS L1 simulator
#####################################
foreach(myExe dlsim ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim)
foreach(myExe dlsim ulsim ufmcsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim)
add_executable(${myExe}
${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR1_DIR}/SIMULATION/LTE_PHY/${myExe}.c
......
......@@ -284,8 +284,8 @@ function main() {
lte_exec=lte-softmodem
fi
if [ "$eNB" = "1" -o "$UE" = "1" ] ; then
# first generate the CMakefile in the right directory
if [ "$eNB" = "1" -o "$UE" = "1" -o "$HW" = "EXMIMO" ] ; then
# LTE softmodem compilation
[ "$CLEAN" = "1" ] && rm -rf $DIR/$lte_build_dir/build
......@@ -303,6 +303,9 @@ function main() {
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd $DIR/$lte_build_dir/build
cmake ..
fi
if [ "$eNB" = "1" ] ; then
echo_info "Compiling $lte_exec"
compilations \
$lte_build_dir $lte_exec \
......@@ -323,7 +326,7 @@ function main() {
# ue_ip driver compilation
echo_info "Compiling UE specific part"
compilations \
lte_build_oai ue_ip \
$lte_build_dir ue_ip \
CMakeFiles/ue_ip/ue_ip.ko $dbin/ue_ip.ko
# mkdir -p $DIR/at_commands/build
......@@ -365,7 +368,7 @@ function main() {
if [ "$SIMUS_PHY" = "1" ] ; then
# lte unitary simulators compilation
echo_info "Compiling unitary tests simulators"
simlist="dlsim ulsim pucchsim prachsim pdcchsim pbchsim mbmssim"
simlist="dlsim ulsim ufmcsim pucchsim prachsim pdcchsim pbchsim mbmssim"
for f in $simlist ; do
compilations \
lte-simulators $f \
......@@ -391,10 +394,6 @@ function main() {
if [ "$HW" = "EXMIMO" -a "$EPC" = "0" ] ; then
echo_info "Compiling Express MIMO 2 board drivers"
[ "$CLEAN" = "1" ] && rm -rf $DIR/$lte_build_dir/build
mkdir -p $DIR/$lte_build_dir/build
cd $DIR/$lte_build_dir/build
cmake ..
compilations \
$lte_build_dir openair_rf \
CMakeFiles/openair_rf/openair_rf.ko $dbin/openair_rf.ko
......
......@@ -5,7 +5,7 @@ linux := $(shell if [ `uname` = "Linux" ] ; then echo "1" ; else echo "0" ; fi)
CFLAGS += -std=gnu99
#CFLAGS += -Wall -g -ggdb -Wstrict-prototypes -fno-strict-aliasing
CFLAGS += -Wall -g -ggdb -Wstrict-prototypes -fno-strict-aliasing
# Need to force this option because default kernel module builder is wrong
CFLAGS += $(call cc-option,-mpreferred-stack-boundary=4)
......
......@@ -8,6 +8,8 @@ export OPENAIRCN_DIR=$OPENAIR_HOME/openair-cn
export OPENAIR_TARGETS=$OPENAIR_HOME/targets
export OPENAIRITS_DIR=$OPENAIR_HOME/openairITS
export PATH=$PATH:$OPENAIR_TARGETS/bin
alias oai='cd $OPENAIR_HOME'
alias oai0='cd $OPENAIR0_DIR'
alias oai1='cd $OPENAIR1_DIR'
......
......@@ -362,12 +362,33 @@ void phy_config_sib2_ue(uint8_t Mod_id,int CC_id,
mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]|
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[1]<<8)|
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]<<16);
LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %ld\n", i,
lte_frame_parms->MBSFN_config[i].mbsfn_SubframeConfig);
}
}
}
switch(lte_frame_parms->N_RB_UL) {
case 6:
ufmc_init(lte_frame_parms->nb_prefix_samples,16,128,lte_frame_parms->N_RB_UL,lte_frame_parms->first_carrier_offset);
break;
case 15:
ufmc_init(lte_frame_parms->nb_prefix_samples,16,256,lte_frame_parms->N_RB_UL,lte_frame_parms->first_carrier_offset);
break;
case 25:
ufmc_init(lte_frame_parms->nb_prefix_samples,32,512,lte_frame_parms->N_RB_UL,lte_frame_parms->first_carrier_offset);
break;
case 50:
ufmc_init(lte_frame_parms->nb_prefix_samples,64,1024,lte_frame_parms->N_RB_UL,lte_frame_parms->first_carrier_offset);
break;
case 75:
ufmc_init(lte_frame_parms->nb_prefix_samples,96,1536,lte_frame_parms->N_RB_UL,lte_frame_parms->first_carrier_offset);
break;
case 100:
ufmc_init(lte_frame_parms->nb_prefix_samples,128,2048,lte_frame_parms->N_RB_UL,lte_frame_parms->first_carrier_offset);
break;
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2, VCD_FUNCTION_OUT);
......
......@@ -27,6 +27,7 @@
*******************************************************************************/
#include "defs.h"
#include "log.h"
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
{
......
This diff is collapsed.
......@@ -419,15 +419,13 @@ void ulsch_modulation(mod_sym_t **txdataF,
nb_rb = ulsch->harq_processes[harq_pid]->nb_rb;
if (nb_rb == 0) {
msg("ulsch_modulation.c: Frame %d, Subframe %d Illegal nb_rb %d\n",frame,subframe,nb_rb);
LOG_E(PHY,"ulsch_modulation.c: Frame %d, Subframe %d Illegal nb_rb %d\n",frame,subframe,nb_rb);
return;
}
if (first_rb >25 ) {
msg("ulsch_modulation.c: Frame %d, Subframe %d Illegal first_rb %d\n",frame,subframe,first_rb);
if (first_rb > frame_parms->N_RB_UL ) {
LOG_E(PHY,"ulsch_modulation.c: Frame %d, Subframe %d Illegal first_rb %d\n",frame,subframe,first_rb);
return;
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_MODULATION, VCD_FUNCTION_IN);
Q_m = get_Qm_ul(ulsch->harq_processes[harq_pid]->mcs);
......
......@@ -99,6 +99,23 @@ void remove_625_Hz(PHY_VARS_eNB *phy_vars_eNB,int16_t *prach);
void apply_625_Hz(PHY_VARS_UE *phy_vars_ue,int16_t *prach);
void PHY_UFMC_mod(int *input, /// pointer to complex input
int *output, /// pointer to complex output
unsigned char log2fftsize, /// log2(FFT_SIZE)
unsigned char nb_symbols, /// number of OFDM symbols
unsigned short nb_prefix_samples, /// cyclic prefix length
unsigned short first_carrier, /// first subcarrier offset
LTE_UL_UE_HARQ_t *ulsch, /// ulsch structure
Extension_t etype /// type of extension
);
void normal_prefix_UFMC_mod(int32_t *txdataF,
int32_t *txdata,
uint8_t nsymb,
LTE_DL_FRAME_PARMS *frame_parms,
LTE_UL_UE_HARQ_t *ulsch);
#endif
/** @}*/
#endif
This diff is collapsed.
This diff is collapsed.
......@@ -35,6 +35,8 @@ PHY_OBJS += $(TOP_DIR)/PHY/MODULATION/slot_fep.o
PHY_OBJS += $(TOP_DIR)/PHY/MODULATION/slot_fep_mbsfn.o
PHY_OBJS += $(TOP_DIR)/PHY/MODULATION/slot_fep_ul.o
PHY_OBJS += $(TOP_DIR)/PHY/MODULATION/ul_7_5_kHz.o
PHY_OBJS += $(TOP_DIR)/PHY/MODULATION/ufmc_mod.o
PHY_OBJS += $(TOP_DIR)/PHY/MODULATION/rx_pdsch_ufmc_sync.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/freq_equalization.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_sync_time.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_sync_timefreq.o
......@@ -84,5 +86,6 @@ PHY_OBJS += $(TOP_DIR)/PHY/TOOLS/smbv.o
endif
PHY_OBJS += $(TOP_DIR)/PHY/TOOLS/time_meas.o
PHY_OBJS += $(TOP_DIR)/PHY/TOOLS/lut.o
PHY_OBJS += $(TOP_DIR)/PHY/TOOLS/ufmc_filter.o
#PHY_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/rangen_double.o
......@@ -555,6 +555,16 @@ void idft1024(int16_t *x,int16_t *y,int scale);
void idft2048(int16_t *x,int16_t *y,int scale);
void idft4096(int16_t *x,int16_t *y,int scale);
void idft8192(int16_t *x,int16_t *y,int scale);
void dolph_cheb(int16_t *in, /// input array-->length=(size+lFIR)*2
int16_t *out, /// output array-->length=(FFT_size+lFIR)*2
uint32_t lFIR, /// (nb_prefix_samples)cyclic prefix length -> it becomes FIR length(multiple of 8)
int size, /// input dimension(only real part) -> FFT dimension
int FFT_size, /// dimensione of standard FFT
int n_rb, ///current resource block index
int first_carrier ///first subcarrier offset
);
/** @} */
......
This diff is collapsed.
This diff is collapsed.
......@@ -86,4 +86,6 @@ extern fifo_dump_emos_eNB emos_dump_eNB;
#endif
*/
extern int ufmc_flag;
#endif /*__SCHED_EXTERN_H__ */
......@@ -1014,7 +1014,7 @@ void fill_dci(DCI_PDU *DCI_pdu, uint8_t sched_subframe, PHY_VARS_eNB *phy_vars_e
UL_alloc_pdu.ndi = phy_vars_eNB->proc[sched_subframe].frame_tx&1;
UL_alloc_pdu.TPC = 0;
UL_alloc_pdu.cshift = 0;
UL_alloc_pdu.dai = 0;
//UL_alloc_pdu.dai = 0;
UL_alloc_pdu.cqi_req = 1;
memcpy((void*)&DCI_pdu->dci_alloc[0].dci_pdu[0],(void *)&UL_alloc_pdu,sizeof(DCI0_5MHz_TDD_1_6_t));
......
This diff is collapsed.
......@@ -30,5 +30,6 @@
OPENAIR_DAQ_VARS openair_daq_vars;
int ufmc_flag;
......@@ -178,6 +178,10 @@ ulsim : $(OBJ) ulsim.c $(LFDS_DIR)/bin/liblfds611.a #ulsim_form.c
@echo "Compiling [ulsim.c]"
@$(CC) ulsim.c -o ulsim $(CFLAGS) $(OBJ) $(LFLAGS)
ufmcsim : $(OBJ) ufmcsim.c $(LFDS_DIR)/bin/liblfds611.a #ulsim_form.c
@echo "Compiling [ufmcsim.c]"
@$(CC) ufmcsim.c -o ufmcsim $(CFLAGS) $(OBJ) $(LFLAGS)
syncsim : $(OBJ) syncsim.c $(LFDS_DIR)/bin/liblfds611.a
@echo "Compiling syncsim.c"
@$(CC) syncsim.c -o syncsim $(CFLAGS) $(OBJ) $(LFLAGS)
......
close all
colors={'r','g','b','m','c','k'};
f=2;
txsigF0UL
txsig0UL
figure(1)
plot(abs(txsF0),colors{mod(f,6)+1})
hold on
drawnow
figure(2)
plot(abs(txs0),colors{mod(f,6)+1})
hold on
drawnow
figure(3)
plot(20*log10(abs(fftshift(fft(txs0(1:7680) )))),colors{mod(f,6)+1})
hold on
drawnow
This diff is collapsed.
......@@ -818,7 +818,7 @@ void schedule_ulsch_rnti(module_id_t module_idP,
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2=mcs;
buffer_occupancy = UE_template->ul_total_buffer;
while ((rb_table[rb_table_index]>(frame_parms->N_RB_UL-1-first_rb[CC_id])) &&
while ((rb_table[rb_table_index]>(frame_parms->N_RB_UL-29-first_rb[CC_id])) &&
(rb_table_index>0)) {
rb_table_index--;
}
......
......@@ -92,7 +92,7 @@ extern uint32_t RRC_CONNECTION_FLAG;
extern uint8_t rb_table[33];
extern DCI0_5MHz_TDD_1_6_t UL_alloc_pdu;
extern DCI0_10MHz_FDD_t UL_alloc_pdu;
extern DCI1A_5MHz_TDD_1_6_t RA_alloc_pdu;
extern DCI1A_5MHz_TDD_1_6_t DLSCH_alloc_pdu1A;
......
......@@ -90,7 +90,7 @@ unsigned char NB_INST=0;
#endif
DCI0_5MHz_TDD_1_6_t UL_alloc_pdu;
DCI0_10MHz_FDD_t UL_alloc_pdu;
DCI1A_5MHz_TDD_1_6_t DLSCH_alloc_pdu1A;
DCI1A_5MHz_TDD_1_6_t RA_alloc_pdu;
......
fc = 1907600000;
%fc = 1907600000;
fc = 2560000000;
%fc = 859.5e6;
rxgain=0;
txgain=0;
eNB_flag = 0;
card = 0;
active_rf = [1 1 1 1];
active_rf = [1 0 0 0];
autocal = [1 1 1 1];
resampling_factor = [2 2 2 2];
resampling_factor = [1 1 1 1];
limeparms;
rf_mode = (RXEN+TXEN+TXLPFNORM+TXLPFEN+TXLPF25+RXLPFNORM+RXLPFEN+RXLPF25+LNA1ON+LNAMax+RFBBNORM) * active_rf;
rf_mode = rf_mode + (DMAMODE_RX + DMAMODE_TX)*active_rf;
......@@ -26,7 +26,7 @@ rf_vcocal = rf_vcocal_19G * active_rf;
rxgain = rxgain*active_rf;
txgain = txgain*active_rf;
freq_tx = fc.*active_rf;
freq_rx = freq_tx;
freq_rx = (fc+120000000).*active_rf;
%freq_rx = freq_tx-120000000*chan_sel;
%freq_tx = freq_rx+1920000;
%tdd_config = DUPLEXMODE_FDD + TXRXSWITCH_LSB;
......@@ -45,7 +45,7 @@ length = 307200/pow2(resampling_factor(1));
s = zeros(length,4);
select = 1;
select = 7;
switch(select)
......@@ -99,7 +99,7 @@ case 5
case 6
nb_rb = 100; %this can be 25, 50, or 100
nb_rb = 50; %this can be 25, 50, or 100
num_carriers = 2048/100*nb_rb;
num_zeros = num_carriers-(12*nb_rb+1);
prefix_length = num_carriers/4; %this is extended CP
......@@ -109,6 +109,10 @@ case 6
s(:,1) = OFDM_TX_FRAME(num_carriers,num_zeros,prefix_length,num_symbols_frame,preamble_length);
s(:,1) = floor(amp*(s(:,1)./max([real(s(:,1)); imag(s(:,1))])));
case 7
txsig8_mod
s(:,1) = repmat(txs8_mod,10,1);
otherwise
error('unknown case')
......
......@@ -28,7 +28,7 @@ eNBs =
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 7;
downlink_frequency = 2660000000L;
downlink_frequency = 2680000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 50;
......@@ -130,7 +130,7 @@ eNBs =
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.11";
mme_ip_address = ( { ipv4 = "192.168.12.171";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
......@@ -140,10 +140,10 @@ eNBs =
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.235/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.235/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
......
......@@ -133,7 +133,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.11";
mme_ip_address = ( { ipv4 = "192.168.12.171";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
......@@ -143,10 +143,10 @@ eNBs =
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.216/24";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.80/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.216/24";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.80/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
......
......@@ -2042,7 +2042,7 @@ static void get_options (int argc, char **argv)
{NULL, 0, NULL, 0}
};
while ((c = getopt_long (argc, argv, "C:dK:g:F:G:hqO:m:SUVRM:r:P:Ws:t:x:",long_options,NULL)) != -1) {
while ((c = getopt_long (argc, argv, "C:F:G:K:M:O:P:RSUVWdg:hm:qr:s:t:ux:",long_options,NULL)) != -1) {
switch (c) {
case LONG_OPTION_MAXPOWER:
tx_max_power[0]=atoi(optarg);
......@@ -2123,6 +2123,10 @@ static void get_options (int argc, char **argv)
downlink_frequency[CC_id][1] = downlink_frequency[CC_id][0];
downlink_frequency[CC_id][2] = downlink_frequency[CC_id][0];
downlink_frequency[CC_id][3] = downlink_frequency[CC_id][0];
uplink_frequency_offset[CC_id][0] = -120000000;
uplink_frequency_offset[CC_id][1] = -120000000;
uplink_frequency_offset[CC_id][2] = -120000000;
uplink_frequency_offset[CC_id][3] = -120000000;
printf("Downlink for CC_id %d frequency set to %u\n", CC_id, downlink_frequency[CC_id][0]);
}
......@@ -2312,6 +2316,10 @@ static void get_options (int argc, char **argv)
case 'h':
help ();
exit (-1);
case 'u':
ufmc_flag=1;
break;
default:
help ();
......@@ -2761,7 +2769,16 @@ int main( int argc, char **argv )
openair_daq_vars.auto_freq_correction = 0;
openair_daq_vars.use_ia_receiver = 0;
/*
UL_alloc_pdu.type = 0;
UL_alloc_pdu.hopping = 0;
UL_alloc_pdu.rballoc = computeRIV(UE[0]->lte_frame_parms.N_RB_UL,0,1);
UL_alloc_pdu.mcs = 2;
UL_alloc_pdu.ndi = 1;
UL_alloc_pdu.TPC = 0;
UL_alloc_pdu.cqi_req = 0;
UL_alloc_pdu.cshift = 0;
*/
// printf("tx_max_power = %d -> amp %d\n",tx_max_power,get_tx_amp(tx_max_power,tx_max_power));
} else {
......@@ -3087,7 +3104,7 @@ openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL;
// connect the TX/RX buffers
if (UE_flag==1) {
#ifdef OAI_USRP
openair_daq_vars.timing_advance = 160;
openair_daq_vars.timing_advance = 0;
#else
openair_daq_vars.timing_advance = 160;
#endif
......