Passing Conditional Number threshold as a command line argument. -V($)
This commit is contained in:
@@ -36,6 +36,8 @@
|
|||||||
#define DEBUG_MEAS_UE
|
#define DEBUG_MEAS_UE
|
||||||
//#define DEBUG_RANK_EST
|
//#define DEBUG_RANK_EST
|
||||||
|
|
||||||
|
int16_t cond_num_threshold = 0;
|
||||||
|
|
||||||
#ifdef USER_MODE
|
#ifdef USER_MODE
|
||||||
void print_shorts(char *s,short *x)
|
void print_shorts(char *s,short *x)
|
||||||
{
|
{
|
||||||
@@ -1019,9 +1021,10 @@ uint8_t rank_estimation_tm3_tm4 (int *dl_ch_estimates_00, // please respect the
|
|||||||
denum_db[i]=dB_fixed(determ_fin[i]);
|
denum_db[i]=dB_fixed(determ_fin[i]);
|
||||||
numer_db[i]=dB_fixed(numer_fin[i]);
|
numer_db[i]=dB_fixed(numer_fin[i]);
|
||||||
cond_db[i]=(numer_db[i]-denum_db[i]);
|
cond_db[i]=(numer_db[i]-denum_db[i]);
|
||||||
if (cond_db[i] < 11)
|
if (cond_db[i] < cond_num_threshold)
|
||||||
count++;
|
count++;
|
||||||
#ifdef DEBUG_RANK_EST
|
#ifdef DEBUG_RANK_EST
|
||||||
|
printf("cond_num_threshold =%d \n", cond_num_threshold);
|
||||||
printf("i %d numer_db[i] = %d \n", i, numer_db[i]);
|
printf("i %d numer_db[i] = %d \n", i, numer_db[i]);
|
||||||
printf("i %d denum_db[i] = %d \n", i, denum_db[i]);
|
printf("i %d denum_db[i] = %d \n", i, denum_db[i]);
|
||||||
printf("i %d cond_db[i] = %d \n", i, cond_db[i]);
|
printf("i %d cond_db[i] = %d \n", i, cond_db[i]);
|
||||||
|
|||||||
@@ -57,6 +57,7 @@
|
|||||||
extern unsigned int dlsch_tbs25[27][25],TBStable[27][110];
|
extern unsigned int dlsch_tbs25[27][25],TBStable[27][110];
|
||||||
extern unsigned char offset_mumimo_llr_drange_fix;
|
extern unsigned char offset_mumimo_llr_drange_fix;
|
||||||
extern int16_t dlsch_demod_shift;
|
extern int16_t dlsch_demod_shift;
|
||||||
|
extern int16_t cond_num_threshold;
|
||||||
|
|
||||||
#include "PHY/TOOLS/lte_phy_scope.h"
|
#include "PHY/TOOLS/lte_phy_scope.h"
|
||||||
|
|
||||||
@@ -338,7 +339,7 @@ int main(int argc, char **argv)
|
|||||||
perfect_ce = 0;
|
perfect_ce = 0;
|
||||||
|
|
||||||
|
|
||||||
while ((c = getopt (argc, argv, "ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:XYv:J:K:U")) != -1) {
|
while ((c = getopt (argc, argv, "ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:XYv:V:J:K:U")) != -1) {
|
||||||
|
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'a':
|
case 'a':
|
||||||
@@ -622,6 +623,9 @@ int main(int argc, char **argv)
|
|||||||
case 'Y':
|
case 'Y':
|
||||||
perfect_ce=1;
|
perfect_ce=1;
|
||||||
break;
|
break;
|
||||||
|
case 'V':
|
||||||
|
cond_num_threshold = atof(optarg);
|
||||||
|
break;
|
||||||
case 'J':
|
case 'J':
|
||||||
dlsch_demod_shift = atof(optarg);
|
dlsch_demod_shift = atof(optarg);
|
||||||
break;
|
break;
|
||||||
@@ -808,14 +812,14 @@ int main(int argc, char **argv)
|
|||||||
if (transmission_mode==3 || transmission_mode==4){
|
if (transmission_mode==3 || transmission_mode==4){
|
||||||
if (rank_adapt==1){
|
if (rank_adapt==1){
|
||||||
if (perfect_ce==1)
|
if (perfect_ce==1)
|
||||||
sprintf(rankadapt_fname,"rank_adapt1_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, dlsch_demod_shift);
|
sprintf(rankadapt_fname,"rank_adapt1_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d_connum_%d.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, dlsch_demod_shift, cond_num_threshold);
|
||||||
else
|
else
|
||||||
sprintf(rankadapt_fname,"rank_adapt1_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, dlsch_demod_shift);
|
sprintf(rankadapt_fname,"rank_adapt1_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d_connum_%d.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, dlsch_demod_shift, cond_num_threshold);
|
||||||
} else {
|
} else {
|
||||||
if (perfect_ce==1)
|
if (perfect_ce==1)
|
||||||
sprintf(rankadapt_fname,"rank_adapt0_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, dlsch_demod_shift);
|
sprintf(rankadapt_fname,"rank_adapt0_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d_connum_%d.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, dlsch_demod_shift, cond_num_threshold);
|
||||||
else
|
else
|
||||||
sprintf(rankadapt_fname,"rank_adapt0_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, dlsch_demod_shift);
|
sprintf(rankadapt_fname,"rank_adapt0_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d_connum_%d.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, dlsch_demod_shift, cond_num_threshold);
|
||||||
}
|
}
|
||||||
rankadapt_fd = fopen(rankadapt_fname,"w");
|
rankadapt_fd = fopen(rankadapt_fname,"w");
|
||||||
if (rankadapt_fd==NULL) {
|
if (rankadapt_fd==NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user