1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
20 #define EVENT_SCH_GEN_CFG 1
21 #define EVENT_SCH_CELL_CFG 2
22 #define EVENT_SCH_CELL_CFG_CFM 3
23 #define EVENT_DL_SCH_INFO 4
24 #define EVENT_UL_SCH_INFO 5
25 #define EVENT_RACH_IND_TO_SCH 6
26 #define EVENT_CRC_IND_TO_SCH 7
27 #define EVENT_DL_RLC_BO_INFO_TO_SCH 8
28 #define EVENT_ADD_UE_CONFIG_REQ_TO_SCH 9
29 #define EVENT_UE_CONFIG_RSP_TO_MAC 10
30 #define EVENT_SLOT_IND_TO_SCH 11
31 #define EVENT_SHORT_BSR 12
32 #define EVENT_UCI_IND_TO_SCH 13
33 #define EVENT_MODIFY_UE_CONFIG_REQ_TO_SCH 14
34 #define EVENT_UE_RECONFIG_RSP_TO_MAC 15
35 #define EVENT_UE_DELETE_REQ_TO_SCH 16
36 #define EVENT_UE_DELETE_RSP_TO_MAC 17
37 #define EVENT_CELL_DELETE_REQ_TO_SCH 18
38 #define EVENT_CELL_DELETE_RSP_TO_MAC 19
39 #define EVENT_LONG_BSR 20
40 #define EVENT_SLICE_CFG_REQ_TO_SCH 21
41 #define EVENT_SLICE_CFG_RSP_TO_MAC 22
42 #define EVENT_SLICE_RECFG_REQ_TO_SCH 23
43 #define EVENT_SLICE_RECFG_RSP_TO_MAC 24
44 #define EVENT_RACH_RESOURCE_REQUEST_TO_SCH 25
45 #define EVENT_RACH_RESOURCE_RESPONSE_TO_MAC 26
46 #define EVENT_RACH_RESOURCE_RELEASE_TO_SCH 27
47 #define EVENT_PAGING_IND_TO_SCH 28
48 #define EVENT_DL_PAGING_ALLOC 29
49 #define EVENT_DL_REL_HQ_PROC 30
50 #define EVENT_DL_HARQ_IND_TO_SCH 31
51 #define EVENT_DL_CQI_TO_SCH 32
52 #define EVENT_UL_CQI_TO_SCH 33
53 #define EVENT_PHR_IND_TO_SCH 34
54 #define EVENT_STATISTICS_REQ_TO_SCH 35
57 #define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */
58 #define SCH_SSB_MASK_SIZE 1
60 #define MAX_NUM_PRG 1 /* max value should be later 275 */
61 #define MAX_DIG_BF_INTERFACES 0 /* max value should be later 255 */
62 #define MAX_CODEWORDS 1 /* max should be 2 */
63 #define SCH_HARQ_PROC_ID 1 /* harq proc id */
64 #define SCH_ALLOC_TYPE_1 1 /*sch res alloc type */
66 /* Datatype in UL SCH Info */
67 #define SCH_DATATYPE_PUSCH 1
68 #define SCH_DATATYPE_PUSCH_UCI 2
69 #define SCH_DATATYPE_UCI 4
70 #define SCH_DATATYPE_SRS 8
71 #define SCH_DATATYPE_PRACH 16
73 #define MAX_NUMBER_OF_CRC_IND_BITS 1
74 #define MAX_NUMBER_OF_UCI_IND_BITS 1
75 #define MAX_SR_BITS_IN_BYTES 1
76 #define MAX_HARQ_BITS_IN_BYTES 1
77 #define MAX_NUM_LOGICAL_CHANNEL_GROUPS 8
78 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
79 #define MAX_NUM_TAGS 4 /* Max number of timing advance groups */
80 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
81 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
82 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
83 #define FREQ_DOM_RSRC_SIZE 6 /* i.e. 6 bytes because Size of frequency domain resource is 45 bits */
84 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
85 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
86 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
88 /* PUCCH Configuration Macro */
89 #define MAX_NUM_PUCCH_RESRC 128
90 #define MAX_NUM_PUCCH_RESRC_SET 4
91 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
92 #define MAX_NUM_SPATIAL_RELATIONS 8
93 #define MAX_NUM_PUCCH_P0_PER_SET 8
94 #define MAX_NUM_PATH_LOSS_REF_RS 4
95 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
96 #define QPSK_MODULATION 2
98 #define RAR_PAYLOAD_SIZE 10 /* As per spec 38.321, sections 6.1.5 and 6.2.3, RAR PDU is 8 bytes long and 2 bytes of padding */
99 #define TX_PAYLOAD_HDR_LEN 32 /* Intel L1 requires adding a 32 byte header to transmitted payload */
100 #define UL_TX_BUFFER_SIZE 5
102 #define MAX_NUM_CONFIG_SLOTS 160 /*Max number of slots as per the numerology*/
103 #define MAX_NUM_K0_IDX 16 /* Max number of pdsch time domain downlink allocation */
104 #define MAX_NUM_K1_IDX 8 /* As per spec 38.213 section 9.2.3 Max number of PDSCH-to-HARQ resource indication */
105 #define MIN_NUM_K1_IDX 4 /* Min K1 values */
106 #define MAX_NUM_K2_IDX 16 /* PUSCH time domain UL resource allocation list */
107 #define DEFAULT_K0_VALUE 0 /* As per 38.331, PDSCH-TimeDomainResourceAllocation field descriptions */
108 /* As per 38.331, PUSCH-TimeDomainResourceAllocationList field descriptions */
109 #define DEFAULT_K2_VALUE_FOR_SCS15 1
110 #define DEFAULT_K2_VALUE_FOR_SCS30 1
111 #define DEFAULT_K2_VALUE_FOR_SCS60 2
112 #define DEFAULT_K2_VALUE_FOR_SCS120 3
115 #define DL_DMRS_SYMBOL_POS 4 /* Bitmap value 00000000000100 i.e. using 3rd symbol for PDSCH DMRS */
117 #define MAX_PHR_REPORT 1 /*TODO: Range of PHR reports in multiple PHR.*/
118 #define MAX_FAILURE_DET_RESOURCES 10 /*Spec 38.331 'maxNrofFailureDetectionResources'*/
120 #define ADD_DELTA_TO_TIME(crntTime, toFill, incr, numOfSlot) \
122 if ((crntTime.slot + incr) > (numOfSlot - 1)) \
124 toFill.sfn = (crntTime.sfn + 1); \
128 toFill.sfn = crntTime.sfn; \
130 toFill.slot = (crntTime.slot + incr) % numOfSlot; \
131 if (toFill.sfn >= MAX_SFN) \
133 toFill.sfn%=MAX_SFN; \
141 RRC_CONNECTED_USERS_RSRC
177 TIME_ALIGNMENT_TIMER_MS500,
178 TIME_ALIGNMENT_TIMER_MS750,
179 TIME_ALIGNMENT_TIMER_MS1280,
180 TIME_ALIGNMENT_TIMER_MS1920,
181 TIME_ALIGNMENT_TIMER_MS2560,
182 TIME_ALIGNMENT_TIMER_MS5120,
183 TIME_ALIGNMENT_TIMER_MS10240,
184 TIME_ALIGNMENT_TIMER_INFINITE
185 }SchTimeAlignmentTimer;
189 PHR_PERIODIC_TIMER_SF10,
190 PHR_PERIODIC_TIMER_SF20,
191 PHR_PERIODIC_TIMER_SF50,
192 PHR_PERIODIC_TIMER_SF100,
193 PHR_PERIODIC_TIMER_SF200,
194 PHR_PERIODIC_TIMER_SF500,
195 PHR_PERIODIC_TIMER_SF1000,
196 PHR_PERIODIC_TIMER_INFINITE
197 }SchPhrPeriodicTimer;
201 PHR_PROHIBIT_TIMER_SF0,
202 PHR_PROHIBIT_TIMER_SF10,
203 PHR_PROHIBIT_TIMER_SF20,
204 PHR_PROHIBIT_TIMER_SF50,
205 PHR_PROHIBIT_TIMER_SF100,
206 PHR_PROHIBIT_TIMER_SF200,
207 PHR_PROHIBIT_TIMER_SF500,
208 PHR_PROHIBIT_TIMER_SF1000
209 }SchPhrProhibitTimer;
213 PHR_TX_PWR_FACTOR_CHANGE_DB1,
214 PHR_TX_PWR_FACTOR_CHANGE_DB3,
215 PHR_TX_PWR_FACTOR_CHANGE_DB6,
216 PHR_TX_PWR_FACTOR_CHANGE_INFINITE
217 }SchPhrTxPwrFactorChange;
227 HARQ_ACK_CODEBOOK_SEMISTATIC,
228 HARQ_ACK_CODEBOOK_DYNAMIC
229 }SchPdschHarqAckCodebook;
233 NUM_HARQ_PROC_FOR_PDSCH_N2,
234 NUM_HARQ_PROC_FOR_PDSCH_N4,
235 NUM_HARQ_PROC_FOR_PDSCH_N6,
236 NUM_HARQ_PROC_FOR_PDSCH_N10,
237 NUM_HARQ_PROC_FOR_PDSCH_N16
238 }SchNumHarqProcForPdsch;
242 MAX_CODE_BLOCK_GROUP_PER_TB_N2,
243 MAX_CODE_BLOCK_GROUP_PER_TB_N4,
244 MAX_CODE_BLOCK_GROUP_PER_TB_N6,
245 MAX_CODE_BLOCK_GROUP_PER_TB_N8
246 }SchMaxCodeBlkGrpPerTB;
250 PDSCH_X_OVERHEAD_XOH_6,
251 PDSCH_X_OVERHEAD_XOH_12,
252 PDSCH_X_OVERHEAD_XOH_18
257 DMRS_ADDITIONAL_POS0,
258 DMRS_ADDITIONAL_POS1,
260 }SchDmrsAdditionPosition;
264 RESOURCE_ALLOCTION_TYPE_0,
265 RESOURCE_ALLOCTION_TYPE_1,
266 RESOURCE_ALLOCTION_DYN_SWITCH
267 }SchResourceAllocType;
271 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_A,
272 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_B
273 }SchTimeDomRsrcAllocMappingType;
277 ENABLED_TRANSFORM_PRECODER,
278 DISABLED_TRANSFORM_PRECODER
279 }SchTransformPrecoder;
283 INTERLEAVED_CCE_REG_MAPPING = 1,
284 NONINTERLEAVED_CCE_REG_MAPPING
289 SLOT_PERIODICITY_AND_OFFSET_SL_1 = 1,
290 SLOT_PERIODICITY_AND_OFFSET_SL_2,
291 SLOT_PERIODICITY_AND_OFFSET_SL_4,
292 SLOT_PERIODICITY_AND_OFFSET_SL_5,
293 SLOT_PERIODICITY_AND_OFFSET_SL_8,
294 SLOT_PERIODICITY_AND_OFFSET_SL_10,
295 SLOT_PERIODICITY_AND_OFFSET_SL_16,
296 SLOT_PERIODICITY_AND_OFFSET_SL_20,
297 SLOT_PERIODICITY_AND_OFFSET_SL_40,
298 SLOT_PERIODICITY_AND_OFFSET_SL_80,
299 SLOT_PERIODICITY_AND_OFFSET_SL_160,
300 SLOT_PERIODICITY_AND_OFFSET_SL_320,
301 SLOT_PERIODICITY_AND_OFFSET_SL_640,
302 SLOT_PERIODICITY_AND_OFFSET_SL_1280,
303 SLOT_PERIODICITY_AND_OFFSET_SL_2560
304 }SchMSlotPeriodAndOffset;
314 SEARCH_SPACE_TYPE_COMMON = 1,
315 SEARCH_SPACE_TYPE_UE_SPECIFIC
320 SCH_QOS_NON_DYNAMIC = 1,
326 AGGREGATION_LEVEL_N0,
327 AGGREGATION_LEVEL_N1,
328 AGGREGATION_LEVEL_N2,
329 AGGREGATION_LEVEL_N3,
330 AGGREGATION_LEVEL_N4,
331 AGGREGATION_LEVEL_N5,
332 AGGREGATION_LEVEL_N6,
344 CODE_WORDS_SCHED_BY_DCI_N1,
345 CODE_WORDS_SCHED_BY_DCI_N2
346 }SchCodeWordsSchedByDci;
350 STATIC_BUNDLING_TYPE = 1,
351 DYNAMIC_BUNDLING_TYPE
357 SCH_SET1_SIZE_WIDEBAND,
358 SCH_SET1_SIZE_N2_WIDEBAND,
359 SCH_SET1_SIZE_N4_WIDEBAND
360 }SchBundlingSizeSet1;
365 SCH_SET2_SIZE_WIDEBAND
366 }SchBundlingSizeSet2;
420 SCH_MCS_TABLE_QAM_64,
421 SCH_MCS_TABLE_QAM_256,
422 SCH_MCS_TABLE_QAM_64_LOW_SE
435 DATA_TRANSMISSION_ALLOWED,
436 STOP_DATA_TRANSMISSION,
437 RESTART_DATA_TRANSMISSION
438 }SchDataTransmission;
445 }SchPurposeOfFailureDet;
453 /* Performance measurements from 3GPP TS 28.552 Release 15 */
456 SCH_DL_TOTAL_PRB_USAGE,
457 SCH_UL_TOTAL_PRB_USAGE
461 typedef struct timeDomainAlloc
467 typedef struct resAllocType0
469 uint8_t rbBitmap[36];
472 typedef struct resAllocType1
478 typedef struct resAllocType1 FreqDomainRsrc;
480 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-32 BWP Information */
481 typedef struct bwpCfg
483 uint8_t subcarrierSpacing;
484 uint8_t cyclicPrefix;
485 FreqDomainRsrc freqAlloc;
491 uint16_t beamIdx[MAX_DIG_BF_INTERFACES];
494 typedef struct beamformingInfo
498 uint8_t digBfInterfaces;
499 Prg prg[MAX_NUM_PRG];
502 /* SIB1 PDSCH structures */
504 typedef struct codewordinfo
506 uint16_t targetCodeRate;
514 typedef struct dmrsInfo
516 uint16_t dlDmrsSymbPos;
517 uint8_t dmrsConfigType;
518 uint16_t dlDmrsScramblingId;
520 uint8_t numDmrsCdmGrpsNoData;
523 uint8_t nrOfDmrsSymbols;
527 typedef struct pdschFreqAlloc
529 uint8_t resourceAllocType;
530 /* since we are using type-1, rbBitmap excluded */
531 uint8_t rbBitmap[36];
534 uint8_t vrbPrbMapping;
537 typedef struct pdschTimeAlloc
544 typedef struct txPowerPdschInfo
546 uint8_t powerControlOffset;
547 uint8_t powerControlOffsetSS;
550 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-43 PDSCH Configuration */
551 typedef struct pdschCfg
556 uint8_t numCodewords;
557 CodewordInfo codeword[MAX_CODEWORDS];
558 uint16_t dataScramblingId;
560 uint8_t transmissionScheme;
563 PdschFreqAlloc pdschFreqAlloc;
564 PdschTimeAlloc pdschTimeAlloc;
565 BeamformingInfo beamPdschInfo;
566 TxPowerPdschInfo txPdschPower;
568 /* SIB1 PDSCH structures end */
570 /* SIB1 interface structure */
572 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-35 CORESET Configuration */
573 typedef struct coresetCfg
576 uint8_t startSymbolIndex;
577 uint8_t durationSymbols;
578 uint8_t freqDomainResource[6];
579 uint8_t cceRegMappingType;
580 uint8_t regBundleSize;
581 uint8_t interleaverSize;
584 uint8_t coresetPoolIndex;
585 uint8_t precoderGranularity;
587 uint8_t aggregationLevel;
590 typedef struct txPowerPdcchInfo
592 uint8_t beta_pdcch_1_0;
593 uint8_t powerControlOffsetSS;
596 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-42 DL-DCI Configuration */
600 uint16_t scramblingId;
601 uint16_t scramblingRnti;
604 BeamformingInfo beamPdcchInfo;
605 TxPowerPdcchInfo txPdcchPower;
609 typedef struct pdcchCfg
611 /* coreset-0 configuration */
612 CoresetCfg coresetCfg;
614 DlDCI dci; /* as of now its only one DCI, later it will be numDlCi */
616 /* end of SIB1 PDCCH structures */
618 typedef struct schPcchCfg
620 uint8_t numPO; /*Derived from Ns*/
621 bool poPresent; /*FirstPDCCH-MonitoringPO is present or not*/
622 uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
625 typedef struct schPdcchConfigSib1
627 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
628 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
631 typedef struct schRachCfgGeneric
633 uint8_t prachCfgIdx; /* PRACH config idx */
634 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
635 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
636 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
637 int16_t preambleRcvdTargetPower;
638 uint8_t preambleTransMax;
639 uint8_t pwrRampingStep;
640 uint8_t raRspWindow; /* RA Response Window */
643 typedef struct schRachCfg
645 SchRachCfgGeneric prachCfgGeneric;
646 uint8_t totalNumRaPreamble; /* Total number of RA preambles */
647 uint8_t ssbPerRach; /* SSB per RACH occassion */
648 uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */
649 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
650 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
651 uint16_t rootSeqIdx; /* Root sequence index */
652 uint16_t rootSeqLen; /* root sequence length */
653 uint8_t numRootSeq; /* Number of root sequences required for FD */
654 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
657 typedef struct schBwpParams
659 FreqDomainRsrc freqAlloc;
661 uint8_t cyclicPrefix;
664 typedef struct schCandidatesInfo
673 typedef struct schSearchSpaceCfg
675 uint8_t searchSpaceId;
677 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
678 uint16_t monitoringSlot;
680 uint16_t monitoringSymbol;
681 SchCandidatesInfo candidate;
684 typedef struct schPdcchCfgCmn
686 SchSearchSpaceCfg commonSearchSpace;
687 uint8_t raSearchSpaceId;
690 typedef struct schPdschCfgCmnTimeDomRsrcAlloc
695 uint8_t lengthSymbol;
696 }SchPdschCfgCmnTimeDomRsrcAlloc;
698 typedef struct schPdschCfgCmn
700 uint8_t numTimeDomAlloc;
701 SchPdschCfgCmnTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
704 typedef struct schPucchCfgCmn
706 uint8_t pucchResourceCommon;
707 uint8_t pucchGroupHopping;
710 /* PUSCH Time Domain Resource Allocation */
711 typedef struct schPuschTimeDomRsrcAlloc
714 SchTimeDomRsrcAllocMappingType mappingType;
716 uint8_t symbolLength;
717 }SchPuschTimeDomRsrcAlloc;
719 typedef struct schPuschCfgCmn
721 uint8_t numTimeDomRsrcAlloc;
722 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
725 typedef struct schK1TimingInfo
728 uint8_t k1Indexes[MAX_NUM_K1_IDX];
731 typedef struct schK0TimingInfo
734 SchK1TimingInfo k1TimingInfo;
737 typedef struct schK0K1TimingInfo
740 SchK0TimingInfo k0Indexes[MAX_NUM_K0_IDX];
743 typedef struct schK0K1TimingInfoTbl
746 SchK0K1TimingInfo k0k1TimingInfo[MAX_NUM_CONFIG_SLOTS];
747 }SchK0K1TimingInfoTbl;
749 typedef struct schBwpDlCfg
752 SchPdcchCfgCmn pdcchCommon;
753 SchPdschCfgCmn pdschCommon;
756 typedef struct schK2TimingInfo
759 uint8_t k2Indexes[MAX_NUM_K2_IDX];
762 typedef struct schK2TimingInfoTbl
765 SchK2TimingInfo k2TimingInfo[MAX_NUM_CONFIG_SLOTS];
768 typedef struct schBwpUlCfg
771 SchRachCfg schRachCfg; /* PRACH config */
772 SchPucchCfgCmn pucchCommon;
773 SchPuschCfgCmn puschCommon;
776 typedef struct schPlmnInfoList
779 uint8_t numSliceSupport; /* Total slice supporting */
780 Snssai **snssai; /* List of supporting snssai*/
784 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
786 typedef struct schDrxOnDurationTimer
788 bool onDurationTimerValInMs;
791 uint8_t subMilliSeconds;
792 uint16_t milliSeconds;
793 }onDurationtimerValue;
794 }SchDrxOnDurationTimer;
796 typedef struct schDrxLongCycleStartOffset
798 uint16_t drxLongCycleStartOffsetChoice;
799 uint16_t drxLongCycleStartOffsetVal;
800 }SchDrxLongCycleStartOffset;
802 typedef struct schShortDrx
804 uint16_t drxShortCycle;
805 uint8_t drxShortCycleTimer;
808 typedef struct schDrxCfg
810 SchDrxOnDurationTimer drxOnDurationTimer;
811 uint16_t drxInactivityTimer;
812 uint8_t drxHarqRttTimerDl;
813 uint8_t drxHarqRttTimerUl;
814 uint16_t drxRetransmissionTimerDl;
815 uint16_t drxRetransmissionTimerUl;
816 SchDrxLongCycleStartOffset drxLongCycleStartOffset;
818 SchShortDrx shortDrx;
819 uint8_t drxSlotOffset;
823 /*Spec 38.331 'NrNsPmaxList'*/
824 typedef struct schNrNsPmaxList
827 long additionalSpectrumEmission;
830 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
831 typedef struct schMultiFreqBandListSib
834 SchNrNsPmaxList nrNsPmaxList[1];
835 }SchMultiFreqBandListSib;
837 /*Spec 38.331 'SCS-SpecificCarrier'*/
838 typedef struct schScsSpecificCarrier
840 uint16_t offsetToCarrier;
841 uint8_t subCarrierSpacing;
843 uint16_t txDirectCurrentLoc;
844 }SchScsSpecificCarrier;
846 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
847 typedef struct schFreqInfoDlSib
849 SchMultiFreqBandListSib mutiFreqBandList[1];
850 uint16_t offsetToPointA;
851 SchScsSpecificCarrier schSpcCarrier[1];
854 typedef struct schBcchCfg
859 /*Spec 38.331 'DownlinkConfigCommonSIB'*/
860 typedef struct schDlCfgCommon
862 SchFreqInfoDlSib schFreqInfoDlSib;
863 SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */
864 SchBcchCfg schBcchCfg;
865 SchPcchCfg schPcchCfg;
868 /*Spec 38.331 'FrequencyInfoUL-SIB'*/
869 typedef struct schFreqInfoUlSib
871 SchMultiFreqBandListSib mutiFreqBandList[1];
872 uint16_t absoluteFreqPointA;
873 SchScsSpecificCarrier schSpcCarrier[1];
875 bool frequencyShift7p5khz;
878 /*Spec 38.331 'UplinkConfigCommonSIB '*/
879 typedef struct schUlCfgCommon
881 SchFreqInfoUlSib schFreqInfoUlSib;
882 SchBwpUlCfg schInitialUlBwp; /* Initial DL BWP */
883 uint16_t schTimeAlignTimer;
886 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.1 Cell Conf Request*/
887 typedef struct schCellCfg
889 uint16_t cellId; /* Cell Id */
893 uint16_t phyCellId; /* Physical cell id */
894 SchPlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */
895 SchDuplexMode dupMode; /* Duplex type: TDD/FDD */
896 uint8_t dlBandwidth; /* Supported B/W */
897 uint8_t ulBandwidth; /* Supported B/W */
898 SchDlCfgCommon dlCfgCommon; /*Spec 38.331 DownlinkConfigCommonSIB*/
899 SchUlCfgCommon ulCfgCommon; /*Spec 38.331 UplinkConfigCommonSIB*/
901 TDDCfg tddCfg; /* Spec 38.331 tdd-UL-DL-ConfigurationCommon */
904 /*Ref:Spec 38.331 "ssb-PositionsInBurst", Value 0 in Bitmap => corresponding SS/PBCH block is not transmitted
905 *value 1 => corresponding SS/PBCH block is transmitted*/
906 uint32_t ssbPosInBurst[SCH_SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
907 SchSSBPeriod ssbPeriod; /* SSB Periodicity in msec */
908 uint32_t ssbFrequency; /* SB frequency in kHz*/
909 uint8_t dmrsTypeAPos;
910 uint8_t ssbScs; /* SSB subcarrier spacing*/
911 SchPdcchConfigSib1 pdcchCfgSib1; /* Req to configure CORESET#0 and SearchSpace#0*/
912 uint32_t ssbPbchPwr; /* SSB block power */
913 uint8_t ssbSubcOffset; /* Subcarrier Offset(Kssb) */
917 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.1 Cell Config Response*/
918 typedef struct schCellCfgCfm
920 uint16_t cellId; /* Cell Id */
925 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.2 Cell Del Req*/
926 typedef struct schCellDeleteReq
931 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.2 Cell Del Response*/
932 typedef struct schCellDeleteRsp
939 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.3*/
940 typedef struct schRrmPolicyRatio
944 uint8_t dedicatedRatio;
947 typedef struct schRrmPolicyOfSlice
950 SchRrmPolicyRatio rrmPolicyRatioInfo;
951 }SchRrmPolicyOfSlice;
953 typedef struct schSliceCfgReq
955 uint8_t numOfConfiguredSlice;
956 SchRrmPolicyOfSlice **listOfSlices;
959 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.3 Slice Cfg Response*/
960 typedef struct schSliceCfgRsp
967 /*As per ORAN-WG8 V7.0.0 Sec 11.2.4.3.4 , Slice Cfg and Recfg are same structures*/
968 typedef struct schSliceCfgReq SchSliceRecfgReq;
969 typedef struct schSliceCfgRsp SchSliceRecfgRsp;
971 typedef struct ssbInfo
973 uint8_t ssbIdx; /* SSB Index */
974 TimeDomainAlloc tdAlloc; /* Time domain allocation */
975 FreqDomainRsrc fdAlloc; /* Freq domain allocation */
978 typedef struct sib1AllocInfo
981 PdcchCfg *sib1PdcchCfg;
984 typedef struct prachSchInfo
986 uint8_t numPrachOcas; /* Num Prach Ocassions */
987 uint8_t prachFormat; /* PRACH Format */
988 uint8_t numRa; /* Freq domain ocassion */
989 uint8_t prachStartSymb; /* Freq domain ocassion */
992 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
993 typedef struct dlBrdcstAlloc
995 uint16_t crnti; /* SI-RNTI */
996 /* Ssb transmission is determined as follows:
997 * 0 : No tranamission
998 * 1 : SSB Transmission
999 * 2 : SSB Repetition */
1000 uint8_t ssbTransmissionMode;
1001 uint8_t ssbIdxSupported;
1002 SsbInfo ssbInfo[MAX_SSB_IDX];
1003 bool systemInfoIndicator;
1005 /* Sib1 transmission is determined as follows:
1006 * 0 : No tranamission
1007 * 1 : SIB1 Transmission
1008 * 2 : SIB1 Repetition */
1009 uint8_t sib1TransmissionMode;
1010 Sib1AllocInfo sib1Alloc;
1013 typedef struct msg3UlGrant
1015 uint8_t freqHopFlag;
1017 FreqDomainRsrc msg3FreqAlloc;
1024 typedef struct rarInfo
1028 Msg3UlGrant ulGrant;
1030 uint8_t rarPdu[RAR_PAYLOAD_SIZE];
1034 typedef struct rarAlloc
1039 PdcchCfg *rarPdcchCfg;
1040 PdschCfg *rarPdschCfg;
1043 typedef struct lcSchInfo
1049 typedef struct ceSchInfo
1055 typedef struct freqDomainAlloc
1057 uint8_t resAllocType; /* Resource allocation type */
1060 ResAllocType0 type0;
1061 ResAllocType1 type1;
1065 typedef struct transportBlock
1072 CeSchInfo ceSchInfo[MAX_NUM_LC];
1074 LcSchInfo lcSchInfo[MAX_NUM_LC];
1077 typedef struct dlMsgSchedInfo
1080 uint8_t dciFormatId;
1081 uint8_t harqProcNum;
1083 uint8_t dlAssignIdx;
1085 uint8_t pucchResInd;
1086 uint8_t harqFeedbackInd;
1087 uint16_t dlMsgPduLen;
1089 FreqDomainAlloc freqAlloc;
1090 TimeDomainAlloc timeAlloc;
1092 TransportBlock transportBlock[2];
1094 PdcchCfg *dlMsgPdcchCfg;
1095 PdschCfg *dlMsgPdschCfg;
1098 typedef struct schSlotValue
1100 SlotTimingInfo currentTime;
1101 SlotTimingInfo broadcastTime;
1102 SlotTimingInfo rarTime;
1103 SlotTimingInfo dlMsgTime;
1104 SlotTimingInfo ulDciTime;
1108 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-36 DCI Format0_0 Configuration */
1109 typedef struct format0_0
1111 uint8_t resourceAllocType;
1112 FreqDomainAlloc freqAlloc;
1113 TimeDomainAlloc timeAlloc;
1124 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-40 DCI Format 0_1 Configuration */
1125 typedef struct format0_1
1127 uint8_t carrierIndicator;
1129 uint8_t bwpIndicator;
1130 uint8_t resourceAlloc;
1131 FreqDomainRsrc freqAlloc;
1132 TimeDomainAlloc timeAlloc;
1139 uint8_t firstDownlinkAssignmentIndex;
1140 uint8_t secondDownlinkAssignmentIndex;
1142 uint8_t srsResourceSetIndicator;
1143 uint8_t srsResourceIndicator;
1145 uint8_t antennaPorts;
1148 uint8_t cbgTransmissionInfo;
1150 uint8_t betaOffsetIndicator;
1151 bool dmrsSequenceInitialization;
1152 bool ulschIndicatior;
1155 typedef struct dciFormat
1157 FormatType formatType; /* DCI Format */
1160 Format0_0 format0_0; /* Format 0_0 */
1161 Format0_1 format0_1; /* Format 0_1 */
1165 typedef struct dciInfo
1167 uint16_t crnti; /* CRNTI */
1168 BwpCfg bwpCfg; /* BWP Cfg */
1169 CoresetCfg coresetCfg; /* Coreset1 Cfg */
1170 DciFormat dciFormatInfo; /* Dci Format */
1171 DlDCI dciInfo; /* DlDCI */
1175 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.8 DL Scheduling Information */
1176 typedef struct dlSchedInfo
1178 uint16_t cellId; /* Cell Id */
1179 SchSlotValue schSlotValue;
1181 /* Allocation for broadcast messages */
1182 bool isBroadcastPres;
1183 DlBrdcstAlloc brdcstAlloc;
1185 /* Allocation for RAR message */
1186 RarAlloc *rarAlloc[MAX_NUM_UE];
1188 /* UL grant in response to BSR */
1191 /* Allocation from dedicated DL msg */
1192 DlMsgSchInfo *dlMsgAlloc[MAX_NUM_UE];
1196 /*Reference: O-RAN.WG8.AAD.v7.0.0, Sec 11.2.4.3.13 Downlink Paging Allocation*/
1197 typedef struct interleaved_t
1199 uint8_t regBundleSize;
1200 uint8_t interleaverSize;
1201 uint16_t shiftIndex;
1204 typedef struct pageDlDci
1206 uint8_t freqDomainResource[6];
1207 uint8_t durationSymbols;
1208 uint8_t cceRegMappingType;
1211 Interleaved interleaved;
1212 uint8_t nonInterleaved;
1214 uint8_t ssStartSymbolIndex;
1216 uint8_t aggregLevel;
1217 uint8_t precoderGranularity;
1218 uint8_t coreSetSize;
1221 typedef struct resAllocType1 PageFreqDomainAlloc;
1223 typedef struct pageTimeDomainAlloc
1225 uint8_t mappingType;
1228 }PageTimeDomainAlloc;
1230 typedef struct pageDmrsConfig
1234 uint8_t nrOfDmrsSymbols;
1237 typedef struct pageTbInfo
1243 typedef struct pageDlSch
1245 PageFreqDomainAlloc freqAlloc;
1246 PageTimeDomainAlloc timeAlloc;
1247 PageDmrsConfig dmrs;
1248 uint8_t vrbPrbMapping;
1251 uint16_t dlPagePduLen;
1255 typedef struct dlPageAlloc
1258 SlotTimingInfo dlPageTime;
1263 PageDlDci pageDlDci;
1264 PageDlSch pageDlSch;
1267 typedef struct tbInfo
1269 uint8_t mcs; /* MCS */
1270 uint8_t ndi; /* NDI */
1271 uint8_t rv; /* Redundancy Version */
1272 uint16_t tbSize; /* TB Size */
1273 uint8_t qamOrder; /* Modulation Order */
1274 SchMcsTable mcsTable; /* MCS Table */
1277 typedef struct schPuschInfo
1279 uint8_t harqProcId; /* HARQ Process ID */
1280 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1281 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1282 TbInfo tbInfo; /* TB info */
1284 uint8_t dmrsMappingType;
1285 uint8_t nrOfDmrsSymbols;
1290 typedef struct harqInfo
1292 uint16_t harqAckBitLength;
1293 uint8_t betaOffsetHarqAck;
1296 typedef struct csiInfo
1299 uint8_t betaOffsetCsi;
1302 typedef struct harqFdbkInfo
1304 uint16_t harqBitLength;
1307 typedef struct csiFdbkInfo
1312 typedef struct schPucchFormatCfg
1314 uint8_t interSlotFreqHop;
1316 uint8_t maxCodeRate;
1322 typedef struct schPucchInfo
1324 FreqDomainRsrc fdAlloc;
1325 TimeDomainAlloc tdAlloc;
1327 HarqFdbkInfo harqInfo;
1328 CsiFdbkInfo csiInfo;
1329 BeamformingInfo beamPucchInfo;
1330 uint8_t pucchFormat;
1331 uint8_t intraFreqHop;
1332 uint16_t secondPrbHop;
1333 uint8_t initialCyclicShift;
1341 typedef struct schPuschUci
1343 uint8_t harqProcId; /* HARQ Process ID */
1344 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1345 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1346 TbInfo tbInfo; /* TB information */
1347 HarqInfo harqInfo; /* Harq Information */
1348 CsiInfo csiInfo; /* Csi information*/
1351 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.9 UL Scheduling Information */
1352 typedef struct ulSchedInfo
1354 uint16_t cellId; /* Cell Id */
1355 uint16_t crnti; /* CRNI */
1356 SlotTimingInfo slotIndInfo; /* Slot Info: sfn, slot number */
1357 uint8_t dataType; /* Type of info being scheduled */
1358 SchPrachInfo prachSchInfo; /* Prach scheduling info */
1359 SchPuschInfo schPuschInfo; /* Pusch scheduling info */
1360 SchPuschUci schPuschUci; /* Pusch Uci */
1361 SchPucchInfo schPucchInfo; /* Pucch and Uci scheduling info */
1364 /* Info of Scheduling Request to Add/Modify */
1365 typedef struct schSchedReqInfo
1368 SchSrProhibitTimer srProhibitTmr;
1369 SchSrTransMax srTransMax;
1372 /* Scheduling Request Configuration */
1373 typedef struct schSchedReqCfg
1375 uint8_t addModListCount;
1376 SchSchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
1377 uint8_t relListCount;
1378 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
1381 /* Info of Tag to Add/Modify */
1382 typedef struct schTagInfo
1385 SchTimeAlignmentTimer timeAlignmentTmr;
1388 /* Timing Advance Group Configuration */
1389 typedef struct schTagCfg
1391 uint8_t addModListCount;
1392 SchTagInfo addModList[MAX_NUM_TAGS]; /* List of Tag to Add/Modify */
1393 uint8_t relListCount;
1394 uint8_t relList[MAX_NUM_TAGS]; /* list of Tag Id to release */
1397 /* Configuration for Power headroom reporting */
1398 typedef struct schPhrCfg
1400 SchPhrPeriodicTimer periodicTmr;
1401 SchPhrProhibitTimer prohibitTmr;
1402 SchPhrTxPwrFactorChange txpowerFactorChange;
1405 bool type2OtherCell;
1406 SchPhrModeOtherCG modeOtherCG;
1409 /* MAC cell Group configuration */
1410 typedef struct schMacCellGrpCfg
1412 SchSchedReqCfg schedReqCfg;
1414 SchPhrCfg phrCfg; /* To be used only if phrCfgSetupPres is true */
1417 SchDrxCfg drxCfg; /* Drx configuration */
1421 /* Physical Cell Group Configuration */
1422 typedef struct schPhyCellGrpCfg
1424 SchPdschHarqAckCodebook pdschHarqAckCodebook;
1428 /* Control resource set info */
1429 typedef struct schControlRsrcSet
1431 uint8_t cRSetId; /* Control resource set id */
1432 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
1434 SchREGMappingType cceRegMappingType;
1435 SchPrecoderGranul precoderGranularity;
1436 uint16_t dmrsScramblingId;
1439 /* Search Space info */
1440 typedef struct schSearchSpace
1442 uint8_t searchSpaceId;
1444 SchMSlotPeriodAndOffset mSlotPeriodicityAndOffset;
1445 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1446 SchAggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
1447 SchAggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
1448 SchAggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
1449 SchAggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
1450 SchAggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
1451 SchSearchSpaceType searchSpaceType;
1452 uint8_t ueSpecificDciFormat;
1455 /* PDCCH cofniguration */
1456 typedef struct schPdcchConfig
1458 uint8_t numCRsetToAddMod;
1459 SchControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
1460 uint8_t numCRsetToRel;
1461 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
1462 uint8_t numSearchSpcToAddMod;
1463 SchSearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
1464 uint8_t numSearchSpcToRel;
1465 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
1468 /* PDSCH time domain resource allocation */
1469 typedef struct schPdschTimeDomRsrcAlloc
1472 SchTimeDomRsrcAllocMappingType mappingType;
1473 uint8_t startSymbol;
1474 uint8_t symbolLength;
1475 }SchPdschTimeDomRsrcAlloc;
1478 typedef struct schPdschBundling
1480 struct schStaticBundling
1482 SchBundlingSizeSet2 size;
1484 struct schDynamicBundling
1486 SchBundlingSizeSet1 sizeSet1;
1487 SchBundlingSizeSet2 sizeSet2;
1488 }SchDynamicBundling;
1491 /* DMRS downlink configuration */
1492 typedef struct schDmrsDlCfg
1494 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1497 /* PDSCH Configuration */
1498 typedef struct schPdschConfig
1500 SchDmrsDlCfg dmrsDlCfgForPdschMapTypeA;
1501 SchResourceAllocType resourceAllocType;
1502 uint8_t numTimeDomRsrcAlloc;
1503 SchPdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1505 SchCodeWordsSchedByDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
1506 SchBundlingType bundlingType;
1507 SchPdschBundling bundlingInfo;
1510 /* Initial Downlink BWP */
1511 typedef struct schInitalDlBwp
1514 SchPdcchConfig pdcchCfg;
1516 SchPdschConfig pdschCfg;
1519 /*Spec 38.331 'RadioLinkMonitoringConfig'*/
1520 typedef uint8_t SchRadioLinkMonitoringRsId;
1522 typedef struct schRadioLinkMonRS
1524 SchRadioLinkMonitoringRsId radioLinkMonitoringRsId;
1525 SchPurposeOfFailureDet purpose;
1529 uint8_t nzpCsiRsResId;
1533 typedef struct schRadioLinkConfig
1535 SchRadioLinkMonRS failurDetResAddModList[MAX_FAILURE_DET_RESOURCES];
1536 SchRadioLinkMonitoringRsId failurDetResRelList[MAX_FAILURE_DET_RESOURCES];
1537 uint8_t beamFailureInstanceMaxCount;
1538 uint8_t beamFailureDetectionTimer;
1539 }SchRadioLinkConfig;
1541 /*Spec 38.331 "SPS-Config'*/
1542 typedef struct schSpsConfig
1544 uint16_t periodicity;
1545 uint8_t numOfHqProcess;
1547 SchMcsTable mcsTable;
1550 /* Spec 38.331, 'BWP-DownlinkDedicated'*/
1551 typedef struct schBwpDlCfgDed
1553 SchPdcchConfig pdcchCfgDed;
1554 SchPdschConfig pdschCfgDed;
1555 SchSpsConfig spsCfgDed;
1556 SchRadioLinkConfig radioLnkMonCfgDed;
1559 /* Spec 38.331, 'BWP-Downlink' Downlink BWP information */
1560 typedef struct schDlBwpInfo
1563 SchBwpDlCfg bwpCommon;
1564 SchBwpDlCfgDed bwpDedicated;
1567 /* PDCCH Serving Cell configuration */
1568 typedef struct schPdschServCellCfg
1570 uint8_t *maxMimoLayers;
1571 SchNumHarqProcForPdsch numHarqProcForPdsch;
1572 SchMaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
1573 bool *codeBlkGrpFlushInd;
1574 SchPdschXOverhead *xOverhead;
1575 }SchPdschServCellCfg;
1577 typedef struct schRaPrioritization
1579 uint8_t powerRampingStepHighPriority;
1580 uint8_t scalingFactorBI;
1581 }SchRaPrioritization;
1583 typedef struct schBfrCsiRsRes
1587 uint8_t raPreambleIndex;
1590 typedef struct schBfrSsbRes
1593 uint8_t raPreambleIndex;
1596 typedef struct schPrachResDedBfr
1599 SchBfrCsiRsRes csiRs;
1602 /*Spec 38.331 'BeamFailureRecoveryConfig' */
1603 typedef struct schBeamFailRecoveryCfg
1605 uint8_t rootSeqIndexBfr;
1606 SchRachCfgGeneric rachCfgBfr;
1607 uint8_t rsrpThreshSsbBfr; /* RSRP Threshold SSB */
1608 SchPrachResDedBfr candidateBeamRSList;
1609 uint8_t ssbPerRachBfr; /* SSB per RACH occassion */
1610 uint8_t raSsbOccMaskIndex;
1611 uint8_t recoverySearchSpaceId;
1612 SchRaPrioritization raPrioBfr;
1614 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
1615 }SchBeamFailRecoveryCfg;
1617 /* PUCCH Configuration */
1618 typedef struct schPucchResrcSetInfo
1621 uint8_t resrcListCount;
1622 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1623 uint8_t maxPayLoadSize;
1624 }SchPucchResrcSetInfo;
1626 typedef struct schPucchResrcSetCfg
1628 uint8_t resrcSetToAddModListCount;
1629 SchPucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1630 uint8_t resrcSetToRelListCount;
1631 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1632 }SchPucchResrcSetCfg;
1634 typedef struct schPucchFormat0
1636 uint8_t initialCyclicShift;
1638 uint8_t startSymbolIdx;
1641 typedef struct schPucchFormat1
1643 uint8_t initialCyclicShift;
1645 uint8_t startSymbolIdx;
1649 typedef struct schPucchFormat2_3
1653 uint8_t startSymbolIdx;
1656 typedef struct schPucchFormat4
1661 uint8_t startSymbolIdx;
1664 typedef struct schPucchResrcInfo
1668 uint8_t intraFreqHop;
1669 uint16_t secondPrbHop;
1670 uint8_t pucchFormat;
1672 SchPucchFormat0 *format0;
1673 SchPucchFormat1 *format1;
1674 SchPucchFormat2_3 *format2;
1675 SchPucchFormat2_3 *format3;
1676 SchPucchFormat4 *format4;
1680 typedef struct schPucchResrcCfg
1682 uint8_t resrcToAddModListCount;
1683 SchPucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1684 uint8_t resrcToRelListCount;
1685 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1689 typedef struct schSchedReqResrcInfo
1693 uint8_t periodicity;
1696 }SchSchedReqResrcInfo;
1698 typedef struct schPucchSchedReqCfg
1700 uint8_t schedAddModListCount;
1701 SchSchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1702 uint8_t schedRelListCount;
1703 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1704 }SchPucchSchedReqCfg;
1706 typedef struct schSpatialRelationInfo
1708 uint8_t spatialRelationId;
1709 uint8_t servCellIdx;
1710 uint8_t pathLossRefRSId;
1712 uint8_t closeLoopIdx;
1713 }SchSpatialRelationInfo;
1715 typedef struct schPucchSpatialCfg
1717 uint8_t spatialAddModListCount;
1718 SchSpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1719 uint8_t spatialRelListCount;
1720 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1721 }SchPucchSpatialCfg;
1723 typedef struct schP0PucchCfg
1729 typedef struct schPathLossRefRSCfg
1731 uint8_t pathLossRefRSId;
1732 }SchPathLossRefRSCfg;
1734 typedef struct schPucchMultiCsiCfg
1736 uint8_t multiCsiResrcListCount;
1737 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1738 }SchPucchMultiCsiCfg;
1740 typedef struct schPucchDlDataToUlAck
1742 uint8_t dlDataToUlAckListCount;
1743 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1744 }SchPucchDlDataToUlAck;
1746 typedef struct schPucchPowerControl
1754 SchP0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1755 uint8_t pathLossRefRSListCount;
1756 SchPathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1757 }SchPucchPowerControl;
1759 typedef struct schPucchCfg
1761 SchPucchResrcSetCfg *resrcSet;
1762 SchPucchResrcCfg *resrc;
1763 SchPucchFormatCfg *format1;
1764 SchPucchFormatCfg *format2;
1765 SchPucchFormatCfg *format3;
1766 SchPucchFormatCfg *format4;
1767 SchPucchSchedReqCfg *schedReq;
1768 SchPucchMultiCsiCfg *multiCsiCfg;
1769 SchPucchSpatialCfg *spatialInfo;
1770 SchPucchDlDataToUlAck *dlDataToUlAck;
1771 SchPucchPowerControl *powerControl;
1774 /* Transform precoding disabled */
1775 typedef struct schTransPrecodDisabled
1777 uint16_t scramblingId0;
1778 }SchTransPrecodDisabled;
1780 /* DMRS Uplink configuration */
1781 typedef struct SchDmrsUlCfg
1783 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1784 SchTransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1787 /* PUSCH Configuration */
1788 typedef struct schPuschCfg
1790 uint8_t dataScramblingId;
1791 SchDmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1792 SchResourceAllocType resourceAllocType;
1793 uint8_t numTimeDomRsrcAlloc;
1794 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1795 SchTransformPrecoder transformPrecoder;
1798 /* Initial Uplink BWP */
1799 typedef struct schInitialUlBwp
1802 SchPucchCfg pucchCfg;
1804 SchPuschCfg puschCfg;
1807 typedef struct schBwpCfgDedicated
1809 SchPucchCfg pucchCfg;
1810 SchPuschCfg puschCfg;
1811 }SchBwpCfgDedicated;
1813 /* Uplink BWP information */
1814 typedef struct schUlBwpInfo
1817 SchBwpUlCfg bwpCommon;
1818 SchBwpCfgDedicated bwpDed;
1821 typedef struct schBwpRelInfo
1826 /* Serving cell configuration */
1827 typedef struct schServCellRecfgInfo
1829 SchInitalDlBwp initDlBwp;
1830 SchRadioLinkConfig radioLinkMonConfig;
1831 uint8_t numDlBwpToAddOrMod;
1832 SchDlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP];
1833 uint8_t numDlBwpToRel;
1834 SchBwpRelInfo dlBwpToRelList[MAX_NUM_BWP];
1835 uint8_t firstActvDlBwpId;
1836 uint8_t defaultDlBwpId;
1837 uint8_t *bwpInactivityTmr;
1838 SchPdschServCellCfg pdschServCellCfg;
1839 SchInitialUlBwp initUlBwp;
1840 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1841 uint8_t numUlBwpToAddOrMod;
1842 SchUlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
1843 uint8_t numUlBwpToRel;
1844 SchBwpRelInfo ulBwpToRelList[MAX_NUM_BWP];
1845 uint8_t firstActvUlBwpId;
1846 }SchServCellRecfgInfo;
1848 /* Serving cell configuration */
1849 typedef struct schServCellCfgInfo
1851 SchInitalDlBwp initDlBwp;
1852 SchRadioLinkConfig radioLinkMonConfig;
1853 uint8_t numDlBwpToAdd;
1854 SchDlBwpInfo dlBwpToAddList[MAX_NUM_BWP];
1855 uint8_t firstActvDlBwpId;
1856 uint8_t defaultDlBwpId;
1857 uint8_t *bwpInactivityTmr;
1858 SchPdschServCellCfg pdschServCellCfg;
1859 SchInitialUlBwp initUlBwp;
1860 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1861 uint8_t numUlBwpToAdd;
1862 SchUlBwpInfo ulBwpToAddList[MAX_NUM_BWP];
1863 uint8_t firstActvUlBwpId;
1864 }SchServCellCfgInfo;
1866 typedef struct schNonDynFiveQi
1871 uint16_t maxDataBurstVol;
1874 typedef struct schDynFiveQi
1877 uint16_t packetDelayBudget;
1878 uint8_t packetErrRateScalar;
1879 uint8_t packetErrRateExp;
1881 uint8_t delayCritical;
1883 uint16_t maxDataBurstVol;
1886 typedef struct schNgRanAllocAndRetPri
1888 uint8_t priorityLevel;
1889 uint8_t preEmptionCap;
1890 uint8_t preEmptionVul;
1891 }SchNgRanAllocAndRetPri;
1893 typedef struct schGrbQosFlowInfo
1895 uint32_t maxFlowBitRateDl;
1896 uint32_t maxFlowBitRateUl;
1897 uint32_t guarFlowBitRateDl;
1898 uint32_t guarFlowBitRateUl;
1902 typedef struct schDrbQos
1904 SchQosType fiveQiType; /* Dynamic or non-dynamic */
1907 SchNonDynFiveQi nonDyn5Qi;
1908 SchDynFiveQi dyn5Qi;
1910 SchNgRanAllocAndRetPri ngRanRetPri;
1911 SchGrbQosFlowInfo grbQosFlowInfo;
1912 uint16_t pduSessionId;
1913 uint32_t ulPduSessAggMaxBitRate; /* UL PDU Session Aggregate max bit rate */
1916 /* Special cell configuration */
1917 typedef struct schSpCellCfg
1919 uint8_t servCellIdx;
1920 SchServCellCfgInfo servCellCfg;
1923 /* Special cell Reconfiguration */
1924 typedef struct schSpCellRecfg
1926 uint8_t servCellIdx;
1927 SchServCellRecfgInfo servCellRecfg;
1930 /* Uplink logical channel configuration */
1931 typedef struct SchUlLcCfg
1936 uint8_t pbr; // prioritisedBitRate
1937 uint8_t bsd; // bucketSizeDuration
1940 /* Downlink logical channel configuration */
1941 typedef struct schDlLcCfg
1943 uint8_t lcp; // logical Channel Prioritization
1946 /* Logical Channel configuration */
1947 typedef struct schLcCfg
1951 SchDrbQosInfo *drbQos;
1956 /* Aggregate max bit rate */
1957 typedef struct schAmbrCfg
1959 uint32_t ulBr; /* Ul BitRate */
1962 typedef struct schModulationInfo
1966 SchMcsTable mcsTable;
1969 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.5' UE Configuration Request*/
1970 typedef struct schUeCfgReq
1976 bool macCellGrpCfgPres;
1977 SchMacCellGrpCfg macCellGrpCfg;
1978 bool phyCellGrpCfgPres;
1979 SchPhyCellGrpCfg phyCellGrpCfg;
1981 SchSpCellCfg spCellCfg;
1982 SchAmbrCfg *ambrCfg;
1983 SchModulationInfo dlModInfo;
1984 SchModulationInfo ulModInfo;
1985 uint8_t numLcsToAdd;
1986 SchLcCfg schLcCfg[MAX_NUM_LC];
1989 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.6' UE Reconfiguration Request*/
1990 typedef struct schUeRecfgReq
1996 bool macCellGrpRecfgPres;
1997 SchMacCellGrpCfg macCellGrpRecfg;
1998 bool phyCellGrpRecfgPres;
1999 SchPhyCellGrpCfg phyCellGrpRecfg;
2000 bool spCellRecfgPres;
2001 SchSpCellRecfg spCellRecfg;
2002 SchAmbrCfg *ambrRecfg;
2003 SchModulationInfo dlModInfo;
2004 SchModulationInfo ulModInfo;
2005 uint8_t numLcsToAdd;
2006 SchLcCfg schLcCfgAdd[MAX_NUM_LC];
2007 uint8_t numLcsToDel;
2008 uint8_t lcIdToDel[MAX_NUM_LC];
2009 uint8_t numLcsToMod;
2010 SchLcCfg schLcCfgMod[MAX_NUM_LC];
2011 SchDataTransmission dataTransmissionInfo;
2013 bool drxConfigIndicatorRelease;
2017 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.5 UE Confg Response*/
2018 typedef struct schUeCfgRsp
2025 CauseOfResult cause;
2028 /*As per WG8 V7.0.0 Sec 11.2.4.3.6, UE ReCFG and UECFG have same structure definition*/
2029 typedef struct schUeCfgRsp SchUeRecfgRsp;
2031 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.7' Delete UE Request*/
2032 typedef struct schUeDelete
2038 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.7*/
2039 typedef struct schUeDeleteRsp
2044 CauseOfResult cause;
2047 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.8' DL HARQ Indication*/
2048 typedef struct dlHarqInd
2052 SlotTimingInfo slotInd;
2054 uint8_t harqPayload[MAX_HARQ_BITS_IN_BYTES];
2057 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.9' UL HARQ (CRC) Indication*/
2058 typedef struct crcIndInfo
2062 SlotTimingInfo timingInfo;
2064 uint8_t crcInd[MAX_NUMBER_OF_CRC_IND_BITS];
2067 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.10' UL Channel Quality Indication*/
2068 typedef struct ulCqiReport
2070 CqiUlReportType reportType;
2075 typedef struct schUlCqiInd
2079 SlotTimingInfo timingInfo;
2080 uint8_t numUlCqiReported;
2081 UlCqiReport ulCqiRpt;
2084 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.11' DL Channel Quality Indication*/
2085 typedef struct dlCqiReport
2087 uint8_t reportType; /*Bitmap for CQI, PMI, RI, CRI report*/
2094 typedef struct schDlCqiInd
2098 SlotTimingInfo timingInfo;
2099 uint8_t numDlCqiReported;
2100 DlCqiReport dlCqiRpt;
2103 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.12' Rach Ind contents*/
2104 typedef struct rachIndInfo
2108 SlotTimingInfo timingInfo;
2112 uint8_t preambleIdx;
2116 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.13' Paging Ind contents*/
2117 typedef struct schPageInd
2126 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.14 Rach Res Request*/
2127 typedef struct schRachRsrcReq
2129 SlotTimingInfo slotInd;
2133 uint8_t ssbIdx[MAX_NUM_SSB];
2136 typedef struct schCfraSsbResource
2139 uint8_t raPreambleIdx;
2140 }SchCfraSsbResource;
2142 typedef struct schCfraRsrc
2145 SchCfraSsbResource ssbResource[MAX_NUM_SSB];
2148 typedef struct schRachRsrcRsp
2153 SchCfraResource cfraResource;
2156 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.15 Rach Res Release*/
2157 typedef struct schRachRsrcRel
2159 SlotTimingInfo slotInd;
2162 SchCfraResource cfraResource;
2165 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.16 DL RLC Buffer Status Information*/
2166 typedef struct dlRlcBOInfo
2171 uint32_t dataVolume;
2174 /*O-RAN WG8 v7.0.0 Sec 11.2.4.2.17 Scheduling Request Indication*/
2175 typedef struct srUciIndInfo
2179 SlotTimingInfo slotInd;
2181 uint8_t srPayload[MAX_SR_BITS_IN_BYTES];
2184 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.18 UL RLC Buffer Status Information*/
2185 typedef struct dataVolInfo
2191 typedef struct ulBufferStatusRptInd
2197 DataVolInfo dataVolInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS];
2198 }UlBufferStatusRptInd;
2200 /**O-RAN WG* v7.0.0 Sec 11.2.4.2.19 Power Headroom Indication*/
2201 typedef struct phrData /*Spec 38.321 Sec 6.1.3.8*/
2207 typedef struct singlePhrInfo
2212 typedef struct multiPhr
2218 typedef struct multiplePhrInfo /*Spec 38.321 Sec 6.1.3.9*/
2220 uint8_t numPhrReported;
2221 MultiPhr multiPhrStat[MAX_PHR_REPORT];
2224 typedef struct schPwrHeadroomInd
2231 SinglePhrInfo singlePhr;
2232 MultiplePhrInfo multiPhr;
2236 typedef struct schUeHqInfo
2242 typedef struct schRlsHqInfo
2246 SchUeHqInfo *ueHqInfo;
2249 typedef struct schStatsInfo
2251 SchMeasurementType type;
2252 uint16_t periodicity; /* In milliseconds */
2255 typedef struct schStatsReq
2258 SchStatsInfo statsList[MAX_NUM_STATS];
2261 /* function declarations */
2262 uint8_t MacMessageRouter(Pst *pst, void *msg);
2263 uint8_t SchMessageRouter(Pst *pst, void *msg);
2265 /**********************************************************************
2267 **********************************************************************/