Commit a9cc4323 authored by Florian Kaltenberger's avatar Florian Kaltenberger

removing directories openair1/ARCH and openair1/LAUNCH_SRIPTS and all references to it

(the only variable that was used is number_of_cards, which is now in openair1/PHY/[vars,extern].h)


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6096 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent fd337a58
This diff is collapsed.
CCC = gcc
KERNEL_MAIN_TYPE=$(shell echo `uname -r | cut -d. -f-2 | tr "." "_"`)
export KERNEL_MAIN_TYPE
SUBVERSION=$(shell echo `grep '^SUBLEVEL =' /usr/src/linux/Makefile | sed -e 's, ,,g' | sed -e 's/SUBLEVEL=//'`)
IS_KERNEL_SUBVERSION_GREATER_THAN_20=$(shell if [ $(SUBVERSION) -ge 20 ] ; then echo true ; fi)
GRPCI_SOFTCONFIG_H=grpci_softconfig.h
GRPCI_SOFTREGS_H=grpci_softregs.h
TOP_DIR = ../../..
OPENAIR1_TOP = ../../..
OPENAIR2_TOP = ../../../../openair2
OPENAIR3_TOP = ../../../../openair3
ifdef RTAI
# Get the RTAI variables
CCC = $(shell rtai-config --cc)
RTAI_SUBVERSION=$(shell rtai-config --version | sed -e 's/^..\(.\).*$$/\1/')
IS_RTAI_SUBVERSION_LESS_THAN_FIVE=$(shell if [ $(RTAI_SUBVERSION) -lt 5 ] ; then echo true ; fi)
EXTRA_CFLAGS = -D__IN_RTAI__ $(shell rtai-config --module-cflags) -ggdb -march=pentium4 -DNODE_RG -DBIGPHYSAREA -DRTAI -DRTAI_ENABLED $(if $(IS_KERNEL_SUBVERSION_GREATER_THAN_20),-mregparm=3 -fno-stack-protector,) -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DWIDENS_DLC -I/lib/modules/$(shell uname -r)/build/include -I/lib/modules/$(shell uname -r)/build/include/asm/mach-default -include /lib/modules/$(shell uname -r)/build/include/linux/autoconf.h $(if $(IS_RTAI_SUBVERSION_LESS_THAN_FIVE),-DRTAI_ISNT_POSIX,)
endif
GCCVERSION = $(shell gcc --version | grep ^gcc | sed 's/^.* //g')
ifeq "$(GCCVERSION)" "4.4.3"
EXTRA_CFLAGS += -Wno-packed-bitfield-compat
endif
ifeq "$(GCCVERSION)" "4.5.2"
EXTRA_CFLAGS += -Wno-packed-bitfield-compat
endif
EXTRA_CFLAGS += -DKERNEL$(KERNEL_MAIN_TYPE)
#-DOLD_REMAP
# Old for 2.6.20
#EXTRA_CFLAGS += -Wall -Wstrict-prototypes -fno-common -fno-strict-aliasing -pipe -fno-strength-reduce -mmmx -msse -msse2 -falign-loops=2 -falign-jumps=2 -falign-functions=2 -DCPU=686 -DMODULE -D_LOOSE_KERNEL_NAMES -O2
#EXTRA_CFLAGS += -Wall -Wstrict-prototypes -fno-common -fno-strict-aliasing -fno-unit-at-a-time -march=i686 -fno-strength-reduce -fno-exceptions -pipe -mmmx -msse -msse2 -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fno-common -ffreestanding -fomit-frame-pointer -nostdinc -DMODULE -D_LOOSE_KERNEL_NAMES -O2
#EXTRA_CFLAGS += -Wstrict-prototypes -fno-common -fno-strict-aliasing -pipe -mpreferred-stack-boundary=4 -freg-struct-return -ffreestanding -maccumulate-outgoing-args -funroll-loops -march=i686 -fomit-frame-pointer -nostdinc -O2
EXTRA_CFLAGS += -fno-common -fno-strict-aliasing -pipe -mpreferred-stack-boundary=4 -freg-struct-return -ffreestanding -maccumulate-outgoing-args -funroll-loops -march=i686 -nostdinc -O2
SSE3PROC = $(shell echo `grep ssse3 /proc/cpuinfo`)
#SSE4PROC = $(shell echo `grep sse4 /proc/cpuinfo`)
CPUFLAGS = -mmmx -msse -msse2 -m32
CPUFLAGS += $(shell if [ -z $(SSE3PROC)]; then echo "" ; else echo "-mssse3"; fi)
#CPUFLAGS += $(shell if [ -z $(SSE4PROC)]; then echo "" ; else echo "-msse4"; fi)
EXTRA_CFLAGS += $(CPUFLAGS)
EXTRA_CFLAGS += -DMAC_CONTEXT -DPHY_CONTEXT -DPC_TARGET -DPC_DSP
ifdef DEBUG_PHY
EXTRA_CFLAGS += -DDEBUG_PHY
endif
ifdef NO_CARD_TEST
EXTRA_CFLAGS += -DNOCARD_TEST
endif
ifeq ($(EMOS),1)
EXTRA_CFLAGS += -DEMOS
endif
ifdef DUALSTREAM
EXTRA_CFLAGS += -DDUALSTREAM
endif
ifdef BIT8_TX
EXTRA_CFLAGS += -DBIT8_TX
endif
ifdef IDROMEL_RF
EXTRA_CFLAGS += -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=1 -DNB_ANTENNAS_TXRX=2
else
EXTRA_CFLAGS += -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DNB_ANTENNAS_TXRX=2
endif
ifdef CBMIMO1
EXTRA_CFLAGS += -DCBMIMO1
endif
ifeq ($(FIRMWARE2010),1)
EXTRA_CFLAGS += -DIFFT_FPGA -DIFFT_FPGA_UE -DOFDMA_ULSCH -DHW_PREFIX_REMOVAL
else
EXTRA_CFLAGS += -DFW2011 -DPUCCH
endif
ifeq ($(OPENAIR_LTE),1)
EXTRA_CFLAGS += -DOPENAIR_LTE
endif
ifeq ($(OPENAIR1),1)
EXTRA_CFLAGS += -DDLSCH_THREAD -DOPENAIR1
endif
ifeq ($(OPENAIR2),1)
EXTRA_CFLAGS += -DOPENAIR2
endif
EXTRA_CFLAGS += -I/usr/include -I/usr/realtime/include
EXTRA_CFLAGS += -I$(OPENAIR1_DIR)
#EXTRA_CFLAGS += -DEMIT_ASN_DEBUG=0
include $(OPENAIR1_DIR)/SCHED/Makefile.inc
include $(OPENAIR1_DIR)/PHY/Makefile.inc
#ifeq ($(OPENAIR2),1)
include $(OPENAIR2_DIR)/LAYER2/Makefile.inc
#else
include $(OPENAIR1_DIR)/MAC_INTERFACE/Makefile.inc
#endif
EXTRA_CFLAGS += $(subst $(OPENAIR2_TOP), $(OPENAIR2_DIR), $(L2_incl))
include $(OPENAIR2_DIR)/UTIL/Makefile.inc
EXTRA_CFLAGS += $(subst $(OPENAIR2_TOP), $(OPENAIR2_DIR), $(UTIL_incl))
ccflags-y += $(EXTRA_CFLAGS)
EXTRA_CFLAGS= ""
include $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc
obj-m += openair_rf.o
# Device driver
openair_rf-objs += $(OPENAIR1_TOP)/ARCH/COMMON/bigphys.o
openair_rf-objs += $(OPENAIR1_TOP)/ARCH/COMMON/reserve_mem.o
#openair_rf-objs += $(OPENAIR1_TOP)/ARCH/COMMON/amp.o
openair_rf-objs += cbmimo1_device.o cbmimo1_rf_cntl.o cbmimo1_init.o cbmimo1_dma.o cbmimo1_get_frame.o cbmimo1_fileops.o fifo_printf.o cbmimo1_proc.o exmimo_fw.o
#openair_rf-objs += cbmimo1_generate_ofdm.o cbmimo1_generate_fs4.o
# MAC Interface
#openair_rf-objs += $(OPENAIR1_TOP)/MAC_INTERFACE/register.o
#openair_rf-objs += $(OPENAIR1_TOP)/MAC_INTERFACE/init.o
# Sched
ifeq ($(FIRMWARE2010),1)
openair_rf-objs += $(OPENAIR1_TOP)/SCHED/sched_lte.o
else
#openair_rf-objs += $(OPENAIR1_TOP)/SCHED/sched_lte_fw2011.o
openair_rf-objs += $(OPENAIR1_TOP)/SCHED/sched_lte_user.o
endif
ifeq ($(OPENAIR1),1)
openair_rf-objs += $(OPENAIR1_TOP)/SCHED/sched_dlsch.o
endif
# Init
openair_rf-objs += $(OPENAIR1_TOP)/PHY/INIT/init_top.o
openair_rf-objs += $(OPENAIR1_TOP)/PHY/INIT/lte_parms.o
# Tools
openair_rf-objs += $(OPENAIR1_TOP)/PHY/TOOLS/memory_routines.o
openair_rf-objs += $(OPENAIR1_TOP)/PHY/TOOLS/fft.o
openair_rf-objs += $(OPENAIR1_TOP)/SIMULATION/TOOLS/taus.o
#include files for MODEM
ifeq ($(OPENAIR1),1)
openair_rf-objs += $(SCHED_OBJS)
openair_rf-objs += $(PHY_OBJS)
endif
#include files for OPENAIR2
ifeq ($(OPENAIR2),1)
openair_rf-objs += $(L2_OBJS)
openair_rf-objs += $(LIST_OBJ)
openair_rf-objs += $(TIMER_OBJ)
openair_rf-objs += $(MEM_OBJ)
else
openair_rf-objs += $(MAC_XFACE_OBJS)
endif
#openair_rf-objs += $(LOG_DIR)/log.o
openair_rf_cbmimo1_softmodem.ko:
(cd $(OPENAIR1_TOP) ; make openair_rf_cbmimo1_softmodem.ko)
oai_user_cbmimo1.ko:
(cd $(OPENAIR1_TOP) ; make oai_user_cbmimo1.ko)
oai_user_exmimo:
(cd $(OPENAIR1_TOP) ; make oai_user_exmimo.ko)
test:
echo $(openair_rf-objs)
echo $(obj-m)
# echo $(CFLAGS)
echo $(ccflags-y) #echo$(EXTRA_CFLAGS)
clean:
rm -f $(openair_rf-objs) $(obj-m)
rm -f openair_rf.mod.c .*.cmd *.o modules.order Module.symvers
rm -rf .tmp_versions/
ultraclean: clean
rm -f *.ko
CCC = gcc
KERNEL_MAIN_TYPE=$(shell echo `uname -r | cut -d. -f-2 | tr "." "_"`)
export KERNEL_MAIN_TYPE
SUBVERSION=$(shell echo `grep '^SUBLEVEL =' /usr/src/linux/Makefile | sed -e 's, ,,g' | sed -e 's/SUBLEVEL=//'`)
IS_KERNEL_SUBVERSION_GREATER_THAN_20=$(shell if [ $(SUBVERSION) -ge 20 ] ; then echo true ; fi)
GRPCI_SOFTCONFIG_H=grpci_softconfig.h
GRPCI_SOFTREGS_H=grpci_softregs.h
TOP_DIR = .
OPENAIR1_TOP = .
OPENAIR2_TOP = ../openair2
OPENAIR3_TOP = ../openair3
ifdef RTAI
# Get the RTAI variables
CCC = $(shell rtai-config --cc)
RTAI_SUBVERSION=$(shell rtai-config --version | sed -e 's/^..\(.\).*$$/\1/')
IS_RTAI_SUBVERSION_LESS_THAN_FIVE=$(shell if [ $(RTAI_SUBVERSION) -lt 5 ] ; then echo true ; fi)
EXTRA_CFLAGS = -D__IN_RTAI__ $(shell rtai-config --module-cflags) -g -march=pentium4 -DNODE_RG -DBIGPHYSAREA -DRTAI -DRTAI_ENABLED $(if $(IS_KERNEL_SUBVERSION_GREATER_THAN_20),-mregparm=3 -fno-stack-protector,) -DHW_PREFIX_REMOVAL -Wall -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DWIDENS_DLC -I/lib/modules/$(shell uname -r)/build/include -I/lib/modules/$(shell uname -r)/build/include/asm/mach-default -include /lib/modules/$(shell uname -r)/build/include/linux/autoconf.h $(if $(IS_RTAI_SUBVERSION_LESS_THAN_FIVE),-DRTAI_ISNT_POSIX,)
endif
EXTRA_CFLAGS += -DKERNEL$(KERNEL_MAIN_TYPE)
#-DOLD_REMAP
# Old for 2.6.20
#EXTRA_CFLAGS += -Wall -Wstrict-prototypes -fno-common -fno-strict-aliasing -pipe -fno-strength-reduce -mmmx -msse -msse2 -falign-loops=2 -falign-jumps=2 -falign-functions=2 -DCPU=686 -DMODULE -D_LOOSE_KERNEL_NAMES -O2
#EXTRA_CFLAGS += -Wall -Wstrict-prototypes -fno-common -fno-strict-aliasing -fno-unit-at-a-time -march=i686 -fno-strength-reduce -fno-exceptions -pipe -mmmx -msse -msse2 -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fno-common -ffreestanding -fomit-frame-pointer -nostdinc -DMODULE -D_LOOSE_KERNEL_NAMES -O2
EXTRA_CFLAGS += -Wall -Wstrict-prototypes -fno-common -fno-strict-aliasing -pipe -mpreferred-stack-boundary=4 -freg-struct-return -ffreestanding -maccumulate-outgoing-args -funroll-loops -march=i686 -fomit-frame-pointer -nostdinc -O2
SSE3PROC = $(shell echo `grep ssse3 /proc/cpuinfo`)
SSE4PROC = $(shell echo `grep sse4 /proc/cpuinfo`)
CPUFLAGS = -mmmx -msse -msse2 -m32
CPUFLAGS += $(shell if [ -z $(SSE3PROC)]; then echo "" ; else echo "-mssse3"; fi)
CPUFLAGS += $(shell if [ -z $(SSE4PROC)]; then echo "" ; else echo "-msse4"; fi)
EXTRA_CFLAGS += $(CPUFLAGS)
EXTRA_CFLAGS += -DMAX_MODULES=1 -DNO_RRM -DMAC_CONTEXT -DPHY_CONTEXT -DPC_TARGET -DPC_DSP -UDLSCH_THREAD -DPHY_ABSTRACTION
ifdef DEBUG_PHY
EXTRA_CFLAGS += -DDEBUG_PHY
endif
ifdef NO_CARD_TEST
EXTRA_CFLAGS += -DNOCARD_TEST
endif
ifeq ($(EMOS),1)
EXTRA_CFLAGS += -DEMOS
endif
ifdef DUALSTREAM
EXTRA_CFLAGS += -DDUALSTREAM
endif
ifndef NO_TXMUX
EXTRA_CFLAGS += -DBIT8_TXMUX -DBIT8_TX
endif
ifdef IDROMEL_RF
EXTRA_CFLAGS += -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=1 -DNB_ANTENNAS_TXRX=2
else
EXTRA_CFLAGS += -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DNB_ANTENNAS_TXRX=2
endif
ifdef CBMIMO1
EXTRA_CFLAGS += -DCBMIMO1
endif
ifeq ($(OPENAIR_LTE),1)
EXTRA_CFLAGS += -DOPENAIR_LTE -DIFFT_FPGA -DIFFT_FPGA_UE -DOFDMA_ULSCH
endif
EXTRA_CFLAGS += -I$(OPENAIR1_DIR) -I$(OPENAIR2_DIR) -I$(OPENAIR2_DIR)/COMMON -I$(OPENAIR2_DIR)/LAYER2/MAC -I$(OPENAIR2_DIR)/LAYER2/PDCP -I$(OPENAIR2_DIR)/LAYER2/RLC -I$(OPENAIR2_DIR)/LAYER2/RLC/AM -I$(OPENAIR2_DIR)/LAYER2/RLC/TM -I$(OPENAIR2_DIR)/LAYER2/RLC/UM_v9.3.0 -I$(OPENAIR2_DIR)/PHY_INTERFACE -I$(OPENAIR2_DIR)/RRC/L2_INTERFACE -I$(OPENAIR2_DIR)/RRC/LITE -I$(OPENAIR2_DIR)/RRC/LITE/MESSAGES -I$(OPENAIR2_DIR)/UTIL/LISTS -I$(OPENAIR2_DIR)/UTIL/LOG -I$(OPENAIR2_DIR)/UTIL/MATH -I$(OPENAIR2_DIR)/UTIL/MEM -I$(OPENAIR2_DIR)/UTIL/TIMER -I/usr/include -I$(OPENAIR3_DIR)/MESH
include $(OPENAIR1_DIR)/SCHED/Makefile.inc
include $(OPENAIR1_DIR)/PHY/Makefile.inc
ifeq ($(OPENAIR2),1)
include $(OPENAIR2_DIR)/LAYER2/Makefile.inc
include $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc
else
include $(OPENAIR1_DIR)/MAC_INTERFACE/Makefile.inc
endif
obj-m += openair_rf.o
# Device driver
openair_rf-objs += $(OPENAIR1_TOP)/ARCH/COMMON/bigphys.o
openair_rf-objs += $(OPENAIR1_TOP)/ARCH/COMMON/reserve_mem.o
#openair_rf-objs += $(OPENAIR1_TOP)/ARCH/COMMON/amp.o
openair_rf-objs += $(OPENAIR1_TOP)/ARCH/CBMIMO1/DEVICE_DRIVER/cbmimo1_device.o
openair_rf-objs += $(OPENAIR1_TOP)/ARCH/CBMIMO1/DEVICE_DRIVER/cbmimo1_rf_cntl.o
openair_rf-objs += $(OPENAIR1_TOP)/ARCH/CBMIMO1/DEVICE_DRIVER/cbmimo1_init.o
openair_rf-objs += $(OPENAIR1_TOP)/ARCH/CBMIMO1/DEVICE_DRIVER/cbmimo1_dma.o
openair_rf-objs += $(OPENAIR1_TOP)/ARCH/CBMIMO1/DEVICE_DRIVER/cbmimo1_get_frame.o
openair_rf-objs += $(OPENAIR1_TOP)/ARCH/CBMIMO1/DEVICE_DRIVER/cbmimo1_fileops.o
openair_rf-objs += $(OPENAIR1_TOP)/ARCH/CBMIMO1/DEVICE_DRIVER/fifo_printf.o
openair_rf-objs += $(OPENAIR1_TOP)/ARCH/CBMIMO1/DEVICE_DRIVER/cbmimo1_proc.o
#openair_rf-objs += cbmimo1_generate_ofdm.o cbmimo1_generate_fs4.o
# MAC Interface
#openair_rf-objs += $(OPENAIR1_TOP)/MAC_INTERFACE/register.o
#openair_rf-objs += $(OPENAIR1_TOP)/MAC_INTERFACE/init.o
openair_rf-objs += $(MAC_XFACE_OBJS)
# Sched
openair_rf-objs += $(OPENAIR1_TOP)/SCHED/sched_lte.o
#openair_rf-objs += $(OPENAIR1_TOP)/SCHED/sched_dlsch.o
# Init
openair_rf-objs += $(OPENAIR1_TOP)/PHY/INIT/init_top.o
# Tools
openair_rf-objs += $(OPENAIR1_TOP)/PHY/TOOLS/memory_routines.o
openair_rf-objs += $(OPENAIR1_TOP)/PHY/TOOLS/fft.o
openair_rf-objs += $(OPENAIR1_TOP)/SIMULATION/TOOLS/taus.o
#include files for MODEM
ifeq ($(OPENAIR1),1)
openair_rf-objs += $(SCHED_OBJS)
openair_rf-objs += $(PHY_OBJS)
endif
#include files for OPENAIR2
ifeq ($(OPENAIR2),1)
openair_rf-objs += $(L2_OBJS)
#openair_rf-objs += $(ASN1_MSG_OBJS)
endif
This diff is collapsed.
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#ifndef OPENAIR_DEVICE_H
#define OPENAIR_DEVICE_H
#define XILINX_VENDOR 0x10ee
#define XILINX_ID 0x0007
#define GRLIB_VENDOR 0x16e3
#define GRLIB_ID 0x0210
#define openair_MAJOR 127
//#define openair_writeb(val,port) pci_config_writel(); //{writeb((ucchar)(val),(ulong)(port)); mb();}
//#define openair_writew(val,port) //{writew((ushort)(val),(ulong)(port)); mb();}
#define openair_writel(dev,offset,val) pci_write_config_dword(dev,(int)offset,(unsigned int)val)//{writel((uclong)(val),(ulong)(port)); mb();}
#define openair_readl(dev,offset,val) pci_read_config_dword(dev,(int)offset,(unsigned int*)val)//{writel((uclong)(val),(ulong)(port)); mb();}
//#define openair_readb(port) readb(port)
//#define openair_readw(port) readw(port)
//#define openair_readl(port) readl(port)
#define openair_IOC_MAGIC 'm'
#define openair_TEST_FPGA _IOR(openair_IOC_MAGIC,1,int)
#define openair_START_1ARY_CLUSTERHEAD _IOR(openair_IOC_MAGIC,2,int)
#define openair_START_2ARY_CLUSTERHEAD _IOR(openair_IOC_MAGIC,3,int)
#define openair_START_NODE _IOR(openair_IOC_MAGIC,4,int)
#define openair_STOP _IOR(openair_IOC_MAGIC,5,int)
#define openair_GET_BUFFER _IOR(openair_IOC_MAGIC,6,int)
#define openair_GET_CONFIG _IOR(openair_IOC_MAGIC,7,int)
#define openair_GET_VARS _IOR(openair_IOC_MAGIC,8,int)
#define openair_SET_TX_GAIN _IOR(openair_IOC_MAGIC,9,int)
#define openair_SET_RX_GAIN _IOR(openair_IOC_MAGIC,10,int)
#define openair_SET_LO_FREQ _IOR(openair_IOC_MAGIC,11,int)
#define openair_START_FS4_TEST _IOR(openair_IOC_MAGIC,12,int)
#define openair_START_OFDM_TEST _IOR(openair_IOC_MAGIC,13,int)
#define openair_START_QAM16_TEST _IOR(openair_IOC_MAGIC,14,int)
#define openair_START_QPSK_TEST _IOR(openair_IOC_MAGIC,15,int)
#define openair_START_IQ_IMPULSES_TEST _IOR(openair_IOC_MAGIC,16,int)
#define openair_START_REAL_FS4_WITH_DC_TEST _IOR(openair_IOC_MAGIC,17,int)
#define openair_DUMP_CONFIG _IOR(openair_IOC_MAGIC,18,int)
#define openair_RX_RF_MODE _IOR(openair_IOC_MAGIC,19,int)
#define openair_SET_TCXO_DAC _IOR(openair_IOC_MAGIC,20,int)
#define openair_GET_PHASE_ESTIMATE _IOR(openair_IOC_MAGIC,21,int)
#define openair_DO_SYNCH _IOR(openair_IOC_MAGIC,22,int)
#define openair_GET_SIGNALS _IOR(openair_IOC_MAGIC,23,int)
#define openair_SET_FFT_SCALE _IOR(openair_IOC_MAGIC,24,int)
#define openair_FFT_TEST _IOR(openair_IOC_MAGIC,25,int)
#define openair_START_CHANSOUNDER _IOR(openair_IOC_MAGIC,26,int)
#define openair_SET_CALIBRATED_RX_GAIN _IOR(openair_IOC_MAGIC,27,int)
#define openair_START_TX_SIG _IOR(openair_IOC_MAGIC,28,int)
/* 5 new ioctls for control of new RF prototype chain (K. Khalfallah, March 2007) */
/* Non posted ioctls (generate an Irq to Leon processor) */
#define openair_NEWRF_ADF4108_WRITE_REG _IOR(openair_IOC_MAGIC,29,int)
#define openair_NEWRF_ADF4108_INIT _IOR(openair_IOC_MAGIC,30,int)
#define openair_NEWRF_LFSW190410_WRITE_KHZ _IOR(openair_IOC_MAGIC,31,int)
#define openair_NEWRF_RF_SWITCH_CTRL _IOR(openair_IOC_MAGIC,32,int)
#define openair_NEWRF_SETTX_SWITCH_GAIN _IOR(openair_IOC_MAGIC,33,int)
#define openair_NEWRF_SETRX_SWITCH_GAIN _IOR(openair_IOC_MAGIC,34,int)
/* Posted ioctls (DO NOT generate an Irq to Leon processor - so its firmware
* should intentionally read back their parameter-values for the corresponding
* action to complete). */
#define openair_NEWRF_ADF4108_WRITE_REG_POSTED _IOR(openair_IOC_MAGIC,35,int)
#define openair_NEWRF_LFSW190410_WRITE_KHZ_POSTED _IOR(openair_IOC_MAGIC,36,int)
#define openair_NEWRF_RF_SWITCH_CTRL_POSTED _IOR(openair_IOC_MAGIC,37,int)
#define openair_NEWRF_SETTX_SWITCH_GAIN_POSTED _IOR(openair_IOC_MAGIC,38,int)
#define openair_NEWRF_SETRX_SWITCH_GAIN_POSTED _IOR(openair_IOC_MAGIC,39,int)
#define openair_UPDATE_FIRMWARE _IOR(openair_IOC_MAGIC,40,int)
// fkalten 25.9.07 this should enable the recording in multiuser mode
#define openair_START_EMOS_NODEB _IOR(openair_IOC_MAGIC,41,int)
#define openair_config_topology _IOR(openair_IOC_MAGIC,42,int)
#define openair_stop_emulation _IOR(openair_IOC_MAGIC,43,int)
// fkalten 11.4.08 set the timing advance
#define openair_SET_TIMING_ADVANCE _IOR(openair_IOC_MAGIC,44,int)
// rknopp 27.08.08 for AgileRF tests
#define openair_START_TX_SIG_NO_OFFSET _IOR(openair_IOC_MAGIC,45,int)
// fkalten+ghozzi 6.4.09 for cognitive operation
#define openair_START_1ARY_CLUSTERHEAD_COGNITIVE _IOR(openair_IOC_MAGIC,46,int)
//fkalten 22.4.09
#define openair_SET_RX_MODE _IOR(openair_IOC_MAGIC,47,int)
// fkalten 9.12.09
#define openair_SET_FREQ_OFFSET _IOR(openair_IOC_MAGIC,48,int)
#define openair_GET_BIGPHYSTOP _IOR(openair_IOC_MAGIC,49,int)
#define openair_SET_UE_DL_MCS _IOR(openair_IOC_MAGIC,50,int)
#define openair_SET_UE_UL_MCS _IOR(openair_IOC_MAGIC,51,int)
#define openair_SET_UE_UL_NB_RB _IOR(openair_IOC_MAGIC,52,int)
#define openair_SET_DLSCH_RATE_ADAPTATION _IOR(openair_IOC_MAGIC,53,int)
#define openair_SET_DLSCH_TRANSMISSION_MODE _IOR(openair_IOC_MAGIC,54,int)
#define openair_SET_ULSCH_ALLOCATION_MODE _IOR(openair_IOC_MAGIC,55,int)
#define openair_SET_RRC_CONN_SETUP _IOR(openair_IOC_MAGIC,56,int)
#define openair_SET_COOPERATION_FLAG _IOR(openair_IOC_MAGIC,57,int)
#define openair_SET_RX_OFFSET _IOR(openair_IOC_MAGIC,58,int)
#define openair_START_LXRT _IOR(openair_IOC_MAGIC,59,int)
#define openair_GET_PCI_INTERFACE _IOR(openair_IOC_MAGIC,60,int)
#define openair_MAXNR 60
#define uclong unsigned int
#define ucshort unsigned short
#define ucchar unsigned char
#define MMAP_SIZE
/* ---------------------------------------------------------------------- */
#define TEST_FAILURE_ADC_MEM -1000
#define TEST_FAILURE_DAC_MEM -1001
#define TEST_FAILURE_DMA -1002
/* Behold: Added directly in (and only in!) R. Knopp's account
(K. Khalfallah, May 10th, 2007) */
#define GRPCI_IOCONFIG_CTRL0 0x60
#define GRPCI_IOCONFIG_CTRL1 0x64
#define GRPCI_IOCONFIG_CTRL2 0x68
#define GRPCI_IOCONFIG_CTRL3 0x6c
#define NO_INFINITE_ACK_LOOP (~0)
/* Update firmware commands */
#define UPDATE_FIRMWARE_TRANSFER_BLOCK 0x1
#define UPDATE_FIRMWARE_CLEAR_BSS 0x2
#define UPDATE_FIRMWARE_START_EXECUTION 0x3
#define UPDATE_FIRMWARE_FORCE_REBOOT 0x4
#define UPDATE_FIRMWARE_TEST_GOK 0x5
#endif /* OPENAIR_DEVICE_H */
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/#ifndef USER_MODE
#define __NO_VERSION__
//#include "rt_compat.h"
#endif
#include "cbmimo1_device.h"
#include "defs.h"
#include "extern.h"
#include "cbmimo1_pci.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "from_grlib_softconfig.h"
#include "from_grlib_softregs.h"
/*
int openair_get_adac_cnt(void) {
#ifndef NOCARD_TEST
// return openair_readl(bar[0]+REG_BAR+ADAC_CNT);
#else
return(0);
#endif
}
*/
int openair_dma(unsigned char card_id,unsigned int cmd) {
#ifndef NOCARD_TEST
int i;
int res;
unsigned int val;
if (vid != XILINX_VENDOR) {
openair_readl(pdev[card_id],FROM_GRLIB_CFG_GRPCI_EUR_CTRL_OFFSET,&res);
// printk("[openair][DMA] cmd %d\n",cmd);
if ((res & FROM_GRLIB_IRQ_FROM_PCI) != 0) {
printk("[openair][DMA] Error: cmd %x, Leon IRQ active\n", cmd);
return -1;
}
//printk("[openair][DMA] cmd %x on card %d\n",cmd,card_id);
//openair_writel(cmd,bar[0]+REG_BAR+DMA_CMD); // arms DMA
openair_writel(pdev[card_id], FROM_GRLIB_CFG_GRPCI_EUR_CTRL_OFFSET, ((cmd & FROM_GRLIB_IRQ_FROM_PCI_MASK) | FROM_GRLIB_IRQ_FROM_PCI));
// openair_writel(PCI_INTR_VAL,bar[0]+REG_BAR+PCI_INTR_OFF); // trigger interrupt
// openair_writel(PCI_INTR_VAL,PCI_INTR_OFF);
// printk("[openair][DMA] cmd %d done \n",cmd);
return 0;
}
else { // ExpressMIMO
// printk("Sending command to ExpressMIMO : %x\n",cmd);
//write cmd to be executed by
iowrite32(cmd,(bar[0]+0x04));
// printk("Readback of control1 %x\n",ioread32(bar[0]+0x4));
val = ioread32(bar[0]);
// set interrupt bit to trigger LEON interrupt
iowrite32(val|0x1,bar[0]);
// printk("Readback of control0 %x\n",ioread32(bar[0]));
}
#endif //NOCARD_TEST
}
This diff is collapsed.
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#ifndef USER_MODE
#define __NO_VERSION__
//#include "rt_compat.h"
#endif
#include "cbmimo1_device.h"
#include "defs.h"
#include "extern.h"
#include "cbmimo1_pci.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "from_grlib_softconfig.h"
#include "from_grlib_softregs.h"
#ifdef IFFT_FPGA
void openair_generate_fs4(unsigned char IQ_imb) {
int i,j;
for (i=0;i<120;i++) {
for (j=0; j<300; j++) {
((mod_sym_t*)TX_DMA_BUFFER[0][0])[300*i+j] = 0;
((mod_sym_t*)TX_DMA_BUFFER[0][1])[300*i+j] = 0;
}
((mod_sym_t*)TX_DMA_BUFFER[0][0])[300*i+127] = 148; // corresponds to 2^14 in mod_table
((mod_sym_t*)TX_DMA_BUFFER[0][1])[300*i+127] = 148; // corresponds to 2^14 in mod_table
}
}
#else
void openair_generate_fs4(unsigned char IQ_imb) {
int i,j;
#ifndef BIT8_TXMUX
unsigned int pQ = 0x7fff-IQ_imb,mQ=0x8001+IQ_imb;
#else
unsigned char pQ = 0x7f-IQ_imb,mQ=0x81+IQ_imb;
#endif
for (i=0;i<FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX;i+=4) {
#ifdef BIT8_TXMUX
((unsigned int *)TX_DMA_BUFFER[0][0])[i] = (0x007f<<16) | (0x007f);
((unsigned int *)TX_DMA_BUFFER[0][0])[i+1] = (pQ<<24) | (pQ<<8);
((unsigned int *)TX_DMA_BUFFER[0][0])[i+2] = (0x0081<<16) | (0x0081);
((unsigned int *)TX_DMA_BUFFER[0][0])[i+3] = (mQ<<24) | (mQ<<8);
#else
((unsigned int *)TX_DMA_BUFFER[0][0])[i] = 0x7fff;
((unsigned int *)TX_DMA_BUFFER[0][0])[i+1] = (pQ<<16);
((unsigned int *)TX_DMA_BUFFER[0][0])[i+2] = 0x8001;
((unsigned int *)TX_DMA_BUFFER[0][0])[i+3] = mQ<<16;
#endif
}
}
#endif
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom