Commit f05ede7f authored by rmagueta's avatar rmagueta

UE is transmitting the SRS periodically

parent dfec275b
......@@ -322,6 +322,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
pbch_vars[gNB_id] = (NR_UE_PBCH *)malloc16_clear(sizeof(NR_UE_PBCH));
srs_vars[gNB_id] = (NR_UE_SRS *)malloc16_clear(sizeof(NR_UE_SRS));
srs_vars[gNB_id]->active = false;
if (abstraction_flag == 0) {
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
phy_init_nr_ue__PDSCH( ue->pdsch_vars[th_id][gNB_id], fp );
......
......@@ -140,7 +140,7 @@ EXTERN const uint16_t srs_periodicity[SRS_PERIODICITY]
@param proc pointer to the transmit parameters
@returns 0 on success -1 on error with message */
int32_t generate_srs_nr(SRS_ResourceSet_t *p_srs_resource_set,
int generate_srs_nr(fapi_nr_ul_config_srs_pdu *srs_config_pdu,
NR_DL_FRAME_PARMS *frame_parms,
int32_t *txptr,
int16_t amp,
......
......@@ -707,6 +707,7 @@ typedef struct {
} NR_UE_PRACH;
typedef struct {
bool active;
fapi_nr_ul_config_srs_pdu srs_config_pdu;
} NR_UE_SRS;
......
......@@ -230,6 +230,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
// srs config pdu
srs_config_pdu = &ul_config->ul_config_list[i].srs_config_pdu;
memcpy((void*)&(PHY_vars_UE_g[module_id][cc_id]->srs_vars[gNB_id]->srs_config_pdu), (void*)srs_config_pdu, sizeof(fapi_nr_ul_config_srs_pdu));
PHY_vars_UE_g[module_id][cc_id]->srs_vars[gNB_id]->active = true;
break;
default:
......
......@@ -282,7 +282,7 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
}
}
if (ue->UE_mode[gNB_id] == PUSCH && is_srs_occasion_nr(ue->frame_parms, frame_tx, slot_tx)) {
if (ue->UE_mode[gNB_id] == PUSCH) {
ue_srs_procedures_nr(ue, proc, gNB_id);
}
......
......@@ -945,7 +945,6 @@ bool nr_ue_periodic_srs_scheduling(module_id_t mod_id, frame_t frame, slot_t slo
srs_config_pdu->cyclic_prefix = 0;
srs_config_pdu->num_ant_ports = srs_resource->nrofSRS_Ports;
srs_config_pdu->num_symbols = srs_resource->resourceMapping.nrofSymbols;
srs_config_pdu->num_repetitions = srs_resource->resourceMapping.repetitionFactor;
srs_config_pdu->time_start_position = srs_resource->resourceMapping.startPosition;
srs_config_pdu->config_index = srs_resource->freqHopping.c_SRS;
......
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