configured LDPC on CPU and GPU

This commit is contained in:
NCTU OpinConnect Terng-Yin Hsu/WEI-YING,LIN
2020-05-13 22:27:36 +08:00
parent da62b92f6e
commit 02dc4ba8ce
230 changed files with 18984 additions and 21450 deletions
+6 -3
View File
@@ -62,6 +62,7 @@
// overwrite the previous deinitions
# define MAX_MODULES NB_MODULES_MAX
#define MAX_NR_RRC_UE_CONTEXTS 64
#ifndef UE_EXPANSION
// TODO:L2 FAPI simulator.
@@ -83,7 +84,7 @@
#else
#define MAX_MOBILES_PER_ENB 4
#define MAX_MOBILES_PER_ENB_NB_IoT 4
#define MAX_MOBILES_PER_GNB 4
#define MAX_MOBILES_PER_GNB 2//16
#define MAX_eNB 2
#define MAX_gNB 2
#endif
@@ -96,8 +97,10 @@
#define MAX_gNB 2
#endif
#define NUMBER_OF_NR_DLSCH_MAX 4
#define NUMBER_OF_NR_ULSCH_MAX 4
#define NUMBER_OF_NR_DLSCH_MAX 2//16
#define NUMBER_OF_NR_ULSCH_MAX 2//16
#define NUMBER_OF_NR_SR_MAX 16
#define MAX_MANAGED_ENB_PER_MOBILE 2
#define MAX_MANAGED_GNB_PER_MOBILE 2
+4 -189
View File
@@ -41,7 +41,7 @@
#include "LTE_SL-PeriodComm-r12.h"
#include "LTE_SL-DiscResourcePool-r12.h"
#include "NR_RACH-ConfigCommon.h"
#include "NR_ServingCellConfigCommon.h"
//-------------------------------------------------------------------------------------------//
// Messages for RRC logging
#if defined(DISABLE_ITTI_XER_PRINT)
@@ -400,194 +400,9 @@ typedef struct NRRrcConfigurationReq_s {
uint16_t mcc[PLMN_LIST_MAX_SIZE];
uint16_t mnc[PLMN_LIST_MAX_SIZE];
uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE];
int16_t nb_cc;
lte_frame_type_t frame_type[MAX_NUM_CCs];
uint8_t tdd_config[MAX_NUM_CCs];
uint8_t tdd_config_s[MAX_NUM_CCs];
lte_prefix_type_t DL_prefix_type[MAX_NUM_CCs];
lte_prefix_type_t UL_prefix_type[MAX_NUM_CCs];
int16_t nr_band[MAX_NUM_CCs];
uint64_t downlink_frequency[MAX_NUM_CCs];
int32_t uplink_frequency_offset[MAX_NUM_CCs];
int16_t Nid_cell[MAX_NUM_CCs];// for testing, change later
int16_t N_RB_DL[MAX_NUM_CCs];// for testing, change later
int nb_antenna_ports[MAX_NUM_CCs];
///NR
//MIB
long MIB_subCarrierSpacingCommon[MAX_NUM_CCs];
uint32_t MIB_ssb_SubcarrierOffset[MAX_NUM_CCs];
long MIB_dmrs_TypeA_Position[MAX_NUM_CCs];
uint32_t pdcch_ConfigSIB1[MAX_NUM_CCs];
//SIB1
long SIB1_frequencyOffsetSSB[MAX_NUM_CCs];
long SIB1_ssb_PeriodicityServingCell[MAX_NUM_CCs];
long SIB1_ss_PBCH_BlockPower[MAX_NUM_CCs];
//NR FrequencyInfoDL
long absoluteFrequencySSB[MAX_NUM_CCs];
long DL_FreqBandIndicatorNR[MAX_NUM_CCs];
long DL_absoluteFrequencyPointA[MAX_NUM_CCs];
//NR DL SCS-SpecificCarrier
long DL_offsetToCarrier[MAX_NUM_CCs];
long DL_SCS_SubcarrierSpacing[MAX_NUM_CCs];
long DL_carrierBandwidth[MAX_NUM_CCs];
//NR BWP-DownlinkCommon
uint32_t DL_locationAndBandwidth[MAX_NUM_CCs];
long DL_BWP_SubcarrierSpacing[MAX_NUM_CCs];
lte_prefix_type_t DL_BWP_prefix_type[MAX_NUM_CCs];
//NR FrequencyInfoUL
long UL_FreqBandIndicatorNR[MAX_NUM_CCs];
long UL_absoluteFrequencyPointA[MAX_NUM_CCs];
long UL_additionalSpectrumEmission[MAX_NUM_CCs];
long UL_p_Max[MAX_NUM_CCs];
long UL_frequencyShift7p5khz[MAX_NUM_CCs];
//NR UL SCS-SpecificCarrier
uint32_t UL_offsetToCarrier[MAX_NUM_CCs];
long UL_SCS_SubcarrierSpacing[MAX_NUM_CCs];
uint32_t UL_carrierBandwidth[MAX_NUM_CCs];
// NR BWP-UplinkCommon
uint32_t UL_locationAndBandwidth[MAX_NUM_CCs];
long UL_BWP_SubcarrierSpacing[MAX_NUM_CCs];
lte_prefix_type_t UL_BWP_prefix_type[MAX_NUM_CCs];
long UL_timeAlignmentTimerCommon[MAX_NUM_CCs];
long ServingCellConfigCommon_n_TimingAdvanceOffset[MAX_NUM_CCs];
uint64_t ServingCellConfigCommon_ssb_PositionsInBurst_PR[MAX_NUM_CCs];
long ServingCellConfigCommon_ssb_periodicityServingCell[MAX_NUM_CCs]; //ServingCellConfigCommon
long ServingCellConfigCommon_dmrs_TypeA_Position[MAX_NUM_CCs]; //ServingCellConfigCommon
long NIA_SubcarrierSpacing[MAX_NUM_CCs]; //ServingCellConfigCommon Used only for non-initial access
long ServingCellConfigCommon_ss_PBCH_BlockPower[MAX_NUM_CCs]; //ServingCellConfigCommon
//NR TDD-UL-DL-ConfigCommon
long referenceSubcarrierSpacing[MAX_NUM_CCs];
long dl_UL_TransmissionPeriodicity[MAX_NUM_CCs];
long nrofDownlinkSlots[MAX_NUM_CCs];
long nrofDownlinkSymbols[MAX_NUM_CCs];
long nrofUplinkSlots[MAX_NUM_CCs];
long nrofUplinkSymbols[MAX_NUM_CCs];
//NR RACH-ConfigCommon
long rach_totalNumberOfRA_Preambles[MAX_NUM_CCs];
long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice[MAX_NUM_CCs];
long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[MAX_NUM_CCs];
long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[MAX_NUM_CCs];
long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[MAX_NUM_CCs];
long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[MAX_NUM_CCs];
long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two[MAX_NUM_CCs];
uint32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four[MAX_NUM_CCs];
uint32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight[MAX_NUM_CCs];
uint32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen[MAX_NUM_CCs];
BOOLEAN_t rach_groupBconfigured[MAX_NUM_CCs];
long rach_ra_Msg3SizeGroupA[MAX_NUM_CCs];
e_NR_RACH_ConfigCommon__groupBconfigured__messagePowerOffsetGroupB rach_messagePowerOffsetGroupB[MAX_NUM_CCs];
long rach_numberOfRA_PreamblesGroupA[MAX_NUM_CCs];
long rach_ra_ContentionResolutionTimer[MAX_NUM_CCs];
long rsrp_ThresholdSSB[MAX_NUM_CCs];
long rsrp_ThresholdSSB_SUL[MAX_NUM_CCs];
long prach_RootSequenceIndex_choice[MAX_NUM_CCs];
uint32_t prach_RootSequenceIndex_l839[MAX_NUM_CCs];
uint32_t prach_RootSequenceIndex_l139[MAX_NUM_CCs];
long prach_msg1_SubcarrierSpacing[MAX_NUM_CCs];
long restrictedSetConfig[MAX_NUM_CCs];
long msg3_transformPrecoding[MAX_NUM_CCs];
//ssb-perRACH-OccasionAndCB-PreamblesPerSSB not sure
//NR RACH-ConfigGeneric
uint32_t prach_ConfigurationIndex[MAX_NUM_CCs];
long prach_msg1_FDM[MAX_NUM_CCs];
long prach_msg1_FrequencyStart[MAX_NUM_CCs];
uint32_t zeroCorrelationZoneConfig[MAX_NUM_CCs];
long preambleReceivedTargetPower[MAX_NUM_CCs];
long preambleTransMax[MAX_NUM_CCs];
long powerRampingStep[MAX_NUM_CCs];
long ra_ResponseWindow[MAX_NUM_CCs];
//NR PUSCH-ConfigCommon
BOOLEAN_t groupHoppingEnabledTransformPrecoding[MAX_NUM_CCs];
long msg3_DeltaPreamble[MAX_NUM_CCs];
long p0_NominalWithGrant[MAX_NUM_CCs];
///NR PUSCH-TimeDomainResourceAllocation
uint32_t PUSCH_TimeDomainResourceAllocation_k2[MAX_NUM_CCs];
long PUSCH_TimeDomainResourceAllocation_mappingType[MAX_NUM_CCs];
uint32_t PUSCH_TimeDomainResourceAllocation_startSymbolAndLength[MAX_NUM_CCs];
//NR PUCCH-ConfigCommon
uint32_t pucch_ResourceCommon[MAX_NUM_CCs];
long pucch_GroupHopping[MAX_NUM_CCs];
uint32_t hoppingId[MAX_NUM_CCs];
long p0_nominal[MAX_NUM_CCs];
//NR PDSCH-ConfigCOmmon
//NR PDSCH-TimeDomainResourceAllocation
uint32_t PDSCH_TimeDomainResourceAllocation_k0[MAX_NUM_CCs];
long PDSCH_TimeDomainResourceAllocation_mappingType[MAX_NUM_CCs];
long PDSCH_TimeDomainResourceAllocation_startSymbolAndLength[MAX_NUM_CCs];
//NR RateMatchPattern is used to configure one rate matching pattern for PDSCH
long rateMatchPatternId[MAX_NUM_CCs];
long RateMatchPattern_patternType[MAX_NUM_CCs];
long symbolsInResourceBlock[MAX_NUM_CCs];
long periodicityAndPattern[MAX_NUM_CCs];
long RateMatchPattern_controlResourceSet[MAX_NUM_CCs]; ///ControlResourceSetId
long RateMatchPattern_subcarrierSpacing[MAX_NUM_CCs];
long RateMatchPattern_mode[MAX_NUM_CCs];
//NR PDCCH-ConfigCommon
uint32_t controlResourceSetZero[MAX_NUM_CCs];
uint32_t searchSpaceZero[MAX_NUM_CCs];
long searchSpaceSIB1[MAX_NUM_CCs];
long searchSpaceOtherSystemInformation[MAX_NUM_CCs];
long pagingSearchSpace[MAX_NUM_CCs];
long ra_SearchSpace[MAX_NUM_CCs];
//NR PDCCH-ConfigCommon commonControlResourcesSets
long PDCCH_common_controlResourceSetId[MAX_NUM_CCs];
long PDCCH_common_ControlResourceSet_duration[MAX_NUM_CCs];
long PDCCH_cce_REG_MappingType[MAX_NUM_CCs];
long PDCCH_reg_BundleSize[MAX_NUM_CCs];
long PDCCH_interleaverSize[MAX_NUM_CCs];
long PDCCH_shiftIndex[MAX_NUM_CCs];
long PDCCH_precoderGranularity[MAX_NUM_CCs]; //Corresponds to L1 parameter 'CORESET-precoder-granuality'
long PDCCH_TCI_StateId[MAX_NUM_CCs];
BOOLEAN_t tci_PresentInDCI[MAX_NUM_CCs];
uint32_t PDCCH_DMRS_ScramblingID[MAX_NUM_CCs];
//NR PDCCH-ConfigCommon commonSearchSpaces
long SearchSpaceId[MAX_NUM_CCs];
long commonSearchSpaces_controlResourceSetId[MAX_NUM_CCs];
long SearchSpace_monitoringSlotPeriodicityAndOffset_choice[MAX_NUM_CCs];
uint32_t SearchSpace_monitoringSlotPeriodicityAndOffset_value[MAX_NUM_CCs];
uint32_t SearchSpace_duration[MAX_NUM_CCs];
long SearchSpace_nrofCandidates_aggregationLevel1[MAX_NUM_CCs];
long SearchSpace_nrofCandidates_aggregationLevel2[MAX_NUM_CCs];
long SearchSpace_nrofCandidates_aggregationLevel4[MAX_NUM_CCs];
long SearchSpace_nrofCandidates_aggregationLevel8[MAX_NUM_CCs];
long SearchSpace_nrofCandidates_aggregationLevel16[MAX_NUM_CCs];
long SearchSpace_searchSpaceType[MAX_NUM_CCs];
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1[MAX_NUM_CCs];
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[MAX_NUM_CCs];
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[MAX_NUM_CCs];
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8[MAX_NUM_CCs];
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[MAX_NUM_CCs];
long Common_dci_Format2_3_monitoringPeriodicity[MAX_NUM_CCs];
long Common_dci_Format2_3_nrofPDCCH_Candidates[MAX_NUM_CCs];
long ue_Specific__dci_Formats[MAX_NUM_CCs];
//RateMatchPatternLTE-CRS
uint32_t RateMatchPatternLTE_CRS_carrierFreqDL[MAX_NUM_CCs];
long RateMatchPatternLTE_CRS_carrierBandwidthDL[MAX_NUM_CCs];
long RateMatchPatternLTE_CRS_nrofCRS_Ports[MAX_NUM_CCs];
long RateMatchPatternLTE_CRS_v_Shift[MAX_NUM_CCs];
long RateMatchPatternLTE_CRS_radioframeAllocationPeriod[MAX_NUM_CCs];
uint32_t RateMatchPatternLTE_CRS_radioframeAllocationOffset[MAX_NUM_CCs];
long RateMatchPatternLTE_CRS_subframeAllocation_choice[MAX_NUM_CCs];
NR_ServingCellConfigCommon_t *scc;
int ssb_SubcarrierOffset;
int pdsch_AntennaPorts;
} gNB_RrcConfigurationReq;
+18 -1
View File
@@ -81,7 +81,8 @@
#ifndef OCP_FRAMEWORK
typedef enum cell_type_e {
CELL_MACRO_ENB,
CELL_HOME_ENB
CELL_HOME_ENB,
CELL_MACRO_GNB
} cell_type_t;
typedef enum paging_drx_e {
@@ -272,6 +273,22 @@ typedef struct e_rab_setup_s {
uint32_t gtp_teid;
} e_rab_setup_t;
typedef struct e_rab_tobe_added_s {
/* Unique e_rab_id for the UE. */
uint8_t e_rab_id;
/* Unique drb_ID for the UE. */
uint8_t drb_ID;
/* The transport layer address for the IP packets */
transport_layer_addr_t eNB_addr;
/* S-GW Tunnel endpoint identifier */
uint32_t gtp_teid;
} e_rab_tobe_added_t;
typedef struct e_rab_tobeswitched_s {
/* Unique e_rab_id for the UE. */
uint8_t e_rab_id;
+5
View File
@@ -50,3 +50,8 @@ MESSAGE_DEF(X2AP_UE_CONTEXT_RELEASE , MESSAGE_PRIORITY_MED, x2ap_ue_
/*Senb bearer addition messages X2AP <-> RRC */
MESSAGE_DEF(X2AP_SENB_ADDITION_REQ , MESSAGE_PRIORITY_MED, x2ap_senb_addition_req_t , x2ap_senb_addition_req)
/*SGnb bearer addition messages X2AP <-> RRC */
MESSAGE_DEF(X2AP_ENDC_SGNB_ADDITION_REQ , MESSAGE_PRIORITY_MED, x2ap_ENDC_sgnb_addition_req_t , x2ap_ENDC_sgnb_addition_req)
MESSAGE_DEF(X2AP_ENDC_SGNB_ADDITION_REQ_ACK , MESSAGE_PRIORITY_MED, x2ap_ENDC_sgnb_addition_req_ACK_t , x2ap_ENDC_sgnb_addition_req_ACK)
MESSAGE_DEF(X2AP_ENDC_SGNB_RECONF_COMPLETE , MESSAGE_PRIORITY_MED, x2ap_ENDC_reconf_complete_t , x2ap_ENDC_sgnb_reconf_complete)
+103 -11
View File
@@ -28,16 +28,19 @@
//-------------------------------------------------------------------------------------------//
// Defines to access message fields.
#define X2AP_REGISTER_ENB_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_register_enb_req
#define X2AP_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_setup_req
#define X2AP_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.x2ap_setup_resp
#define X2AP_HANDOVER_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_req
#define X2AP_HANDOVER_REQ_ACK(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_req_ack
#define X2AP_REGISTER_ENB_CNF(mSGpTR) (mSGpTR)->ittiMsg.x2ap_register_enb_cnf
#define X2AP_DEREGISTERED_ENB_IND(mSGpTR) (mSGpTR)->ittiMsg.x2ap_deregistered_enb_ind
#define X2AP_UE_CONTEXT_RELEASE(mSGpTR) (mSGpTR)->ittiMsg.x2ap_ue_context_release
#define X2AP_HANDOVER_CANCEL(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_cancel
#define X2AP_SENB_ADDITION_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_senb_addition_req
#define X2AP_REGISTER_ENB_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_register_enb_req
#define X2AP_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_setup_req
#define X2AP_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.x2ap_setup_resp
#define X2AP_HANDOVER_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_req
#define X2AP_HANDOVER_REQ_ACK(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_req_ack
#define X2AP_REGISTER_ENB_CNF(mSGpTR) (mSGpTR)->ittiMsg.x2ap_register_enb_cnf
#define X2AP_DEREGISTERED_ENB_IND(mSGpTR) (mSGpTR)->ittiMsg.x2ap_deregistered_enb_ind
#define X2AP_UE_CONTEXT_RELEASE(mSGpTR) (mSGpTR)->ittiMsg.x2ap_ue_context_release
#define X2AP_HANDOVER_CANCEL(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_cancel
#define X2AP_SENB_ADDITION_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_senb_addition_req
#define X2AP_ENDC_SGNB_ADDITION_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_ENDC_sgnb_addition_req
#define X2AP_ENDC_SGNB_ADDITION_REQ_ACK(mSGpTR) (mSGpTR)->ittiMsg.x2ap_ENDC_sgnb_addition_req_ACK
#define X2AP_ENDC_SGNB_RECONF_COMPLETE(mSGpTR) (mSGpTR)->ittiMsg.x2ap_ENDC_sgnb_reconf_complete
#define X2AP_MAX_NB_ENB_IP_ADDRESS 2
@@ -66,6 +69,13 @@ typedef enum {
X2AP_TX2_RELOC_OVERALL_TIMEOUT
} x2ap_handover_cancel_cause_t;
typedef enum {
X2AP_RECONF_RESPONSE_SUCCESS,
X2AP_RECONF_RESPONSE_REJECT
/* Extensions may appear below */
} x2ap_sgNB_reconf_response_information_t;
typedef struct x2ap_handover_cancel_s {
int rnti;
x2ap_handover_cancel_cause_t cause;
@@ -286,7 +296,7 @@ typedef struct x2ap_senb_addition_req_ack_s {
int MeNB_UE_X2_id;
int SeNB_UE_X2_id;
int SgNB_UE_X2_id;
uint8_t nb_sCG_e_rabs_tobeadded;
@@ -303,4 +313,86 @@ typedef struct x2ap_senb_addition_req_ack_s {
} x2ap_senb_addition_req_ack_t;
typedef struct x2ap_ENDC_sgnb_addition_req_s {
int ue_x2_id;
/* used for RRC->X2AP in source eNB */
int rnti;
security_capabilities_t security_capabilities;
/* SgNB Security Key */
uint8_t kgnb[32];
/*next_hop_chaining_coun */
long int kgnb_ncc;
/* UE aggregate maximum bitrate */
ambr_t ue_ambr;
uint8_t nb_e_rabs_tobeadded;
/* list of e_rab to be added by RRC layers */
e_rab_tobe_added_t e_rabs_tobeadded[S1AP_MAX_E_RAB];
/* list of e_rab to be setup by RRC layers */
e_rab_t e_rab_param[S1AP_MAX_E_RAB];
x2ap_lastvisitedcell_info_t lastvisitedcell_info;
uint8_t rrc_buffer[4096 /* arbitrary, big enough */];
int rrc_buffer_size;
int target_assoc_id;
/*long int pDCPatSgNB = X2AP_EN_DC_ResourceConfiguration__pDCPatSgNB_present;
long int mCGresources = X2AP_EN_DC_ResourceConfiguration__mCGresources_not_present;
long int sCGresources = X2AP_EN_DC_ResourceConfiguration__sCGresources_not_present;*/
} x2ap_ENDC_sgnb_addition_req_t;
typedef struct x2ap_ENDC_sgnb_addition_req_ACK_s {
int MeNB_ue_x2_id;
int SgNB_ue_x2_id;
/* used for X2AP->RRC in source eNB */
int rnti;
uint8_t nb_e_rabs_admitted_tobeadded;
/* list of e_rab to be added by RRC layers */
e_rab_tobe_added_t e_rabs_admitted_tobeadded[S1AP_MAX_E_RAB];
/* list of e_rab to be setup by RRC layers */
e_rab_t e_rab_param[S1AP_MAX_E_RAB];
x2ap_lastvisitedcell_info_t lastvisitedcell_info;
uint8_t rrc_buffer[4096 /* arbitrary, big enough */];
int rrc_buffer_size;
int target_assoc_id;
/*long int pDCPatSgNB = X2AP_EN_DC_ResourceConfiguration__pDCPatSgNB_present;
long int mCGresources = X2AP_EN_DC_ResourceConfiguration__mCGresources_not_present;
long int sCGresources = X2AP_EN_DC_ResourceConfiguration__sCGresources_not_present;*/
} x2ap_ENDC_sgnb_addition_req_ACK_t;
typedef struct x2ap_ENDC_reconf_complete_s {
int MeNB_ue_x2_id;
int SgNB_ue_x2_id;
x2ap_sgNB_reconf_response_information_t reconf_response;
uint8_t rrc_buffer[4096 /* arbitrary, big enough */];
int rrc_buffer_size;
} x2ap_ENDC_reconf_complete_t;
#endif /* X2AP_MESSAGES_TYPES_H_ */