diff --git a/lib/include/srsran/phy/phch/pbch_msg_nr.h b/lib/include/srsran/phy/phch/pbch_msg_nr.h index 8d1e09c09..e9757caf1 100644 --- a/lib/include/srsran/phy/phch/pbch_msg_nr.h +++ b/lib/include/srsran/phy/phch/pbch_msg_nr.h @@ -23,11 +23,16 @@ */ #define SRSRAN_PBCH_MSG_NR_SZ 24 +/** + * @brief Define the payload buffer for SRSRAN_PBCH_MSG_NR_SZ to be 32 for alignment purposes + */ +#define SRSRAN_PBCH_MSG_NR_MAX_SZ 32 + /** * @brief Describes the NR PBCH message */ typedef struct SRSRAN_API { - uint8_t payload[SRSRAN_PBCH_MSG_NR_SZ]; ///< Actual PBCH payload provided by higher layers + uint8_t payload[SRSRAN_PBCH_MSG_NR_MAX_SZ]; ///< Actual PBCH payload provided by higher layers uint8_t sfn_4lsb; ///< SFN 4 LSB uint8_t ssb_idx; ///< SS/PBCH blocks index described in TS 38.213 4.1 uint8_t k_ssb_msb; ///< Subcarrier offset MSB described in TS 38.211 7.4.3.1 diff --git a/lib/src/phy/sync/test/ssb_decode_test.c b/lib/src/phy/sync/test/ssb_decode_test.c index 9cebbd0a4..c59982551 100644 --- a/lib/src/phy/sync/test/ssb_decode_test.c +++ b/lib/src/phy/sync/test/ssb_decode_test.c @@ -20,14 +20,6 @@ #include #include -/** - * @brief NR PBCH payload buffer size for the SSB decode test. - * - * @note This needs to be a multiple of 32, since the PBCH message payload is - * generated with srs_random_bit_vector. - */ -#define SRSRAN_PBCH_TEST_MSG_NR_SZ 32 - // NR parameters static uint32_t carrier_nof_prb = 52; static srsran_subcarrier_spacing_t carrier_scs = srsran_subcarrier_spacing_15kHz; @@ -121,7 +113,7 @@ static void gen_pbch_msg(srsran_pbch_msg_nr_t* pbch_msg, uint32_t ssb_idx) SRSRAN_MEM_ZERO(pbch_msg, srsran_pbch_msg_nr_t, 1); // Generate payload - srsran_random_bit_vector(random_gen, pbch_msg->payload, SRSRAN_PBCH_TEST_MSG_NR_SZ); + srsran_random_bit_vector(random_gen, pbch_msg->payload, SRSRAN_PBCH_MSG_NR_SZ); pbch_msg->ssb_idx = ssb_idx; pbch_msg->crc = true;