/** * Stores in the bits buffer a sequence of nbits pseudo-random bits. * Overwrites the bits generated using srslte_binsource_cache_gen. */ int srslte_binsource_generate(srslte_binsource_t* q, uint8_t *bits, int nbits) { if (gen_seq_buff(q,DIV(nbits,32))) { return -1; } int_2_bits(q->seq_buff,bits,nbits); return 0; }
/** * Stores in the bits buffer a sequence of nbits pseudo-random bits. * Overwrites the bits generated using binsource_cache_gen. */ int binsource_generate(binsource_t* q, char *bits, int nbits) { if (gen_seq_buff(q,DIV(nbits,32))) { return -1; } int_2_bits(q->seq_buff,bits,nbits); return 0; }
/** * Copies the next random bits to the buffer bits from the array generated by srslte_binsource_cache_gen */ void srslte_binsource_cache_cpy(srslte_binsource_t* q, uint8_t *bits, int nbits) { q->seq_cache_rp += int_2_bits(&q->seq_buff[q->seq_cache_rp],bits,nbits); }
/** * Copies the next random bits to the buffer bits from the array generated by binsource_cache_gen */ void binsource_cache_cpy(binsource_t* q, char *bits, int nbits) { q->seq_cache_rp += int_2_bits(&q->seq_buff[q->seq_cache_rp],bits,nbits); }