Commit da4320fc authored by knopp's avatar knopp
Browse files

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5924 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent db159480
......@@ -73,7 +73,7 @@ typedef struct {
/* TX bandwidth in Hz */
double tx_bw;
/* RRH IP addr for Ethernet interface */
char rrh_ip[20];
char *rrh_ip;
/* RRH port number for Ethernet interface */
int rrh_port;
} openair0_config_t;
......
......@@ -2,7 +2,7 @@
include $(OPENAIR_TARGETS)/Makerules
default: lte-softmodem
all: lte-softmodem lte-enb
all: lte-softmodem rrh
include $(OPENAIR_TARGETS)/Makedirectives
include $(OPENAIR_TARGETS)/Makefile.common
......@@ -23,7 +23,7 @@ USRP=0
endif
CFLAGS += -O2
CFLAGS += -DDRIVER2013 -I$(OPENAIR_TARGETS)/ARCH/COMMON
CFLAGS += -DDRIVER2013 -I$(OPENAIR_TARGETS)/ARCH/COMMON -I.
CFLAGS += -DMAX_NUM_CCs=1
......@@ -32,7 +32,7 @@ ifeq ($(EXMIMO),1)
endif
ifeq ($(ETHERNET),1)
CFLAGS += -I$(OPENAIR_TARGETS)/ARCH/ETHERNET/USERSPACE/LIB/
CFLAGS += -I$(OPENAIR_TARGETS)/ARCH/ETHERNET/USERSPACE/LIB/ -DETHERNET
endif
ifeq ($(DEBUG),1)
......@@ -46,7 +46,7 @@ CFLAGS += -DRRC_MSG_PRINT
CFLAGS += -DPDCP_MSG_PRINT
endif
SRC = synctest.c condtest.c #lte-softmodem.c
SRC = synctest.c condtest.c
ifndef RTAI
RTAI=1
......@@ -204,7 +204,7 @@ SHARED_DEPENDENCIES += $(LFDS_LIB)
-include $(ASN1_MSG_OBJS1:.o=.d)
-include $(RTAI_OBJ:.o=.d)
-include lte-softmodem.d
-include lte-enb.d
-include rrh.d
$(LFDS_LIB):
@if [ ! -d $(LFDS_OBJ_DIR)/bin ]; then mkdir -p $(LFDS_OBJ_DIR)/bin; fi;
......@@ -220,7 +220,7 @@ endif
ifeq ($(ETHERNET),1)
$(ETHERNET_OBJ):$(ETHERNET_FILE_OBJ)
@echo Compiling $<
@$(CC) -c $(ETHERNET_CFLAGS) $(ETHERNET_FILE_OBJ) -o $(ETHERNET_OBJ)
@$(CC) -c -g -ggdb $(ETHERNET_CFLAGS) $(ETHERNET_FILE_OBJ) -o $(ETHERNET_OBJ)
endif
ifeq ($(RTAI),1)
......@@ -247,6 +247,8 @@ else
$(OBJ) $(ASN1_MSG_OBJS1) lte-softmodem.o: %.o : %.c
endif
rrh.o: %.o : %.c
@echo Compiling $< ...
@$(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -o $@ $<
@$(CC) -MM $(CFLAGS) $(EXTRA_CFLAGS) $< > $*.d
......@@ -274,6 +276,9 @@ lte-softmodem: $(OBJ) $(USRP_OBJ) $(ETHERNET_OBJ) $(ASN1_MSG_OBJS1) $(RTAI_OBJ)
@echo Linking $@
@$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(OBJ) $(USRP_OBJ) $(ETHERNET_OBJ) $(RTAI_OBJ) $(ASN1_MSG_OBJS1) lte-softmodem.o -o lte-softmodem $(LDFLAGS) $(LIBS)
rrh: rrh.o
@$(CC) $(CFLAGS) $(EXTRA_CFLAGS) rrh.o -o rrh -lpthread
emos-raw: $(SHARED_DEPENDENCIES) $(OBJ_EMOS) emos-raw.c
@$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(RTAI_CFLAGS) $(OBJ_EMOS) -o emos-raw emos-raw.c $(LDFLAGS) $(LIBS)
......@@ -362,8 +367,8 @@ cleanmodem:
@$(RM_F_V) $(OBJ) $(RTAI_OBJ) $(OBJ_EMOS) $(OBJ_SYNC) $(USRP_OBJ)
@$(RM_F_V) $(OBJ:.o=.d) $(RTAI_OBJ:.o=.d) $(OBJ_EMOS:.o=.d) $(OBJ_SYNC:.o=.d)
@$(RM_F_V) $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1_msg.o $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1_msg.d
@$(RM_F_V) lte-enb.o lte-enb.d lte-softmodem.o lte-softmodem.d
@$(RM_F_V) lte-enb.o lte-softmodem.o
@$(RM_F_V) rrh.o rrh.d lte-softmodem.o lte-softmodem.d
@$(RM_F_V) rrh.o lte-softmodem.o
cleanasn1:
rm -f $(ASN1_MSG_OBJS1)
......@@ -383,11 +388,11 @@ cleancell:
cleanalmostall: cleanmodem
rm -f $(ASN1_MSG_OBJS1)
rm -rf condtest synctest lte-softmodem
rm -rf condtest synctest lte-softmodem rrh
rm -rf synctest_eNB synctest_UE
cleanall: common-cleanall clean cleanasn1
rm -rf condtest synctest lte-softmodem lte-softmodem-usrp
rm -rf condtest synctest lte-softmodem rrh
rm -rf synctest_eNB synctest_UE
show:
......
......@@ -1313,7 +1313,7 @@ static void *eNB_thread(void *arg)
timing_info.time_avg = 0;
timing_info.n_samples = 0;
#ifdef USRP
#ifndef EXMIMO
printf("waiting for USRP sync (eNB_thread)\n");
#ifdef RTAI
rt_sem_wait(sync_sem);
......@@ -2633,6 +2633,10 @@ int main(int argc, char **argv) {
unsigned int tcxo = 114;
#endif
#ifdef ETHERNET
char *rrh_ip = "127.0.0.1";
int rrh_port = 22222;
#endif
// int amp;
// uint8_t prach_fmt;
// int N_ZC;
......@@ -3016,6 +3020,14 @@ int main(int argc, char **argv) {
for (card=0;card<MAX_CARDS;card++) {
printf("HW: Configuring card %d\n",card);
openair0_cfg[card].Mod_id = 0;
#ifdef ETHERNET
printf("ETHERNET: Configuring ETH for %s:%d\n",rrh_ip,rrh_port);
openair0_cfg[card].rrh_ip = &rrh_ip[0];
openair0_cfg[card].rrh_port = rrh_port;
#endif
openair0_cfg[card].sample_rate = sample_rate;
openair0_cfg[card].tx_bw = bw;
openair0_cfg[card].rx_bw = bw;
......
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