Commit a89620bd authored by gauthier's avatar gauthier

Merge branch 'develop' into Feature-6-fix_test_core_network_with_scenarios

parents 0c017f69 9ccc1999
/*******************************************************************************
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@lists.eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#include "defs.h"
int mult_cpx_matrix_h(short *x1[2][2],
short *x2[2][2],
short *y[2][2],
unsigned int N,
unsigned short output_shift,
short hermitian)
{
if (hermitian) {
// this computes x1^H*x2 and stores it in y
mult_cpx_vector_h(x2[0][0],x1[0][0],y[0][0],N,output_shift,1);
mult_cpx_vector_h(x2[0][1],x1[0][1],y[0][0],N,output_shift,1);
mult_cpx_vector_h(x2[0][0],x1[1][0],y[1][0],N,output_shift,1);
mult_cpx_vector_h(x2[0][1],x1[1][1],y[1][0],N,output_shift,1);
mult_cpx_vector_h(x2[1][0],x1[0][0],y[0][1],N,output_shift,1);
mult_cpx_vector_h(x2[1][1],x1[0][1],y[0][1],N,output_shift,1);
mult_cpx_vector_h(x2[1][0],x1[1][0],y[1][1],N,output_shift,1);
mult_cpx_vector_h(x2[1][1],x1[1][1],y[1][1],N,output_shift,1);
} else {
// this computes x1*x2^H and stores it in y
mult_cpx_vector_h(x1[0][0],x2[0][0],y[0][0],N,output_shift,1);
mult_cpx_vector_h(x1[0][1],x2[0][1],y[0][0],N,output_shift,1);
mult_cpx_vector_h(x1[0][0],x2[1][0],y[0][1],N,output_shift,1);
mult_cpx_vector_h(x1[0][1],x2[1][1],y[0][1],N,output_shift,1);
mult_cpx_vector_h(x1[1][0],x2[0][0],y[1][0],N,output_shift,1);
mult_cpx_vector_h(x1[1][1],x2[0][1],y[1][0],N,output_shift,1);
mult_cpx_vector_h(x1[1][0],x2[1][0],y[1][1],N,output_shift,1);
mult_cpx_vector_h(x1[1][1],x2[1][1],y[1][1],N,output_shift,1);
}
}
int mult_cpx_matrix_vector(int *x1[2][2],
int *x2[2],
int *y[2],
unsigned int N,
unsigned short output_shift)
{
Zero_Buffer(y[0],N*8);
Zero_Buffer(y[1],N*8);
// this computes x1*x2 and stores it in y (32 bit)
mult_cpx_vector_add32((short*)x2[0],(short*)x1[0][0],(short*)y[0],N);
mult_cpx_vector_add32((short*)x2[1],(short*)x1[0][1],(short*)y[0],N);
mult_cpx_vector_add32((short*)x2[0],(short*)x1[1][0],(short*)y[1],N);
mult_cpx_vector_add32((short*)x2[1],(short*)x1[1][1],(short*)y[1],N);
// shift and pack
shift_and_pack((short*)y[0],N,output_shift);
shift_and_pack((short*)y[1],N,output_shift);
}
#ifdef MAIN_MM
#include <stdio.h>
#include <stdlib.h>
main ()
{
short x1_00[256] __attribute__((aligned(16)));
short x1_10[256] __attribute__((aligned(16)));
short x1_01[256] __attribute__((aligned(16)));
short x1_11[256] __attribute__((aligned(16)));
short x2_0[256] __attribute__((aligned(16)));
short x2_1[256] __attribute__((aligned(16)));
short y_0[256] __attribute__((aligned(16)));
short y_1[256] __attribute__((aligned(16)));
int *x1[2][2];
int *x2[2];
int *y[2];
int i,m,n;
x1[0][0] = (int*)x1_00;
x1[0][1] = (int*)x1_01;
x1[1][0] = (int*)x1_10;
x1[1][1] = (int*)x1_11;
x2[0] = (int*)x2_0;
x2[1] = (int*)x2_1;
y[0] = (int*)y_0;
y[1] = (int*)y_1;
for(m=0; m<2; m++) {
for(n=0; n<2; n++) {
for(i=0; i<256; i+=4) {
((short*)x1[m][n])[i] = ((short) rand())/4;
((short*)x1[m][n])[i+1] = ((short) rand())/4;
((short*)x1[m][n])[i+2] = -((short*)x1[m][n])[i+1];
((short*)x1[m][n])[i+3] = ((short*)x1[m][n])[i];
}
}
for(i=0; i<256; i+=4) {
((short*)x2[m])[i] = ((short) rand())/4;
((short*)x2[m])[i+1] = ((short) rand())/4;
((short*)x2[m])[i+2] = ((short*)x2[m])[i];
((short*)x2[m])[i+3] = ((short*)x2[m])[i+1];
}
Zero_Buffer(y[m],512);
}
/*
input[0] = 100;
input[1] = 200;
input[2] = -200;
input[3] = 100;
input[4] = 1000;
input[5] = 2000;
input[6] = -2000;
input[7] = 1000;
input[8] = 100;
input[9] = 200;
input[10] = -200;
input[11] = 100;
input[12] = 1000;
input[13] = 2000;
input[14] = -2000;
input[15] = 1000;
input2[0] = 2;
input2[1] = 1;
input2[2] = 2;
input2[3] = 1;
input2[4] = 20;
input2[5] = 10;
input2[6] = 20;
input2[7] = 10;
input2[8] = 2;
input2[9] = 1;
input2[10] = 2;
input2[11] = 1;
input2[12] = 2000;
input2[13] = 1000;
input2[14] = 2000;
input2[15] = 1000;
x1[0][0] = (int*)input;
x1[0][1] = (int*)input;
x1[1][0] = (int*)input;
x1[1][1] = (int*)input;
x2[0] = (int*)input2;
x2[1] = (int*)input2;
y[0] = (int*)output;
y[1] = (int*)output2;
*/
mult_cpx_matrix_vector(x1,x2,y,64,15);
//mult_cpx_vector_add32(x2[0],x1[0][0],y[0],64);
for (i=0; i<128; i+=2)
printf("i=%d, x1 = [%d+1i*%d %d+1i*%d; %d+1i*%d %d+1i*%d]; x2 = [%d+1i*%d; %d+1i*%d]; y = [%d+1i*%d; %d+1i*%d]; y_m= round(x1*x2./pow2(15)); y-y_m \n",
i,
((short*)x1[0][0])[2*i], ((short*)x1[0][0])[2*i+2],
((short*)x1[0][1])[2*i], ((short*)x1[0][1])[2*i+2],
((short*)x1[1][0])[2*i], ((short*)x1[1][0])[2*i+2],
((short*)x1[1][1])[2*i], ((short*)x1[1][1])[2*i+2],
((short*)x2[0])[2*i], ((short*)x2[0])[2*i+1],
((short*)x2[1])[2*i], ((short*)x2[1])[2*i+1],
((short*)y[0])[2*i], ((short*)y[0])[2*i+1],
((short*)y[1])[2*i], ((short*)y[1])[2*i+1]);
//((int*)y[0])[i], ((int*)y[0])[i+1],
//((int*)y[1])[i], ((int*)y[1])[i+1]);
}
#endif
...@@ -50,7 +50,7 @@ int mult_cpx_conj_vector(int16_t *x1, ...@@ -50,7 +50,7 @@ int mult_cpx_conj_vector(int16_t *x1,
uint32_t N, uint32_t N,
int output_shift) int output_shift)
{ {
// Multiply elementwise two complex vectors of N elements with repeated formatted output // Multiply elementwise the complex conjugate of x1 with x2.
// x1 - input 1 in the format |Re0 Im0 Re1 Im1|,......,|Re(N-2) Im(N-2) Re(N-1) Im(N-1)| // x1 - input 1 in the format |Re0 Im0 Re1 Im1|,......,|Re(N-2) Im(N-2) Re(N-1) Im(N-1)|
// We assume x1 with a dinamic of 15 bit maximum // We assume x1 with a dinamic of 15 bit maximum
// //
...@@ -90,7 +90,7 @@ int mult_cpx_conj_vector(int16_t *x1, ...@@ -90,7 +90,7 @@ int mult_cpx_conj_vector(int16_t *x1,
tmp_im = _mm_shufflelo_epi16(*x1_128,_MM_SHUFFLE(2,3,0,1)); tmp_im = _mm_shufflelo_epi16(*x1_128,_MM_SHUFFLE(2,3,0,1));
tmp_im = _mm_shufflehi_epi16(tmp_im,_MM_SHUFFLE(2,3,0,1)); tmp_im = _mm_shufflehi_epi16(tmp_im,_MM_SHUFFLE(2,3,0,1));
tmp_im = _mm_sign_epi16(tmp_im,*(__m128i*)&conjug[0]); tmp_im = _mm_sign_epi16(tmp_im,*(__m128i*)&conjug[0]);
tmp_im = _mm_madd_epi16(tmp_im,*x1_128); tmp_im = _mm_madd_epi16(tmp_im,*x2_128);
tmp_re = _mm_srai_epi32(tmp_re,output_shift); tmp_re = _mm_srai_epi32(tmp_re,output_shift);
tmp_im = _mm_srai_epi32(tmp_im,output_shift); tmp_im = _mm_srai_epi32(tmp_im,output_shift);
tmpy0 = _mm_unpacklo_epi32(tmp_re,tmp_im); tmpy0 = _mm_unpacklo_epi32(tmp_re,tmp_im);
...@@ -130,3 +130,4 @@ int mult_cpx_conj_vector(int16_t *x1, ...@@ -130,3 +130,4 @@ int mult_cpx_conj_vector(int16_t *x1,
return(0); return(0);
} }
This diff is collapsed.
This diff is collapsed.
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/ *******************************************************************************/
#ifndef __TIME_MEAS_DEFS__H__
#define __TIME_MEAS_DEFS__H__
#include <unistd.h> #include <unistd.h>
#include <math.h> #include <math.h>
#include <stdint.h> #include <stdint.h>
...@@ -148,3 +151,4 @@ static inline void copy_meas(time_stats_t *dst_ts,time_stats_t *src_ts) ...@@ -148,3 +151,4 @@ static inline void copy_meas(time_stats_t *dst_ts,time_stats_t *src_ts)
dst_ts->max=src_ts->max; dst_ts->max=src_ts->max;
} }
} }
#endif
...@@ -2678,18 +2678,18 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac ...@@ -2678,18 +2678,18 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
if (ret == (1+phy_vars_ue->dlsch_ue[eNB_id][0]->max_turbo_iterations)) { if (ret == (1+phy_vars_ue->dlsch_ue[eNB_id][0]->max_turbo_iterations)) {
phy_vars_ue->dlsch_errors[eNB_id]++; phy_vars_ue->dlsch_errors[eNB_id]++;
//#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH in error (rv %d,mcs %d,TBS %d)\n", LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH in error (rv %d,mcs %d,TBS %d)\n",
phy_vars_ue->Mod_id,phy_vars_ue->dlsch_ue[eNB_id][0]->rnti, phy_vars_ue->Mod_id,phy_vars_ue->dlsch_ue[eNB_id][0]->rnti,
harq_pid,frame_rx,subframe_prev, harq_pid,frame_rx,subframe_prev,
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->rvidx, phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->rvidx,
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->mcs, phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->mcs,
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->TBS); phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->TBS);
/*
// if (abstraction_flag ==0 ) if (abstraction_flag ==0 )
dump_dlsch(phy_vars_ue,eNB_id,subframe_prev,harq_pid); dump_dlsch(phy_vars_ue,eNB_id,subframe_prev,harq_pid);
mac_xface->macphy_exit(""); mac_xface->macphy_exit(""); */
//#endif #endif
} else { } else {
LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d (slot_rx %d): Received DLSCH (rv %d,mcs %d,TBS %d)\n", LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d (slot_rx %d): Received DLSCH (rv %d,mcs %d,TBS %d)\n",
phy_vars_ue->Mod_id,phy_vars_ue->dlsch_ue[eNB_id][0]->rnti, phy_vars_ue->Mod_id,phy_vars_ue->dlsch_ue[eNB_id][0]->rnti,
......
...@@ -1019,7 +1019,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -1019,7 +1019,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
enb_properties.properties[enb_properties_index]->prach_zero_correlation[j] =prach_zero_correlation; enb_properties.properties[enb_properties_index]->prach_zero_correlation[j] =prach_zero_correlation;
if ((prach_zero_correlation <0) || (prach_zero_correlation > 63)) if ((prach_zero_correlation <0) || (prach_zero_correlation > 15))
AssertError (0, parse_errors ++, AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_zero_correlation choice: 0..15!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_zero_correlation choice: 0..15!\n",
lib_config_file_name_pP, i, prach_zero_correlation); lib_config_file_name_pP, i, prach_zero_correlation);
......
...@@ -412,7 +412,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -412,7 +412,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_I,offIold); bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_I,offIold);
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
for (meanIold=meanQold=i=j=0;i<RXDCLENGTH;i++) { for (meanIold=meanQold=i=j=0;i<RXDCLENGTH;i++) {
switch (i&3) { switch (i&3) {
...@@ -438,7 +438,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -438,7 +438,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_I,offI); bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_I,offI);
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) { for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) {
switch (i&3) { switch (i&3) {
...@@ -474,7 +474,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -474,7 +474,7 @@ void calibrate_rf(openair0_device *device) {
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) { for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) {
switch (i&3) { switch (i&3) {
...@@ -503,7 +503,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -503,7 +503,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_Q,offQold); bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_Q,offQold);
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
// project on fs/4 // project on fs/4
for (meanIold=meanQold=i=j=0;i<RXDCLENGTH;i++) { for (meanIold=meanQold=i=j=0;i<RXDCLENGTH;i++) {
...@@ -530,7 +530,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -530,7 +530,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_Q,offQ); bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_Q,offQ);
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) { for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) {
switch (i&3) { switch (i&3) {
...@@ -568,7 +568,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -568,7 +568,7 @@ void calibrate_rf(openair0_device *device) {
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) { for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) {
switch (i&3) { switch (i&3) {
...@@ -601,7 +601,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -601,7 +601,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_PHASE,offphaseold); bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_PHASE,offphaseold);
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
// project on fs/8 (Image of TX signal in +ve frequencies) // project on fs/8 (Image of TX signal in +ve frequencies)
for (meanIold=meanQold=i=j=0;i<RXDCLENGTH;i++) { for (meanIold=meanQold=i=j=0;i<RXDCLENGTH;i++) {
...@@ -618,7 +618,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -618,7 +618,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_PHASE,offphase); bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_PHASE,offphase);
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
// project on fs/8 (Image of TX signal in +ve frequencies) // project on fs/8 (Image of TX signal in +ve frequencies)
for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) { for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) {
...@@ -648,7 +648,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -648,7 +648,7 @@ void calibrate_rf(openair0_device *device) {
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
// project on fs/8 (Image of TX signal in +ve frequencies) // project on fs/8 (Image of TX signal in +ve frequencies)
for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) { for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) {
...@@ -670,7 +670,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -670,7 +670,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_GAIN,offgainold); bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_GAIN,offgainold);
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
// project on fs/8 (Image of TX signal in +ve frequencies) // project on fs/8 (Image of TX signal in +ve frequencies)
for (meanIold=meanQold=i=j=0;i<RXDCLENGTH;i++) { for (meanIold=meanQold=i=j=0;i<RXDCLENGTH;i++) {
...@@ -687,7 +687,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -687,7 +687,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_GAIN,offgain); bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_GAIN,offgain);
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
// project on fs/8 (Image of TX signal in +ve frequencies) // project on fs/8 (Image of TX signal in +ve frequencies)
for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) { for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) {
...@@ -716,7 +716,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -716,7 +716,7 @@ void calibrate_rf(openair0_device *device) {
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
// project on fs/8 (Image of TX signal in +ve frequencies) // project on fs/8 (Image of TX signal in +ve frequencies)
for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) { for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) {
...@@ -741,7 +741,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -741,7 +741,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_PHASE,offphaseold); bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_PHASE,offphaseold);
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
// project on -3fs/8 (Image of TX signal in -ve frequencies) // project on -3fs/8 (Image of TX signal in -ve frequencies)
for (meanIold=meanQold=i=j=0;i<RXDCLENGTH;i++) { for (meanIold=meanQold=i=j=0;i<RXDCLENGTH;i++) {
...@@ -758,7 +758,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -758,7 +758,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_PHASE,offphase); bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_PHASE,offphase);
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
// project on -3fs/8 (Image of TX signal in -ve frequencies) // project on -3fs/8 (Image of TX signal in -ve frequencies)
for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) { for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) {
...@@ -788,7 +788,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -788,7 +788,7 @@ void calibrate_rf(openair0_device *device) {
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
// project on -3fs/8 (Image of TX signal in -ve frequencies) // project on -3fs/8 (Image of TX signal in -ve frequencies)
for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) { for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) {
...@@ -810,7 +810,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -810,7 +810,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_GAIN,offgainold); bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_GAIN,offgainold);
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0,0);
} }
// project on -3fs/8 (Image of TX signal in +ve frequencies) // project on -3fs/8 (Image of TX signal in +ve frequencies)
for (meanIold=meanQold=i=j=0;i<RXDCLENGTH;i++) { for (meanIold=meanQold=i=j=0;i<RXDCLENGTH;i++) {
...@@ -827,7 +827,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -827,7 +827,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_GAIN,offgain); bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_GAIN,offgain);
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
// project on 3fs/8 (Image of TX signal in -ve frequencies) // project on 3fs/8 (Image of TX signal in -ve frequencies)
for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) { for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) {
...@@ -856,7 +856,7 @@ void calibrate_rf(openair0_device *device) { ...@@ -856,7 +856,7 @@ void calibrate_rf(openair0_device *device) {
for (i=0;i<10;i++) { for (i=0;i<10;i++) {
trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0);
trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0, 0);
} }
// project on -3fs/8 (Image of TX signal in -ve frequencies) // project on -3fs/8 (Image of TX signal in -ve frequencies)
for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) { for (meanI=meanQ=i=j=0;i<RXDCLENGTH;i++) {
...@@ -1068,7 +1068,6 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) { ...@@ -1068,7 +1068,6 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
bladerf_log_set_verbosity(get_brf_log_level(openair0_cfg->log_level)); bladerf_log_set_verbosity(get_brf_log_level(openair0_cfg->log_level));
printf("BLADERF: Initializing openair0_device\n"); printf("BLADERF: Initializing openair0_device\n");
device->priv = brf;
device->Mod_id = num_devices++; device->Mod_id = num_devices++;
device->type = BLADERF_DEV; device->type = BLADERF_DEV;
device->trx_start_func = trx_brf_start; device->trx_start_func = trx_brf_start;
......
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "95";
////////// Physical parameters:
component_carriers = (
{
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 13;
downlink_frequency = 751000000L;
uplink_frequency_offset = 31000000;
Nid_cell = 0;
N_RB_DL = 50;
Nid_cell_mbsfn = 0;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 125;
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 2;
pucch_delta_shift = 1;
pucch_nRB_CQI = 1;
pucch_nCS_AN = 0;
pucch_n1_AN = 32;
pdsch_referenceSignalPower = -20;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 1;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -90;
pusch_alpha = "AL1";
pucch_p0_Nominal = -96;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
/*
rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ;
*/
rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -108;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
ue_TimersAndConstants_t310 = 1000;
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit = 80;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering = 35;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit = 0;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu = 4;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte = 99999;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold = 4;
}
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.62";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth4";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.242/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth4";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.242/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
}
);
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "95";
////////// Physical parameters:
component_carriers = (
{
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 13;
downlink_frequency = 751000000L;
uplink_frequency_offset = 31000000;
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 125;
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 2;
pucch_delta_shift = 1;
pucch_nRB_CQI = 1;
pucch_nCS_AN = 0;
pucch_n1_AN = 32;
pdsch_referenceSignalPower = -17;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 1;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -90;
pusch_alpha = "AL1";
pucch_p0_Nominal = -96;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
/*
rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ;
*/
rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -108;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
ue_TimersAndConstants_t310 = 1000;
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit = 80;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering = 35;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit = 0;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu = 4;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte = 99999;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold = 4;
}
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.62";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth4";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.242/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth4";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.242/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
}
);
...@@ -31,12 +31,12 @@ eNBs = ...@@ -31,12 +31,12 @@ eNBs =
downlink_frequency = 751000000L; downlink_frequency = 751000000L;
uplink_frequency_offset = 31000000; uplink_frequency_offset = 31000000;
Nid_cell = 0; Nid_cell = 0;
N_RB_DL = 25; N_RB_DL = 50;
Nid_cell_mbsfn = 0; Nid_cell_mbsfn = 0;
nb_antennas_tx = 1; nb_antennas_tx = 1;
nb_antennas_rx = 1; nb_antennas_rx = 1;
tx_gain = 90; tx_gain = 90;
rx_gain = 100; rx_gain = 110;
prach_root = 0; prach_root = 0;
prach_config_index = 0; prach_config_index = 0;
prach_high_speed = "DISABLE"; prach_high_speed = "DISABLE";
...@@ -64,7 +64,7 @@ eNBs = ...@@ -64,7 +64,7 @@ eNBs =
srs_ackNackST =; srs_ackNackST =;
srs_MaxUpPts =;*/ srs_MaxUpPts =;*/
pusch_p0_Nominal = -86; pusch_p0_Nominal = -90;
pusch_alpha = "AL1"; pusch_alpha = "AL1";
pucch_p0_Nominal = -96; pucch_p0_Nominal = -96;
msg3_delta_Preamble = 6; msg3_delta_Preamble = 6;
...@@ -82,7 +82,7 @@ eNBs = ...@@ -82,7 +82,7 @@ eNBs =
rach_messagePowerOffsetGroupB = ; rach_messagePowerOffsetGroupB = ;
*/ */
rach_powerRampingStep = 4; rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -108; rach_preambleInitialReceivedTargetPower = -100;
rach_preambleTransMax = 10; rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10; rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48; rach_macContentionResolutionTimer = 48;
...@@ -133,7 +133,7 @@ eNBs = ...@@ -133,7 +133,7 @@ eNBs =
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.62"; mme_ip_address = ( { ipv4 = "172.27.8.52";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
active = "yes"; active = "yes";
preference = "ipv4"; preference = "ipv4";
...@@ -142,11 +142,11 @@ eNBs = ...@@ -142,11 +142,11 @@ eNBs =
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
ENB_INTERFACE_NAME_FOR_S1_MME = "eth4"; ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.242/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "172.27.8.51/23";
ENB_INTERFACE_NAME_FOR_S1U = "eth4"; ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.242/24"; ENB_IPV4_ADDRESS_FOR_S1U = "172.27.8.51/23";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
...@@ -168,4 +168,4 @@ eNBs = ...@@ -168,4 +168,4 @@ eNBs =
rrc_log_verbosity ="medium"; rrc_log_verbosity ="medium";
}; };
} }
); );
\ No newline at end of file
...@@ -17,7 +17,7 @@ eNBs = ...@@ -17,7 +17,7 @@ eNBs =
mobile_country_code = "208"; mobile_country_code = "208";
mobile_network_code = "93"; mobile_network_code = "95";
////////// Physical parameters: ////////// Physical parameters:
...@@ -132,7 +132,7 @@ eNBs = ...@@ -132,7 +132,7 @@ eNBs =
}; };
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.171"; mme_ip_address = ( { ipv4 = "192.168.12.62";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
active = "yes"; active = "yes";
preference = "ipv4"; preference = "ipv4";
......
...@@ -150,7 +150,7 @@ rrh_gw_config = ( ...@@ -150,7 +150,7 @@ rrh_gw_config = (
rrh_gw_active = "yes"; rrh_gw_active = "yes";
tr_preference = "raw"; tr_preference = "raw";
rf_preference = "usrp_b200"; rf_preference = "usrp_b200";
iq_txshift = 5; iq_txshift = 4;
tx_sample_advance = 113; tx_sample_advance = 113;
tx_scheduling_advance = 9; tx_scheduling_advance = 9;
...@@ -163,8 +163,6 @@ rrh_gw_config = ( ...@@ -163,8 +163,6 @@ rrh_gw_config = (
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth4"; ENB_INTERFACE_NAME_FOR_S1U = "eth4";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
......
...@@ -133,7 +133,7 @@ eNBs = ...@@ -133,7 +133,7 @@ eNBs =
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.26"; mme_ip_address = ( { ipv4 = "192.168.12.170";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
active = "yes"; active = "yes";
preference = "ipv4"; preference = "ipv4";
...@@ -145,14 +145,14 @@ rrh_gw_config = ( ...@@ -145,14 +145,14 @@ rrh_gw_config = (
local_if_name = "eth0"; local_if_name = "eth0";
#remote_address = "169.254.10.158"; #remote_address = "169.254.10.158";
#local_address = "169.254.8.15"; #local_address = "169.254.8.15";
remote_address = "74:d4:35:cc:88:45"; remote_address = "74:d4:35:cc:88:e3";
local_address = "98:90:96:df:66:07"; local_address = "74:d4:35:cc:88:d1";
local_port = 50000; #for raw option local port must be the same to remote local_port = 50000; #for raw option local port must be the same to remote
remote_port = 50000; remote_port = 50000;
rrh_gw_active = "yes"; rrh_gw_active = "yes";
tr_preference = "raw"; tr_preference = "raw";
rf_preference = "usrp_b200"; rf_preference = "usrp_b200";
iq_txshift = 5; iq_txshift = 4;
tx_sample_advance = 70; tx_sample_advance = 70;
tx_scheduling_advance = 9; tx_scheduling_advance = 9;
...@@ -162,12 +162,11 @@ rrh_gw_config = ( ...@@ -162,12 +162,11 @@ rrh_gw_config = (
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
ENB_INTERFACE_NAME_FOR_S1_MME = "eth4"; ENB_INTERFACE_NAME_FOR_S1_MME = "eth4";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.240/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth4"; ENB_INTERFACE_NAME_FOR_S1U = "eth4";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.240/24";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
......
...@@ -17,7 +17,7 @@ eNBs = ...@@ -17,7 +17,7 @@ eNBs =
mobile_country_code = "208"; mobile_country_code = "208";
mobile_network_code = "93"; mobile_network_code = "95";
////////// Physical parameters: ////////// Physical parameters:
...@@ -28,7 +28,7 @@ eNBs = ...@@ -28,7 +28,7 @@ eNBs =
tdd_config_s = 0; tdd_config_s = 0;
prefix_type = "NORMAL"; prefix_type = "NORMAL";
eutra_band = 7; eutra_band = 7;
downlink_frequency = 2660000000L; downlink_frequency = 2685000000L;
uplink_frequency_offset = -120000000; uplink_frequency_offset = -120000000;
Nid_cell = 0; Nid_cell = 0;
N_RB_DL = 25; N_RB_DL = 25;
...@@ -133,7 +133,7 @@ eNBs = ...@@ -133,7 +133,7 @@ eNBs =
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.11"; mme_ip_address = ( { ipv4 = "172.27.8.52";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
active = "yes"; active = "yes";
preference = "ipv4"; preference = "ipv4";
...@@ -143,10 +143,10 @@ eNBs = ...@@ -143,10 +143,10 @@ eNBs =
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.212/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "172.27.8.51/23";
ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.212/24"; ENB_IPV4_ADDRESS_FOR_S1U = "172.27.8.51/23";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
......
This diff is collapsed.
/******************************************************************************
*
* Copyright(c) EURECOM / Thales Communications & Security
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program 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
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
* The full GNU General Public License is included in this distribution in the
* file called LICENSE.
*
* Contact Information:
* Thales Communications & Security <philippe.agostini@thalesgroup.com>
*
*****************************************************************************/
/******************************************************************************
*
* Includes
*
*****************************************************************************/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include "ieee80211p-netlinkapi.h"
#include "phy/DOT11/defs.h"
#include "PHY/TOOLS/defs.h"
#include <stdint.h>
#include <string.h>
#include <pthread.h>
#include <rtai_lxrt.h>
#include <rtai_sem.h>
#include <rtai_msg.h>
/******************************************************************************
*
* Definitions
*
*****************************************************************************/
enum nl80211_band {
NL80211_BAND_2GHZ,
NL80211_BAND_5GHZ,
NL80211_BAND_5_9GHZ,
NL80211_BAND_0_8GHZ,
};
enum ieee80211_band {
IEEE80211_BAND_2GHZ = NL80211_BAND_2GHZ,
IEEE80211_BAND_5GHZ = NL80211_BAND_5GHZ,
IEEE80211_BAND_5_9GHZ = NL80211_BAND_5_9GHZ,
IEEE80211_BAND_0_8GHZ = NL80211_BAND_0_8GHZ,
};
struct ieee80211p_rx_status {
short data_len; //frame data length in bytes
char rssi; //received power in dBm
char rate; //reveived data rate in units of 100 kbps
enum ieee80211_band band;
char flags; //RX flags
}; /* struct ieee80211p_rx_status */
extern uint32_t *txdata[2],*rxdata[2];
//CHANNEL_STATUS_t dot11_state = IDLE;
extern int oai_exit;
extern unsigned int *DAQ_MBOX;
extern int Ndbps[8];
extern int32_t rxDATA_F_comp_aggreg2[48*1024];
extern int32_t rxDATA_F_comp_aggreg3[48*1024];
extern uint32_t rxgain[4];
extern uint32_t rxg_max[4], rxg_med[4], rxg_byp[4];
#define FRAME_LENGTH_SAMPLES 76800
#define RX_THRES 60
#define SLOT_DURATION_5MHz 105
#define RX_THRES_dB 40
int tx_sdu_active = 0;
int tx_sdu_length = 0;
char rxsdu[2000];
void *tx_thread(void *arg)
{
int fd=*((int*)arg);
RT_TASK *task;
int ret;
int i;
char dummy_data[10];
if (fd > 0) {
ret = netlink_send(fd,NLCMD_INIT,10,&dummy_data[0]);
printf("tx_thread starting, fd %d\n",fd);
task = rt_task_init_schmod(nam2num("TASK1"), 0, 0, 0, SCHED_FIFO, 0xF);
mlockall(MCL_CURRENT | MCL_FUTURE);
// rt_make_hard_real_time();
while (!oai_exit) {
if (tx_sdu_active == 1)
printf("tx_thread: waiting (MBOX %d)\n",((unsigned int*)DAQ_MBOX)[0]);
while(((volatile int)tx_sdu_active) != 0) {
rt_sleep(nano2count(66666));
}
printf("tx_thread: calling netlink\n");
ret = netlink_recv(fd,rxsdu);
tx_sdu_active = 1;
tx_sdu_length = ret;
/*
if (ret > 0) {
printf("received TX SDU: ");
for (i=0;i<ret;i++) {
printf("%02hhx ",rxsdu[i]);
}
printf("\n");
}
*/
}
} else {
printf("tx_thread: no netlink\n");
}
printf("tx_thread exiting\n");
return(0);
}
/******************************************************************************
*
* Main
*
*****************************************************************************/
/*
int dot11_netlink_init() {
int fd;
int ret;
int i;
char txdata[10];
fd = netlink_init();
if (fd < 0) {
return -1;
}
ret = netlink_send(fd,NLCMD_INIT,10,&txdata[0]);
return(fd);
}
*/
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