Increased softbuffer. Changed pusch_test

This commit is contained in:
ismagom 2015-08-08 02:16:48 +02:00
parent ea40092db7
commit e3166e37c7
5 changed files with 30 additions and 15 deletions

View File

@ -270,6 +270,18 @@ bool mux::allocate_sdu(uint32_t lcid, sch_pdu *pdu_msg, int max_sdu_sz, uint32_t
} }
Info("Allocated SDU lcid=%d nbytes=%d, buffer_state=%d\n", lcid, sdu_len, buffer_state); Info("Allocated SDU lcid=%d nbytes=%d, buffer_state=%d\n", lcid, sdu_len, buffer_state);
/*
char str[64];
int len = 10;
if (len > sdu_len) {
len = sdu_len;
}
uint8_t *x=pdu_msg->get()->get_sdu_ptr();
for (int i=0;i<len;i++) {
sprintf(str, "0x%x, ", x[i]);
}
Info("Payload: %s\n", str);
*/
return true; return true;
} else { } else {
Info("Could not add SDU rem_size=%d, sdu_len=%d\n", pdu_msg->rem_size(), buffer_state); Info("Could not add SDU rem_size=%d, sdu_len=%d\n", pdu_msg->rem_size(), buffer_state);

View File

@ -70,8 +70,8 @@ int srslte_rm_turbo_tx(uint8_t *w_buff, uint32_t w_buff_len, uint8_t *input, uin
K_p = nrows * NCOLS; K_p = nrows * NCOLS;
if (3 * K_p > w_buff_len) { if (3 * K_p > w_buff_len) {
fprintf(stderr, fprintf(stderr,
"Input too large. Max input length including dummy bits is %d (3x%dx32, in_len %d)\n", "Input too large. Max input length including dummy bits is %d (3x%dx32, in_len %d, Kp=%d)\n",
w_buff_len, nrows, in_len); w_buff_len, nrows, in_len, K_p);
return -1; return -1;
} }

View File

@ -63,7 +63,7 @@ int srslte_softbuffer_rx_init(srslte_softbuffer_rx_t *q, uint32_t nof_prb) {
} }
// FIXME: Use HARQ buffer limitation based on UE category // FIXME: Use HARQ buffer limitation based on UE category
q->buff_size = 3 * (SRSLTE_TCOD_MAX_LEN_CB+24); q->buff_size = 18600;
for (uint32_t i=0;i<q->max_cb;i++) { for (uint32_t i=0;i<q->max_cb;i++) {
q->buffer_f[i] = srslte_vec_malloc(sizeof(float) * q->buff_size); q->buffer_f[i] = srslte_vec_malloc(sizeof(float) * q->buff_size);
if (!q->buffer_f[i]) { if (!q->buffer_f[i]) {
@ -125,7 +125,7 @@ int srslte_softbuffer_tx_init(srslte_softbuffer_tx_t *q, uint32_t nof_prb) {
} }
// FIXME: Use HARQ buffer limitation based on UE category // FIXME: Use HARQ buffer limitation based on UE category
q->buff_size = 3 * SRSLTE_TCOD_MAX_LEN_CB; q->buff_size = 18600;
for (uint32_t i=0;i<q->max_cb;i++) { for (uint32_t i=0;i<q->max_cb;i++) {
q->buffer_b[i] = srslte_vec_malloc(sizeof(float) * q->buff_size); q->buffer_b[i] = srslte_vec_malloc(sizeof(float) * q->buff_size);
if (!q->buffer_b[i]) { if (!q->buffer_b[i]) {

View File

@ -179,7 +179,7 @@ int srslte_dci_msg_to_ul_grant(srslte_dci_msg_t *msg, uint32_t nof_prb,
if (srslte_dci_msg_unpack_pusch(msg, ul_dci, nof_prb)) { if (srslte_dci_msg_unpack_pusch(msg, ul_dci, nof_prb)) {
return ret; return ret;
} }
if (srslte_ra_ul_dci_to_grant(ul_dci, nof_prb, n_rb_ho, grant)) { if (srslte_ra_ul_dci_to_grant(ul_dci, nof_prb, n_rb_ho, grant)) {
fprintf(stderr, "Error computing resource allocation\n"); fprintf(stderr, "Error computing resource allocation\n");
return ret; return ret;
@ -340,6 +340,7 @@ int dci_format0_pack(srslte_ra_ul_dci_t *data, srslte_dci_msg_t *msg, uint32_t n
} else { } else {
riv = data->type2_alloc.riv; riv = data->type2_alloc.riv;
} }
srslte_bit_pack(riv, &y, riv_nbits(nof_prb) - n_ul_hop); srslte_bit_pack(riv, &y, riv_nbits(nof_prb) - n_ul_hop);
/* pack MCS according to 8.6.1 of 36.213 */ /* pack MCS according to 8.6.1 of 36.213 */

View File

@ -129,17 +129,16 @@ int main(int argc, char **argv) {
dci.type2_alloc.L_crb = L_prb; dci.type2_alloc.L_crb = L_prb;
dci.type2_alloc.RB_start = n_prb; dci.type2_alloc.RB_start = n_prb;
} else { } else {
srslte_ra_type2_from_riv((uint32_t) riv, &dci.type2_alloc.L_crb, &dci.type2_alloc.RB_start, cell.nof_prb, cell.nof_prb); dci.type2_alloc.riv = riv;
} }
dci.mcs_idx = mcs_idx; dci.mcs_idx = mcs_idx;
srslte_dci_msg_t dci_msg;
srslte_dci_msg_pack_pusch(&dci, &dci_msg, cell.nof_prb);
srslte_ra_ul_grant_t grant; srslte_ra_ul_grant_t grant;
if (srslte_dci_msg_to_ul_grant(&dci_msg, cell.nof_prb, 0, &dci, &grant)) { if (srslte_ra_ul_dci_to_grant(&dci, cell.nof_prb, 0, &grant)) {
return false; fprintf(stderr, "Error computing resource allocation\n");
return ret;
} }
srslte_pusch_hopping_cfg_t ul_hopping; srslte_pusch_hopping_cfg_t ul_hopping;
ul_hopping.n_sb = 1; ul_hopping.n_sb = 1;
ul_hopping.hopping_offset = 0; ul_hopping.hopping_offset = 0;
@ -196,7 +195,7 @@ int main(int argc, char **argv) {
srslte_ofdm_tx_init(&fft, SRSLTE_CP_NORM, cell.nof_prb); srslte_ofdm_tx_init(&fft, SRSLTE_CP_NORM, cell.nof_prb);
srslte_ofdm_set_freq_shift(&fft, 0.5); srslte_ofdm_set_freq_shift(&fft, 0.5);
data = malloc(sizeof(uint8_t) * cfg.grant.mcs.tbs); data = srslte_vec_malloc(sizeof(uint8_t) * cfg.grant.mcs.tbs);
if (!data) { if (!data) {
perror("malloc"); perror("malloc");
goto quit; goto quit;
@ -207,7 +206,7 @@ int main(int argc, char **argv) {
} }
gettimeofday(&t[1], NULL); gettimeofday(&t[1], NULL);
if (srslte_softbuffer_tx_init(&softbuffer, cell.nof_prb)) { if (srslte_softbuffer_tx_init(&softbuffer, 4*cell.nof_prb)) {
fprintf(stderr, "Error initiating soft buffer\n"); fprintf(stderr, "Error initiating soft buffer\n");
goto quit; goto quit;
} }
@ -235,7 +234,10 @@ int main(int argc, char **argv) {
ret = -1; ret = -1;
goto quit; goto quit;
} else { } else {
printf("ENCODED OK in %d:%d (%.2f Mbps)\n", (int) t[0].tv_sec, (int) t[0].tv_usec, printf("ENCODED OK in %d:%d (TBS: %d bits, TX: %.2f Mbps, Processing: %.2f Mbps)\n", (int) t[0].tv_sec,
(int) t[0].tv_usec,
cfg.grant.mcs.tbs,
(float) cfg.grant.mcs.tbs/1000,
(float) cfg.grant.mcs.tbs/t[0].tv_usec); (float) cfg.grant.mcs.tbs/t[0].tv_usec);
} }