Fixed bug in PUSCH and DRMS using all PRBs. Fixed bug in PDU writing packet not returning true

master
ismagom 10 years ago
parent a9d399c760
commit 99f2ab4e9b

@ -93,7 +93,7 @@ private:
qbuff msg3_buff;
/* PDU Buffer */
static const uint32_t PDU_BUFF_SZ = 16*1024;
static const uint32_t PDU_BUFF_SZ = 128*1024;
qbuff pdu_buff;
sch_pdu pdu_msg;
bool msg3_has_been_transmitted;

@ -240,7 +240,7 @@ bool mux::assemble_pdu(uint32_t pdu_sz_nbits) {
}
pkt_num++;
// MAC control element for PHR
if (pkt_num == 1) {
if (pkt_num == 2) {
if (pdu_msg.new_subh()) {
pdu_msg.next();
pdu_msg.get()->set_phd(46);

@ -169,7 +169,8 @@ bool sch_pdu::write_packet(uint8_t* ptr)
}
// Set paddint to zeros (if any)
bzero(ptr, rem_len*sizeof(uint8_t)*8);
return true;
}
uint32_t sch_pdu::rem_size() {
@ -572,6 +573,8 @@ bool rar_pdu::write_packet(uint8_t* ptr)
}
// Set paddint to zeros (if any)
bzero(ptr, rem_len*sizeof(uint8_t)*8);
return true;
}

@ -547,7 +547,6 @@ void phy::run_rx_tx_state()
Info("Restoring AGC. Set TX gain to %.1f dB\n", old_gain);
} else if (get_ul_buffer_adv(current_tti)->is_end_of_burst()) {
radio_handler->tx_end();
Info("Sending TX END\n");
}
// Receive alligned buffer for the current tti

@ -315,7 +315,7 @@ bool srslte_refsignal_dmrs_pusch_cfg_isvalid(srslte_refsignal_ul_t *q, srslte_re
if (cfg->cyclic_shift < SRSLTE_NOF_CSHIFT &&
cfg->cyclic_shift_for_dmrs < SRSLTE_NOF_CSHIFT &&
cfg->delta_ss < SRSLTE_NOF_DELTA_SS &&
nof_prb < q->cell.nof_prb) {
nof_prb <= q->cell.nof_prb) {
return true;
} else {
return false;

@ -48,7 +48,7 @@ int srslte_dft_precoding_init(srslte_dft_precoding_t *q, uint32_t max_prb)
if (max_prb <= SRSLTE_MAX_PRB) {
ret = SRSLTE_ERROR;
for (uint32_t i=1;i<max_prb;i++) {
for (uint32_t i=1;i<=max_prb;i++) {
if(srslte_dft_precoding_valid_prb(i)) {
DEBUG("Initiating DFT precoding plan for %d PRBs\n", i);
if (srslte_dft_plan_c(&q->dft_plan[i], i*SRSLTE_NRE, SRSLTE_DFT_FORWARD)) {
@ -77,7 +77,7 @@ clean_exit:
/* Free DFT plans for transform precoding */
void srslte_dft_precoding_free(srslte_dft_precoding_t *q)
{
for (uint32_t i=1;i<q->max_prb;i++) {
for (uint32_t i=1;i<=q->max_prb;i++) {
if(srslte_dft_precoding_valid_prb(i)) {
DEBUG("Freeing DFT precoding plan for %d PRBs\n", i);
srslte_dft_plan_free(&q->dft_plan[i]);
@ -99,7 +99,7 @@ int srslte_dft_precoding(srslte_dft_precoding_t *q, cf_t *input, cf_t *output,
uint32_t nof_prb, uint32_t nof_symbols)
{
if (!srslte_dft_precoding_valid_prb(nof_prb)) {
if (!srslte_dft_precoding_valid_prb(nof_prb) && nof_prb <= q->max_prb) {
fprintf(stderr, "Error invalid number of PRB (%d)\n", nof_prb);
return SRSLTE_ERROR;
}
@ -114,7 +114,7 @@ int srslte_dft_precoding(srslte_dft_precoding_t *q, cf_t *input, cf_t *output,
int srslte_dft_predecoding(srslte_dft_precoding_t *q, cf_t *input, cf_t *output,
uint32_t nof_prb, uint32_t nof_symbols)
{
if (!srslte_dft_precoding_valid_prb(nof_prb)) {
if (!srslte_dft_precoding_valid_prb(nof_prb) && nof_prb <= q->max_prb) {
fprintf(stderr, "Error invalid number of PRB (%d)\n", nof_prb);
return SRSLTE_ERROR;
}

@ -517,7 +517,7 @@ int srslte_pusch_uci_encode_rnti(srslte_pusch_t *q, srslte_pusch_cfg_t *cfg, srs
fprintf(stderr, "Error encoding TB\n");
return SRSLTE_ERROR;
}
if (rnti != q->rnti) {
srslte_sequence_t seq;
if (srslte_sequence_pusch(&seq, rnti, 2 * cfg->sf_idx, q->cell.id, cfg->nbits.nof_bits)) {
@ -528,7 +528,6 @@ int srslte_pusch_uci_encode_rnti(srslte_pusch_t *q, srslte_pusch_cfg_t *cfg, srs
} else {
srslte_scrambling_b_offset_pusch(&q->seq[cfg->sf_idx], (uint8_t*) q->q, 0, cfg->nbits.nof_bits);
}
srslte_mod_modulate(&q->mod[cfg->grant.mcs.mod], (uint8_t*) q->q, q->d, cfg->nbits.nof_bits);
srslte_dft_precoding(&q->dft_precoding, q->d, q->z, cfg->grant.L_prb, cfg->nbits.nof_symb);

Loading…
Cancel
Save