Changed eNodeB console prompt

master
ismagom 10 years ago
parent 51f9dc9efb
commit 1456432607

@ -107,7 +107,7 @@ void usage(char *prog) {
printf("\t-n number of frames [Default %d]\n", nof_frames); printf("\t-n number of frames [Default %d]\n", nof_frames);
printf("\t-c cell id [Default %d]\n", cell.id); printf("\t-c cell id [Default %d]\n", cell.id);
printf("\t-p nof_prb [Default %d]\n", cell.nof_prb); printf("\t-p nof_prb [Default %d]\n", cell.nof_prb);
printf("\t-u listen UDP port for input data (-1 is random) [Default %d]\n", net_port); printf("\t-u listen TCP port for input data (-1 is random) [Default %d]\n", net_port);
printf("\t-v [set verbose to debug, default none]\n"); printf("\t-v [set verbose to debug, default none]\n");
} }
@ -328,7 +328,8 @@ int update_radl() {
ra_mcs_from_idx_dl(mcs_idx, prb_alloc.slot[0].nof_prb, &ra_dl.mcs); ra_mcs_from_idx_dl(mcs_idx, prb_alloc.slot[0].nof_prb, &ra_dl.mcs);
ra_pdsch_fprint(stdout, &ra_dl, cell.nof_prb); ra_pdsch_fprint(stdout, &ra_dl, cell.nof_prb);
printf("Type new MCS index and press Enter: "); fflush(stdout);
pdsch_harq_reset(&harq_process); pdsch_harq_reset(&harq_process);
if (pdsch_harq_setup(&harq_process, ra_dl.mcs, &prb_alloc)) { if (pdsch_harq_setup(&harq_process, ra_dl.mcs, &prb_alloc)) {
fprintf(stderr, "Error configuring HARQ process\n"); fprintf(stderr, "Error configuring HARQ process\n");
@ -374,7 +375,6 @@ int update_control() {
prbset_num--; prbset_num--;
break; break;
} }
printf("num: %d, orig: %d\n", prbset_num, prbset_orig);
} else { } else {
last_mcs_idx = mcs_idx; last_mcs_idx = mcs_idx;
mcs_idx = atoi(input); mcs_idx = atoi(input);
@ -604,8 +604,6 @@ int main(int argc, char **argv) {
nf++; nf++;
} }
sfn = (sfn + 1) % 1024; sfn = (sfn + 1) % 1024;
printf("SFN: %4d\tType new MCS index and press Enter\r", sfn);
fflush(stdout);
} }
base_free(); base_free();

