mirror of https://github.com/PentHertz/srsLTE.git
Increased softbuffer. Changed pusch_test
This commit is contained in:
parent
ea40092db7
commit
e3166e37c7
|
@ -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);
|
||||
/*
|
||||
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;
|
||||
} else {
|
||||
Info("Could not add SDU rem_size=%d, sdu_len=%d\n", pdu_msg->rem_size(), buffer_state);
|
||||
|
|
|
@ -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;
|
||||
if (3 * K_p > w_buff_len) {
|
||||
fprintf(stderr,
|
||||
"Input too large. Max input length including dummy bits is %d (3x%dx32, in_len %d)\n",
|
||||
w_buff_len, nrows, in_len);
|
||||
"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, K_p);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
q->buff_size = 3 * (SRSLTE_TCOD_MAX_LEN_CB+24);
|
||||
q->buff_size = 18600;
|
||||
for (uint32_t i=0;i<q->max_cb;i++) {
|
||||
q->buffer_f[i] = srslte_vec_malloc(sizeof(float) * q->buff_size);
|
||||
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
|
||||
q->buff_size = 3 * SRSLTE_TCOD_MAX_LEN_CB;
|
||||
q->buff_size = 18600;
|
||||
for (uint32_t i=0;i<q->max_cb;i++) {
|
||||
q->buffer_b[i] = srslte_vec_malloc(sizeof(float) * q->buff_size);
|
||||
if (!q->buffer_b[i]) {
|
||||
|
|
|
@ -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)) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
if (srslte_ra_ul_dci_to_grant(ul_dci, nof_prb, n_rb_ho, grant)) {
|
||||
fprintf(stderr, "Error computing resource allocation\n");
|
||||
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 {
|
||||
riv = data->type2_alloc.riv;
|
||||
}
|
||||
|
||||
srslte_bit_pack(riv, &y, riv_nbits(nof_prb) - n_ul_hop);
|
||||
|
||||
/* pack MCS according to 8.6.1 of 36.213 */
|
||||
|
|
|
@ -129,17 +129,16 @@ int main(int argc, char **argv) {
|
|||
dci.type2_alloc.L_crb = L_prb;
|
||||
dci.type2_alloc.RB_start = n_prb;
|
||||
} 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;
|
||||
srslte_dci_msg_t dci_msg;
|
||||
srslte_dci_msg_pack_pusch(&dci, &dci_msg, cell.nof_prb);
|
||||
|
||||
|
||||
srslte_ra_ul_grant_t grant;
|
||||
if (srslte_dci_msg_to_ul_grant(&dci_msg, cell.nof_prb, 0, &dci, &grant)) {
|
||||
return false;
|
||||
if (srslte_ra_ul_dci_to_grant(&dci, cell.nof_prb, 0, &grant)) {
|
||||
fprintf(stderr, "Error computing resource allocation\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
srslte_pusch_hopping_cfg_t ul_hopping;
|
||||
ul_hopping.n_sb = 1;
|
||||
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_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) {
|
||||
perror("malloc");
|
||||
goto quit;
|
||||
|
@ -207,7 +206,7 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
|
||||
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");
|
||||
goto quit;
|
||||
}
|
||||
|
@ -235,7 +234,10 @@ int main(int argc, char **argv) {
|
|||
ret = -1;
|
||||
goto quit;
|
||||
} 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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue