Commit c128e822 authored by Thomas Schlichter's avatar Thomas Schlichter

use nfapi_nr_ue_pusch_pdu_t instead of fapi_nr_ul_config_pusch_pdu for pusch_config_pdu

parent b9148d63
...@@ -357,9 +357,9 @@ static void UE_synch(void *arg) { ...@@ -357,9 +357,9 @@ static void UE_synch(void *arg) {
} }
void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) { void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
uint32_t nb_rb, start_rb; uint32_t rb_size, rb_start;
uint8_t nb_symb_sch, start_symbol, mcs, precod_nbr_layers, harq_pid, rvidx; uint8_t nr_of_symbols, start_symbol_index, mcs_index, mcs_table, nrOfLayers, harq_process_id, rv_index;
uint16_t n_rnti, l_prime_mask; uint16_t rnti, l_prime_mask;
nr_dcireq_t dcireq; nr_dcireq_t dcireq;
nr_scheduled_response_t scheduled_response; nr_scheduled_response_t scheduled_response;
...@@ -381,34 +381,34 @@ void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) { ...@@ -381,34 +381,34 @@ void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
scheduled_response.frame = proc->frame_rx; scheduled_response.frame = proc->frame_rx;
scheduled_response.slot = proc->nr_tti_rx; scheduled_response.slot = proc->nr_tti_rx;
//--------------------------Temporary configuration-----------------------------// //--------------------------Temporary configuration-----------------------------//
n_rnti = 0x1234; rnti = 0x1234;
nb_rb = 50; rb_size = 50;
start_rb = 0; rb_start = 0;
nb_symb_sch = 12; nr_of_symbols = 12;
start_symbol = 2; start_symbol_index = 2;
precod_nbr_layers = 1; nrOfLayers = 1;
mcs = 9; mcs_index = 9;
mcs_table = 0; mcs_table = 0;
harq_pid = 0; harq_process_id = 0;
rvidx = 0; rv_index = 0;
l_prime_mask = get_l_prime(nb_symb_sch, typeB, pusch_dmrs_pos0, pusch_len1); l_prime_mask = get_l_prime(nr_of_symbols, typeB, pusch_dmrs_pos0, pusch_len1);
//------------------------------------------------------------------------------// //------------------------------------------------------------------------------//
scheduled_response.ul_config->slot = 8; scheduled_response.ul_config->slot = 8;
scheduled_response.ul_config->number_pdus = 1; scheduled_response.ul_config->number_pdus = 1;
scheduled_response.ul_config->ul_config_list[0].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH; scheduled_response.ul_config->ul_config_list[0].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.rnti = n_rnti; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.rnti = rnti;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.number_rbs = nb_rb; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.rb_size = rb_size;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.start_rb = start_rb; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.rb_start = rb_start;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.number_symbols = nb_symb_sch; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.nr_of_symbols = nr_of_symbols;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.start_symbol = start_symbol; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.start_symbol_index = start_symbol_index;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.ul_dmrs_symb_pos = l_prime_mask; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.ul_dmrs_symb_pos = l_prime_mask;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.mcs = mcs; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.mcs_index = mcs_index;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.mcs_table = mcs_table; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.mcs_table = mcs_table;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.ndi = 0; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_data.new_data_indicator = 0;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.rv = rvidx; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_data.rv_index = rv_index;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.n_layers = precod_nbr_layers; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.nrOfLayers = nrOfLayers;
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.harq_process_nbr = harq_pid; scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_data.harq_process_id = harq_process_id;
nr_ue_scheduled_response(&scheduled_response); nr_ue_scheduled_response(&scheduled_response);
...@@ -595,7 +595,6 @@ void readFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp, bool toTrash) ...@@ -595,7 +595,6 @@ void readFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp, bool toTrash)
void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) { void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
LOG_I(PHY,"Resynchronizing RX by %d samples (mode = %d)\n",UE->rx_offset,UE->mode); LOG_I(PHY,"Resynchronizing RX by %d samples (mode = %d)\n",UE->rx_offset,UE->mode);
void *dummy_tx[UE->frame_parms.nb_antennas_tx];
*timestamp += UE->frame_parms.get_samples_per_slot(1,&UE->frame_parms); *timestamp += UE->frame_parms.get_samples_per_slot(1,&UE->frame_parms);
for ( int size=UE->rx_offset ; size > 0 ; size -= UE->frame_parms.samples_per_subframe ) { for ( int size=UE->rx_offset ; size > 0 ; size -= UE->frame_parms.samples_per_subframe ) {
......
...@@ -258,11 +258,6 @@ typedef struct { ...@@ -258,11 +258,6 @@ typedef struct {
} fapi_nr_ul_config_pucch_pdu; } fapi_nr_ul_config_pucch_pdu;
typedef enum {pusch_freq_hopping_disabled = 0 , pusch_freq_hopping_enabled = 1}pusch_freq_hopping_t;
typedef struct{
uint8_t aperiodicSRS_ResourceTrigger;
} fapi_nr_ul_srs_config_t;
typedef struct typedef struct
{ {
uint8_t rv_index; uint8_t rv_index;
...@@ -378,44 +373,10 @@ typedef struct ...@@ -378,44 +373,10 @@ typedef struct
nfapi_nr_ue_dfts_ofdm_t dfts_ofdm; nfapi_nr_ue_dfts_ofdm_t dfts_ofdm;
//beamforming //beamforming
nfapi_nr_ue_ul_beamforming_t beamforming; nfapi_nr_ue_ul_beamforming_t beamforming;
//OAI specific
int8_t absolute_delta_PUSCH;
} nfapi_nr_ue_pusch_pdu_t; } nfapi_nr_ue_pusch_pdu_t;
typedef struct {
uint32_t TBS;
uint8_t bandwidth_part_ind;
uint16_t number_rbs;
uint16_t start_rb;
uint8_t frame_offset;
uint16_t number_symbols;
uint16_t start_symbol;
pusch_freq_hopping_t pusch_freq_hopping;
uint8_t mcs;
uint8_t mcs_table;
uint8_t ndi;
uint8_t rv;
uint8_t harq_process_nbr;
int8_t accumulated_delta_PUSCH;
int8_t absolute_delta_PUSCH;
uint8_t n_layers;
uint8_t tpmi;
//DMRS
uint16_t ul_dmrs_symb_pos;
uint8_t n_dmrs_cdm_groups;
uint8_t dmrs_ports[4];
uint8_t n_front_load_symb;
fapi_nr_ul_srs_config_t srs_config;
uint8_t csi_reportTriggerSize;
uint8_t maxCodeBlockGroupsPerTransportBlock;
uint8_t ptrs_dmrs_association_port;
uint8_t beta_offset_ind;
} fapi_nr_ul_config_pusch_pdu_rel15_t;
typedef struct {
uint16_t rnti;
fapi_nr_ul_config_pusch_pdu_rel15_t ulsch_pdu_rel15;
} fapi_nr_ul_config_pusch_pdu;
typedef struct { typedef struct {
} fapi_nr_ul_config_srs_pdu; } fapi_nr_ul_config_srs_pdu;
...@@ -425,7 +386,7 @@ typedef struct { ...@@ -425,7 +386,7 @@ typedef struct {
union { union {
fapi_nr_ul_config_prach_pdu prach_config_pdu; fapi_nr_ul_config_prach_pdu prach_config_pdu;
fapi_nr_ul_config_pucch_pdu pucch_config_pdu; fapi_nr_ul_config_pucch_pdu pucch_config_pdu;
fapi_nr_ul_config_pusch_pdu ulsch_config_pdu; nfapi_nr_ue_pusch_pdu_t pusch_config_pdu;
fapi_nr_ul_config_srs_pdu srs_config_pdu; fapi_nr_ul_config_srs_pdu srs_config_pdu;
}; };
} fapi_nr_ul_config_request_pdu_t; } fapi_nr_ul_config_request_pdu_t;
...@@ -466,7 +427,6 @@ typedef struct { ...@@ -466,7 +427,6 @@ typedef struct {
uint8_t SubcarrierSpacing; uint8_t SubcarrierSpacing;
uint16_t number_rbs; uint16_t number_rbs;
uint16_t start_rb; uint16_t start_rb;
uint8_t frame_offset;
uint16_t number_symbols; uint16_t number_symbols;
uint16_t start_symbol; uint16_t start_symbol;
uint16_t dlDmrsSymbPos; uint16_t dlDmrsSymbPos;
......
...@@ -116,22 +116,11 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response) ...@@ -116,22 +116,11 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response)
for(i=0; i<ul_config->number_pdus; ++i){ for(i=0; i<ul_config->number_pdus; ++i){
if(ul_config->ul_config_list[i].pdu_type == FAPI_NR_UL_CONFIG_TYPE_PUSCH){ if(ul_config->ul_config_list[i].pdu_type == FAPI_NR_UL_CONFIG_TYPE_PUSCH){
// pusch config pdu // pusch config pdu
fapi_nr_ul_config_pusch_pdu_rel15_t *pusch_config_pdu = &ul_config->ul_config_list[i].ulsch_config_pdu.ulsch_pdu_rel15; nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu = &ul_config->ul_config_list[i].pusch_config_pdu;
uint8_t current_harq_pid = pusch_config_pdu->harq_process_nbr; uint8_t current_harq_pid = pusch_config_pdu->pusch_data.harq_process_id;
nfapi_nr_ue_pusch_pdu_t *pusch_pdu = &ulsch0->harq_processes[current_harq_pid]->pusch_pdu; nfapi_nr_ue_pusch_pdu_t *pusch_pdu = &ulsch0->harq_processes[current_harq_pid]->pusch_pdu;
pusch_pdu->rnti = ul_config->ul_config_list[i].ulsch_config_pdu.rnti; memcpy(pusch_pdu, pusch_config_pdu, sizeof(nfapi_nr_ue_pusch_pdu_t));
pusch_pdu->rb_size = pusch_config_pdu->number_rbs;
pusch_pdu->rb_start = pusch_config_pdu->start_rb;
pusch_pdu->nr_of_symbols = pusch_config_pdu->number_symbols;
pusch_pdu->start_symbol_index = pusch_config_pdu->start_symbol;
pusch_pdu->ul_dmrs_symb_pos = pusch_config_pdu->ul_dmrs_symb_pos;
pusch_pdu->mcs_index = pusch_config_pdu->mcs;
pusch_pdu->mcs_table = pusch_config_pdu->mcs_table;
pusch_pdu->nrOfLayers = pusch_config_pdu->n_layers;
pusch_pdu->pusch_data.new_data_indicator = pusch_config_pdu->ndi;
pusch_pdu->pusch_data.rv_index = pusch_config_pdu->rv;
pusch_pdu->pusch_data.tb_size = pusch_config_pdu->TBS;
ulsch0->f_pusch = pusch_config_pdu->absolute_delta_PUSCH; ulsch0->f_pusch = pusch_config_pdu->absolute_delta_PUSCH;
} }
......
...@@ -423,13 +423,6 @@ int main(int argc, char **argv) ...@@ -423,13 +423,6 @@ int main(int argc, char **argv)
for (i = 0; i < TBS / 8; i++) for (i = 0; i < TBS / 8; i++)
test_input[i] = (unsigned char) rand(); test_input[i] = (unsigned char) rand();
/////////////////////////[adk] preparing NR_UE_ULSCH_t parameters///////////////////////// A HOT FIX until creating nfapi_nr_ul_config_ulsch_pdu_rel15_t
///////////
ulsch_ue->pusch_pdu.rnti = n_rnti;
///////////
////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////[adk] preparing UL harq_process parameters///////////////////////// /////////////////////////[adk] preparing UL harq_process parameters/////////////////////////
/////////// ///////////
NR_UL_UE_HARQ_t *harq_process_ul_ue = ulsch_ue->harq_processes[harq_pid]; NR_UL_UE_HARQ_t *harq_process_ul_ue = ulsch_ue->harq_processes[harq_pid];
...@@ -439,6 +432,7 @@ int main(int argc, char **argv) ...@@ -439,6 +432,7 @@ int main(int argc, char **argv)
if (harq_process_ul_ue) { if (harq_process_ul_ue) {
harq_process_ul_ue->pusch_pdu.rnti = n_rnti;
harq_process_ul_ue->pusch_pdu.mcs_index = Imcs; harq_process_ul_ue->pusch_pdu.mcs_index = Imcs;
harq_process_ul_ue->pusch_pdu.nrOfLayers = Nl; harq_process_ul_ue->pusch_pdu.nrOfLayers = Nl;
harq_process_ul_ue->pusch_pdu.rb_size = nb_rb; harq_process_ul_ue->pusch_pdu.rb_size = nb_rb;
......
...@@ -587,21 +587,21 @@ int main(int argc, char **argv) ...@@ -587,21 +587,21 @@ int main(int argc, char **argv)
ul_config.slot = slot; ul_config.slot = slot;
ul_config.number_pdus = 1; ul_config.number_pdus = 1;
ul_config.ul_config_list[0].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH; ul_config.ul_config_list[0].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH;
ul_config.ul_config_list[0].ulsch_config_pdu.rnti = n_rnti; ul_config.ul_config_list[0].pusch_config_pdu.rnti = n_rnti;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.number_rbs = nb_rb; ul_config.ul_config_list[0].pusch_config_pdu.rb_size = nb_rb;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.start_rb = start_rb; ul_config.ul_config_list[0].pusch_config_pdu.rb_start = start_rb;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.number_symbols = nb_symb_sch; ul_config.ul_config_list[0].pusch_config_pdu.nr_of_symbols = nb_symb_sch;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.start_symbol = start_symbol; ul_config.ul_config_list[0].pusch_config_pdu.start_symbol_index = start_symbol;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.ul_dmrs_symb_pos = l_prime_mask; ul_config.ul_config_list[0].pusch_config_pdu.ul_dmrs_symb_pos = l_prime_mask;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.mcs = Imcs; ul_config.ul_config_list[0].pusch_config_pdu.mcs_index = Imcs;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.mcs_table = 0; ul_config.ul_config_list[0].pusch_config_pdu.mcs_table = 0;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.ndi = 0; ul_config.ul_config_list[0].pusch_config_pdu.pusch_data.new_data_indicator = 0;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.rv = 0; ul_config.ul_config_list[0].pusch_config_pdu.pusch_data.rv_index = 0;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.n_layers = precod_nbr_layers; ul_config.ul_config_list[0].pusch_config_pdu.nrOfLayers = precod_nbr_layers;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.TBS = TBS; ul_config.ul_config_list[0].pusch_config_pdu.pusch_data.tb_size = TBS;
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.harq_process_nbr = harq_pid; ul_config.ul_config_list[0].pusch_config_pdu.pusch_data.harq_process_id = harq_pid;
//there are plenty of other parameters that we don't seem to be using for now. e.g. //there are plenty of other parameters that we don't seem to be using for now. e.g.
//ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.absolute_delta_PUSCH = 0; ul_config.ul_config_list[0].pusch_config_pdu.absolute_delta_PUSCH = 0;
// set FAPI parameters for UE, put them in the scheduled response and call // set FAPI parameters for UE, put them in the scheduled response and call
nr_ue_scheduled_response(&scheduled_response); nr_ue_scheduled_response(&scheduled_response);
......
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