Commit e2ee13e9 authored by Raymond Knopp's avatar Raymond Knopp

modifications for DCI size of format 1_0 for RAR and filling of FAPI for RAR...

modifications for DCI size of format 1_0 for RAR and filling of FAPI for RAR according to special RAR-related configuration
parent edeb9ea7
...@@ -394,7 +394,7 @@ int configure_fapi_dl_pdu(int Mod_idP, ...@@ -394,7 +394,7 @@ int configure_fapi_dl_pdu(int Mod_idP,
rnti_types[0] = NR_RNTI_C; rnti_types[0] = NR_RNTI_C;
pdcch_pdu_rel15->dci_pdu.PayloadSizeBits[0]=nr_dci_size(dci_formats[0],rnti_types[0],pdcch_pdu_rel15->BWPSize); pdcch_pdu_rel15->dci_pdu.PayloadSizeBits[0]=nr_dci_size(dci_formats[0],rnti_types[0],pdcch_pdu_rel15->BWPSize);
fill_dci_pdu_rel15(pdcch_pdu_rel15,&dci_pdu_rel15[0],dci_formats,rnti_types); fill_dci_pdu_rel15(pdcch_pdu_rel15,&dci_pdu_rel15[0],dci_formats,rnti_types,pdcch_pdu_rel15->BWPSize);
LOG_D(MAC, "DCI params: rnti %d, rnti_type %d, dci_format %d\n \ LOG_D(MAC, "DCI params: rnti %d, rnti_type %d, dci_format %d\n \
coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d\n", coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d\n",
...@@ -846,6 +846,6 @@ void nr_schedule_uss_ulsch_phytest(int Mod_idP, ...@@ -846,6 +846,6 @@ void nr_schedule_uss_ulsch_phytest(int Mod_idP,
config_uldci(ubwp,pusch_pdu,pdcch_pdu_rel15, &dci_pdu_rel15[0], dci_formats, rnti_types); config_uldci(ubwp,pusch_pdu,pdcch_pdu_rel15, &dci_pdu_rel15[0], dci_formats, rnti_types);
pdcch_pdu_rel15->dci_pdu.PayloadSizeBits[0]=nr_dci_size(dci_formats[0],rnti_types[0],pdcch_pdu_rel15->BWPSize); pdcch_pdu_rel15->dci_pdu.PayloadSizeBits[0]=nr_dci_size(dci_formats[0],rnti_types[0],pdcch_pdu_rel15->BWPSize);
fill_dci_pdu_rel15(pdcch_pdu_rel15,&dci_pdu_rel15[0],dci_formats,rnti_types); fill_dci_pdu_rel15(pdcch_pdu_rel15,&dci_pdu_rel15[0],dci_formats,rnti_types,pdcch_pdu_rel15->BWPSize);
} }
...@@ -534,10 +534,11 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t* pdcch_pdu, ...@@ -534,10 +534,11 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t* pdcch_pdu,
void fill_dci_pdu_rel15(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15, void fill_dci_pdu_rel15(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15,
dci_pdu_rel15_t *dci_pdu_rel15, dci_pdu_rel15_t *dci_pdu_rel15,
int *dci_formats, int *dci_formats,
int *rnti_types int *rnti_types,
int N_RB
) { ) {
uint16_t N_RB = pdcch_pdu_rel15->BWPSize;
uint8_t fsize=0, pos=0; uint8_t fsize=0, pos=0;
for (int d=0;d<pdcch_pdu_rel15->numDlDci;d++) { for (int d=0;d<pdcch_pdu_rel15->numDlDci;d++) {
...@@ -546,7 +547,9 @@ void fill_dci_pdu_rel15(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15, ...@@ -546,7 +547,9 @@ void fill_dci_pdu_rel15(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15,
AssertFatal(pdcch_pdu_rel15->dci_pdu.PayloadSizeBits[d]<=64, "DCI sizes above 64 bits not yet supported"); AssertFatal(pdcch_pdu_rel15->dci_pdu.PayloadSizeBits[d]<=64, "DCI sizes above 64 bits not yet supported");
int dci_size = pdcch_pdu_rel15->dci_pdu.PayloadSizeBits[d]; int dci_size = pdcch_pdu_rel15->dci_pdu.PayloadSizeBits[d];
*dci_pdu=0;
/// Payload generation /// Payload generation
switch(dci_formats[d]) { switch(dci_formats[d]) {
case NR_DL_DCI_FORMAT_1_0: case NR_DL_DCI_FORMAT_1_0:
...@@ -563,7 +566,7 @@ void fill_dci_pdu_rel15(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15, ...@@ -563,7 +566,7 @@ void fill_dci_pdu_rel15(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15,
pos+=4; pos+=4;
*dci_pdu |= (((uint64_t)dci_pdu_rel15->time_domain_assignment&0xf) << (dci_size-pos)); *dci_pdu |= (((uint64_t)dci_pdu_rel15->time_domain_assignment&0xf) << (dci_size-pos));
#ifdef DEBUG_FILL_DCI #ifdef DEBUG_FILL_DCI
LOG_D(MAC,"time-domain assignment %d (3 bits)=> %d (0x%lx)\n",dci_pdu_rel15->time_domain_assignment,dci_size-pos,*dci_pdu); LOG_D(MAC,"time-domain assignment %d (4 bits)=> %d (0x%lx)\n",dci_pdu_rel15->time_domain_assignment,dci_size-pos,*dci_pdu);
#endif #endif
// VRB to PRB mapping // VRB to PRB mapping
......
...@@ -176,7 +176,8 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t* pdcch_pdu, ...@@ -176,7 +176,8 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t* pdcch_pdu,
void fill_dci_pdu_rel15(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15, void fill_dci_pdu_rel15(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15,
dci_pdu_rel15_t *dci_pdu_rel15, dci_pdu_rel15_t *dci_pdu_rel15,
int *dci_formats, int *dci_formats,
int *rnti_types); int *rnti_types,
int N_RB);
int get_spf(nfapi_nr_config_request_scf_t *cfg); int get_spf(nfapi_nr_config_request_scf_t *cfg);
......
...@@ -85,56 +85,60 @@ typedef enum { ...@@ -85,56 +85,60 @@ typedef enum {
/*! \brief gNB template for the Random access information */ /*! \brief gNB template for the Random access information */
typedef struct { typedef struct {
/// Flag to indicate this process is active /// Flag to indicate this process is active
RA_state_t state; RA_state_t state;
/// Slot where preamble was received /// BWP id of RA process
uint8_t preamble_slot; int bwp_id;
/// Subframe where Msg2 is to be sent /// CORESET0 configured flag
uint8_t Msg2_slot; int coreset0_configured;
/// Frame where Msg2 is to be sent /// Slot where preamble was received
frame_t Msg2_frame; uint8_t preamble_slot;
/// Subframe where Msg3 is to be sent /// Subframe where Msg2 is to be sent
sub_frame_t Msg3_slot; uint8_t Msg2_slot;
/// Frame where Msg3 is to be sent /// Frame where Msg2 is to be sent
frame_t Msg3_frame; frame_t Msg2_frame;
/// Subframe where Msg4 is to be sent /// Subframe where Msg3 is to be sent
sub_frame_t Msg4_slot; sub_frame_t Msg3_slot;
/// Frame where Msg4 is to be sent /// Frame where Msg3 is to be sent
frame_t Msg4_frame; frame_t Msg3_frame;
/// harq_pid used for Msg4 transmission /// Subframe where Msg4 is to be sent
uint8_t harq_pid; sub_frame_t Msg4_slot;
/// UE RNTI allocated during RAR /// Frame where Msg4 is to be sent
rnti_t rnti; frame_t Msg4_frame;
/// RA RNTI allocated from received PRACH /// harq_pid used for Msg4 transmission
uint16_t RA_rnti; uint8_t harq_pid;
/// Received preamble_index /// UE RNTI allocated during RAR
uint8_t preamble_index; rnti_t rnti;
/// Received UE Contention Resolution Identifier /// RA RNTI allocated from received PRACH
uint8_t cont_res_id[6]; uint16_t RA_rnti;
/// Timing offset indicated by PHY /// Received preamble_index
int16_t timing_offset; uint8_t preamble_index;
/// Timeout for RRC connection /// Received UE Contention Resolution Identifier
int16_t RRC_timer; uint8_t cont_res_id[6];
/// Msg3 first RB /// Timing offset indicated by PHY
uint8_t msg3_first_rb; int16_t timing_offset;
/// Msg3 number of RB /// Timeout for RRC connection
uint8_t msg3_nb_rb; int16_t RRC_timer;
/// Msg3 MCS /// Msg3 first RB
uint8_t msg3_mcs; uint8_t msg3_first_rb;
/// Msg3 TPC command /// Msg3 number of RB
uint8_t msg3_TPC; uint8_t msg3_nb_rb;
/// Msg3 ULdelay command /// Msg3 MCS
uint8_t msg3_ULdelay; uint8_t msg3_mcs;
/// Msg3 cqireq command /// Msg3 TPC command
uint8_t msg3_cqireq; uint8_t msg3_TPC;
/// Round of Msg3 HARQ /// Msg3 ULdelay command
uint8_t msg3_round; uint8_t msg3_ULdelay;
/// TBS used for Msg4 /// Msg3 cqireq command
int msg4_TBsize; uint8_t msg3_cqireq;
/// MCS used for Msg4 /// Round of Msg3 HARQ
int msg4_mcs; uint8_t msg3_round;
/// RA search space /// TBS used for Msg4
NR_SearchSpace_t *ra_ss; int msg4_TBsize;
/// MCS used for Msg4
int msg4_mcs;
/// RA search space
NR_SearchSpace_t *ra_ss;
} NR_RA_t; } NR_RA_t;
/*! \brief gNB common channels */ /*! \brief gNB common channels */
......
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