Add T2 LDPC encoding/decoding offload
This commit is contained in:
committed by
Raymond Knopp
parent
99ca87a1c1
commit
cf97acb8c7
@@ -291,6 +291,7 @@ int main(int argc, char **argv)
|
||||
uint8_t n_tx=1,n_rx=1;
|
||||
uint8_t round;
|
||||
uint8_t num_rounds = 4;
|
||||
int ldpc_offload_flag = 0;
|
||||
char gNBthreads[128]="n";
|
||||
|
||||
channel_desc_t *gNB2UE;
|
||||
@@ -398,6 +399,10 @@ int main(int argc, char **argv)
|
||||
n_trials = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
ldpc_offload_flag = 1;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
snr0 = atof(optarg);
|
||||
printf("Setting SNR0 to %f\n",snr0);
|
||||
@@ -562,6 +567,7 @@ int main(int argc, char **argv)
|
||||
//printf("-j Relative strength of second intefering gNB (in dB) - cell_id mod 3 = 2\n");
|
||||
printf("-R N_RB_DL\n");
|
||||
printf("-O oversampling factor (1,2,4,8,16)\n");
|
||||
printf("-c ldpc offload flag\n");
|
||||
printf("-A Interpolation_filname Run with Abstraction to generate Scatter plot using interpolation polynomial in file\n");
|
||||
//printf("-C Generate Calibration information for Abstraction (effective SNR adjustment to remove Pe bias w.r.t. AWGN)\n");
|
||||
printf("-f raw file containing RRC configuration (generated by gNB)\n");
|
||||
@@ -620,6 +626,7 @@ int main(int argc, char **argv)
|
||||
|
||||
gNB = RC.gNB[0];
|
||||
gNB->ofdm_offset_divisor = UINT_MAX;
|
||||
gNB->ldpc_offload_flag = ldpc_offload_flag;
|
||||
frame_parms = &gNB->frame_parms; //to be initialized I suppose (maybe not necessary for PBCH)
|
||||
frame_parms->nb_antennas_tx = n_tx;
|
||||
frame_parms->nb_antennas_rx = n_rx;
|
||||
@@ -1325,6 +1332,9 @@ int main(int argc, char **argv)
|
||||
free(UE->phy_sim_pdsch_dl_ch_estimates_ext);
|
||||
free(UE->phy_sim_dlsch_b);
|
||||
|
||||
if (gNB->ldpc_offload_flag)
|
||||
free_LDPClib(&ldpc_interface_offload);
|
||||
|
||||
if (output_fd)
|
||||
fclose(output_fd);
|
||||
|
||||
|
||||
@@ -186,6 +186,7 @@ int main(int argc, char *argv[])
|
||||
double effRate;
|
||||
double effTP;
|
||||
float eff_tp_check = 100;
|
||||
int ldpc_offload_flag = 0;
|
||||
uint8_t max_rounds = 4;
|
||||
int chest_type[2] = {0};
|
||||
int enable_ptrs = 0;
|
||||
@@ -329,6 +330,10 @@ int main(int argc, char *argv[])
|
||||
n_trials = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
ldpc_offload_flag = 1;
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
extended_prefix_flag = 1;
|
||||
break;
|
||||
@@ -488,6 +493,7 @@ int main(int argc, char *argv[])
|
||||
printf("-k 3/4 sampling\n");
|
||||
printf("-m MCS value\n");
|
||||
printf("-n Number of trials to simulate\n");
|
||||
printf("-o ldpc offload flag\n");
|
||||
printf("-p Use extended prefix mode\n");
|
||||
printf("-q MCS table\n");
|
||||
printf("-r Number of allocated resource blocks for PUSCH\n");
|
||||
@@ -623,6 +629,7 @@ int main(int argc, char *argv[])
|
||||
cfg->carrier_config.num_rx_ant.value = n_rx;
|
||||
|
||||
// nr_phy_config_request_sim(gNB,N_RB_DL,N_RB_DL,mu,0,0x01);
|
||||
gNB->ldpc_offload_flag = ldpc_offload_flag;
|
||||
gNB->chest_freq = chest_type[0];
|
||||
gNB->chest_time = chest_type[1];
|
||||
|
||||
@@ -1604,6 +1611,8 @@ int main(int argc, char *argv[])
|
||||
num_dmrs_cdm_grps_no_data);
|
||||
|
||||
free_MIB_NR(mib);
|
||||
if (gNB->ldpc_offload_flag)
|
||||
free_LDPClib(&ldpc_interface_offload);
|
||||
|
||||
if (output_fd)
|
||||
fclose(output_fd);
|
||||
|
||||
Reference in New Issue
Block a user