Refactor and extend CPU channel model with float support
This commit refactors the CPU-based channel model for improved reusability and extends it with single-precision floating-point support. This serves as a performance and correctness baseline for the new CUDA implementation. Key changes include: - The original double-based multipath_channel function is refactored to remove hardcoded antenna dimensions from its signature. It now accepts dynamically sized arrays, making it more flexible for use in simulators like dlsim and ulsim. - A new multipath_channel_float function is introduced to operate on float data types, matching the GPU's native format. - A corresponding add_noise_float function is also added to complete the floating-point CPU pipeline. - The new float-based functions are designed to work with an interleaved IQ sample format ([I, Q, I, Q]), which is more suitable for vectorized (SSE) and GPU processing.
This commit is contained in:
committed by
Jaroslava Fiedlerova
parent
70726903f3
commit
c54f0f7955
@@ -412,13 +412,39 @@ int random_channel(channel_desc_t *desc, uint8_t abstraction_flag);
|
||||
*/
|
||||
|
||||
void multipath_channel(channel_desc_t *desc,
|
||||
double *tx_sig_re[NB_ANTENNAS_TX],
|
||||
double *tx_sig_im[NB_ANTENNAS_TX],
|
||||
double *rx_sig_re[NB_ANTENNAS_RX],
|
||||
double *rx_sig_im[NB_ANTENNAS_RX],
|
||||
double **tx_sig_re,
|
||||
double **tx_sig_im,
|
||||
double **rx_sig_re,
|
||||
double **rx_sig_im,
|
||||
uint32_t length,
|
||||
uint8_t keep_channel,
|
||||
int log_channel);
|
||||
|
||||
void multipath_channel_float(channel_desc_t *desc,
|
||||
float **tx_sig_interleaved,
|
||||
float **rx_sig_re,
|
||||
float **rx_sig_im,
|
||||
uint32_t length,
|
||||
uint8_t keep_channel,
|
||||
int log_channel);
|
||||
|
||||
void interleave_channel_output(float **rx_sig_re,
|
||||
float **rx_sig_im,
|
||||
float **output_interleaved,
|
||||
int nb_rx,
|
||||
int num_samples);
|
||||
|
||||
void add_noise_float(c16_t **rxdata,
|
||||
const float **r_re,
|
||||
const float **r_im,
|
||||
const float sigma2,
|
||||
const int length,
|
||||
const int slot_offset,
|
||||
const double ts,
|
||||
const int delay,
|
||||
bool apply_phase_noise,
|
||||
const uint8_t nb_antennas_rx);
|
||||
|
||||
/*
|
||||
\fn double compute_pbch_sinr(channel_desc_t *desc,
|
||||
channel_desc_t *desc_i1,
|
||||
|
||||
Reference in New Issue
Block a user