Conflicts: openair1/PHY/INIT/lte_init.c openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c openair1/PHY/LTE_TRANSPORT/dci.c openair1/PHY/LTE_TRANSPORT/dci_tools.c openair1/PHY/LTE_TRANSPORT/dlsch_coding.c openair1/PHY/LTE_TRANSPORT/edci.c openair1/PHY/LTE_TRANSPORT/if4_tools.c openair1/PHY/LTE_TRANSPORT/prach.c openair1/PHY/LTE_TRANSPORT/print_stats.c openair1/PHY/LTE_TRANSPORT/pucch.c openair1/PHY/LTE_TRANSPORT/transport_eNB.h openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h openair1/PHY/impl_defs_lte.h openair1/SCHED/fapi_l1.c openair1/SCHED/phy_procedures_lte_eNb.c openair2/COMMON/rrc_messages_types.h openair2/ENB_APP/enb_config.c openair2/ENB_APP/enb_paramdef.h openair2/LAYER2/MAC/config.c openair2/LAYER2/MAC/defs.h openair2/LAYER2/MAC/eNB_scheduler.c openair2/LAYER2/MAC/eNB_scheduler_RA.c openair2/LAYER2/MAC/eNB_scheduler_bch.c openair2/LAYER2/MAC/eNB_scheduler_dlsch.c openair2/LAYER2/MAC/eNB_scheduler_primitives.c openair2/LAYER2/MAC/eNB_scheduler_ulsch.c openair2/LAYER2/MAC/pre_processor.c openair2/LAYER2/MAC/rar_tools.c openair2/LAYER2/MAC/ue_procedures.c openair2/PHY_INTERFACE/IF_Module.c openair2/RRC/LITE/rrc_common.c openair2/RRC/LTE/L2_interface_ue.c openair2/RRC/LTE/MESSAGES/asn1_msg.c openair2/RRC/LTE/rrc_eNB.c targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp targets/RT/USER/lte-enb.c targets/RT/USER/lte-ru.c
65 lines
1.5 KiB
C
Executable File
65 lines
1.5 KiB
C
Executable File
#include <stdio.h>
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
#include "PHY/impl_defs_lte.h"
|
|
#include "PHY/defs_common.h"
|
|
|
|
int f_read(char *calibF_fname, int nb_ant, int nb_freq, int32_t **tdd_calib_coeffs){
|
|
|
|
FILE *calibF_fd;
|
|
int i,j,calibF_e;
|
|
|
|
calibF_fd = fopen(calibF_fname,"r");
|
|
|
|
if (calibF_fd) {
|
|
printf("Loading Calibration matrix from %s\n", calibF_fname);
|
|
|
|
for(i=0;i<nb_ant;i++){
|
|
for(j=0;j<nb_freq*2;j++){
|
|
if (fscanf(calibF_fd, "%d", &calibF_e) != 1) abort();
|
|
tdd_calib_coeffs[i][j] = (int16_t)calibF_e;
|
|
}
|
|
}
|
|
printf("%d\n",(int)tdd_calib_coeffs[0][0]);
|
|
printf("%d\n",(int)tdd_calib_coeffs[1][599]);
|
|
} else
|
|
printf("%s not found, running with defaults\n",calibF_fname);
|
|
/* TODO: what to return? is this code used at all? */
|
|
return 0;
|
|
}
|
|
|
|
|
|
int estimate_DLCSI_from_ULCSI(int32_t **calib_dl_ch_estimates, int32_t **ul_ch_estimates, int32_t **tdd_calib_coeffs, int nb_ant, int nb_freq) {
|
|
|
|
/* TODO: what to return? is this code used at all? */
|
|
return 0;
|
|
|
|
}
|
|
|
|
int compute_BF_weights(int32_t **beam_weights, int32_t **calib_dl_ch_estimates, PRECODE_TYPE_t precode_type, int nb_ant, int nb_freq) {
|
|
switch (precode_type) {
|
|
//case MRT
|
|
case 0 :
|
|
//case ZF
|
|
break;
|
|
case 1 :
|
|
//case MMSE
|
|
break;
|
|
case 2 :
|
|
break;
|
|
default :
|
|
break;
|
|
}
|
|
/* TODO: what to return? is this code used at all? */
|
|
return 0;
|
|
}
|
|
|
|
// temporal test function
|
|
/*
|
|
void main(){
|
|
// initialization
|
|
// compare
|
|
printf("Hello world!\n");
|
|
}
|
|
*/
|