diff --git a/matlab/tests/pucch_test.m b/matlab/tests/pucch_test.m index 49af83b8d..7dc09ccee 100644 --- a/matlab/tests/pucch_test.m +++ b/matlab/tests/pucch_test.m @@ -1,8 +1,8 @@ clear -ueConfig=struct('NCellID',50,'RNTI',11,'NULRB',6,'NSubframe',1,'CyclicPrefixUL','Normal','NTxAnts',1,'Hopping','Off'); +ueConfig=struct('NCellID',25,'RNTI',11,'NULRB',6,'NSubframe',1,'CyclicPrefixUL','Normal','NTxAnts',1,'Hopping','Off'); pucchConfig=struct('NLayers',1,'OrthCover','Off','Shortened',0,'ResourceSize',0); -addpath('../../debug/srslte/lib/phch/test') +addpath('../../build/srslte/lib/phch/test') format_str={'1','1a','1b','2','2a','2b'}; @@ -41,9 +41,9 @@ for f=0:5 [sym, dmrs, subframe]=srslte_pucch_encode(ueConfig,pucchConfig,[bits; bits_ack]); - error_sym=mean(abs(sym-sym_mat)); - error_dmrs=mean(abs(dmrs-dmrs_mat)); - error_sf=mean(abs(subframe_mat(:)-subframe)); + error_sym=max(abs(sym-sym_mat)); + error_dmrs=max(abs(dmrs-dmrs_mat)); + error_sf=max(abs(subframe_mat(:)-subframe)); k=k+1; if (error_sym > 1e-5) @@ -56,7 +56,7 @@ for f=0:5 plot(angle(dmrs)-angle(dmrs_mat)) error('Error in DMRS'); end - if (error_sf > 1e-6) + if (error_sf > 1e-5) disp(info) plot(abs(subframe-subframe_mat(:))) error('Error in subframe'); diff --git a/srsapps/ue/mac/src/dl_harq.cc b/srsapps/ue/mac/src/dl_harq.cc index 4ce08a201..49e70823c 100644 --- a/srsapps/ue/mac/src/dl_harq.cc +++ b/srsapps/ue/mac/src/dl_harq.cc @@ -142,12 +142,12 @@ void dl_harq_entity::dl_harq_process::receive_data(uint32_t tti, srslte::ue::dl_ // RX OK if (pid == HARQ_BCCH_PID) { Debug("Delivering PDU=%d bytes to Dissassemble and Demux unit (BCCH)\n", cur_grant.get_tbs()/8); - harq_entity->demux_unit->push_pdu_bcch(payload, cur_grant.get_tbs()); - is_first_tx = true; + harq_entity->demux_unit->push_pdu_bcch(payload, cur_grant.get_tbs()); } else { if (is_first_decoded) { if (cur_grant.is_temp_rnti()) { - Debug("Delivering PDU=%d bytes to Dissassemble and Demux unit (Temporal C-RNTI)\n", cur_grant.get_tbs()/8); + Debug("Delivering PDU=%d bytes to Dissassemble and Demux unit (Temporal C-RNTI)\n", + cur_grant.get_tbs()/8); harq_entity->demux_unit->push_pdu_temp_crnti(payload, cur_grant.get_tbs()); } else { Debug("Delivering PDU=%d bytes to Dissassemble and Demux unit\n", cur_grant.get_tbs()/8); diff --git a/srsapps/ue/phy/include/srsapps/ue/phy/ul_buffer.h b/srsapps/ue/phy/include/srsapps/ue/phy/ul_buffer.h index 615ce3151..16b178350 100644 --- a/srsapps/ue/phy/include/srsapps/ue/phy/ul_buffer.h +++ b/srsapps/ue/phy/include/srsapps/ue/phy/ul_buffer.h @@ -67,7 +67,6 @@ namespace ue { phy_params *params_db; srslte_cell_t cell; srslte_ue_ul_t ue_ul; - srslte_pusch_cfg_t pusch_cfg; bool cell_initiated; cf_t* signal_buffer; uint32_t current_tx_nb; diff --git a/srsapps/ue/phy/src/ul_buffer.cc b/srsapps/ue/phy/src/ul_buffer.cc index 76f03f305..fcf7d5f90 100644 --- a/srsapps/ue/phy/src/ul_buffer.cc +++ b/srsapps/ue/phy/src/ul_buffer.cc @@ -196,7 +196,8 @@ bool ul_buffer::generate_data(ul_sched_grant *grant, srslte_softbuffer_tx_t *sof grant->to_pusch_cfg(tti%10, 0, &ue_ul); Info("Encoding PUSCH TBS=%d, mod=%s, rb_start=%d n_prb=%d, ack=%s, sr=%s, rnti=%d, sf_idx=%d\n", - grant->get_tbs(), srslte_mod_string(pusch_cfg.grant.mcs.mod), pusch_cfg.grant.n_prb[0], pusch_cfg.grant.L_prb, + grant->get_tbs(), srslte_mod_string(ue_ul.pusch_cfg.grant.mcs.mod), ue_ul.pusch_cfg.grant.n_prb[0], + ue_ul.pusch_cfg.grant.L_prb, uci_data.uci_ack_len>0?(uci_data.uci_ack?"1":"0"):"no",uci_data.scheduling_request?"yes":"no", grant->get_rnti(), tti%10); @@ -205,8 +206,9 @@ bool ul_buffer::generate_data(ul_sched_grant *grant, srslte_softbuffer_tx_t *sof softbuffer, grant->get_rnti(), signal_buffer); - } else { - Info("Encoding PUCCH n_cce=%d, ack=%d, sr=%d\n", last_n_cce, uci_data.uci_ack, uci_data.scheduling_request); + } else { + Info("Encoding PUCCH n_cce=%d, ack=%s, sr=%s\n", last_n_cce, + uci_data.uci_ack_len>0?(uci_data.uci_ack?"1":"0"):"no",uci_data.scheduling_request?"yes":"no"); n = srslte_ue_ul_pucch_encode(&ue_ul, uci_data, tti&10, signal_buffer); }