Skip to content
Snippets Groups Projects
Commit 7ea60872 authored by Bo Zhao's avatar Bo Zhao Committed by cig
Browse files

Extend the length of the channel processing to 32 bits

parent ac122452
No related branches found
No related tags found
8 merge requests!1757Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c,!1493fix DL arq errors in UE,!1093Issue in generating NR PRACH for High Speed case,!1074PBCH test case support for non-zero bchpyload,!847Nr vcd,!836Nr fix phytest packet corruption dlsch,!833Develop integration 2020 week 25,!799WIP: Nr rrc prach procedures
...@@ -27,18 +27,20 @@ ...@@ -27,18 +27,20 @@
#include "SIMULATION/RF/rf.h" #include "SIMULATION/RF/rf.h"
#include <complex.h> #include <complex.h>
void tv_channel(channel_desc_t *desc,double complex ***H,uint16_t length); void tv_channel(channel_desc_t *desc,double complex ***H,uint32_t length);
double frand_a_b(double a, double b); double frand_a_b(double a, double b);
void tv_conv(double complex **h, double complex *x, double complex *y, uint16_t nb_samples, uint8_t nb_taps, int delay); void tv_conv(double complex **h, double complex *x, double complex *y, uint32_t nb_samples, uint8_t nb_taps, int delay);
void multipath_tv_channel(channel_desc_t *desc, void multipath_tv_channel(channel_desc_t *desc,
double **tx_sig_re, double **tx_sig_re,
double **tx_sig_im, double **tx_sig_im,
double **rx_sig_re, double **rx_sig_re,
double **rx_sig_im, double **rx_sig_im,
uint16_t length, uint32_t length,
uint8_t keep_channel) { uint8_t keep_channel)
double complex **tx,**rx,* **H_t,*rx_temp; //, *tv_H_t; {
double complex **tx,**rx,***H_t,*rx_temp;//, *tv_H_t;
double path_loss = pow(10,desc->path_loss_dB/20); double path_loss = pow(10,desc->path_loss_dB/20);
int i,j,k,dd; int i,j,k,dd;
dd = abs(desc->channel_offset); dd = abs(desc->channel_offset);
...@@ -126,7 +128,8 @@ void multipath_tv_channel(channel_desc_t *desc, ...@@ -126,7 +128,8 @@ void multipath_tv_channel(channel_desc_t *desc,
} }
//TODO: make phi_rad a parameter of this function //TODO: make phi_rad a parameter of this function
void tv_channel(channel_desc_t *desc,double complex ***H,uint16_t length) { void tv_channel(channel_desc_t *desc,double complex ***H,uint32_t length){
int i,j,p,l,k; int i,j,p,l,k;
double *alpha,*phi_rad,pi=acos(-1),*w_Hz; double *alpha,*phi_rad,pi=acos(-1),*w_Hz;
alpha = (double *)calloc(desc->nb_paths,sizeof(double)); alpha = (double *)calloc(desc->nb_paths,sizeof(double));
...@@ -193,7 +196,8 @@ void tv_channel(channel_desc_t *desc,double complex ***H,uint16_t length) { ...@@ -193,7 +196,8 @@ void tv_channel(channel_desc_t *desc,double complex ***H,uint16_t length) {
} }
// time varying convolution // time varying convolution
void tv_conv(double complex **h, double complex *x, double complex *y, uint16_t nb_samples, uint8_t nb_taps, int dd) { void tv_conv(double complex **h, double complex *x, double complex *y, uint32_t nb_samples, uint8_t nb_taps, int dd){
int i,j; int i,j;
for(i=0; i<((int)nb_samples-dd); i++) { for(i=0; i<((int)nb_samples-dd); i++) {
......
...@@ -426,7 +426,7 @@ void multipath_tv_channel(channel_desc_t *desc, ...@@ -426,7 +426,7 @@ void multipath_tv_channel(channel_desc_t *desc,
double **tx_sig_im, double **tx_sig_im,
double **rx_sig_re, double **rx_sig_re,
double **rx_sig_im, double **rx_sig_im,
uint16_t length, uint32_t length,
uint8_t keep_channel); uint8_t keep_channel);
/**@} */ /**@} */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment