#define MAX_NB_PRACH_CONF_PERIOD_IN_ASSOCIATION_PERIOD (16) // Maximum association period is 16
#define MAX_NB_PRACH_CONF_PERIOD_IN_ASSOCIATION_PATTERN_PERIOD (16) // Max association pattern period is 160ms and minimum PRACH configuration period is 10ms
#define MAX_NB_ASSOCIATION_PERIOD_IN_ASSOCIATION_PATTERN_PERIOD (16) // Max nb of association periods in an association pattern period of 160ms
#define MAX_NB_FRAME_IN_PRACH_CONF_PERIOD (16) // Max PRACH configuration period is 160ms and frame is 10ms
#define MAX_NB_SLOT_IN_FRAME (160) // Max number of slots in a frame (@ SCS 240kHz = 160)
#define MAX_NB_FRAME_IN_ASSOCIATION_PATTERN_PERIOD (16) // Maximum number of frames in the maximum association pattern period
#define MAX_NB_SSB (64) // Maximum number of possible SSB indexes
#define MAX_RO_PER_SSB (8) // Maximum number of consecutive ROs that can be mapped to an SSB according to the ssb_per_RACH config
// Maximum number of ROs that can be mapped to an SSB in an association pattern
// This is to reserve enough elements in the SSBs list for each mapped ROs for a single SSB
// An arbitrary maximum number is chosen to be safe: maximum number of slots in an association pattern * maximum number of ROs in a slot
uint8_tnb_of_assoc_period;// Nb of association periods within the association pattern
uint8_tnb_of_prach_conf_period_in_max_period;// Nb of PRACH configuration periods within the maximum association pattern period (according to the size of the configured PRACH
uint8_tnb_of_frame;// Total number of frames included in the association pattern period (after mapping the SSBs and determining the real association pattern length)
}prach_association_pattern_t;
// SSB details
typedefstructssb_info{
prach_occasion_info_t*mapped_ro[MAX_NB_RO_PER_SSB_IN_ASSOCIATION_PATTERN];// List of mapped RACH Occasions to this SSB index
uint32_tnb_mapped_ro;// Total number of mapped ROs to this SSB index
}ssb_info_t;
// List of all the possible SSBs and their details
"Adding a PRACH occasion: frame %u, slot-symbol %d-%d, occ_in_time-occ_in-freq %d-%d, nb ROs in conf period %d, for this slot: RO# in time %d, RO# in freq %d\n",
frame_rach,
slot,
start_symbol,
n_prach_occ_in_time,
n_prach_occ_in_freq,
prach_conf_period_list->nb_of_prach_occasion,
slot_map->nb_of_prach_occasion_in_time,
slot_map->nb_of_prach_occasion_in_freq);
}// For every freq in the slot
}// For every time occasions in the slot
}// Valid slot?
}// For every slots in a frame
}// Valid frame?
}// For every frames in a prach configuration period
}// For every prach configuration periods in the maximum association pattern period (160ms)