fix physical simulators
This commit is contained in:
@@ -75,45 +75,45 @@ void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char c;
|
||||
int i; //,j,l,aa;
|
||||
double SNR, SNR_lin, snr0 = -2.0, snr1 = 2.0;
|
||||
double snr_step = 0.1;
|
||||
uint8_t snr1set = 0;
|
||||
int **txdata;
|
||||
double **s_re, **s_im, **r_re, **r_im;
|
||||
// int sync_pos, sync_pos_slot;
|
||||
// FILE *rx_frame_file;
|
||||
FILE *output_fd = NULL;
|
||||
//uint8_t write_output_file = 0;
|
||||
// int subframe_offset;
|
||||
// char fname[40], vname[40];
|
||||
int trial, n_trials = 1, n_errors = 0, n_false_positive = 0;
|
||||
uint8_t n_tx = 1, n_rx = 1;
|
||||
//uint8_t transmission_mode = 1;
|
||||
uint16_t Nid_cell = 0;
|
||||
channel_desc_t *gNB2UE;
|
||||
uint8_t extended_prefix_flag = 0;
|
||||
//int8_t interf1 = -21, interf2 = -21;
|
||||
FILE *input_fd = NULL, *pbch_file_fd = NULL;
|
||||
//char input_val_str[50],input_val_str2[50];
|
||||
//uint16_t NB_RB=25;
|
||||
SCM_t channel_model = AWGN; //Rayleigh1_anticorr;
|
||||
uint16_t N_RB_DL = 106, mu = 1;
|
||||
//unsigned char frame_type = 0;
|
||||
unsigned char pbch_phase = 0;
|
||||
int frame = 0, slot = 0;
|
||||
int frame_length_complex_samples;
|
||||
//int frame_length_complex_samples_no_prefix;
|
||||
NR_DL_FRAME_PARMS *frame_parms;
|
||||
uint8_t Kmimo = 0;
|
||||
uint32_t Nsoft = 0;
|
||||
double sigma;
|
||||
unsigned char qbits = 8;
|
||||
int ret;
|
||||
//int run_initial_sync=0;
|
||||
int loglvl = OAILOG_WARNING;
|
||||
uint8_t dlsch_threads = 0;
|
||||
char c;
|
||||
int i; //,j,l,aa;
|
||||
double SNR, SNR_lin, snr0 = -2.0, snr1 = 2.0;
|
||||
double snr_step = 0.1;
|
||||
uint8_t snr1set = 0;
|
||||
int **txdata;
|
||||
double **s_re, **s_im, **r_re, **r_im;
|
||||
// int sync_pos, sync_pos_slot;
|
||||
// FILE *rx_frame_file;
|
||||
FILE *output_fd = NULL;
|
||||
//uint8_t write_output_file = 0;
|
||||
// int subframe_offset;
|
||||
// char fname[40], vname[40];
|
||||
int trial, n_trials = 1, n_errors = 0, n_false_positive = 0;
|
||||
uint8_t n_tx = 1, n_rx = 1;
|
||||
//uint8_t transmission_mode = 1;
|
||||
uint16_t Nid_cell = 0;
|
||||
channel_desc_t *gNB2UE;
|
||||
uint8_t extended_prefix_flag = 0;
|
||||
//int8_t interf1 = -21, interf2 = -21;
|
||||
FILE *input_fd = NULL, *pbch_file_fd = NULL;
|
||||
//char input_val_str[50],input_val_str2[50];
|
||||
//uint16_t NB_RB=25;
|
||||
SCM_t channel_model = AWGN; //Rayleigh1_anticorr;
|
||||
uint16_t N_RB_DL = 106, mu = 1;
|
||||
//unsigned char frame_type = 0;
|
||||
unsigned char pbch_phase = 0;
|
||||
int frame = 0, slot = 0;
|
||||
int frame_length_complex_samples;
|
||||
//int frame_length_complex_samples_no_prefix;
|
||||
NR_DL_FRAME_PARMS *frame_parms;
|
||||
uint8_t Kmimo = 0;
|
||||
uint32_t Nsoft = 0;
|
||||
double sigma;
|
||||
unsigned char qbits = 8;
|
||||
int ret;
|
||||
//int run_initial_sync=0;
|
||||
int loglvl = OAILOG_WARNING;
|
||||
uint8_t dlsch_threads = 0;
|
||||
float target_error_rate = 0.01;
|
||||
uint64_t SSB_positions=0x01;
|
||||
uint16_t nb_symb_sch = 12;
|
||||
@@ -460,6 +460,7 @@ int main(int argc, char **argv)
|
||||
rel15->mcsIndex[0] = Imcs;
|
||||
rel15->numDmrsCdmGrpsNoData = 1;
|
||||
rel15->maintenance_parms_v3.tbSizeLbrmBytes = Tbslbrm;
|
||||
rel15->maintenance_parms_v3.ldpcBaseGraph = get_BG(TBS, rate);
|
||||
double modulated_input[16 * 68 * 384]; // [hna] 16 segments, 68*Zc
|
||||
short channel_output_fixed[16 * 68 * 384];
|
||||
//unsigned char *estimated_output;
|
||||
|
||||
@@ -318,6 +318,7 @@ void nr_dlsim_preprocessor(module_id_t module_id,
|
||||
sched_pdsch->rbStart = g_rbStart;
|
||||
sched_pdsch->rbSize = g_rbSize;
|
||||
sched_pdsch->mcs = g_mcsIndex;
|
||||
sched_pdsch->nrOfLayers = g_nrOfLayers;
|
||||
/* the following might override the table that is mandated by RRC
|
||||
* configuration */
|
||||
current_BWP->mcsTableIdx = g_mcsTableIdx;
|
||||
|
||||
@@ -466,6 +466,7 @@ int main(int argc, char **argv)
|
||||
rel15_ul->nrOfLayers = Nl;
|
||||
rel15_ul->target_code_rate = code_rate;
|
||||
rel15_ul->pusch_data.tb_size = TBS>>3;
|
||||
rel15_ul->maintenance_parms_v3.ldpcBaseGraph = get_BG(TBS, code_rate);
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
double modulated_input[16 * 68 * 384]; // [hna] 16 segments, 68*Zc
|
||||
|
||||
@@ -1126,7 +1126,7 @@ int main(int argc, char **argv)
|
||||
pusch_pdu->bwp_size = abwp_size;
|
||||
}
|
||||
|
||||
pusch_pdu->pusch_data.tb_size = TBS/8;
|
||||
pusch_pdu->pusch_data.tb_size = TBS>>3;
|
||||
pusch_pdu->pdu_bit_map = pdu_bit_map;
|
||||
pusch_pdu->rnti = n_rnti;
|
||||
pusch_pdu->mcs_index = Imcs;
|
||||
@@ -1158,6 +1158,7 @@ int main(int argc, char **argv)
|
||||
pusch_pdu->pusch_ptrs.ptrs_freq_density = ptrs_freq_density;
|
||||
pusch_pdu->pusch_ptrs.ptrs_ports_list = (nfapi_nr_ptrs_ports_t *) malloc(2*sizeof(nfapi_nr_ptrs_ports_t));
|
||||
pusch_pdu->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset = 0;
|
||||
pusch_pdu->maintenance_parms_v3.ldpcBaseGraph = get_BG(TBS, code_rate);
|
||||
|
||||
// if transform precoding is enabled
|
||||
if (transform_precoding == transformPrecoder_enabled) {
|
||||
|
||||
Reference in New Issue
Block a user