@ -125,8 +125,8 @@ void usage(prog_args_t *args, char *prog) {
printf("\t-n nof_subframes [Default %d]\n", args->nof_subframes); printf("\t-n nof_subframes [Default %d]\n", args->nof_subframes);
printf("\t-s remote UDP port to send input signal (-1 does nothing with it) [Default %d]\n", args->net_port_signal); printf("\t-s remote UDP port to send input signal (-1 does nothing with it) [Default %d]\n", args->net_port_signal);
printf("\t-S remote UDP address to send input signal [Default %s]\n", args->net_address_signal); printf("\t-S remote UDP address to send input signal [Default %s]\n", args->net_address_signal);
printf("\t-u remote UDP port to send data (-1 does nothing with it) [Default %d]\n", args->net_port); printf("\t-u remote TCP port to send data (-1 does nothing with it) [Default %d]\n", args->net_port);
printf("\t-U remote UDP address to send data [Default %s]\n", args->net_address); printf("\t-U remote TCP address to send data [Default %s]\n", args->net_address);
printf("\t-v [set verbose to debug, default none]\n"); printf("\t-v [set verbose to debug, default none]\n");
} }
@ -421,6 +421,20 @@ int main(int argc, char **argv) {
if (isnan(rsrp)) { if (isnan(rsrp)) {
rsrp = 0; rsrp = 0;
} }
/* Adjust channel estimator based on SNR */
if (10*log10(snr) < 5.0) {
float f_low_snr[5]={0.05, 0.15, 0.6, 0.15, 0.05};
chest_dl_set_filter_freq(&ue_dl.chest, f_low_snr, 5);
} else if (10*log10(snr) < 10.0) {
float f_mid_snr[3]={0.1, 0.8, 0.1};
chest_dl_set_filter_freq(&ue_dl.chest, f_mid_snr, 3);
} else {
float f_high_snr[3]={0.05, 0.9, 0.05};
chest_dl_set_filter_freq(&ue_dl.chest, f_high_snr, 3);
}
} }
if (ue_sync_get_sfidx(&ue_sync) != 5 && ue_sync_get_sfidx(&ue_sync) != 0) { if (ue_sync_get_sfidx(&ue_sync) != 5 && ue_sync_get_sfidx(&ue_sync) != 0) {
pdcch_tx++; pdcch_tx++;

@ -0,0 +1,83 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2014 The libLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution.
*
* \section LICENSE
*
* This file is part of the libLTE library.
*
* libLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* libLTE 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 Lesser General Public License for more details.
*
* A copy of the GNU Lesser General Public License can be found in
* the LICENSE file in the top-level directory of this distribution
* and at http://www.gnu.org/licenses/.
*
*/
#ifndef REFSIGNAL_UL_
#define REFSIGNAL_DL_
/* Object to manage Downlink reference signals for channel estimation.
*
*/
#include "liblte/config.h"
#include "liblte/phy/common/phy_common.h"
typedef _Complex float cf_t;
// Number of references in a subframe: there are 2 symbols for port_id=0,1 x 2 slots x 2 refs per prb
#define REFSIGNAL_NUM_SF(nof_prb, port_id) (((port_id)<2?8:4)*(nof_prb))
#define REFSIGNAL_MAX_NUM_SF(nof_prb) REFSIGNAL_NUM_SF(nof_prb, 0)
#define REFSIGNAL_PILOT_IDX(i,l,cell) (2*cell.nof_prb*(l)+(i))
/** Cell-Specific Reference Signal */
typedef struct LIBLTE_API {
lte_cell_t cell;
cf_t *pilots[2][NSUBFRAMES_X_FRAME]; // Saves the reference signal per subframe for ports 0,1 and ports 2,3
} refsignal_cs_t;
LIBLTE_API int refsignal_cs_generate(refsignal_cs_t *q,
lte_cell_t cell);
LIBLTE_API void refsignal_cs_free(refsignal_cs_t *q);
LIBLTE_API int refsignal_cs_put_sf(lte_cell_t cell,
uint32_t port_id,
cf_t *pilots,
cf_t *sf_symbols);
LIBLTE_API int refsignal_cs_get_sf(lte_cell_t cell,
uint32_t port_id,
cf_t *sf_symbols,
cf_t *pilots);
LIBLTE_API uint32_t refsignal_fidx(lte_cell_t cell,
uint32_t l,
uint32_t port_id,
uint32_t m);
LIBLTE_API uint32_t refsignal_nsymbol(uint32_t l,
lte_cp_t cp,
uint32_t port_id);
LIBLTE_API uint32_t refsignal_cs_v(uint32_t port_id,
uint32_t ref_symbol_idx);
LIBLTE_API uint32_t refsignal_cs_nof_symbols(uint32_t port_id);
#endif

@ -1,5 +1,45 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2014 The libLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution.
*
* \section LICENSE
*
* This file is part of the libLTE library.
*
* libLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* libLTE 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 Lesser General Public License for more details.
*
* A copy of the GNU Lesser General Public License can be found in
* the LICENSE file in the top-level directory of this distribution
* and at http://www.gnu.org/licenses/.
*
*/
#ifdef compile
#include <math.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <complex.h>
#include "liblte/phy/common/phy_common.h"
#include "liblte/phy/ch_estimation/refsignal_ul.h"
#include "liblte/phy/utils/vector.h"
#include "liblte/phy/utils/debug.h"
#include "liblte/phy/common/sequence.h"
#ifdef nocompile
// n_drms_2 table 5.5.2.1.1-1 from 36.211 // n_drms_2 table 5.5.2.1.1-1 from 36.211
uint32_t n_drms_2[8] = { 0, 6, 3, 4, 2, 8, 10, 9 }; uint32_t n_drms_2[8] = { 0, 6, 3, 4, 2, 8, 10, 9 };
@ -180,4 +220,6 @@ free_and_exit:
return ret; return ret;
} }
#endif #endif

@ -5,14 +5,14 @@
clear clear
Npackets = 1000; Npackets = 1000;
SNR_values = linspace(-0.5,3,6); SNR_values = linspace(-5,0,8);
txCFI = 3; txCFI = 3;
enbConfig.NDLRB = 15; % No of Downlink RBs in total BW enbConfig.NDLRB = 15; % No of Downlink RBs in total BW
enbConfig.CyclicPrefix = 'Normal'; % CP length enbConfig.CyclicPrefix = 'Normal'; % CP length
enbConfig.CFI = txCFI; ; % 4 PDCCH symbols as NDLRB <= 10 enbConfig.CFI = txCFI; ; % 4 PDCCH symbols as NDLRB <= 10
enbConfig.Ng = 'Sixth'; % HICH groups enbConfig.Ng = 'Sixth'; % HICH groups
enbConfig.CellRefP = 1; % 1-antenna ports enbConfig.CellRefP = 2; % 1-antenna ports
enbConfig.NCellID = 0; % Physical layer cell identity enbConfig.NCellID = 0; % Physical layer cell identity
enbConfig.NSubframe = 5; % Subframe number 0 enbConfig.NSubframe = 5; % Subframe number 0
enbConfig.DuplexMode = 'FDD'; % Frame structure enbConfig.DuplexMode = 'FDD'; % Frame structure

Loading…
Cancel
Save