Softbuffer RX initialization with ratematching NULL. Moved softbuffer to fec

master
ismagom 10 years ago
parent fe830a5287
commit e7cc7b330e

@ -37,7 +37,7 @@
#define PDSCHCFG_ #define PDSCHCFG_
#include "srslte/phch/ra.h" #include "srslte/phch/ra.h"
#include "srslte/phch/softbuffer.h" #include "srslte/fec/softbuffer.h"
#include "srslte/fec/cbsegm.h" #include "srslte/fec/cbsegm.h"
typedef struct SRSLTE_API { typedef struct SRSLTE_API {

@ -37,7 +37,7 @@
#define PUSCHCFG_ #define PUSCHCFG_
#include "srslte/phch/ra.h" #include "srslte/phch/ra.h"
#include "srslte/phch/softbuffer.h" #include "srslte/fec/softbuffer.h"
#include "srslte/fec/cbsegm.h" #include "srslte/fec/cbsegm.h"
typedef struct SRSLTE_API { typedef struct SRSLTE_API {

@ -88,7 +88,7 @@
#include "srslte/phch/cqi.h" #include "srslte/phch/cqi.h"
#include "srslte/phch/dci.h" #include "srslte/phch/dci.h"
#include "srslte/phch/softbuffer.h" #include "srslte/fec/softbuffer.h"
#include "srslte/phch/pbch.h" #include "srslte/phch/pbch.h"
#include "srslte/phch/pcfich.h" #include "srslte/phch/pcfich.h"
#include "srslte/phch/pdcch.h" #include "srslte/phch/pdcch.h"

@ -133,8 +133,7 @@ int srslte_rm_turbo_tx(uint8_t *w_buff, uint32_t w_buff_len, uint8_t *input, uin
/* Undoes Turbo Code Rate Matching. /* Undoes Turbo Code Rate Matching.
* 3GPP TS 36.212 v10.1.0 section 5.1.4.1 * 3GPP TS 36.212 v10.1.0 section 5.1.4.1
* *
* If rv_idx==0, the w_buff circular buffer is initialized. Every subsequent call * Soft-combines the data available in w_buff
* with rv_idx!=0 will soft-combine the LLRs from input with w_buff
*/ */
int srslte_rm_turbo_rx(float *w_buff, uint32_t w_buff_len, float *input, uint32_t in_len, float *output, int srslte_rm_turbo_rx(float *w_buff, uint32_t w_buff_len, float *input, uint32_t in_len, float *output,
uint32_t out_len, uint32_t rv_idx, uint32_t nof_filler_bits) { uint32_t out_len, uint32_t rv_idx, uint32_t nof_filler_bits) {
@ -164,12 +163,6 @@ int srslte_rm_turbo_rx(float *w_buff, uint32_t w_buff_len, float *input, uint32_
ndummy = 0; ndummy = 0;
} }
if (rv_idx == 0) {
for (i = 0; i < 3 * K_p; i++) {
w_buff[i] = SRSLTE_RX_NULL;
}
}
/* Undo bit collection. Account for dummy bits */ /* Undo bit collection. Account for dummy bits */
N_cb = 3 * K_p; // TODO: Soft buffer size limitation N_cb = 3 * K_p; // TODO: Soft buffer size limitation
k0 = nrows k0 = nrows

@ -37,7 +37,8 @@
#include "srslte/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phch/ra.h" #include "srslte/phch/ra.h"
#include "srslte/fec/turbodecoder.h" #include "srslte/fec/turbodecoder.h"
#include "srslte/phch/softbuffer.h" #include "srslte/fec/rm_turbo.h"
#include "srslte/fec/softbuffer.h"
#include "srslte/utils/vector.h" #include "srslte/utils/vector.h"
#include "srslte/utils/debug.h" #include "srslte/utils/debug.h"
@ -92,11 +93,12 @@ void srslte_softbuffer_rx_free(srslte_softbuffer_rx_t *q) {
} }
void srslte_softbuffer_rx_reset(srslte_softbuffer_rx_t *q) { void srslte_softbuffer_rx_reset(srslte_softbuffer_rx_t *q) {
int i;
if (q->buffer_f) { if (q->buffer_f) {
for (i=0;i<q->max_cb;i++) { for (uint32_t i=0;i<q->max_cb;i++) {
if (q->buffer_f[i]) { if (q->buffer_f[i]) {
bzero(q->buffer_f[i], sizeof(float) * q->buff_size); for (uint32_t j=0;j<q->buff_size;j++) {
q->buffer_f[i][j] = SRSLTE_RX_NULL;
}
} }
} }
} }

Loading…
Cancel
Save