diff --git a/lib/examples/pssch_ue.c b/lib/examples/pssch_ue.c index 2d05da183..7239f433c 100644 --- a/lib/examples/pssch_ue.c +++ b/lib/examples/pssch_ue.c @@ -127,8 +127,8 @@ void pcap_pack_and_write(FILE* pcap_file, .ueid = 1, .isRetx = reTX, .crcStatusOK = crc_ok, - .sysFrameNumber = (uint16_t)(tti / 10), - .subFrameNumber = (uint16_t)(tti % 10), + .sysFrameNumber = (uint16_t)(tti / SRSLTE_NOF_SF_X_FRAME), + .subFrameNumber = (uint16_t)(tti % SRSLTE_NOF_SF_X_FRAME), .nbiotMode = 0}; if (pdu) { LTE_PCAP_MAC_WritePDU(pcap_file, &context, pdu, pdu_len_bytes); diff --git a/lib/src/phy/phch/test/pssch_pscch_file_test.c b/lib/src/phy/phch/test/pssch_pscch_file_test.c index 69f252e24..ec038512e 100644 --- a/lib/src/phy/phch/test/pssch_pscch_file_test.c +++ b/lib/src/phy/phch/test/pssch_pscch_file_test.c @@ -380,7 +380,7 @@ int main(int argc, char** argv) uint32_t N_x_id = 0; for (int j = 0; j < SRSLTE_SCI_CRC_LEN; j++) { - N_x_id += pscch.sci_crc[j] * exp2(SRSLTE_SCI_CRC_LEN - 1 - j); + N_x_id += pscch.sci_crc[j] * (1 << (SRSLTE_SCI_CRC_LEN - 1 - j)); } uint32_t rv_idx = 0; diff --git a/lib/src/phy/phch/test/pssch_test.c b/lib/src/phy/phch/test/pssch_test.c index 4a53ce839..ee4909377 100644 --- a/lib/src/phy/phch/test/pssch_test.c +++ b/lib/src/phy/phch/test/pssch_test.c @@ -97,16 +97,7 @@ int main(int argc, char** argv) return SRSLTE_ERROR; } - // FIXME: Due to srslte_dft_precoding, many values give error - uint32_t nof_prb_pssch = cell.nof_prb; - while (srslte_dft_precoding_valid_prb(nof_prb_pssch) == false) { - nof_prb_pssch--; - if (nof_prb_pssch == 0) { - ERROR("Invalid parameters"); - exit(-1); - } - } - + uint32_t nof_prb_pssch = srslte_dft_precoding_get_valid_prb(cell.nof_prb); uint32_t N_x_id = 255; uint32_t sf_n_re = SRSLTE_SF_LEN_RE(cell.nof_prb, cell.cp); cf_t* sf_buffer = srslte_vec_cf_malloc(sf_n_re);