Commit 33e524a3 authored by Florian Kaltenberger's avatar Florian Kaltenberger

restored openair0_dump_config -> octave scripts compile again


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5782 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 4d4c4b45
...@@ -102,7 +102,7 @@ int openair0_open(void) ...@@ -102,7 +102,7 @@ int openair0_open(void)
ioctl(openair0_fd, openair_GET_BIGSHMTOPS_KVIRT, &bigshm_top_kvirtptr[0]); ioctl(openair0_fd, openair_GET_BIGSHMTOPS_KVIRT, &bigshm_top_kvirtptr[0]);
ioctl(openair0_fd, openair_GET_PCI_INTERFACE_BOTS_KVIRT, &exmimo_pci_kvirt[0]); ioctl(openair0_fd, openair_GET_PCI_INTERFACE_BOTS_KVIRT, &exmimo_pci_kvirt[0]);
printf("bigshm_top_kvirtptr (MAX_CARDS %d): %p %p %p %p\n", MAX_CARDS,bigshm_top_kvirtptr[0], bigshm_top_kvirtptr[1], bigshm_top_kvirtptr[2], bigshm_top_kvirtptr[3]); //printf("bigshm_top_kvirtptr (MAX_CARDS %d): %p %p %p %p\n", MAX_CARDS,bigshm_top_kvirtptr[0], bigshm_top_kvirtptr[1], bigshm_top_kvirtptr[2], bigshm_top_kvirtptr[3]);
...@@ -133,17 +133,20 @@ int openair0_open(void) ...@@ -133,17 +133,20 @@ int openair0_open(void)
openair0_exmimo_pci[card].exmimo_id_ptr = (exmimo_id_t*) (bigshm_top[card] + (int32_t)exmimo_pci_kvirt[0].exmimo_id_ptr - (int32_t)bigshm_top_kvirtptr[0]); openair0_exmimo_pci[card].exmimo_id_ptr = (exmimo_id_t*) (bigshm_top[card] + (int32_t)exmimo_pci_kvirt[0].exmimo_id_ptr - (int32_t)bigshm_top_kvirtptr[0]);
#endif #endif
/*
printf("openair0_exmimo_pci.firmware_block_ptr (%p) = bigshm_top(%p) + exmimo_pci_kvirt.firmware_block_ptr(%p) - bigshm_top_kvirtptr(%p)\n", printf("openair0_exmimo_pci.firmware_block_ptr (%p) = bigshm_top(%p) + exmimo_pci_kvirt.firmware_block_ptr(%p) - bigshm_top_kvirtptr(%p)\n",
openair0_exmimo_pci[card].firmware_block_ptr, bigshm_top, exmimo_pci_kvirt[card].firmware_block_ptr, bigshm_top_kvirtptr[card]); openair0_exmimo_pci[card].firmware_block_ptr, bigshm_top, exmimo_pci_kvirt[card].firmware_block_ptr, bigshm_top_kvirtptr[card]);
printf("card%d, openair0_exmimo_pci.exmimo_id_ptr (%p) = bigshm_top(%p) + exmimo_pci_kvirt.exmimo_id_ptr (%p) - bigshm_top_kvirtptr(%p)\n", printf("card%d, openair0_exmimo_pci.exmimo_id_ptr (%p) = bigshm_top(%p) + exmimo_pci_kvirt.exmimo_id_ptr (%p) - bigshm_top_kvirtptr(%p)\n",
card, openair0_exmimo_pci[card].exmimo_id_ptr, bigshm_top[card], exmimo_pci_kvirt[card].exmimo_id_ptr, bigshm_top_kvirtptr[card]); card, openair0_exmimo_pci[card].exmimo_id_ptr, bigshm_top[card], exmimo_pci_kvirt[card].exmimo_id_ptr, bigshm_top_kvirtptr[card]);
*/
//if (openair0_exmimo_pci[card].exmimo_id_ptr->board_swrev != BOARD_SWREV_CNTL2)
// {
// error("Software revision %d and firmware revision %d do not match, Please update either Software or Firmware",BOARD_SWREV_CNTL2,openair0_exmimo_pci[card].exmimo_id_ptr->board_swrev);
// return -5;
// }
/*
if (openair0_exmimo_pci[card].exmimo_id_ptr->board_swrev != BOARD_SWREV_CNTL2)
{
error("Software revision %d and firmware revision %d do not match, Please update either Software or Firmware",BOARD_SWREV_CNTL2,openair0_exmimo_pci[card].exmimo_id_ptr->board_swrev);
return -5;
}
*/
if ( openair0_exmimo_pci[card].exmimo_id_ptr->board_exmimoversion == 1) if ( openair0_exmimo_pci[card].exmimo_id_ptr->board_exmimoversion == 1)
openair0_num_antennas[card] = 2; openair0_num_antennas[card] = 2;
...@@ -219,12 +222,10 @@ int openair0_close(void) ...@@ -219,12 +222,10 @@ int openair0_close(void)
return 0; return 0;
} }
/*
int openair0_dump_config(int card) int openair0_dump_config(int card)
{ {
return ioctl(openair0_fd, openair_DUMP_CONFIG, card); return ioctl(openair0_fd, openair_DUMP_CONFIG, card);
} }
*/
int openair0_get_frame(int card) int openair0_get_frame(int card)
{ {
...@@ -290,7 +291,7 @@ int openair0_device_init(openair0_device *device, openair0_config_t *openair0_cf ...@@ -290,7 +291,7 @@ int openair0_device_init(openair0_device *device, openair0_config_t *openair0_cf
return(0); return(0);
} }
int openair0_dump_config(openair0_config_t *openair0_cfg, int UE_flag) int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
{ {
int ret; int ret;
int ant, card; int ant, card;
...@@ -441,13 +442,13 @@ int openair0_reconfig(openair0_config_t *openair0_cfg) ...@@ -441,13 +442,13 @@ int openair0_reconfig(openair0_config_t *openair0_cfg)
switch (openair0_cfg[card].rxg_mode[ant]) { switch (openair0_cfg[card].rxg_mode[ant]) {
default: default:
case max_gain: case max_gain:
p_exmimo_config[card].rf.rf_mode[ant] = (p_exmimo_config->rf.rf_mode[ant]&(~LNAGAINMASK))|LNAMax; p_exmimo_config->rf.rf_mode[ant] = (p_exmimo_config->rf.rf_mode[ant]&(~LNAGAINMASK))|LNAMax;
break; break;
case med_gain: case med_gain:
p_exmimo_config[card].rf.rf_mode[ant] = (p_exmimo_config->rf.rf_mode[ant]&(~LNAGAINMASK))|LNAMed; p_exmimo_config->rf.rf_mode[ant] = (p_exmimo_config->rf.rf_mode[ant]&(~LNAGAINMASK))|LNAMed;
break; break;
case byp_gain: case byp_gain:
p_exmimo_config[card].rf.rf_mode[ant] = (p_exmimo_config->rf.rf_mode[ant]&(~LNAGAINMASK))|LNAByp; p_exmimo_config->rf.rf_mode[ant] = (p_exmimo_config->rf.rf_mode[ant]&(~LNAGAINMASK))|LNAByp;
break; break;
} }
} }
......
...@@ -63,10 +63,15 @@ int openair0_close(void); ...@@ -63,10 +63,15 @@ int openair0_close(void);
// trigger config update on card // trigger config update on card
// return 0 on success // return 0 on success
int openair0_dump_config(openair0_config_t *openair0_cfg, int UE_flag); int openair0_dump_config(int card);
//int openair0_dump_config(int card);
// reconfigures the card (frequencies and gains only, does not do IOCTL) // wrapper function for openair0_open (defined in common_lib.h)
// int openair0_device_init(openair0_device *device, openair0_config_t *openair0_cfg);
// copies data from openair0_cfg into exmimo_config and calls openair0_dump_config (for all cards)
int openair0_config(openair0_config_t *openair0_cfg, int UE_flag);
// copies data from openair0_cfg into exmimo_config (frequencies and gains only); does not call openair0_dump_configu (no IOCTL)
int openair0_reconfig(openair0_config_t *openair0_cfg); int openair0_reconfig(openair0_config_t *openair0_cfg);
// triggers recording of exactly 1 frame // triggers recording of exactly 1 frame
......
CC = gcc CC = gcc
CFLAGS = -DUSER_MODE CFLAGS = -DUSER_MODE -g
XTRA_CFLAGS = -msse -msse2 -mssse3 -fPIC XTRA_CFLAGS = -msse -msse2 -mssse3 -fPIC
#ifndef OPENAIR0_DIR #ifndef OPENAIR0_DIR
...@@ -24,7 +24,7 @@ endif ...@@ -24,7 +24,7 @@ endif
OPENAIRTARGETS_DIR ?=../../../.. OPENAIRTARGETS_DIR ?=../../../..
OPENAIROBJS += $(OPENAIRTARGETS_DIR)/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.o OPENAIROBJS += $(OPENAIRTARGETS_DIR)/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.o
CFLAGS += -I$(OPENAIRTARGETS_DIR)/ARCH/EXMIMO/USERSPACE/LIB -I$(OPENAIRTARGETS_DIR)/ARCH/EXMIMO/DEFS CFLAGS += -I$(OPENAIRTARGETS_DIR)/ARCH/EXMIMO/USERSPACE/LIB -I$(OPENAIRTARGETS_DIR)/ARCH/EXMIMO/DEFS -I$(OPENAIRTARGETS_DIR)/ARCH/COMMON
#OPENAIROBJS = $(OPENAIR1_DIR)/PHY/CONFIG/openair_readconfigfile.o $(OPENAIR1_DIR)/PHY/CONFIG/openair_configure.o #OPENAIROBJS = $(OPENAIR1_DIR)/PHY/CONFIG/openair_readconfigfile.o $(OPENAIR1_DIR)/PHY/CONFIG/openair_configure.o
......
...@@ -1618,7 +1618,7 @@ static void *UE_thread_synch(void *arg) { ...@@ -1618,7 +1618,7 @@ static void *UE_thread_synch(void *arg) {
for (i=0; i<openair0_cfg[rf_map[CC_id].card].tx_num_channels; i++) for (i=0; i<openair0_cfg[rf_map[CC_id].card].tx_num_channels; i++)
openair0_cfg[rf_map[CC_id].card].tx_freq[rf_map[CC_id].chain+i] = downlink_frequency[CC_id][i]+openair_daq_vars.freq_offset; openair0_cfg[rf_map[CC_id].card].tx_freq[rf_map[CC_id].chain+i] = downlink_frequency[CC_id][i]+openair_daq_vars.freq_offset;
} }
// openair0_dump_config(&openair0_cfg[0],UE_flag); // openair0_config(&openair0_cfg[0],UE_flag);
// rt_sleep_ns(FRAME_PERIOD); // rt_sleep_ns(FRAME_PERIOD);
} // freq_offset } // freq_offset
...@@ -2025,7 +2025,7 @@ static void *UE_thread(void *arg) { ...@@ -2025,7 +2025,7 @@ static void *UE_thread(void *arg) {
for (i=0; i<openair0_cfg[rf_map[CC_id].card].tx_num_channels; i++) for (i=0; i<openair0_cfg[rf_map[CC_id].card].tx_num_channels; i++)
openair0_cfg[rf_map[CC_id].card].tx_freq[rf_map[CC_id].chain+i] = downlink_frequency[CC_id][i]+openair_daq_vars.freq_offset; openair0_cfg[rf_map[CC_id].card].tx_freq[rf_map[CC_id].chain+i] = downlink_frequency[CC_id][i]+openair_daq_vars.freq_offset;
} }
openair0_dump_config(&openair0_cfg[0],UE_flag); openair0_config(&openair0_cfg[0],UE_flag);
#endif #endif
rt_sleep_ns(FRAME_PERIOD); rt_sleep_ns(FRAME_PERIOD);
} }
...@@ -2808,7 +2808,7 @@ int main(int argc, char **argv) { ...@@ -2808,7 +2808,7 @@ int main(int argc, char **argv) {
#endif #endif
} }
#ifndef USRP #ifndef USRP
openair0_dump_config(&openair0_cfg[0],UE_flag); openair0_config(&openair0_cfg[0],UE_flag);
#endif #endif
/* /*
......
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