Enhance T2 Offload for gNB and UE
- Reworked nrLDPC_decoder_offload.c to process all segments in a TB with a single call to LDPCdecoder() or LDPCencoder(). - Perform CRC checks on the T2. - Modified nr_ulsch_decoding (gNB decoder) to: - Count processed segments. - Properly perform CRC checks. - Created a constant NR_LDPC_MAX_NUM_CB to define the maximum number of codeblocks. - Conditional library loading: - On gNB: Load ldpc_t2 library if offload is enabled using the --ldpc-offload-enable flag. - On UE: Load both ldpc_t2 and ldpc libraries since only encoder offload is supported. - General cleanup of nrLDPC_decoder_offload.c for improved readability and maintainability. - Modified the structure of LDPC encoder/decoder/offload parameters: - Introduced a structure for code block (CB) related parameters. - Removed parameter E from the encoder and offload parameter structures for clarity. - Replaced E with perCB->E_cb in the UE encoder code.
This commit is contained in:
@@ -286,6 +286,7 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){
|
||||
UE->rf_map.card = card_offset;
|
||||
UE->rf_map.chain = CC_id + chain_offset;
|
||||
UE->max_ldpc_iterations = nrUE_params.max_ldpc_iterations;
|
||||
UE->ldpc_offload_enable = nrUE_params.ldpc_offload_flag;
|
||||
UE->UE_scan_carrier = nrUE_params.UE_scan_carrier;
|
||||
UE->UE_fo_compensation = nrUE_params.UE_fo_compensation;
|
||||
UE->if_freq = nrUE_params.if_freq;
|
||||
@@ -491,7 +492,11 @@ int main(int argc, char **argv)
|
||||
cpuf=get_cpu_freq_GHz();
|
||||
itti_init(TASK_MAX, tasks_info);
|
||||
|
||||
init_opt() ;
|
||||
init_opt();
|
||||
|
||||
if (nrUE_params.ldpc_offload_flag)
|
||||
load_LDPClib("_t2", &ldpc_interface_offload);
|
||||
|
||||
load_LDPClib(NULL, &ldpc_interface);
|
||||
|
||||
if (ouput_vcd) {
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
{"dlsch-parallel", CONFIG_HLP_DLSCH_PARA, 0, .u8ptr=NULL, .defintval=0, TYPE_UINT8, 0}, \
|
||||
{"offset-divisor", CONFIG_HLP_OFFSET_DIV, 0, .uptr=&nrUE_params.ofdm_offset_divisor, .defuintval=8, TYPE_UINT32, 0}, \
|
||||
{"max-ldpc-iterations", CONFIG_HLP_MAX_LDPC_ITERATIONS, 0, .iptr=&nrUE_params.max_ldpc_iterations, .defuintval=8, TYPE_UINT8, 0}, \
|
||||
{"ldpc-offload-enable", CONFIG_HLP_LDPC_OFFLOAD, PARAMFLAG_BOOL, .iptr=&(nrUE_params.ldpc_offload_flag), .defintval=0, TYPE_INT, 0}, \
|
||||
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, .iptr=(int32_t *)&nr_dlsch_demod_shift, .defintval=0, TYPE_INT, 0}, \
|
||||
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, .iptr=&vcdflag, .defintval=0, TYPE_INT, 0}, \
|
||||
{"uecap_file", CONFIG_HLP_UECAP_FILE, 0, .strptr=&uecap_file, .defstrval="./uecap_ports1.xml", TYPE_STRING, 0}, \
|
||||
@@ -80,6 +81,7 @@ typedef struct {
|
||||
int nb_antennas_tx;
|
||||
int N_RB_DL;
|
||||
int ssb_start_subcarrier;
|
||||
int ldpc_offload_flag;
|
||||
} nrUE_params_t;
|
||||
extern uint64_t get_nrUE_optmask(void);
|
||||
extern uint64_t set_nrUE_optmask(uint64_t bitmask);
|
||||
|
||||
Reference in New Issue
Block a user