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
55 #define EVENT_STATISTICS_RSP_TO_MAC 36
56 #define EVENT_STATISTICS_IND_TO_MAC 37
57 #define EVENT_STATISTICS_DELETE_REQ_TO_SCH 38
58 #define EVENT_STATISTICS_DELETE_RSP_TO_MAC 39
59 #define EVENT_STATISTICS_MODIFY_REQ_TO_SCH 40
60 #define EVENT_STATISTICS_MODIFY_RSP_TO_MAC 41
63 #define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */
64 #define SCH_SSB_MASK_SIZE 1
66 #define MAX_NUM_PRG 1 /* max value should be later 275 */
67 #define MAX_DIG_BF_INTERFACES 0 /* max value should be later 255 */
68 #define MAX_CODEWORDS 1 /* max should be 2 */
69 #define SCH_HARQ_PROC_ID 1 /* harq proc id */
70 #define SCH_ALLOC_TYPE_1 1 /*sch res alloc type */
72 /* Datatype in UL SCH Info */
73 #define SCH_DATATYPE_PUSCH 1
74 #define SCH_DATATYPE_PUSCH_UCI 2
75 #define SCH_DATATYPE_UCI 4
76 #define SCH_DATATYPE_SRS 8
77 #define SCH_DATATYPE_PRACH 16
79 #define MAX_NUMBER_OF_CRC_IND_BITS 1
80 #define MAX_NUMBER_OF_UCI_IND_BITS 1
81 #define MAX_SR_BITS_IN_BYTES 1
82 #define MAX_HARQ_BITS_IN_BYTES 1
83 #define MAX_NUM_LOGICAL_CHANNEL_GROUPS 8
84 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
85 #define MAX_NUM_TAGS 4 /* Max number of timing advance groups */
86 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
87 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
88 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
89 #define FREQ_DOM_RSRC_SIZE 6 /* i.e. 6 bytes because Size of frequency domain resource is 45 bits */
90 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
91 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
92 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
94 /* PUCCH Configuration Macro */
95 #define MAX_NUM_PUCCH_RESRC 128
96 #define MAX_NUM_PUCCH_RESRC_SET 4
97 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
98 #define MAX_NUM_SPATIAL_RELATIONS 8
99 #define MAX_NUM_PUCCH_P0_PER_SET 8
100 #define MAX_NUM_PATH_LOSS_REF_RS 4
101 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
102 #define QPSK_MODULATION 2
104 #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 */
105 #define TX_PAYLOAD_HDR_LEN 32 /* Intel L1 requires adding a 32 byte header to transmitted payload */
106 #define UL_TX_BUFFER_SIZE 5
108 #define MAX_NUM_CONFIG_SLOTS 160 /*Max number of slots as per the numerology*/
109 #define MAX_NUM_K0_IDX 16 /* Max number of pdsch time domain downlink allocation */
110 #define MAX_NUM_K1_IDX 8 /* As per spec 38.213 section 9.2.3 Max number of PDSCH-to-HARQ resource indication */
111 #define MIN_NUM_K1_IDX 4 /* Min K1 values */
112 #define MAX_NUM_K2_IDX 16 /* PUSCH time domain UL resource allocation list */
113 #define DEFAULT_K0_VALUE 0 /* As per 38.331, PDSCH-TimeDomainResourceAllocation field descriptions */
114 /* As per 38.331, PUSCH-TimeDomainResourceAllocationList field descriptions */
115 #define DEFAULT_K2_VALUE_FOR_SCS15 1
116 #define DEFAULT_K2_VALUE_FOR_SCS30 1
117 #define DEFAULT_K2_VALUE_FOR_SCS60 2
118 #define DEFAULT_K2_VALUE_FOR_SCS120 3
121 #define DL_DMRS_SYMBOL_POS 4 /* Bitmap value 00000000000100 i.e. using 3rd symbol for PDSCH DMRS */
123 #define MAX_PHR_REPORT 1 /*TODO: Range of PHR reports in multiple PHR.*/
124 #define MAX_FAILURE_DET_RESOURCES 10 /*Spec 38.331 'maxNrofFailureDetectionResources'*/
126 /*As per SCF222_5GFAPI, 'MaxDciPerSlot' defines this value but this parameter value is missing in Spec.*/
128 #define MAX_NUM_PDCCH 1
130 #define MAX_NUM_PDCCH 2
133 #define ADD_DELTA_TO_TIME(crntTime, toFill, incr, numOfSlot) \
135 if ((crntTime.slot + incr) > (numOfSlot - 1)) \
137 toFill.sfn = (crntTime.sfn + 1); \
141 toFill.sfn = crntTime.sfn; \
143 toFill.slot = (crntTime.slot + incr) % numOfSlot; \
144 if (toFill.sfn >= MAX_SFN) \
146 toFill.sfn%=MAX_SFN; \
154 RRC_CONNECTED_USERS_RSRC
190 TIME_ALIGNMENT_TIMER_MS500,
191 TIME_ALIGNMENT_TIMER_MS750,
192 TIME_ALIGNMENT_TIMER_MS1280,
193 TIME_ALIGNMENT_TIMER_MS1920,
194 TIME_ALIGNMENT_TIMER_MS2560,
195 TIME_ALIGNMENT_TIMER_MS5120,
196 TIME_ALIGNMENT_TIMER_MS10240,
197 TIME_ALIGNMENT_TIMER_INFINITE
198 }SchTimeAlignmentTimer;
202 PHR_PERIODIC_TIMER_SF10,
203 PHR_PERIODIC_TIMER_SF20,
204 PHR_PERIODIC_TIMER_SF50,
205 PHR_PERIODIC_TIMER_SF100,
206 PHR_PERIODIC_TIMER_SF200,
207 PHR_PERIODIC_TIMER_SF500,
208 PHR_PERIODIC_TIMER_SF1000,
209 PHR_PERIODIC_TIMER_INFINITE
210 }SchPhrPeriodicTimer;
214 PHR_PROHIBIT_TIMER_SF0,
215 PHR_PROHIBIT_TIMER_SF10,
216 PHR_PROHIBIT_TIMER_SF20,
217 PHR_PROHIBIT_TIMER_SF50,
218 PHR_PROHIBIT_TIMER_SF100,
219 PHR_PROHIBIT_TIMER_SF200,
220 PHR_PROHIBIT_TIMER_SF500,
221 PHR_PROHIBIT_TIMER_SF1000
222 }SchPhrProhibitTimer;
226 PHR_TX_PWR_FACTOR_CHANGE_DB1,
227 PHR_TX_PWR_FACTOR_CHANGE_DB3,
228 PHR_TX_PWR_FACTOR_CHANGE_DB6,
229 PHR_TX_PWR_FACTOR_CHANGE_INFINITE
230 }SchPhrTxPwrFactorChange;
240 HARQ_ACK_CODEBOOK_SEMISTATIC,
241 HARQ_ACK_CODEBOOK_DYNAMIC
242 }SchPdschHarqAckCodebook;
246 NUM_HARQ_PROC_FOR_PDSCH_N2,
247 NUM_HARQ_PROC_FOR_PDSCH_N4,
248 NUM_HARQ_PROC_FOR_PDSCH_N6,
249 NUM_HARQ_PROC_FOR_PDSCH_N10,
250 NUM_HARQ_PROC_FOR_PDSCH_N16
251 }SchNumHarqProcForPdsch;
255 MAX_CODE_BLOCK_GROUP_PER_TB_N2,
256 MAX_CODE_BLOCK_GROUP_PER_TB_N4,
257 MAX_CODE_BLOCK_GROUP_PER_TB_N6,
258 MAX_CODE_BLOCK_GROUP_PER_TB_N8
259 }SchMaxCodeBlkGrpPerTB;
263 PDSCH_X_OVERHEAD_XOH_6,
264 PDSCH_X_OVERHEAD_XOH_12,
265 PDSCH_X_OVERHEAD_XOH_18
270 DMRS_ADDITIONAL_POS0,
271 DMRS_ADDITIONAL_POS1,
273 }SchDmrsAdditionPosition;
277 RESOURCE_ALLOCTION_TYPE_0,
278 RESOURCE_ALLOCTION_TYPE_1,
279 RESOURCE_ALLOCTION_DYN_SWITCH
280 }SchResourceAllocType;
284 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_A,
285 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_B
286 }SchTimeDomRsrcAllocMappingType;
290 ENABLED_TRANSFORM_PRECODER,
291 DISABLED_TRANSFORM_PRECODER
292 }SchTransformPrecoder;
296 INTERLEAVED_CCE_REG_MAPPING = 1,
297 NONINTERLEAVED_CCE_REG_MAPPING
302 SLOT_PERIODICITY_SL_1 = 1,
303 SLOT_PERIODICITY_SL_2,
304 SLOT_PERIODICITY_SL_4,
305 SLOT_PERIODICITY_SL_5,
306 SLOT_PERIODICITY_SL_8,
307 SLOT_PERIODICITY_SL_10,
308 SLOT_PERIODICITY_SL_16,
309 SLOT_PERIODICITY_SL_20,
310 SLOT_PERIODICITY_SL_40,
311 SLOT_PERIODICITY_SL_80,
312 SLOT_PERIODICITY_SL_160,
313 SLOT_PERIODICITY_SL_320,
314 SLOT_PERIODICITY_SL_640,
315 SLOT_PERIODICITY_SL_1280,
316 SLOT_PERIODICITY_SL_2560
317 }SchMSlotPeriodicity;
327 SEARCH_SPACE_TYPE_COMMON = 1,
328 SEARCH_SPACE_TYPE_UE_SPECIFIC
333 SCH_QOS_NON_DYNAMIC = 1,
339 AGGREGATION_LEVEL_N0,
340 AGGREGATION_LEVEL_N1,
341 AGGREGATION_LEVEL_N2,
342 AGGREGATION_LEVEL_N3,
343 AGGREGATION_LEVEL_N4,
344 AGGREGATION_LEVEL_N5,
345 AGGREGATION_LEVEL_N6,
357 CODE_WORDS_SCHED_BY_DCI_N1,
358 CODE_WORDS_SCHED_BY_DCI_N2
359 }SchCodeWordsSchedByDci;
363 STATIC_BUNDLING_TYPE = 1,
364 DYNAMIC_BUNDLING_TYPE
370 SCH_SET1_SIZE_WIDEBAND,
371 SCH_SET1_SIZE_N2_WIDEBAND,
372 SCH_SET1_SIZE_N4_WIDEBAND
373 }SchBundlingSizeSet1;
378 SCH_SET2_SIZE_WIDEBAND
379 }SchBundlingSizeSet2;
433 SCH_MCS_TABLE_QAM_64,
434 SCH_MCS_TABLE_QAM_256,
435 SCH_MCS_TABLE_QAM_64_LOW_SE
448 DATA_TRANSMISSION_ALLOWED,
449 STOP_DATA_TRANSMISSION,
450 RESTART_DATA_TRANSMISSION
451 }SchDataTransmission;
458 }SchPurposeOfFailureDet;
466 /* Performance measurements from 3GPP TS 28.552 Release 15 */
469 SCH_DL_TOTAL_PRB_USAGE,
470 SCH_UL_TOTAL_PRB_USAGE
474 typedef struct timeDomainAlloc
480 typedef struct resAllocType0
482 uint8_t rbBitmap[36];
485 typedef struct resAllocType1
491 typedef struct resAllocType1 FreqDomainRsrc;
493 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-32 BWP Information */
494 typedef struct bwpCfg
496 uint8_t subcarrierSpacing;
497 uint8_t cyclicPrefix;
498 FreqDomainRsrc freqAlloc;
504 uint16_t beamIdx[MAX_DIG_BF_INTERFACES];
507 typedef struct beamformingInfo
511 uint8_t digBfInterfaces;
512 Prg prg[MAX_NUM_PRG];
515 /* SIB1 PDSCH structures */
517 typedef struct codewordinfo
519 uint16_t targetCodeRate;
527 typedef struct dmrsInfo
529 uint16_t dlDmrsSymbPos;
530 uint8_t dmrsConfigType;
531 uint16_t dlDmrsScramblingId;
533 uint8_t numDmrsCdmGrpsNoData;
536 uint8_t nrOfDmrsSymbols;
540 typedef struct pdschFreqAlloc
542 uint8_t resourceAllocType;
543 /* since we are using type-1, rbBitmap excluded */
544 uint8_t rbBitmap[36];
547 uint8_t vrbPrbMapping;
550 typedef struct pdschTimeAlloc
557 typedef struct txPowerPdschInfo
559 uint8_t powerControlOffset;
560 uint8_t powerControlOffsetSS;
563 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-43 PDSCH Configuration */
564 typedef struct pdschCfg
569 uint8_t numCodewords;
570 CodewordInfo codeword[MAX_CODEWORDS];
571 uint16_t dataScramblingId;
573 uint8_t transmissionScheme;
576 PdschFreqAlloc pdschFreqAlloc;
577 PdschTimeAlloc pdschTimeAlloc;
578 BeamformingInfo beamPdschInfo;
579 TxPowerPdschInfo txPdschPower;
581 /* SIB1 PDSCH structures end */
583 /* SIB1 interface structure */
585 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-35 CORESET Configuration */
586 typedef struct coresetCfg
589 uint8_t startSymbolIndex;
590 uint8_t durationSymbols;
591 uint8_t freqDomainResource[6];
592 uint8_t cceRegMappingType;
593 uint8_t regBundleSize;
594 uint8_t interleaverSize;
597 uint8_t coresetPoolIndex;
598 uint8_t precoderGranularity;
600 uint8_t aggregationLevel;
603 typedef struct txPowerPdcchInfo
605 uint8_t beta_pdcch_1_0;
606 uint8_t powerControlOffsetSS;
609 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-42 DL-DCI Configuration */
613 uint16_t scramblingId;
614 uint16_t scramblingRnti;
617 BeamformingInfo beamPdcchInfo;
618 TxPowerPdcchInfo txPdcchPower;
622 typedef struct pdcchCfg
624 /* coreset-0 configuration */
625 CoresetCfg coresetCfg;
627 DlDCI dci[MAX_NUM_PDCCH];
629 /* end of SIB1 PDCCH structures */
631 typedef struct schPcchCfg
633 uint8_t numPO; /*Derived from Ns*/
634 bool poPresent; /*FirstPDCCH-MonitoringPO is present or not*/
635 uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
638 typedef struct schPdcchConfigSib1
640 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
641 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
644 typedef struct schRachCfgGeneric
646 uint8_t prachCfgIdx; /* PRACH config idx */
647 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
648 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
649 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
650 int16_t preambleRcvdTargetPower;
651 uint8_t preambleTransMax;
652 uint8_t pwrRampingStep;
653 uint8_t raRspWindow; /* RA Response Window */
656 typedef struct schRachCfg
658 SchRachCfgGeneric prachCfgGeneric;
659 uint8_t totalNumRaPreamble; /* Total number of RA preambles */
660 uint8_t ssbPerRach; /* SSB per RACH occassion */
661 uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */
662 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
663 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
664 uint16_t rootSeqIdx; /* Root sequence index */
665 uint16_t rootSeqLen; /* root sequence length */
666 uint8_t numRootSeq; /* Number of root sequences required for FD */
667 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
670 typedef struct schBwpParams
672 FreqDomainRsrc freqAlloc;
674 uint8_t cyclicPrefix;
677 typedef struct schCandidatesInfo
686 typedef struct schSearchSpaceCfg
688 uint8_t searchSpaceId;
690 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
691 uint16_t monitoringSlot;
693 uint16_t monitoringSymbol;
694 SchCandidatesInfo candidate;
697 typedef struct schPdcchCfgCmn
699 SchSearchSpaceCfg commonSearchSpace;
700 uint8_t raSearchSpaceId;
703 typedef struct schPdschCfgCmnTimeDomRsrcAlloc
708 uint8_t lengthSymbol;
709 }SchPdschCfgCmnTimeDomRsrcAlloc;
711 typedef struct schPdschCfgCmn
713 uint8_t numTimeDomAlloc;
714 SchPdschCfgCmnTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
717 typedef struct schPucchCfgCmn
719 uint8_t pucchResourceCommon;
720 uint8_t pucchGroupHopping;
723 /* PUSCH Time Domain Resource Allocation */
724 typedef struct schPuschTimeDomRsrcAlloc
727 SchTimeDomRsrcAllocMappingType mappingType;
729 uint8_t symbolLength;
730 }SchPuschTimeDomRsrcAlloc;
732 typedef struct schPuschCfgCmn
734 uint8_t numTimeDomRsrcAlloc;
735 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
738 typedef struct schK1TimingInfo
741 uint8_t k1Indexes[MAX_NUM_K1_IDX];
744 typedef struct schK0TimingInfo
747 SchK1TimingInfo k1TimingInfo;
750 typedef struct schK0K1TimingInfo
753 SchK0TimingInfo k0Indexes[MAX_NUM_K0_IDX];
756 typedef struct schK0K1TimingInfoTbl
759 SchK0K1TimingInfo k0k1TimingInfo[MAX_NUM_CONFIG_SLOTS];
760 }SchK0K1TimingInfoTbl;
762 typedef struct schBwpDlCfg
765 SchPdcchCfgCmn pdcchCommon;
766 SchPdschCfgCmn pdschCommon;
769 typedef struct schK2TimingInfo
772 uint8_t k2Indexes[MAX_NUM_K2_IDX];
775 typedef struct schK2TimingInfoTbl
778 SchK2TimingInfo k2TimingInfo[MAX_NUM_CONFIG_SLOTS];
781 typedef struct schBwpUlCfg
784 SchRachCfg schRachCfg; /* PRACH config */
785 SchPucchCfgCmn pucchCommon;
786 SchPuschCfgCmn puschCommon;
789 typedef struct schPlmnInfoList
792 SupportedSliceList suppSliceList;
796 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
798 typedef struct schDrxOnDurationTimer
800 bool onDurationTimerValInMs;
803 uint8_t subMilliSeconds;
804 uint16_t milliSeconds;
805 }onDurationtimerValue;
806 }SchDrxOnDurationTimer;
808 typedef struct schDrxLongCycleStartOffset
810 uint16_t drxLongCycleStartOffsetChoice;
811 uint16_t drxLongCycleStartOffsetVal;
812 }SchDrxLongCycleStartOffset;
814 typedef struct schShortDrx
816 uint16_t drxShortCycle;
817 uint8_t drxShortCycleTimer;
820 typedef struct schDrxCfg
822 SchDrxOnDurationTimer drxOnDurationTimer;
823 uint16_t drxInactivityTimer;
824 uint8_t drxHarqRttTimerDl;
825 uint8_t drxHarqRttTimerUl;
826 uint16_t drxRetransmissionTimerDl;
827 uint16_t drxRetransmissionTimerUl;
828 SchDrxLongCycleStartOffset drxLongCycleStartOffset;
830 SchShortDrx shortDrx;
831 uint8_t drxSlotOffset;
835 /*Spec 38.331 'NrNsPmaxList'*/
836 typedef struct schNrNsPmaxList
839 long additionalSpectrumEmission;
842 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
843 typedef struct schMultiFreqBandListSib
846 SchNrNsPmaxList nrNsPmaxList[1];
847 }SchMultiFreqBandListSib;
849 /*Spec 38.331 'SCS-SpecificCarrier'*/
850 typedef struct schScsSpecificCarrier
852 uint16_t offsetToCarrier;
853 uint8_t subCarrierSpacing;
855 uint16_t txDirectCurrentLoc;
856 }SchScsSpecificCarrier;
858 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
859 typedef struct schFreqInfoDlSib
861 SchMultiFreqBandListSib mutiFreqBandList[1];
862 uint16_t offsetToPointA;
863 SchScsSpecificCarrier schSpcCarrier[1];
866 typedef struct schBcchCfg
871 /*Spec 38.331 'DownlinkConfigCommonSIB'*/
872 typedef struct schDlCfgCommon
874 SchFreqInfoDlSib schFreqInfoDlSib;
875 SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */
876 SchBcchCfg schBcchCfg;
877 SchPcchCfg schPcchCfg;
880 /*Spec 38.331 'FrequencyInfoUL-SIB'*/
881 typedef struct schFreqInfoUlSib
883 SchMultiFreqBandListSib mutiFreqBandList[1];
884 uint16_t absoluteFreqPointA;
885 SchScsSpecificCarrier schSpcCarrier[1];
887 bool frequencyShift7p5khz;
890 /*Spec 38.331 'UplinkConfigCommonSIB '*/
891 typedef struct schUlCfgCommon
893 SchFreqInfoUlSib schFreqInfoUlSib;
894 SchBwpUlCfg schInitialUlBwp; /* Initial DL BWP */
895 uint16_t schTimeAlignTimer;
898 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.1 Cell Conf Request*/
899 typedef struct schCellCfg
901 uint16_t cellId; /* Cell Id */
905 uint16_t phyCellId; /* Physical cell id */
906 SchPlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */
907 SchDuplexMode dupMode; /* Duplex type: TDD/FDD */
908 uint8_t dlBandwidth; /* Supported B/W */
909 uint8_t ulBandwidth; /* Supported B/W */
910 SchDlCfgCommon dlCfgCommon; /*Spec 38.331 DownlinkConfigCommonSIB*/
911 SchUlCfgCommon ulCfgCommon; /*Spec 38.331 UplinkConfigCommonSIB*/
913 TDDCfg tddCfg; /* Spec 38.331 tdd-UL-DL-ConfigurationCommon */
916 /*Ref:Spec 38.331 "ssb-PositionsInBurst", Value 0 in Bitmap => corresponding SS/PBCH block is not transmitted
917 *value 1 => corresponding SS/PBCH block is transmitted*/
918 uint32_t ssbPosInBurst[SCH_SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
919 SchSSBPeriod ssbPeriod; /* SSB Periodicity in msec */
920 uint32_t ssbFrequency; /* SB frequency in kHz*/
921 uint8_t dmrsTypeAPos;
922 uint8_t ssbScs; /* SSB subcarrier spacing*/
923 SchPdcchConfigSib1 pdcchCfgSib1; /* Req to configure CORESET#0 and SearchSpace#0*/
924 uint32_t ssbPbchPwr; /* SSB block power */
925 uint8_t ssbSubcOffset; /* Subcarrier Offset(Kssb) */
929 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.1 Cell Config Response*/
930 typedef struct schCellCfgCfm
932 uint16_t cellId; /* Cell Id */
937 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.2 Cell Del Req*/
938 typedef struct schCellDeleteReq
943 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.2 Cell Del Response*/
944 typedef struct schCellDeleteRsp
951 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.3*/
952 typedef struct schRrmPolicyRatio
956 uint8_t dedicatedRatio;
959 typedef struct schRrmPolicyOfSlice
962 SchRrmPolicyRatio rrmPolicyRatioInfo;
963 }SchRrmPolicyOfSlice;
965 typedef struct schSliceCfgReq
967 uint8_t numOfConfiguredSlice;
968 SchRrmPolicyOfSlice **listOfSlices;
971 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.3 Slice Cfg Response*/
972 typedef struct schSliceCfgRsp
979 /*As per ORAN-WG8 V7.0.0 Sec 11.2.4.3.4 , Slice Cfg and Recfg are same structures*/
980 typedef struct schSliceCfgReq SchSliceRecfgReq;
981 typedef struct schSliceCfgRsp SchSliceRecfgRsp;
983 typedef struct ssbInfo
985 uint8_t ssbIdx; /* SSB Index */
986 TimeDomainAlloc tdAlloc; /* Time domain allocation */
987 FreqDomainRsrc fdAlloc; /* Freq domain allocation */
990 typedef struct sib1AllocInfo
993 PdcchCfg *sib1PdcchCfg;
996 typedef struct prachSchInfo
998 uint8_t numPrachOcas; /* Num Prach Ocassions */
999 uint8_t prachFormat; /* PRACH Format */
1000 uint8_t numRa; /* Freq domain ocassion */
1001 uint8_t prachStartSymb; /* Freq domain ocassion */
1004 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
1005 typedef struct dlBrdcstAlloc
1007 uint16_t crnti; /* SI-RNTI */
1008 /* Ssb transmission is determined as follows:
1009 * 0 : No tranamission
1010 * 1 : SSB Transmission
1011 * 2 : SSB Repetition */
1012 uint8_t ssbTransmissionMode;
1013 uint8_t ssbIdxSupported;
1014 SsbInfo ssbInfo[MAX_SSB_IDX];
1015 bool systemInfoIndicator;
1017 /* Sib1 transmission is determined as follows:
1018 * 0 : No tranamission
1019 * 1 : SIB1 Transmission
1020 * 2 : SIB1 Repetition */
1021 uint8_t sib1TransmissionMode;
1022 Sib1AllocInfo sib1Alloc;
1025 typedef struct msg3UlGrant
1027 uint8_t freqHopFlag;
1029 FreqDomainRsrc msg3FreqAlloc;
1036 typedef struct rarInfo
1040 Msg3UlGrant ulGrant;
1042 uint8_t rarPdu[RAR_PAYLOAD_SIZE];
1046 typedef struct rarAlloc
1051 PdcchCfg *rarPdcchCfg;
1052 PdschCfg *rarPdschCfg;
1055 typedef struct lcSchInfo
1061 typedef struct ceSchInfo
1067 typedef struct freqDomainAlloc
1069 uint8_t resAllocType; /* Resource allocation type */
1072 ResAllocType0 type0;
1073 ResAllocType1 type1;
1077 typedef struct transportBlock
1084 CeSchInfo ceSchInfo[MAX_NUM_LC];
1086 LcSchInfo lcSchInfo[MAX_NUM_LC];
1089 typedef struct dlMsgSchedInfo
1092 uint8_t dciFormatId;
1093 uint8_t harqProcNum;
1095 uint8_t dlAssignIdx;
1097 uint8_t pucchResInd;
1098 uint8_t harqFeedbackInd;
1099 uint16_t dlMsgPduLen;
1101 FreqDomainAlloc freqAlloc;
1102 TimeDomainAlloc timeAlloc;
1104 TransportBlock transportBlock[2];
1106 PdcchCfg *dlMsgPdcchCfg;
1107 PdschCfg *dlMsgPdschCfg;
1110 typedef struct schSlotValue
1112 SlotTimingInfo currentTime;
1113 SlotTimingInfo broadcastTime;
1114 SlotTimingInfo rarTime;
1115 SlotTimingInfo dlMsgTime;
1116 SlotTimingInfo ulDciTime;
1120 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-36 DCI Format0_0 Configuration */
1121 typedef struct format0_0
1123 uint8_t resourceAllocType;
1124 FreqDomainAlloc freqAlloc;
1125 TimeDomainAlloc timeAlloc;
1136 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-40 DCI Format 0_1 Configuration */
1137 typedef struct format0_1
1139 uint8_t carrierIndicator;
1141 uint8_t bwpIndicator;
1142 uint8_t resourceAlloc;
1143 FreqDomainRsrc freqAlloc;
1144 TimeDomainAlloc timeAlloc;
1151 uint8_t firstDownlinkAssignmentIndex;
1152 uint8_t secondDownlinkAssignmentIndex;
1154 uint8_t srsResourceSetIndicator;
1155 uint8_t srsResourceIndicator;
1157 uint8_t antennaPorts;
1160 uint8_t cbgTransmissionInfo;
1162 uint8_t betaOffsetIndicator;
1163 bool dmrsSequenceInitialization;
1164 bool ulschIndicatior;
1167 typedef struct dciFormat
1169 FormatType formatType; /* DCI Format */
1172 Format0_0 format0_0; /* Format 0_0 */
1173 Format0_1 format0_1; /* Format 0_1 */
1177 typedef struct dciInfo
1179 uint16_t crnti; /* CRNTI */
1180 BwpCfg bwpCfg; /* BWP Cfg */
1181 CoresetCfg coresetCfg; /* Coreset1 Cfg */
1182 DciFormat dciFormatInfo; /* Dci Format */
1183 DlDCI dciInfo; /* DlDCI */
1187 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.8 DL Scheduling Information */
1188 typedef struct dlSchedInfo
1190 uint16_t cellId; /* Cell Id */
1191 SchSlotValue schSlotValue;
1193 /* Allocation for broadcast messages */
1194 bool isBroadcastPres;
1195 DlBrdcstAlloc brdcstAlloc;
1197 /* Allocation for RAR message */
1198 RarAlloc *rarAlloc[MAX_NUM_UE];
1200 /* UL grant in response to BSR */
1203 /* Allocation from dedicated DL msg */
1204 DlMsgSchInfo *dlMsgAlloc[MAX_NUM_UE];
1208 /*Reference: O-RAN.WG8.AAD.v7.0.0, Sec 11.2.4.3.13 Downlink Paging Allocation*/
1209 typedef struct interleaved_t
1211 uint8_t regBundleSize;
1212 uint8_t interleaverSize;
1213 uint16_t shiftIndex;
1216 typedef struct pageDlDci
1218 uint8_t freqDomainResource[6];
1219 uint8_t durationSymbols;
1220 uint8_t cceRegMappingType;
1223 Interleaved interleaved;
1224 uint8_t nonInterleaved;
1226 uint8_t ssStartSymbolIndex;
1228 uint8_t aggregLevel;
1229 uint8_t precoderGranularity;
1230 uint8_t coreSetSize;
1233 typedef struct resAllocType1 PageFreqDomainAlloc;
1235 typedef struct pageTimeDomainAlloc
1237 uint8_t mappingType;
1240 }PageTimeDomainAlloc;
1242 typedef struct pageDmrsConfig
1246 uint8_t nrOfDmrsSymbols;
1249 typedef struct pageTbInfo
1255 typedef struct pageDlSch
1257 PageFreqDomainAlloc freqAlloc;
1258 PageTimeDomainAlloc timeAlloc;
1259 PageDmrsConfig dmrs;
1260 uint8_t vrbPrbMapping;
1263 uint16_t dlPagePduLen;
1267 typedef struct dlPageAlloc
1270 SlotTimingInfo dlPageTime;
1275 PageDlDci pageDlDci;
1276 PageDlSch pageDlSch;
1279 typedef struct tbInfo
1281 uint8_t mcs; /* MCS */
1282 uint8_t ndi; /* NDI */
1283 uint8_t rv; /* Redundancy Version */
1284 uint16_t tbSize; /* TB Size */
1285 uint8_t qamOrder; /* Modulation Order */
1286 SchMcsTable mcsTable; /* MCS Table */
1289 typedef struct schPuschInfo
1291 uint8_t harqProcId; /* HARQ Process ID */
1292 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1293 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1294 TbInfo tbInfo; /* TB info */
1296 uint8_t dmrsMappingType;
1297 uint8_t nrOfDmrsSymbols;
1302 typedef struct harqInfo
1304 uint16_t harqAckBitLength;
1305 uint8_t betaOffsetHarqAck;
1308 typedef struct csiInfo
1311 uint8_t betaOffsetCsi;
1314 typedef struct harqFdbkInfo
1316 uint16_t harqBitLength;
1319 typedef struct csiFdbkInfo
1324 typedef struct schPucchFormatCfg
1326 uint8_t interSlotFreqHop;
1328 uint8_t maxCodeRate;
1334 typedef struct schPucchInfo
1336 FreqDomainRsrc fdAlloc;
1337 TimeDomainAlloc tdAlloc;
1339 HarqFdbkInfo harqInfo;
1340 CsiFdbkInfo csiInfo;
1341 BeamformingInfo beamPucchInfo;
1342 uint8_t pucchFormat;
1343 uint8_t intraFreqHop;
1344 uint16_t secondPrbHop;
1345 uint8_t initialCyclicShift;
1353 typedef struct schPuschUci
1355 uint8_t harqProcId; /* HARQ Process ID */
1356 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1357 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1358 TbInfo tbInfo; /* TB information */
1359 HarqInfo harqInfo; /* Harq Information */
1360 CsiInfo csiInfo; /* Csi information*/
1363 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.9 UL Scheduling Information */
1364 typedef struct ulSchedInfo
1366 uint16_t cellId; /* Cell Id */
1367 uint16_t crnti; /* CRNI */
1368 SlotTimingInfo slotIndInfo; /* Slot Info: sfn, slot number */
1369 uint8_t dataType; /* Type of info being scheduled */
1370 SchPrachInfo prachSchInfo; /* Prach scheduling info */
1371 SchPuschInfo schPuschInfo; /* Pusch scheduling info */
1372 SchPuschUci schPuschUci; /* Pusch Uci */
1373 SchPucchInfo schPucchInfo; /* Pucch and Uci scheduling info */
1376 /* Info of Scheduling Request to Add/Modify */
1377 typedef struct schSchedReqInfo
1380 SchSrProhibitTimer srProhibitTmr;
1381 SchSrTransMax srTransMax;
1384 /* Scheduling Request Configuration */
1385 typedef struct schSchedReqCfg
1387 uint8_t addModListCount;
1388 SchSchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
1389 uint8_t relListCount;
1390 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
1393 /* Info of Tag to Add/Modify */
1394 typedef struct schTagInfo
1397 SchTimeAlignmentTimer timeAlignmentTmr;
1400 /* Timing Advance Group Configuration */
1401 typedef struct schTagCfg
1403 uint8_t addModListCount;
1404 SchTagInfo addModList[MAX_NUM_TAGS]; /* List of Tag to Add/Modify */
1405 uint8_t relListCount;
1406 uint8_t relList[MAX_NUM_TAGS]; /* list of Tag Id to release */
1409 /* Configuration for Power headroom reporting */
1410 typedef struct schPhrCfg
1412 SchPhrPeriodicTimer periodicTmr;
1413 SchPhrProhibitTimer prohibitTmr;
1414 SchPhrTxPwrFactorChange txpowerFactorChange;
1417 bool type2OtherCell;
1418 SchPhrModeOtherCG modeOtherCG;
1421 /* MAC cell Group configuration */
1422 typedef struct schMacCellGrpCfg
1424 SchSchedReqCfg schedReqCfg;
1426 SchPhrCfg phrCfg; /* To be used only if phrCfgSetupPres is true */
1429 SchDrxCfg drxCfg; /* Drx configuration */
1433 /* Physical Cell Group Configuration */
1434 typedef struct schPhyCellGrpCfg
1436 SchPdschHarqAckCodebook pdschHarqAckCodebook;
1440 /* Control resource set info */
1441 typedef struct schControlRsrcSet
1443 uint8_t cRSetId; /* Control resource set id */
1444 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
1446 SchREGMappingType cceRegMappingType;
1447 SchPrecoderGranul precoderGranularity;
1448 uint16_t dmrsScramblingId;
1451 /*Slot Perioicity and Offset*/
1452 typedef struct schMSlotPeriodAndOffset
1454 SchMSlotPeriodicity mSlotPeriodicity;
1455 uint16_t mSlotOffset;
1456 }SchMSlotPeriodAndOffset;
1458 /* Search Space info */
1459 typedef struct schSearchSpace
1461 uint8_t searchSpaceId;
1463 SchMSlotPeriodAndOffset mSlotPeriodicityAndOffset;
1464 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1465 SchAggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
1466 SchAggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
1467 SchAggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
1468 SchAggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
1469 SchAggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
1470 SchSearchSpaceType searchSpaceType;
1471 uint8_t ueSpecificDciFormat;
1474 /* PDCCH cofniguration */
1475 typedef struct schPdcchConfig
1477 uint8_t numCRsetToAddMod;
1478 SchControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
1479 uint8_t numCRsetToRel;
1480 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
1481 uint8_t numSearchSpcToAddMod;
1482 SchSearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
1483 uint8_t numSearchSpcToRel;
1484 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
1487 /* PDSCH time domain resource allocation */
1488 typedef struct schPdschTimeDomRsrcAlloc
1491 SchTimeDomRsrcAllocMappingType mappingType;
1492 uint8_t startSymbol;
1493 uint8_t symbolLength;
1494 }SchPdschTimeDomRsrcAlloc;
1497 typedef struct schPdschBundling
1499 struct schStaticBundling
1501 SchBundlingSizeSet2 size;
1503 struct schDynamicBundling
1505 SchBundlingSizeSet1 sizeSet1;
1506 SchBundlingSizeSet2 sizeSet2;
1507 }SchDynamicBundling;
1510 /* DMRS downlink configuration */
1511 typedef struct schDmrsDlCfg
1513 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1516 /* PDSCH Configuration */
1517 typedef struct schPdschConfig
1519 SchDmrsDlCfg dmrsDlCfgForPdschMapTypeA;
1520 SchResourceAllocType resourceAllocType;
1521 uint8_t numTimeDomRsrcAlloc;
1522 SchPdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1524 SchCodeWordsSchedByDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
1525 SchBundlingType bundlingType;
1526 SchPdschBundling bundlingInfo;
1529 /* Initial Downlink BWP */
1530 typedef struct schInitalDlBwp
1533 SchPdcchConfig pdcchCfg;
1535 SchPdschConfig pdschCfg;
1538 /*Spec 38.331 'RadioLinkMonitoringConfig'*/
1539 typedef uint8_t SchRadioLinkMonitoringRsId;
1541 typedef struct schRadioLinkMonRS
1543 SchRadioLinkMonitoringRsId radioLinkMonitoringRsId;
1544 SchPurposeOfFailureDet purpose;
1548 uint8_t nzpCsiRsResId;
1552 typedef struct schRadioLinkConfig
1554 SchRadioLinkMonRS failurDetResAddModList[MAX_FAILURE_DET_RESOURCES];
1555 SchRadioLinkMonitoringRsId failurDetResRelList[MAX_FAILURE_DET_RESOURCES];
1556 uint8_t beamFailureInstanceMaxCount;
1557 uint8_t beamFailureDetectionTimer;
1558 }SchRadioLinkConfig;
1560 /*Spec 38.331 "SPS-Config'*/
1561 typedef struct schSpsConfig
1563 uint16_t periodicity;
1564 uint8_t numOfHqProcess;
1566 SchMcsTable mcsTable;
1569 /* Spec 38.331, 'BWP-DownlinkDedicated'*/
1570 typedef struct schBwpDlCfgDed
1572 SchPdcchConfig pdcchCfgDed;
1573 SchPdschConfig pdschCfgDed;
1574 SchSpsConfig spsCfgDed;
1575 SchRadioLinkConfig radioLnkMonCfgDed;
1578 /* Spec 38.331, 'BWP-Downlink' Downlink BWP information */
1579 typedef struct schDlBwpInfo
1582 SchBwpDlCfg bwpCommon;
1583 SchBwpDlCfgDed bwpDedicated;
1586 /* PDCCH Serving Cell configuration */
1587 typedef struct schPdschServCellCfg
1589 uint8_t *maxMimoLayers;
1590 SchNumHarqProcForPdsch numHarqProcForPdsch;
1591 SchMaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
1592 bool *codeBlkGrpFlushInd;
1593 SchPdschXOverhead *xOverhead;
1594 }SchPdschServCellCfg;
1596 typedef struct schRaPrioritization
1598 uint8_t powerRampingStepHighPriority;
1599 uint8_t scalingFactorBI;
1600 }SchRaPrioritization;
1602 typedef struct schBfrCsiRsRes
1606 uint8_t raPreambleIndex;
1609 typedef struct schBfrSsbRes
1612 uint8_t raPreambleIndex;
1615 typedef struct schPrachResDedBfr
1618 SchBfrCsiRsRes csiRs;
1621 /*Spec 38.331 'BeamFailureRecoveryConfig' */
1622 typedef struct schBeamFailRecoveryCfg
1624 uint8_t rootSeqIndexBfr;
1625 SchRachCfgGeneric rachCfgBfr;
1626 uint8_t rsrpThreshSsbBfr; /* RSRP Threshold SSB */
1627 SchPrachResDedBfr candidateBeamRSList;
1628 uint8_t ssbPerRachBfr; /* SSB per RACH occassion */
1629 uint8_t raSsbOccMaskIndex;
1630 uint8_t recoverySearchSpaceId;
1631 SchRaPrioritization raPrioBfr;
1633 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
1634 }SchBeamFailRecoveryCfg;
1636 /* PUCCH Configuration */
1637 typedef struct schPucchResrcSetInfo
1640 uint8_t resrcListCount;
1641 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1642 uint8_t maxPayLoadSize;
1643 }SchPucchResrcSetInfo;
1645 typedef struct schPucchResrcSetCfg
1647 uint8_t resrcSetToAddModListCount;
1648 SchPucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1649 uint8_t resrcSetToRelListCount;
1650 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1651 }SchPucchResrcSetCfg;
1653 typedef struct schPucchFormat0
1655 uint8_t initialCyclicShift;
1657 uint8_t startSymbolIdx;
1660 typedef struct schPucchFormat1
1662 uint8_t initialCyclicShift;
1664 uint8_t startSymbolIdx;
1668 typedef struct schPucchFormat2_3
1672 uint8_t startSymbolIdx;
1675 typedef struct schPucchFormat4
1680 uint8_t startSymbolIdx;
1683 typedef struct schPucchResrcInfo
1687 uint8_t intraFreqHop;
1688 uint16_t secondPrbHop;
1689 uint8_t pucchFormat;
1691 SchPucchFormat0 *format0;
1692 SchPucchFormat1 *format1;
1693 SchPucchFormat2_3 *format2;
1694 SchPucchFormat2_3 *format3;
1695 SchPucchFormat4 *format4;
1699 typedef struct schPucchResrcCfg
1701 uint8_t resrcToAddModListCount;
1702 SchPucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1703 uint8_t resrcToRelListCount;
1704 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1708 typedef struct schSchedReqResrcInfo
1712 uint8_t periodicity;
1715 }SchSchedReqResrcInfo;
1717 typedef struct schPucchSchedReqCfg
1719 uint8_t schedAddModListCount;
1720 SchSchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1721 uint8_t schedRelListCount;
1722 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1723 }SchPucchSchedReqCfg;
1725 typedef struct schSpatialRelationInfo
1727 uint8_t spatialRelationId;
1728 uint8_t servCellIdx;
1729 uint8_t pathLossRefRSId;
1731 uint8_t closeLoopIdx;
1732 }SchSpatialRelationInfo;
1734 typedef struct schPucchSpatialCfg
1736 uint8_t spatialAddModListCount;
1737 SchSpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1738 uint8_t spatialRelListCount;
1739 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1740 }SchPucchSpatialCfg;
1742 typedef struct schP0PucchCfg
1748 typedef struct schPathLossRefRSCfg
1750 uint8_t pathLossRefRSId;
1751 }SchPathLossRefRSCfg;
1753 typedef struct schPucchMultiCsiCfg
1755 uint8_t multiCsiResrcListCount;
1756 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1757 }SchPucchMultiCsiCfg;
1759 typedef struct schPucchDlDataToUlAck
1761 uint8_t dlDataToUlAckListCount;
1762 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1763 }SchPucchDlDataToUlAck;
1765 typedef struct schPucchPowerControl
1773 SchP0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1774 uint8_t pathLossRefRSListCount;
1775 SchPathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1776 }SchPucchPowerControl;
1778 typedef struct schPucchCfg
1780 SchPucchResrcSetCfg *resrcSet;
1781 SchPucchResrcCfg *resrc;
1782 SchPucchFormatCfg *format1;
1783 SchPucchFormatCfg *format2;
1784 SchPucchFormatCfg *format3;
1785 SchPucchFormatCfg *format4;
1786 SchPucchSchedReqCfg *schedReq;
1787 SchPucchMultiCsiCfg *multiCsiCfg;
1788 SchPucchSpatialCfg *spatialInfo;
1789 SchPucchDlDataToUlAck *dlDataToUlAck;
1790 SchPucchPowerControl *powerControl;
1793 /* Transform precoding disabled */
1794 typedef struct schTransPrecodDisabled
1796 uint16_t scramblingId0;
1797 }SchTransPrecodDisabled;
1799 /* DMRS Uplink configuration */
1800 typedef struct SchDmrsUlCfg
1802 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1803 SchTransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1806 /* PUSCH Configuration */
1807 typedef struct schPuschCfg
1809 uint8_t dataScramblingId;
1810 SchDmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1811 SchResourceAllocType resourceAllocType;
1812 uint8_t numTimeDomRsrcAlloc;
1813 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1814 SchTransformPrecoder transformPrecoder;
1817 /* Initial Uplink BWP */
1818 typedef struct schInitialUlBwp
1821 SchPucchCfg pucchCfg;
1823 SchPuschCfg puschCfg;
1826 typedef struct schBwpCfgDedicated
1828 SchPucchCfg pucchCfg;
1829 SchPuschCfg puschCfg;
1830 }SchBwpCfgDedicated;
1832 /* Uplink BWP information */
1833 typedef struct schUlBwpInfo
1836 SchBwpUlCfg bwpCommon;
1837 SchBwpCfgDedicated bwpDed;
1840 typedef struct schBwpRelInfo
1845 /* Serving cell configuration */
1846 typedef struct schServCellRecfgInfo
1848 SchInitalDlBwp initDlBwp;
1849 SchRadioLinkConfig radioLinkMonConfig;
1850 uint8_t numDlBwpToAddOrMod;
1851 SchDlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP];
1852 uint8_t numDlBwpToRel;
1853 SchBwpRelInfo dlBwpToRelList[MAX_NUM_BWP];
1854 uint8_t firstActvDlBwpId;
1855 uint8_t defaultDlBwpId;
1856 uint8_t *bwpInactivityTmr;
1857 SchPdschServCellCfg pdschServCellCfg;
1858 SchInitialUlBwp initUlBwp;
1859 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1860 uint8_t numUlBwpToAddOrMod;
1861 SchUlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
1862 uint8_t numUlBwpToRel;
1863 SchBwpRelInfo ulBwpToRelList[MAX_NUM_BWP];
1864 uint8_t firstActvUlBwpId;
1865 }SchServCellRecfgInfo;
1867 /* Serving cell configuration */
1868 typedef struct schServCellCfgInfo
1870 SchInitalDlBwp initDlBwp;
1871 SchRadioLinkConfig radioLinkMonConfig;
1872 uint8_t numDlBwpToAdd;
1873 SchDlBwpInfo dlBwpToAddList[MAX_NUM_BWP];
1874 uint8_t firstActvDlBwpId;
1875 uint8_t defaultDlBwpId;
1876 uint8_t *bwpInactivityTmr;
1877 SchPdschServCellCfg pdschServCellCfg;
1878 SchInitialUlBwp initUlBwp;
1879 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1880 uint8_t numUlBwpToAdd;
1881 SchUlBwpInfo ulBwpToAddList[MAX_NUM_BWP];
1882 uint8_t firstActvUlBwpId;
1883 }SchServCellCfgInfo;
1885 typedef struct schNonDynFiveQi
1890 uint16_t maxDataBurstVol;
1893 typedef struct schDynFiveQi
1896 uint16_t packetDelayBudget;
1897 uint8_t packetErrRateScalar;
1898 uint8_t packetErrRateExp;
1900 uint8_t delayCritical;
1902 uint16_t maxDataBurstVol;
1905 typedef struct schNgRanAllocAndRetPri
1907 uint8_t priorityLevel;
1908 uint8_t preEmptionCap;
1909 uint8_t preEmptionVul;
1910 }SchNgRanAllocAndRetPri;
1912 typedef struct schGrbQosFlowInfo
1914 uint32_t maxFlowBitRateDl;
1915 uint32_t maxFlowBitRateUl;
1916 uint32_t guarFlowBitRateDl;
1917 uint32_t guarFlowBitRateUl;
1921 typedef struct schDrbQos
1923 SchQosType fiveQiType; /* Dynamic or non-dynamic */
1926 SchNonDynFiveQi nonDyn5Qi;
1927 SchDynFiveQi dyn5Qi;
1929 SchNgRanAllocAndRetPri ngRanRetPri;
1930 SchGrbQosFlowInfo grbQosFlowInfo;
1931 uint16_t pduSessionId;
1932 uint32_t ulPduSessAggMaxBitRate; /* UL PDU Session Aggregate max bit rate */
1935 /* Special cell configuration */
1936 typedef struct schSpCellCfg
1938 uint8_t servCellIdx;
1939 SchServCellCfgInfo servCellCfg;
1942 /* Special cell Reconfiguration */
1943 typedef struct schSpCellRecfg
1945 uint8_t servCellIdx;
1946 SchServCellRecfgInfo servCellRecfg;
1949 /* Uplink logical channel configuration */
1950 typedef struct SchUlLcCfg
1955 uint8_t pbr; // prioritisedBitRate
1956 uint8_t bsd; // bucketSizeDuration
1959 /* Downlink logical channel configuration */
1960 typedef struct schDlLcCfg
1962 uint8_t lcp; // logical Channel Prioritization
1965 /* Logical Channel configuration */
1966 typedef struct schLcCfg
1970 SchDrbQosInfo *drbQos;
1975 /* Aggregate max bit rate */
1976 typedef struct schAmbrCfg
1978 uint32_t ulBr; /* Ul BitRate */
1981 typedef struct schModulationInfo
1985 SchMcsTable mcsTable;
1988 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.5' UE Configuration Request*/
1989 typedef struct schUeCfgReq
1994 bool macCellGrpCfgPres;
1995 SchMacCellGrpCfg macCellGrpCfg;
1996 bool phyCellGrpCfgPres;
1997 SchPhyCellGrpCfg phyCellGrpCfg;
1999 SchSpCellCfg spCellCfg;
2000 SchAmbrCfg *ambrCfg;
2001 SchModulationInfo dlModInfo;
2002 SchModulationInfo ulModInfo;
2003 uint8_t numLcsToAdd;
2004 SchLcCfg schLcCfg[MAX_NUM_LC];
2007 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.6' UE Reconfiguration Request*/
2008 typedef struct schUeRecfgReq
2013 bool macCellGrpRecfgPres;
2014 SchMacCellGrpCfg macCellGrpRecfg;
2015 bool phyCellGrpRecfgPres;
2016 SchPhyCellGrpCfg phyCellGrpRecfg;
2017 bool spCellRecfgPres;
2018 SchSpCellRecfg spCellRecfg;
2019 SchAmbrCfg *ambrRecfg;
2020 SchModulationInfo dlModInfo;
2021 SchModulationInfo ulModInfo;
2022 uint8_t numLcsToAdd;
2023 SchLcCfg schLcCfgAdd[MAX_NUM_LC];
2024 uint8_t numLcsToDel;
2025 uint8_t lcIdToDel[MAX_NUM_LC];
2026 uint8_t numLcsToMod;
2027 SchLcCfg schLcCfgMod[MAX_NUM_LC];
2028 SchDataTransmission dataTransmissionInfo;
2030 bool drxConfigIndicatorRelease;
2034 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.5 UE Confg Response*/
2035 typedef struct schUeCfgRsp
2041 CauseOfResult cause;
2044 /*As per WG8 V7.0.0 Sec 11.2.4.3.6, UE ReCFG and UECFG have same structure definition*/
2045 typedef struct schUeCfgRsp SchUeRecfgRsp;
2047 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.7' Delete UE Request*/
2048 typedef struct schUeDelete
2054 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.7*/
2055 typedef struct schUeDeleteRsp
2060 CauseOfResult cause;
2063 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.8' DL HARQ Indication*/
2064 typedef struct dlHarqInd
2068 SlotTimingInfo slotInd;
2070 uint8_t harqPayload[MAX_HARQ_BITS_IN_BYTES];
2073 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.9' UL HARQ (CRC) Indication*/
2074 typedef struct crcIndInfo
2078 SlotTimingInfo timingInfo;
2080 uint8_t crcInd[MAX_NUMBER_OF_CRC_IND_BITS];
2083 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.10' UL Channel Quality Indication*/
2084 typedef struct ulCqiReport
2086 CqiUlReportType reportType;
2091 typedef struct schUlCqiInd
2095 SlotTimingInfo timingInfo;
2096 uint8_t numUlCqiReported;
2097 UlCqiReport ulCqiRpt;
2100 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.11' DL Channel Quality Indication*/
2101 typedef struct dlCqiReport
2103 uint8_t reportType; /*Bitmap for CQI, PMI, RI, CRI report*/
2110 typedef struct schDlCqiInd
2114 SlotTimingInfo timingInfo;
2115 uint8_t numDlCqiReported;
2116 DlCqiReport dlCqiRpt;
2119 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.12' Rach Ind contents*/
2120 typedef struct rachIndInfo
2124 SlotTimingInfo timingInfo;
2128 uint8_t preambleIdx;
2132 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.13' Paging Ind contents*/
2133 typedef struct schPageInd
2142 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.14 Rach Res Request*/
2143 typedef struct schRachRsrcReq
2145 SlotTimingInfo slotInd;
2149 uint8_t ssbIdx[MAX_NUM_SSB];
2152 typedef struct schCfraSsbResource
2155 uint8_t raPreambleIdx;
2156 }SchCfraSsbResource;
2158 typedef struct schCfraRsrc
2161 SchCfraSsbResource ssbResource[MAX_NUM_SSB];
2164 typedef struct schRachRsrcRsp
2169 SchCfraResource cfraResource;
2172 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.15 Rach Res Release*/
2173 typedef struct schRachRsrcRel
2175 SlotTimingInfo slotInd;
2178 SchCfraResource cfraResource;
2181 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.16 DL RLC Buffer Status Information*/
2182 typedef struct dlRlcBOInfo
2187 uint32_t dataVolume;
2190 /*O-RAN WG8 v7.0.0 Sec 11.2.4.2.17 Scheduling Request Indication*/
2191 typedef struct srUciIndInfo
2195 SlotTimingInfo slotInd;
2197 uint8_t srPayload[MAX_SR_BITS_IN_BYTES];
2200 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.18 UL RLC Buffer Status Information*/
2201 typedef struct dataVolInfo
2207 typedef struct ulBufferStatusRptInd
2213 DataVolInfo dataVolInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS];
2214 }UlBufferStatusRptInd;
2216 /**O-RAN WG* v7.0.0 Sec 11.2.4.2.19 Power Headroom Indication*/
2217 typedef struct phrData /*Spec 38.321 Sec 6.1.3.8*/
2223 typedef struct singlePhrInfo
2228 typedef struct multiPhr
2234 typedef struct multiplePhrInfo /*Spec 38.321 Sec 6.1.3.9*/
2236 uint8_t numPhrReported;
2237 MultiPhr multiPhrStat[MAX_PHR_REPORT];
2240 typedef struct schPwrHeadroomInd
2247 SinglePhrInfo singlePhr;
2248 MultiplePhrInfo multiPhr;
2252 typedef struct schUeHqInfo
2258 typedef struct schRlsHqInfo
2262 SchUeHqInfo *ueHqInfo;
2265 /* Statistics Request from MAC to SCH */
2266 typedef struct schStatsGrpInfo
2269 uint16_t periodicity; /* In milliseconds */
2271 SchMeasurementType statsList[MAX_NUM_STATS];
2274 typedef struct schStatsReq
2276 uint64_t subscriptionId;
2277 uint8_t numStatsGroup;
2278 SchStatsGrpInfo statsGrpList[MAX_NUM_STATS_GRP];
2281 typedef struct schStatsReq SchStatsModificationReq;
2282 typedef struct schStatsRsp SchStatsModificationRsp;
2284 /* Statistics Response from SCH to MAC */
2285 typedef struct schStatsGrpRejected
2288 CauseOfResult cause;
2289 }SchStatsGrpRejected;
2291 typedef struct schStatsRsp
2293 uint64_t subscriptionId;
2294 uint8_t numGrpAccepted;
2295 uint8_t statsGrpAcceptedList[MAX_NUM_STATS_GRP];
2296 uint8_t numGrpRejected;
2297 SchStatsGrpRejected statsGrpRejectedList[MAX_NUM_STATS_GRP];
2300 /* Statistics Indication from SCH to MAC */
2301 typedef struct schStats
2303 SchMeasurementType type;
2307 typedef struct schStatsInd
2309 uint64_t subscriptionId;
2312 SchStats measuredStatsList[MAX_NUM_STATS];
2315 typedef struct schStatsDeleteReq
2317 uint64_t subscriptionId;
2318 uint8_t numStatsGroupToBeDeleted;
2319 uint8_t statsGrpIdToBeDelList[MAX_NUM_STATS_GRP];
2322 typedef struct statsDeleteResult
2325 SchMacRsp statsGrpDelRsp;
2326 CauseOfResult statsGrpDelCause;
2329 typedef struct schStatsDeleteRsp
2331 uint64_t subscriptionId; /* subscription Id */
2332 SchMacRsp subsDelRsp; /* deletion status of all statsGrp with given subscriptionId */
2333 CauseOfResult subsDelCause; /* cause of failure in deletion of all statsGrp with given subscriptionId*/
2334 uint8_t numStatsGroupDeleted; /* num of action deleted */
2335 StatsDeleteResult statsGrpDelInfo[MAX_NUM_STATS_GRP]; /* list of the deletion status for specific actions */
2338 /* function declarations */
2339 uint8_t MacMessageRouter(Pst *pst, void *msg);
2340 uint8_t SchMessageRouter(Pst *pst, void *msg);
2342 /**********************************************************************
2344 **********************************************************************/