Commit cb09bb9f authored by Khalid Ahmed's avatar Khalid Ahmed Committed by Thomas Schlichter

Code review meeting clean ups

- remove printf in nr_ulsch_coding.c
- renaming test_input to mac_pdu
- using memcpy for mac_pdu instead of pointing to data
- remove temp_nfapi struct from header file
parent c0b4fcfb
...@@ -561,47 +561,6 @@ typedef struct { ...@@ -561,47 +561,6 @@ typedef struct {
nfapi_bf_vector_t bf_vector; nfapi_bf_vector_t bf_vector;
} nfapi_nr_dl_config_pdcch_parameters_rel15_t; } nfapi_nr_dl_config_pdcch_parameters_rel15_t;
//--------------------------------------------------------//
// This is a temp nfapi struct.
// Once the specs for nfapi UL is ready we will update this struct
typedef struct {
nfapi_tl_t tl;
uint16_t rnti;
uint8_t rnti_type;
uint8_t dci_format;
/// Number of CRB in BWP that this DCI configures
uint16_t n_RB_BWP;
uint8_t config_type;
uint8_t search_space_type;
uint8_t common_search_space_type;
uint8_t aggregation_level;
uint16_t nb_rb;
uint8_t n_symb;
int Imcs;
int8_t rb_offset;
int first_rb; // first rb for PUSCH TX
uint8_t nb_codewords;
uint8_t Nl; // number of layers
uint8_t rvidx;
uint8_t cr_mapping_type;
uint8_t reg_bundle_size;
uint8_t interleaver_size;
uint8_t shift_index;
uint8_t mux_pattern;
uint8_t precoder_granularity;
uint8_t first_slot;
uint8_t first_symbol;
uint8_t nb_ss_sets_per_slot;
uint8_t nb_slots;
uint8_t sfn_mod2;
uint16_t scrambling_id;
nfapi_bf_vector_t bf_vector;
} temp_nfapi_nr_ul_config_pdcch_parameters_rel15_t;
//--------------------------------------------------------//
typedef struct { typedef struct {
nfapi_tl_t tl; nfapi_tl_t tl;
uint16_t length; uint16_t length;
......
...@@ -1060,7 +1060,6 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch, ...@@ -1060,7 +1060,6 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
@param[in] thread_id, thread id @param[in] thread_id, thread id
@param[in] gNB_id, gNB id @param[in] gNB_id, gNB id
@param[in] harq_pid, harq id @param[in] harq_pid, harq id
@param[in] test_input, pointer to ulsch pdu to be sent
*/ */
int generate_ue_ulsch_params(PHY_VARS_NR_UE *UE, int generate_ue_ulsch_params(PHY_VARS_NR_UE *UE,
...@@ -1093,8 +1092,7 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, ...@@ -1093,8 +1092,7 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
unsigned char harq_pid, unsigned char harq_pid,
uint8_t slot, uint8_t slot,
uint8_t thread_id, uint8_t thread_id,
int eNB_id, int eNB_id);
unsigned char *test_input);
/** \brief This function does IFFT for PUSCH /** \brief This function does IFFT for PUSCH
......
...@@ -249,7 +249,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch, ...@@ -249,7 +249,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
printf("ulsch coding nb_rb %d nb_symb_sch %d nb_re_dmrs %d, length_dmrs %d\n", nb_rb,nb_symb_sch, nb_re_dmrs,length_dmrs); LOG_D(PHY,"ulsch coding nb_rb %d nb_symb_sch %d nb_re_dmrs %d, length_dmrs %d\n", nb_rb,nb_symb_sch, nb_re_dmrs,length_dmrs);
G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs,mod_order,harq_process->Nl); G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs,mod_order,harq_process->Nl);
...@@ -315,7 +315,6 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch, ...@@ -315,7 +315,6 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
Kr_bytes = Kr>>3; Kr_bytes = Kr>>3;
#endif #endif
printf("ulsch coding A %d G %d mod_order %d C %d\n", A,G, mod_order, harq_process->C);
/////////// ///////////
///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
......
...@@ -151,8 +151,7 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, ...@@ -151,8 +151,7 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
unsigned char harq_pid, unsigned char harq_pid,
uint8_t slot, uint8_t slot,
uint8_t thread_id, uint8_t thread_id,
int eNB_id, int eNB_id) {
unsigned char *test_input) {
unsigned int available_bits; unsigned int available_bits;
uint8_t mod_order, cwd_index, num_of_codewords; uint8_t mod_order, cwd_index, num_of_codewords;
...@@ -181,8 +180,6 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, ...@@ -181,8 +180,6 @@ uint8_t nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
ulsch_ue = UE->ulsch[thread_id][eNB_id][cwd_index]; ulsch_ue = UE->ulsch[thread_id][eNB_id][cwd_index];
harq_process_ul_ue = ulsch_ue->harq_processes[harq_pid]; harq_process_ul_ue = ulsch_ue->harq_processes[harq_pid];
harq_process_ul_ue->a = test_input;
/////////////////////////ULSCH coding///////////////////////// /////////////////////////ULSCH coding/////////////////////////
/////////// ///////////
......
...@@ -2473,7 +2473,7 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t g ...@@ -2473,7 +2473,7 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t g
//int32_t ulsch_start=0; //int32_t ulsch_start=0;
int slot_tx = proc->nr_slot_tx; int slot_tx = proc->nr_slot_tx;
int frame_tx = proc->frame_tx; int frame_tx = proc->frame_tx;
unsigned char *test_input; unsigned char *mac_pdu;
int harq_pid, i, TBS; int harq_pid, i, TBS;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX,VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX,VCD_FUNCTION_IN);
...@@ -2500,18 +2500,19 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t g ...@@ -2500,18 +2500,19 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t g
TBS = nr_compute_tbs(ul_dci_pdu->mcs, harq_process_ul_ue->nb_rb, ulsch_ue->Nsymb_pusch, ulsch_ue->nb_re_dmrs, ulsch_ue->length_dmrs, ul_dci_pdu->precod_nbr_layers); TBS = nr_compute_tbs(ul_dci_pdu->mcs, harq_process_ul_ue->nb_rb, ulsch_ue->Nsymb_pusch, ulsch_ue->nb_re_dmrs, ulsch_ue->length_dmrs, ul_dci_pdu->precod_nbr_layers);
test_input = (unsigned char *) malloc16(sizeof(unsigned char) * TBS / 8); mac_pdu = (unsigned char *) malloc16(sizeof(unsigned char) * TBS / 8);
for (i = 0; i < TBS / 8; i++) for (i = 0; i < TBS / 8; i++)
test_input[i] = (unsigned char) rand(); mac_pdu[i] = (unsigned char) rand();
memcpy(harq_process_ul_ue->a, mac_pdu, TBS/8);
nr_ue_ulsch_procedures(ue, nr_ue_ulsch_procedures(ue,
harq_pid, harq_pid,
slot_tx, slot_tx,
0, 0,
gNB_id, gNB_id);
test_input);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment