expose UL-SCH interleaver to use in Sidelink

master
Andre Puschmann 5 years ago
parent fef6893ce4
commit 2e7a357226

@ -122,4 +122,19 @@ SRSLTE_API uint32_t srslte_sch_find_Ioffset_cqi(float beta);
SRSLTE_API uint32_t srslte_sch_find_Ioffset_ri(float beta); SRSLTE_API uint32_t srslte_sch_find_Ioffset_ri(float beta);
#endif // SRSLTE_SCH_H ///< Sidelink uses PUSCH Interleaver in all channels
SRSLTE_API void srslte_sl_ulsch_interleave(uint8_t* g_bits,
uint32_t Qm,
uint32_t H_prime_total,
uint32_t N_pusch_symbs,
uint8_t* q_bits);
///< Sidelink uses PUSCH Deinterleaver in all channels
SRSLTE_API void srslte_sl_ulsch_deinterleave(int16_t* q_bits,
uint32_t Qm,
uint32_t H_prime_total,
uint32_t N_pusch_symbs,
int16_t* g_bits,
uint32_t* inteleaver_lut);
#endif // SRSLTE_SCH_H

@ -620,7 +620,7 @@ static void ulsch_interleave_gen(uint32_t H_prime_total,
for (uint32_t j = 0; j < rows; j++) { for (uint32_t j = 0; j < rows; j++) {
for (uint32_t i = 0; i < cols; i++) { for (uint32_t i = 0; i < cols; i++) {
for (uint32_t k = 0; k < Qm; k++) { for (uint32_t k = 0; k < Qm; k++) {
if (ri_present[j * Qm + i * rows * Qm + k]) { if (ri_present && ri_present[j * Qm + i * rows * Qm + k]) {
interleaver_lut[j * Qm + i * rows * Qm + k] = 0; interleaver_lut[j * Qm + i * rows * Qm + k] = 0;
} else { } else {
interleaver_lut[j * Qm + i * rows * Qm + k] = idx; interleaver_lut[j * Qm + i * rows * Qm + k] = idx;
@ -1257,3 +1257,22 @@ int srslte_ulsch_encode(srslte_sch_t* q,
return nof_ri_ack_bits; return nof_ri_ack_bits;
} }
void srslte_sl_ulsch_interleave(uint8_t* g_bits,
uint32_t Qm,
uint32_t H_prime_total,
uint32_t N_pusch_symbs,
uint8_t* q_bits)
{
ulsch_interleave(g_bits, Qm, H_prime_total, N_pusch_symbs, q_bits, NULL, 0, false);
}
void srslte_sl_ulsch_deinterleave(int16_t* q_bits,
uint32_t Qm,
uint32_t H_prime_total,
uint32_t N_pusch_symbs,
int16_t* g_bits,
uint32_t* inteleaver_lut)
{
ulsch_deinterleave(q_bits, Qm, H_prime_total, N_pusch_symbs, g_bits, NULL, 0, NULL, inteleaver_lut);
}
Loading…
Cancel
Save