Commit 84e9eced authored by Raymond Knopp's avatar Raymond Knopp

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6190 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent e6a155d2
......@@ -3,6 +3,7 @@ export OPENAIR_HOME=$(pwd)
export OPENAIR1_DIR=$OPENAIR_HOME/openair1
export OPENAIR2_DIR=$OPENAIR_HOME/openair2
export OPENAIR3_DIR=$OPENAIR_HOME/openair3
export OPENAIRCN_DIR=$OPENAIR_HOME/openair-cn
export OPENAIR_TARGETS=$OPENAIR_HOME/targets
export OPENAIRCN_DIR=$OPENAIR_HOME/openair-cn
......
......@@ -596,7 +596,7 @@ gtpv1u_new_data_req(
stack_req.apiInfo.sendtoInfo.teid = bearer_p->teid_sgw;
stack_req.apiInfo.sendtoInfo.ipAddr = bearer_p->sgw_ip_addr;
LOG_I(GTPU, "TX TO TEID %u addr 0x%x\n",bearer_p->teid_sgw, bearer_p->sgw_ip_addr);
LOG_D(GTPU, "TX TO TEID %u addr 0x%x\n",bearer_p->teid_sgw, bearer_p->sgw_ip_addr);
rc = nwGtpv1uGpduMsgNew(gtpv1u_data_p->gtpv1u_stack,
bearer_p->teid_sgw,
NW_FALSE,
......@@ -622,7 +622,7 @@ gtpv1u_new_data_req(
LOG_E(GTPU, "nwGtpv1uMsgDelete failed: 0x%x\n", rc);
return -1;
}
LOG_I(GTPU, "%s() return code OK\n", __FUNCTION__);
LOG_D(GTPU, "%s() return code OK\n", __FUNCTION__);
return 0;
}
......
......@@ -50,7 +50,7 @@ fi
if [ ! -w /usr/local/src/ ]
then
echo "You don't have permissions to write to /usr/local/src/"
exit -1
# exit -1
fi
cd /usr/local/src/
......@@ -104,9 +104,9 @@ mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../ > install_log.txt || exit -1
echo "Compiling freeDiameter"
make -j2 > install_log.txt 2>&1
sudo make -j2 > install_log.txt 2>&1
#make help
make test > install_log.txt
sudo make test > install_log.txt
sudo make install > install_log.txt
cd $CURRENT_PATH
......
......@@ -72,9 +72,9 @@
#include "sgw_lite_ie_defs.h"
#include "ip_forward_messages_types.h"
//# define SGI_IF_DEBUG(x, args...)
//# define SGI_IF_ERROR(x, args...)
//# define SGI_IF_WARNING(x, args...)
# define SGI_IF_DEBUG(x, args...)
# define SGI_IF_ERROR(x, args...)
# define SGI_IF_WARNING(x, args...)
//-----------------------------------------------------------------------------
#ifndef SGI_IF_DEBUG
# define SGI_IF_DEBUG(x, args...) do { fprintf(stdout, "[SGI_IF][D]"x, ##args); } \
......
......@@ -113,15 +113,22 @@ void phy_config_sib2_eNB(uint8_t Mod_id,
LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms;
int i;
LOG_D(PHY,"[eNB%d] Frame %d: Applying radioResourceConfigCommon\n",Mod_id,PHY_vars_eNB_g[Mod_id][CC_id]->proc[8].frame_tx);
LOG_D(PHY,"[eNB%d] CCid %d Frame %d: Applying radioResourceConfigCommon\n",Mod_id,CC_id,PHY_vars_eNB_g[Mod_id][CC_id]->proc[8].frame_tx);
lte_frame_parms->prach_config_common.rootSequenceIndex =radioResourceConfigCommon->prach_Config.rootSequenceIndex;
LOG_D(PHY,"prach_config_common.rootSequenceIndex = %d\n",lte_frame_parms->prach_config_common.rootSequenceIndex );
lte_frame_parms->prach_config_common.prach_Config_enabled=1;
lte_frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_ConfigIndex;
LOG_D(PHY,"prach_config_common.prach_ConfigInfo.prach_ConfigIndex = %d\n",lte_frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex);
lte_frame_parms->prach_config_common.prach_ConfigInfo.highSpeedFlag =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.highSpeedFlag;
LOG_D(PHY,"prach_config_common.prach_ConfigInfo.highSpeedFlag = %d\n",lte_frame_parms->prach_config_common.prach_ConfigInfo.highSpeedFlag);
lte_frame_parms->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig;
LOG_D(PHY,"prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig = %d\n",lte_frame_parms->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig);
lte_frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_FreqOffset;
LOG_D(PHY,"prach_config_common.prach_ConfigInfo.prach_FreqOffset = %d\n",lte_frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset);
compute_prach_seq(&lte_frame_parms->prach_config_common,lte_frame_parms->frame_type,
PHY_vars_eNB_g[Mod_id][CC_id]->X_u);
......@@ -149,16 +156,16 @@ void phy_config_sib2_eNB(uint8_t Mod_id,
LOG_D(PHY,"pusch_config_common.enable64QAM = %d\n",lte_frame_parms->pusch_config_common.enable64QAM );
lte_frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = radioResourceConfigCommon->pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled;
LOG_D(PHY,"pusch_config_common.groupHoppingEnabled = %d\n",lte_frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled);
LOG_D(PHY,"pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = %d\n",lte_frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled);
lte_frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = radioResourceConfigCommon->pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH;
LOG_D(PHY,"pusch_config_common.groupAssignmentPUSCH = %d\n",lte_frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH);
LOG_D(PHY,"pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = %d\n",lte_frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH);
lte_frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = radioResourceConfigCommon->pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled;
LOG_D(PHY,"pusch_config_common.sequenceHoppingEnabled = %d\n",lte_frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled);
LOG_D(PHY,"pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = %d\n",lte_frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled);
lte_frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = dmrs1_tab[radioResourceConfigCommon->pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift];
LOG_D(PHY,"pusch_config_common.enable64QAM = %d\n",lte_frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift);
LOG_D(PHY,"pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = %d\n",lte_frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift);
init_ul_hopping(lte_frame_parms);
......
......@@ -54,81 +54,57 @@ int generate_pss(mod_sym_t **txdataF,
unsigned short slot_offset) {
unsigned int Nsymb;
unsigned short k,m,aa;
unsigned short k,m,aa,a;
uint8_t Nid2;
#ifdef IFFT_FPGA
unsigned char *primary_sync_tab;
#else
short *primary_sync;
#endif
Nid2 = frame_parms->Nid_cell % 3;
switch (Nid2) {
case 0:
#ifdef IFFT_FPGA
primary_sync_tab = primary_synch0_tab;
#else
primary_sync = primary_synch0;
#endif
break;
case 1:
#ifdef IFFT_FPGA
primary_sync_tab = primary_synch1_tab;
#else
primary_sync = primary_synch1;
#endif
break;
case 2:
#ifdef IFFT_FPGA
primary_sync_tab = primary_synch2_tab;
#else
primary_sync = primary_synch2;
#endif
break;
default:
msg("[PSS] eNb_id has to be 0,1,2\n");
return(-1);
}
//a = (amp*ONE_OVER_SQRT2_Q15)>>15;
a = (frame_parms->mode1_flag == 0) ? amp : (amp*ONE_OVER_SQRT2_Q15)>>15;
//printf("[PSS] amp=%d, a=%d\n",amp,a);
Nsymb = (frame_parms->Ncp==NORMAL)?14:12;
//for (aa=0;aa<frame_parms->nb_antennas_tx;aa++) {
aa = 0;
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++) {
// aa = 0;
// The PSS occupies the inner 6 RBs, which start at
#ifdef IFFT_FPGA
k = (frame_parms->N_RB_DL-3)*12+5;
#else
k = frame_parms->ofdm_symbol_size-3*12+5;
#endif
//printf("[PSS] k = %d\n",k);
for (m=5;m<67;m++) {
#ifdef IFFT_FPGA
txdataF[aa][slot_offset*Nsymb/2*frame_parms->N_RB_DL*12 + symbol*frame_parms->N_RB_DL*12 + k] = primary_sync_tab[m];
#else
((short*)txdataF[aa])[2*(slot_offset*Nsymb/2*frame_parms->ofdm_symbol_size +
symbol*frame_parms->ofdm_symbol_size + k)] =
(amp * primary_sync[2*m]) >> 15;
(a * primary_sync[2*m]) >> 15;
((short*)txdataF[aa])[2*(slot_offset*Nsymb/2*frame_parms->ofdm_symbol_size +
symbol*frame_parms->ofdm_symbol_size + k) + 1] =
(amp * primary_sync[2*m+1]) >> 15;
#endif
(a * primary_sync[2*m+1]) >> 15;
k+=1;
#ifdef IFFT_FPGA
if (k >= frame_parms->N_RB_DL*12)
k-=frame_parms->N_RB_DL*12;
#else
if (k >= frame_parms->ofdm_symbol_size) {
k++; //skip DC
k-=frame_parms->ofdm_symbol_size;
}
#endif
}
}
//}
return(0);
}
......
......@@ -45,16 +45,16 @@
int generate_sss(mod_sym_t **txdataF,
short amp,
int16_t amp,
LTE_DL_FRAME_PARMS *frame_parms,
unsigned short symbol,
unsigned short slot_offset) {
uint16_t symbol,
uint16_t slot_offset) {
uint8_t i,aa,Nsymb;
short *d,k;
int16_t *d,k;
uint8_t Nid2;
uint16_t Nid1;
int16_t a;
Nid2 = frame_parms->Nid_cell % 3;
Nid1 = frame_parms->Nid_cell/3;
......@@ -66,14 +66,16 @@ int generate_sss(mod_sym_t **txdataF,
Nsymb = (frame_parms->Ncp==NORMAL)?14:12;
k = frame_parms->ofdm_symbol_size-3*12+5;
a = (frame_parms->mode1_flag == 0) ? amp : (amp*ONE_OVER_SQRT2_Q15)>>15;
for (i=0;i<62;i++) {
//for (aa=0;aa<frame_parms->nb_antennas_tx;aa++) {
aa=0;
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++) {
//aa=0;
((short*)txdataF[aa])[2*(slot_offset*Nsymb/2*frame_parms->ofdm_symbol_size +
((int16_t*)txdataF[aa])[2*(slot_offset*Nsymb/2*frame_parms->ofdm_symbol_size +
symbol*frame_parms->ofdm_symbol_size + k)] =
(amp * d[i]);
((short*)txdataF[aa])[2*(slot_offset*Nsymb/2*frame_parms->ofdm_symbol_size +
((int16_t*)txdataF[aa])[2*(slot_offset*Nsymb/2*frame_parms->ofdm_symbol_size +
symbol*frame_parms->ofdm_symbol_size + k)+1] = 0;
/*
if (aa==0)
......@@ -82,7 +84,7 @@ int generate_sss(mod_sym_t **txdataF,
symbol*frame_parms->ofdm_symbol_size + k,
(amp * d[i]),0);
*/
//}
}
k+=1;
if (k >= frame_parms->ofdm_symbol_size) {
k++;
......@@ -96,8 +98,8 @@ int pss_ch_est(PHY_VARS_UE *phy_vars_ue,
int32_t pss_ext[4][72],
int32_t sss_ext[4][72]) {
short *pss;
short *pss_ext2,*sss_ext2,*sss_ext3,tmp_re,tmp_im,tmp_re2,tmp_im2;
int16_t *pss;
int16_t *pss_ext2,*sss_ext2,*sss_ext3,tmp_re,tmp_im,tmp_re2,tmp_im2;
uint8_t aarx,i;
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->lte_frame_parms;
......@@ -117,11 +119,11 @@ int pss_ch_est(PHY_VARS_UE *phy_vars_ue,
break;
}
sss_ext3 = (short*)&sss_ext[0][5];
sss_ext3 = (int16_t*)&sss_ext[0][5];
for (aarx=0;aarx<frame_parms->nb_antennas_rx;aarx++) {
sss_ext2 = (short*)&sss_ext[aarx][5];
pss_ext2 = (short*)&pss_ext[aarx][5];
sss_ext2 = (int16_t*)&sss_ext[aarx][5];
pss_ext2 = (int16_t*)&pss_ext[aarx][5];
for (i=0;i<62;i++) {
// This is H*(PSS) = R* \cdot PSS
......@@ -230,8 +232,8 @@ int pss_sss_extract(PHY_VARS_UE *phy_vars_ue,
}
short phase_re[7] = {16383, 25101, 30791, 32767, 30791, 25101, 16383};
short phase_im[7] = {-28378, -21063, -11208, 0, 11207, 21062, 28377};
int16_t phase_re[7] = {16383, 25101, 30791, 32767, 30791, 25101, 16383};
int16_t phase_im[7] = {-28378, -21063, -11208, 0, 11207, 21062, 28377};
int rx_sss(PHY_VARS_UE *phy_vars_ue,int32_t *tot_metric,uint8_t *flip_max,uint8_t *phase_max) {
......@@ -357,8 +359,8 @@ int rx_sss(PHY_VARS_UE *phy_vars_ue,int32_t *tot_metric,uint8_t *flip_max,uint8_
*tot_metric = -99999999;
sss0 = (short*)&sss0_ext[0][5];
sss5 = (short*)&sss5_ext[0][5];
sss0 = (int16_t*)&sss0_ext[0][5];
sss5 = (int16_t*)&sss5_ext[0][5];
for (flip=0;flip<2;flip++) { // d0/d5 flip in RX frame
for (phase=0;phase<=7;phase++) { // phase offset between PSS and SSS
for (Nid1 = 0 ; Nid1 <= 167; Nid1++) { // 168 possible Nid1 values
......
......@@ -2627,7 +2627,7 @@ void prach_procedures(PHY_VARS_eNB *phy_vars_eNB,uint8_t sched_subframe,uint8_t
preamble_delay_list[preamble_max]);
#endif
if (preamble_energy_list[preamble_max] > 600) {
if (preamble_energy_list[preamble_max] > 580) {
/*
write_output("prach_ifft0.m","prach_t0",prach_ifft[0],2048,1,1);
write_output("prach_rx0.m","prach_rx0",&phy_vars_eNB->lte_eNB_common_vars.rxdata[0][0][subframe*phy_vars_eNB->lte_frame_parms.samples_per_tti],6144+792,1,1);
......@@ -3098,7 +3098,7 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
LOG_I(PHY,"[eNB %d] frame %d, subframe %d, UE %d: ULSCH consecutive error count reached %u, removing UE\n",
phy_vars_eNB->Mod_id,frame,subframe, i, phy_vars_eNB->eNB_UE_stats[i].ulsch_consecutive_errors);
mac_xface->macphy_exit("Consecutive error count reached");
// mac_xface->macphy_exit("Consecutive error count reached");
phy_vars_eNB->eNB_UE_stats[i].mode = PRACH;
#ifdef OPENAIR2
......
......@@ -267,6 +267,8 @@ static void enb_config_display(void) {
printf( "\n\tCell ID for CC %d:\t%d:\n",j,enb_properties.properties[i]->Nid_cell[j]);
printf( "\tN_RB_DL for CC %d:\t%d:\n",j,enb_properties.properties[i]->N_RB_DL[j]);
printf( "\tnb_antennas_tx for CC %d:\t%d:\n",j,enb_properties.properties[i]->nb_antennas_tx[j]);
printf( "\tnb_antennas_rx for CC %d:\t%d:\n",j,enb_properties.properties[i]->nb_antennas_rx[j]);
// RACH-Config
printf( "\trach_numberOfRA_Preambles for CC %d:\t%d:\n",j,enb_properties.properties[i]->rach_numberOfRA_Preambles[j]);
......
......@@ -125,7 +125,7 @@ int pdcp_fifo_flush_sdus(frame_t frameP, eNB_flag_t enb_flagP, module_id_t enb_m
#if defined(LINK_PDCP_TO_GTPV1U)
if (enb_flagP) {
AssertFatal(0, "Now execution should not go here");
LOG_I(PDCP,"Sending to GTPV1U %d bytes\n", ((pdcp_data_ind_header_t *)(sdu_p->data))->data_size);
LOG_D(PDCP,"Sending to GTPV1U %d bytes\n", ((pdcp_data_ind_header_t *)(sdu_p->data))->data_size);
/*message_p = itti_alloc_new_message(TASK_PDCP_ENB, GTPV1U_TUNNEL_DATA_REQ);
GTPV1U_TUNNEL_DATA_REQ(message_p).buffer = &(((uint8_t *) sdu_p->data)[sizeof (pdcp_data_ind_header_t)]);
GTPV1U_TUNNEL_DATA_REQ(message_p).length = ((pdcp_data_ind_header_t *)(sdu_p->data))->data_size;
......@@ -144,7 +144,7 @@ int pdcp_fifo_flush_sdus(frame_t frameP, eNB_flag_t enb_flagP, module_id_t enb_m
cont = 1;
pdcp_nb_sdu_sent += 1;
sdu_p = list_get_head (&pdcp_sdu_list);
LOG_I(OTG,"After GTPV1U\n");
LOG_D(OTG,"After GTPV1U\n");
continue; // loop again
}
#endif /* defined(ENABLE_USE_MME) */
......
......@@ -237,7 +237,7 @@ int openair0_device_init(openair0_device* device, openair0_config_t *openair0_cf
// lock mboard clocks
s->usrp->set_clock_source("internal");
// set master clock rate and sample rate for tx & rx for streaming
s->usrp->set_master_clock_rate(15.36e6);
s->usrp->set_master_clock_rate(30.72e6);
......
......@@ -35,9 +35,9 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 20;
nb_antennas_tx = 2;
nb_antennas_rx = 2;
tx_gain = 25;
rx_gain = 20;
prach_root = 0;
prach_config_index = 0;
......@@ -114,10 +114,10 @@ eNBs =
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.82/24";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.82/24";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
/*
......
......@@ -30,13 +30,13 @@ eNBs =
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 7;
downlink_frequency = 2680000000L;
downlink_frequency = 2660000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
nb_antennas_tx = 2;
nb_antennas_rx = 2;
tx_gain = 90;
rx_gain = 135;
prach_root = 0;
......
......@@ -108,9 +108,11 @@ include $(OPENAIR3_DIR)/RAL-LTE/Makefile.inc
ifeq ($(USRP),1)
include $(OPENAIR_TARGETS)/ARCH/USRP/USERSPACE/LIB/Makefile.inc
CFLAGS += -I/opt/include/uhd -L/opt/lib -luhd -lpthread -lstdc++
#CFLAGS += -I/opt/include/uhd -L/opt/lib -luhd -lpthread -lstdc++
CFLAGS += -I/usr/include/uhd -L/usr/lib -luhd -lpthread -lstdc++
CFLAGS += -DUSRP
LDFLAGS += -L/opt/lib -luhd -lpthread -lstdc++
#LDFLAGS += -L/opt/lib -luhd -lpthread -lstdc++
LDFLAGS += -L/usr/lib/ -luhd -lpthread -lstdc++
endif
ifeq ($(ETHERNET),1)
......@@ -230,7 +232,7 @@ $(LFDS_LIB):
ifeq ($(USRP),1)
$(USRP_OBJ):$(USRP_FILE_OBJ)
@echo Compiling $<
@$(CXX) -c $(USRP_CFLAGS) $(USRP_FILE_OBJ) -o $(USRP_OBJ)
@$(CXX) -c -g -ggdb $(USRP_CFLAGS) $(USRP_FILE_OBJ) -o $(USRP_OBJ)
endif
ifeq ($(ETHERNET),1)
......
......@@ -291,6 +291,9 @@ unsigned int samples_per_frame = 307200;
unsigned int samples_per_packets = 2048; // samples got every recv or send
unsigned int tx_forward_nsamps;
int sf_bounds_1_5[10] = {8, 15, 23, 30, 38, 45, 53, 60, 68, 75};
int sf_bounds_1_5_tx[10] = {4, 11, 19, 26, 34, 41, 49, 56, 64, 71};
int sf_bounds_5[10] = {8, 15, 23, 30, 38, 45, 53, 60, 68, 75};
int sf_bounds_5_tx[10] = {4, 11, 19, 26, 34, 41, 49, 56, 64, 71};
......@@ -1241,11 +1244,11 @@ void init_eNB_proc(void) {
for (i=0;i<10;i++) {
/*set the stack sizw */
pthread_attr_init (&attr_eNB_proc_tx[CC_id][i]);
if (pthread_attr_setstacksize(&attr_eNB_proc_tx[CC_id][i],OPENAIR_THREAD_STACK_SIZE) != 0)
if (pthread_attr_setstacksize(&attr_eNB_proc_tx[CC_id][i],PTHREAD_STACK_MIN) != 0)
perror("[ENB_PROC_TX] setting thread stack size failed\n");
pthread_attr_init (&attr_eNB_proc_rx[CC_id][i]);
if (pthread_attr_setstacksize(&attr_eNB_proc_rx[CC_id][i],OPENAIR_THREAD_STACK_SIZE) != 0)
if (pthread_attr_setstacksize(&attr_eNB_proc_rx[CC_id][i],PTHREAD_STACK_MIN) != 0)
perror("[ENB_PROC_RX] setting thread stack size failed\n");
/* set the kernel scheduling policy and priority */
#ifndef LOWLATENCY
......@@ -1543,7 +1546,6 @@ static void *eNB_thread(void *arg)
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_TXCNT,tx_cnt);
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_RXCNT,rx_cnt*samples_per_packets);
printf("hw_subframe %d: rx_cnt %d\n",hw_subframe,rx_cnt);
for (i=0;i<PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_rx;i++)
rxp[i] = (void*)&rxdata[i][rx_cnt*samples_per_packets];
......@@ -1559,7 +1561,6 @@ static void *eNB_thread(void *arg)
if (rxs != samples_per_packets)
oai_exit=1;
// printf("hw_subframe %d: tx_cnt %d\n",hw_subframe,tx_cnt);
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ,0);
......@@ -1699,7 +1700,7 @@ static void *eNB_thread(void *arg)
#ifndef USRP
#ifdef EXMIMO
slot++;
if (slot == 20) {
frame++;
......@@ -2490,13 +2491,13 @@ void init_UE_threads(void) {
PHY_VARS_UE *UE=PHY_vars_UE_g[0][0];
pthread_attr_init(&attr_UE_thread_tx);
pthread_attr_setstacksize(&attr_UE_thread_tx,OPENAIR_THREAD_STACK_SIZE);
pthread_attr_setstacksize(&attr_UE_thread_tx,PTHREAD_STACK_MIN);
sched_param_UE_thread_tx.sched_priority = sched_get_priority_max(SCHED_FIFO)-1;
pthread_attr_setschedparam (&attr_UE_thread_tx, &sched_param_UE_thread_tx);
pthread_attr_setschedpolicy (&attr_UE_thread_tx, SCHED_FIFO);
pthread_attr_init(&attr_UE_thread_rx);
pthread_attr_setstacksize(&attr_UE_thread_rx,OPENAIR_THREAD_STACK_SIZE);
pthread_attr_setstacksize(&attr_UE_thread_rx,PTHREAD_STACK_MIN);
sched_param_UE_thread_rx.sched_priority = sched_get_priority_max(SCHED_FIFO)-1;
pthread_attr_setschedparam (&attr_UE_thread_rx, &sched_param_UE_thread_rx);
pthread_attr_setschedpolicy (&attr_UE_thread_rx, SCHED_FIFO);
......@@ -2777,6 +2778,7 @@ static void get_options (int argc, char **argv) {
//for (j=0; j < enb_properties->properties[i]->nb_cc; j++ ){
frame_parms[CC_id]->Nid_cell = enb_properties->properties[i]->Nid_cell[CC_id];
frame_parms[CC_id]->N_RB_DL = enb_properties->properties[i]->N_RB_DL[CC_id];
frame_parms[CC_id]->N_RB_UL = enb_properties->properties[i]->N_RB_DL[CC_id];
frame_parms[CC_id]->nb_antennas_tx = enb_properties->properties[i]->nb_antennas_tx[CC_id];
frame_parms[CC_id]->nb_antennas_tx_eNB = enb_properties->properties[i]->nb_antennas_tx[CC_id];
frame_parms[CC_id]->nb_antennas_rx = enb_properties->properties[i]->nb_antennas_rx[CC_id];
......@@ -3251,11 +3253,23 @@ int main(int argc, char **argv) {
tx_delay = 5;
#endif
}
else if (frame_parms[0]->N_RB_DL == 6) {
sample_rate = 1.92e6;
#ifndef EXMIMO
samples_per_packets = 256;
samples_per_frame = 19200;
tx_forward_nsamps = 40;
sf_bounds = sf_bounds_1_5;
sf_bounds_tx = sf_bounds_1_5_tx;
max_cnt = 75;
tx_delay = 5;
#endif
}
for (card=0;card<MAX_CARDS;card++) {
#ifndef EXMIMO
openair0_cfg[card].samples_per_packet = samples_per_packets;
openair0_cfg[card].samples_per_packet = 1024;//samples_per_packets;
#endif
printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card,
((UE_flag==0) ? PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_tx : PHY_vars_UE_g[0][0]->lte_frame_parms.nb_antennas_tx),
......@@ -3338,6 +3352,7 @@ int main(int argc, char **argv) {
init_predef_traffic(UE_flag ? 1 : 0, UE_flag ? 0 : 1);
// }
#endif */
#ifdef EXMIMO
number_of_cards = openair0_num_detected_cards;
#else
......@@ -3348,7 +3363,7 @@ int main(int argc, char **argv) {
for(CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
rf_map[CC_id].card=0;
rf_map[CC_id].chain=CC_id;
rf_map[CC_id].chain=CC_id+3;
}
// connect the TX/RX buffers
......@@ -3510,7 +3525,7 @@ int main(int argc, char **argv) {
#ifndef RTAI
pthread_attr_init (&attr_dlsch_threads);
pthread_attr_setstacksize(&attr_dlsch_threads,OPENAIR_THREAD_STACK_SIZE);
pthread_attr_setstacksize(&attr_dlsch_threads,PTHREAD_STACK_MIN);
#ifndef LOWLATENCY
sched_param_dlsch.sched_priority = sched_get_priority_max(SCHED_FIFO); //OPENAIR_THREAD_PRIORITY;
......@@ -3518,7 +3533,7 @@ int main(int argc, char **argv) {
pthread_attr_setschedpolicy (&attr_dlsch_threads, SCHED_FIFO);
#endif
pthread_attr_init (&attr_UE_init_synch);
pthread_attr_setstacksize(&attr_UE_init_synch,OPENAIR_THREAD_STACK_SIZE);
pthread_attr_setstacksize(&attr_UE_init_synch,PTHREAD_STACK_MIN);
sched_param_UE_init_synch.sched_priority = sched_get_priority_max(SCHED_FIFO); //OPENAIR_THREAD_PRIORITY;
pthread_attr_setschedparam (&attr_UE_init_synch, &sched_param_UE_init_synch);
pthread_attr_setschedpolicy (&attr_UE_init_synch, SCHED_FIFO);
......@@ -3557,7 +3572,7 @@ int main(int argc, char **argv) {
}
printf("Creating main eNB_thread \n");
#ifdef RTAI
main_eNB_thread = rt_thread_create(eNB_thread, NULL, OPENAIR_THREAD_STACK_SIZE);
main_eNB_thread = rt_thread_create(eNB_thread, NULL, PTHREAD_STACK_MIN);
#else
error_code = pthread_create(&main_eNB_thread, &attr_dlsch_threads, eNB_thread, NULL);
if (error_code!= 0) {
......@@ -3891,14 +3906,14 @@ int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_c
for (i=0;i<frame_parms->nb_antennas_rx;i++) {
free(phy_vars_eNB[CC_id]->lte_eNB_common_vars.rxdata[0][i]);
rxdata[i] = (int32_t*)malloc16(samples_per_frame*sizeof(int32_t));
rxdata[i] = (int32_t*)(16 + malloc16(16+samples_per_frame*sizeof(int32_t)));
phy_vars_eNB[CC_id]->lte_eNB_common_vars.rxdata[0][i] = rxdata[i]-N_TA_offset; // N_TA offset for TDD
memset(rxdata[i], 0, samples_per_frame*sizeof(int32_t));
printf("rxdata[%d] @ %p (%p) (N_TA_OFFSET %d)\n", i, phy_vars_eNB[CC_id]->lte_eNB_common_vars.rxdata[0][i],rxdata[i],N_TA_offset);
}
for (i=0;i<frame_parms->nb_antennas_tx;i++) {
free(phy_vars_eNB[CC_id]->lte_eNB_common_vars.txdata[0][i]);
txdata[i] = (int32_t*)malloc16(samples_per_frame*sizeof(int32_t));
txdata[i] = (int32_t*)(16 + malloc16(16+samples_per_frame*sizeof(int32_t)));
phy_vars_eNB[CC_id]->lte_eNB_common_vars.txdata[0][i] = txdata[i];
memset(txdata[i], 0, samples_per_frame*sizeof(int32_t));
printf("txdata[%d] @ %p\n", i, phy_vars_eNB[CC_id]->lte_eNB_common_vars.txdata[0][i]);
......
......@@ -69,6 +69,8 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
LOG_I(PHY,"init eNB: frame_type %d,tdd_config %d\n", frame_parms->frame_type,frame_parms->tdd_config);
LOG_I(PHY,"init eNB: number of ue max %d number of enb max %d number of harq pid max %d\n",
NUMBER_OF_UE_MAX, NUMBER_OF_eNB_MAX, NUMBER_OF_HARQ_PID_MAX);
LOG_I(PHY,"init eNB: N_RB_DL %d\n", frame_parms->N_RB_DL);
LOG_I(PHY,"init eNB: Transmission mode %d\n", transmission_mode);
for (i=0;i<NUMBER_OF_UE_MAX;i++) {
for (j=0;j<2;j++) {
......
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