phy: remove function pointers in frame param
1. Removed function pointers for functions get_samples_per_slot(), get_samples_slot_timestamp() and get_slot_from_timestamp() as it does not offer any advantage. The functions are now called directly from everywhere. 2. Optimized these functions by removing loops where ever possible.
This commit is contained in:
@@ -1052,8 +1052,8 @@ int main(int argc, char *argv[])
|
||||
//for (int i=0;i<16;i++) printf("%f\n",gaussdouble(0.0,1.0));
|
||||
int read_errors=0;
|
||||
|
||||
int slot_offset = gNB->frame_parms.get_samples_slot_timestamp(slot, &gNB->frame_parms, 0);
|
||||
int slot_length = slot_offset - gNB->frame_parms.get_samples_slot_timestamp(slot - 1, &gNB->frame_parms, 0);
|
||||
int slot_offset = get_samples_slot_timestamp(&gNB->frame_parms, slot);
|
||||
int slot_length = slot_offset - get_samples_slot_timestamp(&gNB->frame_parms, slot - 1);
|
||||
|
||||
if (input_fd != NULL) {
|
||||
// 800 samples is N_TA_OFFSET for FR1 @ 30.72 Ms/s,
|
||||
@@ -1373,7 +1373,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
/////////////////////////phy_procedures_nr_ue_TX///////////////////////
|
||||
///////////
|
||||
int slot_start = UE->frame_parms.get_samples_slot_timestamp(slot, &UE->frame_parms, 0);
|
||||
int slot_start = get_samples_slot_timestamp(&UE->frame_parms, slot);
|
||||
c16_t *tx[UE->frame_parms.nb_antennas_tx];
|
||||
for (int i = 0; i < UE->frame_parms.nb_antennas_tx; i++)
|
||||
tx[i] = UE->common_vars.txData[i] + slot_start;
|
||||
@@ -1391,7 +1391,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
///////////
|
||||
////////////////////////////////////////////////////
|
||||
tx_offset = gNB->frame_parms.get_samples_slot_timestamp(slot, &gNB->frame_parms, 0);
|
||||
tx_offset = get_samples_slot_timestamp(&gNB->frame_parms, slot);
|
||||
txlev_sum = 0;
|
||||
for (int aa = 0; aa < UE->frame_parms.nb_antennas_tx; aa++) {
|
||||
atxlev[aa] =
|
||||
|
||||
Reference in New Issue
Block a user