Fixed PDCCH not looking for aggregation level L=8. Fixed PCFICH encoder not accepting cfi=3

master
Ismael Gomez 9 years ago
parent 77a560cbf3
commit a612009ea7

@ -66,7 +66,7 @@ srslte_cell_t cell = {
int net_port = -1; // -1 generates random dataThat means there is some problem sending samples to the device
uint32_t cfi=2;
uint32_t cfi=3;
uint32_t mcs_idx = 1, last_mcs_idx = 1;
int nof_frames = -1;
@ -597,7 +597,11 @@ int main(int argc, char **argv) {
for (i=0;i<pdsch_cfg.grant.mcs.tbs/8;i++) {
data[i] = rand()%256;
}
if (sf_idx != 0 && sf_idx != 5) {
send_data = true;
} else {
send_data = false;
}
}
if (send_data) {

@ -550,8 +550,8 @@ int main(int argc, char **argv) {
nof_trials++;
rsrq = SRSLTE_VEC_EMA(srslte_chest_dl_get_rsrq(&ue_dl.chest), rsrq, 0.1);
rsrp = SRSLTE_VEC_EMA(srslte_chest_dl_get_rsrp(&ue_dl.chest), rsrp, 0.1);
noise = SRSLTE_VEC_EMA(srslte_chest_dl_get_noise_estimate(&ue_dl.chest), noise, 0.1);
rsrp = SRSLTE_VEC_EMA(srslte_chest_dl_get_rsrp(&ue_dl.chest), rsrp, 0.05);
noise = SRSLTE_VEC_EMA(srslte_chest_dl_get_noise_estimate(&ue_dl.chest), noise, 0.05);
nframes++;
if (isnan(rsrq)) {
rsrq = 0;
@ -585,6 +585,11 @@ int main(int argc, char **argv) {
sfn++;
if (sfn == 1024) {
sfn = 0;
printf("reset\n");
ue_dl.pkt_errors = 0;
ue_dl.pkts_total = 0;
ue_dl.nof_detected = 0;
nof_trials = 0;
}
}

@ -40,6 +40,8 @@
#define TB_ITER 3
#define DEFAULT_GAIN 10
//#undef LV_HAVE_SSE
int decode37(void *o, uint8_t *symbols, uint8_t *data, uint32_t frame_length) {
@ -132,7 +134,7 @@ int init37(srslte_viterbi_t *q, uint32_t poly[3], uint32_t framebits, bool tail_
q->K = 7;
q->R = 3;
q->framebits = framebits;
q->gain_quant = 32;
q->gain_quant = DEFAULT_GAIN;
q->tail_biting = tail_biting;
q->decode = decode37;
q->free = free37;
@ -168,7 +170,7 @@ int init37_sse(srslte_viterbi_t *q, uint32_t poly[3], uint32_t framebits, bool t
q->K = 7;
q->R = 3;
q->framebits = framebits;
q->gain_quant = 20;
q->gain_quant = DEFAULT_GAIN;
q->tail_biting = tail_biting;
q->decode = decode37_sse;
q->free = free37_sse;

@ -141,7 +141,11 @@ bool srslte_cqi_send(uint32_t I_cqi_pmi, uint32_t tti) {
/* SNR-to-CQI conversion, got from "Downlink SNR to CQI Mapping for Different Multiple Antenna Techniques in LTE"
* Table III.
*/
static float cqi_to_snr_table[15] = { 1.95, 4, 6, 8, 10, 11.95, 14.05, 16, 17.9, 19.9, 21.5, 23.45, 25.0, 27.30, 29};
// Original version
//static float cqi_to_snr_table[15] = { 1.95, 4, 6, 8, 10, 11.95, 14.05, 16, 17.9, 19.9, 21.5, 23.45, 25.0, 27.30, 29};
// From experimental measurements @ 5 MHz
static float cqi_to_snr_table[15] = { 0, 1.25, 2.5, 3.75, 5, 6, 7.5, 9, 11.5, 13.0, 15.0, 18, 20, 22.5, 26.5};
uint8_t srslte_cqi_from_snr(float snr)
{

@ -134,7 +134,7 @@ float srslte_pcfich_cfi_decode(srslte_pcfich_t *q, uint32_t *cfi) {
/** Encodes the CFI producing a vector of 32 bits.
* 36.211 10.3 section 5.3.4
*/
int srslte_pcfich_cfi_encode(int cfi, uint8_t bits[PCFICH_CFI_LEN]) {
int srslte_pcfich_cfi_encode(uint32_t cfi, uint8_t bits[PCFICH_CFI_LEN]) {
if (cfi < 1 || cfi > 3) {
return SRSLTE_ERROR_INVALID_INPUTS;
} else{
@ -220,7 +220,7 @@ int srslte_pcfich_encode(srslte_pcfich_t *q, uint32_t cfi, cf_t *slot_symbols[SR
int i;
if (q != NULL &&
cfi < 3 &&
cfi <= 3 &&
slot_symbols != NULL &&
subframe < SRSLTE_NSUBFRAMES_X_FRAME)
{

@ -192,7 +192,7 @@ uint32_t srslte_pdcch_ue_locations(srslte_pdcch_t *q, srslte_dci_location_t *c,
k = 0;
// All aggregation levels from 8 to 1
for (l = 0; l < 3; l++) {
for (l = 3; l >= 0; l--) {
L = (1 << l);
// For all possible ncce offset
for (i = 0; i < SRSLTE_MIN(q->nof_cce / L, S[l]/PDCCH_FORMAT_NOF_CCE(l)); i++) {

@ -194,16 +194,12 @@ int srslte_ue_dl_decode_fft_estimate(srslte_ue_dl_t *q, cf_t *input, uint32_t sf
/* Correct SFO multiplying by complex exponential in the time domain */
if (q->sample_offset) {
struct timeval t[3];
gettimeofday(&t[1], NULL);
for (int i=0;i<2*SRSLTE_CP_NSYMB(q->cell.cp);i++) {
srslte_cfo_correct(&q->sfo_correct,
&q->sf_symbols[i*q->cell.nof_prb*SRSLTE_NRE],
&q->sf_symbols[i*q->cell.nof_prb*SRSLTE_NRE],
q->sample_offset / q->fft.symbol_sz);
}
gettimeofday(&t[2], NULL);
get_time_interval(t);
}
return srslte_ue_dl_decode_estimate(q, sf_idx, cfi);
@ -221,7 +217,8 @@ int srslte_ue_dl_decode_estimate(srslte_ue_dl_t *q, uint32_t sf_idx, uint32_t *c
/* First decode PCFICH and obtain CFI */
if (srslte_pcfich_decode(&q->pcfich, q->sf_symbols, q->ce,
srslte_chest_dl_get_noise_estimate(&q->chest), sf_idx, cfi, &cfi_corr)<0) {
srslte_chest_dl_get_noise_estimate(&q->chest),
sf_idx, cfi, &cfi_corr)<0) {
fprintf(stderr, "Error decoding PCFICH\n");
return SRSLTE_ERROR;
}

Loading…
Cancel
Save