Commit bd7b0ead authored by Florian Kaltenberger's avatar Florian Kaltenberger

merges from branch regarding openair1


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7119 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 56c90005
......@@ -3,7 +3,7 @@
# these flags have to be explicitely exported so that the sub-make is aware of them
include $(OPENAIR_HOME)/common/utils/Makefile.inc
include $(OPENAIR_DIR)/common/utils/Makefile.inc
ifndef OPENAIR_LTE
export OPENAIR_LTE=1
endif
......
include $(OPENAIR_HOME)/common/utils/Makefile.inc
include $(OPENAIR_DIR)/common/utils/Makefile.inc
COMMON_UTILS_DIR = $(OPENAIR_HOME)/common/utils
COMMON_UTILS_DIR = $(OPENAIR_DIR)/common/utils
TOP_DIR = $(OPENAIR1_DIR)
OPENAIR1_TOP = $(OPENAIR1_DIR)
OPENAIR2_TOP = $(OPENAIR2_DIR)
......
......@@ -46,10 +46,11 @@
#ifdef OPENAIR2
#include "../openair2/LAYER2/MAC/proto.h"
#include "../openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#endif
extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index);
#if defined(USRP) || defined(EXMIMO)
#if defined(OAI_USRP) || defined(EXMIMO)
#include "common_lib.h"
extern openair0_config_t openair0_cfg[];
#endif
......@@ -86,7 +87,7 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t
#ifdef EXMIMO
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB (LNA %d, vga %d dB)\n",phy_vars_ue->rx_total_gain_dB, openair0_cfg[0].rxg_mode[0],(int)openair0_cfg[0].rx_gain[0]);
#endif
#ifdef USRP
#ifdef OAI_USRP
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB\n",phy_vars_ue->rx_total_gain_dB);
#endif
......@@ -451,7 +452,7 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t
}
#ifdef OPENAIR2
RRC_status = mac_get_rrc_status(phy_vars_ue->Mod_id,0,0);
RRC_status = mac_UE_get_rrc_status(phy_vars_ue->Mod_id, 0);
len += sprintf(&buffer[len],"[UE PROC] RRC status = %d\n",RRC_status);
#endif
len += sprintf(&buffer[len],"[UE PROC] RSRP[0] %.2f dBm/RE, RSSI %.2f, RSRQ[0] %.2f\n",
......@@ -661,7 +662,7 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
UE_id_mac = find_UE_id(phy_vars_eNB->Mod_id,phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->rnti);
if (UE_id_mac != -1) {
RRC_status = mac_get_rrc_status(phy_vars_eNB->Mod_id,1,UE_id_mac);
RRC_status = mac_eNB_get_rrc_status(phy_vars_eNB->Mod_id,phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->rnti);
len += sprintf(&buffer[len],"[eNB PROC] UE_id_mac = %d, RRC status = %d\n",UE_id_mac,RRC_status);
} else
len += sprintf(&buffer[len],"[eNB PROC] UE_id_mac = -1\n");
......
......@@ -2545,7 +2545,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
phy_procedures_emos_eNB_TX(subframe, phy_vars_eNB);
#endif
#if !(defined(EXMIMO) || defined(USRP) || defined (CPRIGW))
#if !(defined(EXMIMO) || defined(OAI_USRP) || defined (CPRIGW))
if (abstraction_flag==0)
{
......
......@@ -122,7 +122,7 @@ extern int rx_sig_fifo;
#endif
#if defined(EXMIMO) || defined(USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
extern uint32_t downlink_frequency[MAX_NUM_CCs][4];
#endif
......@@ -619,7 +619,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
uint8_t ack_status=0;
int8_t Po_PUCCH;
int32_t ulsch_start=0;
#if defined(EXMIMO) || defined(USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
int overflow=0;
int k,l;
#endif
......@@ -934,7 +934,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d, generating PUSCH, Po_PUSCH: %d dBm, amp %d\n",
Mod_id,harq_pid,frame_tx,subframe_tx,phy_vars_ue->tx_power_dBm,
#if defined(EXMIMO) || defined(USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
get_tx_amp(phy_vars_ue->tx_power_dBm,phy_vars_ue->tx_power_max_dBm)
#else
AMP
......@@ -942,7 +942,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
);
start_meas(&phy_vars_ue->ulsch_modulation_stats);
ulsch_modulation(phy_vars_ue->lte_ue_common_vars.txdataF,
#if defined(EXMIMO) || defined(USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
get_tx_amp(phy_vars_ue->tx_power_dBm,phy_vars_ue->tx_power_max_dBm),
#else
AMP,
......@@ -951,8 +951,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
subframe_tx,
&phy_vars_ue->lte_frame_parms,
phy_vars_ue->ulsch_ue[eNB_id]);
#if defined(EXMIMO) || defined(USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
for (aa=0; aa<1/*frame_parms->nb_antennas_tx*/; aa++)
generate_drs_pusch(phy_vars_ue,eNB_id,get_tx_amp(phy_vars_ue->tx_power_dBm,phy_vars_ue->tx_power_max_dBm),subframe_tx,first_rb,nb_rb,aa);
......@@ -1041,7 +1040,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
frame_tx, subframe_tx,
phy_vars_ue->scheduling_request_config[eNB_id].sr_PUCCH_ResourceIndex,
Po_PUCCH,
#if defined(EXMIMO) || defined(USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
get_tx_amp(Po_PUCCH,phy_vars_ue->tx_power_max_dBm)
#else
AMP
......@@ -1054,7 +1053,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
frame_tx, subframe_tx,
n1_pucch,pucch_ack_payload[0],pucch_ack_payload[1],SR_payload,
Po_PUCCH,
#if defined(EXMIMO) || defined(USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
get_tx_amp(Po_PUCCH,phy_vars_ue->tx_power_max_dBm)
#else
AMP
......@@ -1073,7 +1072,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
0, // n2_pucch
1, // shortened format
pucch_ack_payload,
#if defined(EXMIMO) || defined(USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
get_tx_amp(Po_PUCCH,phy_vars_ue->tx_power_max_dBm),
#else
AMP,
......@@ -1119,7 +1118,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
0, // n2_pucch
1, // shortened format
pucch_ack_payload, // this is ignored anyway, we just need a pointer
#if defined(EXMIMO) || defined(USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
get_tx_amp(Po_PUCCH,phy_vars_ue->tx_power_max_dBm),
#else
AMP,
......@@ -1199,7 +1198,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
if (abstraction_flag == 0) {
nsymb = (frame_parms->Ncp == 0) ? 14 : 12;
#if defined(EXMIMO) || defined(USRP) //this is the EXPRESS MIMO case
#if defined(EXMIMO) || defined(OAI_USRP) //this is the EXPRESS MIMO case
ulsch_start = (phy_vars_ue->rx_offset+subframe_tx*frame_parms->samples_per_tti-
openair_daq_vars.timing_advance-
phy_vars_ue->timing_advance-
......@@ -1223,7 +1222,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
if (frame_parms->Ncp == 1)
PHY_ofdm_mod(&phy_vars_ue->lte_ue_common_vars.txdataF[aa][subframe_tx*nsymb*frame_parms->ofdm_symbol_size],
#if defined(EXMIMO) || defined(USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
dummy_tx_buffer,
#else
&phy_vars_ue->lte_ue_common_vars.txdata[aa][ulsch_start],
......@@ -1236,7 +1235,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
CYCLIC_PREFIX);
else
normal_prefix_mod(&phy_vars_ue->lte_ue_common_vars.txdataF[aa][subframe_tx*nsymb*frame_parms->ofdm_symbol_size],
#if defined(EXMIMO) || defined(USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
dummy_tx_buffer,
#else
&phy_vars_ue->lte_ue_common_vars.txdata[aa][ulsch_start],
......@@ -1257,7 +1256,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
}
*/
#ifndef OFDMA_ULSCH
#if defined(EXMIMO) || defined(USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
apply_7_5_kHz(phy_vars_ue,dummy_tx_buffer,0);
apply_7_5_kHz(phy_vars_ue,dummy_tx_buffer,1);
#else
......@@ -1272,7 +1271,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
*/
#endif
#if defined(EXMIMO) || defined(USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
overflow = ulsch_start - 9*frame_parms->samples_per_tti;
//if ((slot_tx==4) && (aa==0)) printf("ulsch_start %d, overflow %d\n",ulsch_start,overflow);
......@@ -1358,7 +1357,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
phy_vars_ue->tx_total_RE = 96;
#if defined(EXMIMO) || defined(USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
phy_vars_ue->lte_ue_prach_vars[eNB_id]->amp = get_tx_amp(phy_vars_ue->tx_power_dBm,phy_vars_ue->tx_power_max_dBm);
#else
phy_vars_ue->lte_ue_prach_vars[eNB_id]->amp = AMP;
......@@ -1560,7 +1559,7 @@ void lte_ue_measurement_procedures(uint16_t l, PHY_VARS_UE *phy_vars_ue,uint8_t
gain_control_all(phy_vars_ue->PHY_measurements.rx_power_avg_dB[eNB_id],0);
#else
#ifndef USRP
#ifndef OAI_USRP
phy_adjust_gain (phy_vars_ue,0);
#endif
#endif
......@@ -3622,7 +3621,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstr
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_LTE,1);
#if defined(EXMIMO)
#ifndef USRP
#ifndef OAI_USRP
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_DAQ_MBOX, *((volatile unsigned int *) openair0_exmimo_pci[0].rxcnt_ptr[0]));
#endif
#endif
......
......@@ -68,17 +68,21 @@ int netlink_init(void)
if (nas_sock_fd == -1) {
printf("[NETLINK] Error opening socket %d (%d:%s)\n",nas_sock_fd,errno, strerror(errno));
// exit(1);
#if defined(LINK_ENB_PDCP_TO_IP_DRIVER)
exit(1);
#endif
}
printf("[NETLINK]Opened socket with fd %d\n",nas_sock_fd);
#if !defined(ENABLE_PDCP_NETLINK_FIFO)
#if !defined(USE_PDCP_NETLINK_QUEUES)
ret = fcntl(nas_sock_fd,F_SETFL,O_NONBLOCK);
if (ret == -1) {
printf("[NETLINK] Error fcntl (%d:%s)\n",errno, strerror(errno));
// exit(1);
#if defined(LINK_ENB_PDCP_TO_IP_DRIVER)
exit(1);
#endif
}
#endif
......
include $(OPENAIR_HOME)/common/utils/Makefile.inc
include $(OPENAIR_DIR)/common/utils/Makefile.inc
COMMON_UTILS_DIR = $(OPENAIR_HOME)/common/utils
COMMON_UTILS_DIR = $(OPENAIR_DIR)/common/utils
TOP_DIR = $(OPENAIR1_DIR)
OPENAIR1_TOP = $(OPENAIR1_DIR)
OPENAIR2_TOP = $(OPENAIR2_DIR)
......
include $(OPENAIR_HOME)/common/utils/Makefile.inc
include $(OPENAIR_DIR)/common/utils/Makefile.inc
OBJS = rf.o ../../PHY/TOOLS/file_output.o ../TOOLS/rangen_double.o
CFLAGS += -DRF_MAIN -DUSER_MODE -DDEBUG_PHY
......
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