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
59 #define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */
60 #define SCH_SSB_MASK_SIZE 1
62 #define MAX_NUM_PRG 1 /* max value should be later 275 */
63 #define MAX_DIG_BF_INTERFACES 0 /* max value should be later 255 */
64 #define MAX_CODEWORDS 1 /* max should be 2 */
65 #define SCH_HARQ_PROC_ID 1 /* harq proc id */
66 #define SCH_ALLOC_TYPE_1 1 /*sch res alloc type */
68 /* Datatype in UL SCH Info */
69 #define SCH_DATATYPE_PUSCH 1
70 #define SCH_DATATYPE_PUSCH_UCI 2
71 #define SCH_DATATYPE_UCI 4
72 #define SCH_DATATYPE_SRS 8
73 #define SCH_DATATYPE_PRACH 16
75 #define MAX_NUMBER_OF_CRC_IND_BITS 1
76 #define MAX_NUMBER_OF_UCI_IND_BITS 1
77 #define MAX_SR_BITS_IN_BYTES 1
78 #define MAX_HARQ_BITS_IN_BYTES 1
79 #define MAX_NUM_LOGICAL_CHANNEL_GROUPS 8
80 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
81 #define MAX_NUM_TAGS 4 /* Max number of timing advance groups */
82 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
83 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
84 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
85 #define FREQ_DOM_RSRC_SIZE 6 /* i.e. 6 bytes because Size of frequency domain resource is 45 bits */
86 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
87 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
88 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
90 /* PUCCH Configuration Macro */
91 #define MAX_NUM_PUCCH_RESRC 128
92 #define MAX_NUM_PUCCH_RESRC_SET 4
93 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
94 #define MAX_NUM_SPATIAL_RELATIONS 8
95 #define MAX_NUM_PUCCH_P0_PER_SET 8
96 #define MAX_NUM_PATH_LOSS_REF_RS 4
97 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
98 #define QPSK_MODULATION 2
100 #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 */
101 #define TX_PAYLOAD_HDR_LEN 32 /* Intel L1 requires adding a 32 byte header to transmitted payload */
102 #define UL_TX_BUFFER_SIZE 5
104 #define MAX_NUM_CONFIG_SLOTS 160 /*Max number of slots as per the numerology*/
105 #define MAX_NUM_K0_IDX 16 /* Max number of pdsch time domain downlink allocation */
106 #define MAX_NUM_K1_IDX 8 /* As per spec 38.213 section 9.2.3 Max number of PDSCH-to-HARQ resource indication */
107 #define MIN_NUM_K1_IDX 4 /* Min K1 values */
108 #define MAX_NUM_K2_IDX 16 /* PUSCH time domain UL resource allocation list */
109 #define DEFAULT_K0_VALUE 0 /* As per 38.331, PDSCH-TimeDomainResourceAllocation field descriptions */
110 /* As per 38.331, PUSCH-TimeDomainResourceAllocationList field descriptions */
111 #define DEFAULT_K2_VALUE_FOR_SCS15 1
112 #define DEFAULT_K2_VALUE_FOR_SCS30 1
113 #define DEFAULT_K2_VALUE_FOR_SCS60 2
114 #define DEFAULT_K2_VALUE_FOR_SCS120 3
117 #define DL_DMRS_SYMBOL_POS 4 /* Bitmap value 00000000000100 i.e. using 3rd symbol for PDSCH DMRS */
119 #define MAX_PHR_REPORT 1 /*TODO: Range of PHR reports in multiple PHR.*/
120 #define MAX_FAILURE_DET_RESOURCES 10 /*Spec 38.331 'maxNrofFailureDetectionResources'*/
122 #define ADD_DELTA_TO_TIME(crntTime, toFill, incr, numOfSlot) \
124 if ((crntTime.slot + incr) > (numOfSlot - 1)) \
126 toFill.sfn = (crntTime.sfn + 1); \
130 toFill.sfn = crntTime.sfn; \
132 toFill.slot = (crntTime.slot + incr) % numOfSlot; \
133 if (toFill.sfn >= MAX_SFN) \
135 toFill.sfn%=MAX_SFN; \
143 RRC_CONNECTED_USERS_RSRC
179 TIME_ALIGNMENT_TIMER_MS500,
180 TIME_ALIGNMENT_TIMER_MS750,
181 TIME_ALIGNMENT_TIMER_MS1280,
182 TIME_ALIGNMENT_TIMER_MS1920,
183 TIME_ALIGNMENT_TIMER_MS2560,
184 TIME_ALIGNMENT_TIMER_MS5120,
185 TIME_ALIGNMENT_TIMER_MS10240,
186 TIME_ALIGNMENT_TIMER_INFINITE
187 }SchTimeAlignmentTimer;
191 PHR_PERIODIC_TIMER_SF10,
192 PHR_PERIODIC_TIMER_SF20,
193 PHR_PERIODIC_TIMER_SF50,
194 PHR_PERIODIC_TIMER_SF100,
195 PHR_PERIODIC_TIMER_SF200,
196 PHR_PERIODIC_TIMER_SF500,
197 PHR_PERIODIC_TIMER_SF1000,
198 PHR_PERIODIC_TIMER_INFINITE
199 }SchPhrPeriodicTimer;
203 PHR_PROHIBIT_TIMER_SF0,
204 PHR_PROHIBIT_TIMER_SF10,
205 PHR_PROHIBIT_TIMER_SF20,
206 PHR_PROHIBIT_TIMER_SF50,
207 PHR_PROHIBIT_TIMER_SF100,
208 PHR_PROHIBIT_TIMER_SF200,
209 PHR_PROHIBIT_TIMER_SF500,
210 PHR_PROHIBIT_TIMER_SF1000
211 }SchPhrProhibitTimer;
215 PHR_TX_PWR_FACTOR_CHANGE_DB1,
216 PHR_TX_PWR_FACTOR_CHANGE_DB3,
217 PHR_TX_PWR_FACTOR_CHANGE_DB6,
218 PHR_TX_PWR_FACTOR_CHANGE_INFINITE
219 }SchPhrTxPwrFactorChange;
229 HARQ_ACK_CODEBOOK_SEMISTATIC,
230 HARQ_ACK_CODEBOOK_DYNAMIC
231 }SchPdschHarqAckCodebook;
235 NUM_HARQ_PROC_FOR_PDSCH_N2,
236 NUM_HARQ_PROC_FOR_PDSCH_N4,
237 NUM_HARQ_PROC_FOR_PDSCH_N6,
238 NUM_HARQ_PROC_FOR_PDSCH_N10,
239 NUM_HARQ_PROC_FOR_PDSCH_N16
240 }SchNumHarqProcForPdsch;
244 MAX_CODE_BLOCK_GROUP_PER_TB_N2,
245 MAX_CODE_BLOCK_GROUP_PER_TB_N4,
246 MAX_CODE_BLOCK_GROUP_PER_TB_N6,
247 MAX_CODE_BLOCK_GROUP_PER_TB_N8
248 }SchMaxCodeBlkGrpPerTB;
252 PDSCH_X_OVERHEAD_XOH_6,
253 PDSCH_X_OVERHEAD_XOH_12,
254 PDSCH_X_OVERHEAD_XOH_18
259 DMRS_ADDITIONAL_POS0,
260 DMRS_ADDITIONAL_POS1,
262 }SchDmrsAdditionPosition;
266 RESOURCE_ALLOCTION_TYPE_0,
267 RESOURCE_ALLOCTION_TYPE_1,
268 RESOURCE_ALLOCTION_DYN_SWITCH
269 }SchResourceAllocType;
273 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_A,
274 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_B
275 }SchTimeDomRsrcAllocMappingType;
279 ENABLED_TRANSFORM_PRECODER,
280 DISABLED_TRANSFORM_PRECODER
281 }SchTransformPrecoder;
285 INTERLEAVED_CCE_REG_MAPPING = 1,
286 NONINTERLEAVED_CCE_REG_MAPPING
291 SLOT_PERIODICITY_AND_OFFSET_SL_1 = 1,
292 SLOT_PERIODICITY_AND_OFFSET_SL_2,
293 SLOT_PERIODICITY_AND_OFFSET_SL_4,
294 SLOT_PERIODICITY_AND_OFFSET_SL_5,
295 SLOT_PERIODICITY_AND_OFFSET_SL_8,
296 SLOT_PERIODICITY_AND_OFFSET_SL_10,
297 SLOT_PERIODICITY_AND_OFFSET_SL_16,
298 SLOT_PERIODICITY_AND_OFFSET_SL_20,
299 SLOT_PERIODICITY_AND_OFFSET_SL_40,
300 SLOT_PERIODICITY_AND_OFFSET_SL_80,
301 SLOT_PERIODICITY_AND_OFFSET_SL_160,
302 SLOT_PERIODICITY_AND_OFFSET_SL_320,
303 SLOT_PERIODICITY_AND_OFFSET_SL_640,
304 SLOT_PERIODICITY_AND_OFFSET_SL_1280,
305 SLOT_PERIODICITY_AND_OFFSET_SL_2560
306 }SchMSlotPeriodAndOffset;
316 SEARCH_SPACE_TYPE_COMMON = 1,
317 SEARCH_SPACE_TYPE_UE_SPECIFIC
322 SCH_QOS_NON_DYNAMIC = 1,
328 AGGREGATION_LEVEL_N0,
329 AGGREGATION_LEVEL_N1,
330 AGGREGATION_LEVEL_N2,
331 AGGREGATION_LEVEL_N3,
332 AGGREGATION_LEVEL_N4,
333 AGGREGATION_LEVEL_N5,
334 AGGREGATION_LEVEL_N6,
346 CODE_WORDS_SCHED_BY_DCI_N1,
347 CODE_WORDS_SCHED_BY_DCI_N2
348 }SchCodeWordsSchedByDci;
352 STATIC_BUNDLING_TYPE = 1,
353 DYNAMIC_BUNDLING_TYPE
359 SCH_SET1_SIZE_WIDEBAND,
360 SCH_SET1_SIZE_N2_WIDEBAND,
361 SCH_SET1_SIZE_N4_WIDEBAND
362 }SchBundlingSizeSet1;
367 SCH_SET2_SIZE_WIDEBAND
368 }SchBundlingSizeSet2;
422 SCH_MCS_TABLE_QAM_64,
423 SCH_MCS_TABLE_QAM_256,
424 SCH_MCS_TABLE_QAM_64_LOW_SE
437 DATA_TRANSMISSION_ALLOWED,
438 STOP_DATA_TRANSMISSION,
439 RESTART_DATA_TRANSMISSION
440 }SchDataTransmission;
447 }SchPurposeOfFailureDet;
455 /* Performance measurements from 3GPP TS 28.552 Release 15 */
458 SCH_DL_TOTAL_PRB_USAGE,
459 SCH_UL_TOTAL_PRB_USAGE
463 typedef struct timeDomainAlloc
469 typedef struct resAllocType0
471 uint8_t rbBitmap[36];
474 typedef struct resAllocType1
480 typedef struct resAllocType1 FreqDomainRsrc;
482 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-32 BWP Information */
483 typedef struct bwpCfg
485 uint8_t subcarrierSpacing;
486 uint8_t cyclicPrefix;
487 FreqDomainRsrc freqAlloc;
493 uint16_t beamIdx[MAX_DIG_BF_INTERFACES];
496 typedef struct beamformingInfo
500 uint8_t digBfInterfaces;
501 Prg prg[MAX_NUM_PRG];
504 /* SIB1 PDSCH structures */
506 typedef struct codewordinfo
508 uint16_t targetCodeRate;
516 typedef struct dmrsInfo
518 uint16_t dlDmrsSymbPos;
519 uint8_t dmrsConfigType;
520 uint16_t dlDmrsScramblingId;
522 uint8_t numDmrsCdmGrpsNoData;
525 uint8_t nrOfDmrsSymbols;
529 typedef struct pdschFreqAlloc
531 uint8_t resourceAllocType;
532 /* since we are using type-1, rbBitmap excluded */
533 uint8_t rbBitmap[36];
536 uint8_t vrbPrbMapping;
539 typedef struct pdschTimeAlloc
546 typedef struct txPowerPdschInfo
548 uint8_t powerControlOffset;
549 uint8_t powerControlOffsetSS;
552 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-43 PDSCH Configuration */
553 typedef struct pdschCfg
558 uint8_t numCodewords;
559 CodewordInfo codeword[MAX_CODEWORDS];
560 uint16_t dataScramblingId;
562 uint8_t transmissionScheme;
565 PdschFreqAlloc pdschFreqAlloc;
566 PdschTimeAlloc pdschTimeAlloc;
567 BeamformingInfo beamPdschInfo;
568 TxPowerPdschInfo txPdschPower;
570 /* SIB1 PDSCH structures end */
572 /* SIB1 interface structure */
574 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-35 CORESET Configuration */
575 typedef struct coresetCfg
578 uint8_t startSymbolIndex;
579 uint8_t durationSymbols;
580 uint8_t freqDomainResource[6];
581 uint8_t cceRegMappingType;
582 uint8_t regBundleSize;
583 uint8_t interleaverSize;
586 uint8_t coresetPoolIndex;
587 uint8_t precoderGranularity;
589 uint8_t aggregationLevel;
592 typedef struct txPowerPdcchInfo
594 uint8_t beta_pdcch_1_0;
595 uint8_t powerControlOffsetSS;
598 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-42 DL-DCI Configuration */
602 uint16_t scramblingId;
603 uint16_t scramblingRnti;
606 BeamformingInfo beamPdcchInfo;
607 TxPowerPdcchInfo txPdcchPower;
611 typedef struct pdcchCfg
613 /* coreset-0 configuration */
614 CoresetCfg coresetCfg;
616 DlDCI dci; /* as of now its only one DCI, later it will be numDlCi */
618 /* end of SIB1 PDCCH structures */
620 typedef struct schPcchCfg
622 uint8_t numPO; /*Derived from Ns*/
623 bool poPresent; /*FirstPDCCH-MonitoringPO is present or not*/
624 uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
627 typedef struct schPdcchConfigSib1
629 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
630 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
633 typedef struct schRachCfgGeneric
635 uint8_t prachCfgIdx; /* PRACH config idx */
636 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
637 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
638 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
639 int16_t preambleRcvdTargetPower;
640 uint8_t preambleTransMax;
641 uint8_t pwrRampingStep;
642 uint8_t raRspWindow; /* RA Response Window */
645 typedef struct schRachCfg
647 SchRachCfgGeneric prachCfgGeneric;
648 uint8_t totalNumRaPreamble; /* Total number of RA preambles */
649 uint8_t ssbPerRach; /* SSB per RACH occassion */
650 uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */
651 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
652 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
653 uint16_t rootSeqIdx; /* Root sequence index */
654 uint16_t rootSeqLen; /* root sequence length */
655 uint8_t numRootSeq; /* Number of root sequences required for FD */
656 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
659 typedef struct schBwpParams
661 FreqDomainRsrc freqAlloc;
663 uint8_t cyclicPrefix;
666 typedef struct schCandidatesInfo
675 typedef struct schSearchSpaceCfg
677 uint8_t searchSpaceId;
679 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
680 uint16_t monitoringSlot;
682 uint16_t monitoringSymbol;
683 SchCandidatesInfo candidate;
686 typedef struct schPdcchCfgCmn
688 SchSearchSpaceCfg commonSearchSpace;
689 uint8_t raSearchSpaceId;
692 typedef struct schPdschCfgCmnTimeDomRsrcAlloc
697 uint8_t lengthSymbol;
698 }SchPdschCfgCmnTimeDomRsrcAlloc;
700 typedef struct schPdschCfgCmn
702 uint8_t numTimeDomAlloc;
703 SchPdschCfgCmnTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
706 typedef struct schPucchCfgCmn
708 uint8_t pucchResourceCommon;
709 uint8_t pucchGroupHopping;
712 /* PUSCH Time Domain Resource Allocation */
713 typedef struct schPuschTimeDomRsrcAlloc
716 SchTimeDomRsrcAllocMappingType mappingType;
718 uint8_t symbolLength;
719 }SchPuschTimeDomRsrcAlloc;
721 typedef struct schPuschCfgCmn
723 uint8_t numTimeDomRsrcAlloc;
724 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
727 typedef struct schK1TimingInfo
730 uint8_t k1Indexes[MAX_NUM_K1_IDX];
733 typedef struct schK0TimingInfo
736 SchK1TimingInfo k1TimingInfo;
739 typedef struct schK0K1TimingInfo
742 SchK0TimingInfo k0Indexes[MAX_NUM_K0_IDX];
745 typedef struct schK0K1TimingInfoTbl
748 SchK0K1TimingInfo k0k1TimingInfo[MAX_NUM_CONFIG_SLOTS];
749 }SchK0K1TimingInfoTbl;
751 typedef struct schBwpDlCfg
754 SchPdcchCfgCmn pdcchCommon;
755 SchPdschCfgCmn pdschCommon;
758 typedef struct schK2TimingInfo
761 uint8_t k2Indexes[MAX_NUM_K2_IDX];
764 typedef struct schK2TimingInfoTbl
767 SchK2TimingInfo k2TimingInfo[MAX_NUM_CONFIG_SLOTS];
770 typedef struct schBwpUlCfg
773 SchRachCfg schRachCfg; /* PRACH config */
774 SchPucchCfgCmn pucchCommon;
775 SchPuschCfgCmn puschCommon;
778 typedef struct schPlmnInfoList
781 uint8_t numSliceSupport; /* Total slice supporting */
782 Snssai **snssai; /* List of supporting snssai*/
786 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
788 typedef struct schDrxOnDurationTimer
790 bool onDurationTimerValInMs;
793 uint8_t subMilliSeconds;
794 uint16_t milliSeconds;
795 }onDurationtimerValue;
796 }SchDrxOnDurationTimer;
798 typedef struct schDrxLongCycleStartOffset
800 uint16_t drxLongCycleStartOffsetChoice;
801 uint16_t drxLongCycleStartOffsetVal;
802 }SchDrxLongCycleStartOffset;
804 typedef struct schShortDrx
806 uint16_t drxShortCycle;
807 uint8_t drxShortCycleTimer;
810 typedef struct schDrxCfg
812 SchDrxOnDurationTimer drxOnDurationTimer;
813 uint16_t drxInactivityTimer;
814 uint8_t drxHarqRttTimerDl;
815 uint8_t drxHarqRttTimerUl;
816 uint16_t drxRetransmissionTimerDl;
817 uint16_t drxRetransmissionTimerUl;
818 SchDrxLongCycleStartOffset drxLongCycleStartOffset;
820 SchShortDrx shortDrx;
821 uint8_t drxSlotOffset;
825 /*Spec 38.331 'NrNsPmaxList'*/
826 typedef struct schNrNsPmaxList
829 long additionalSpectrumEmission;
832 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
833 typedef struct schMultiFreqBandListSib
836 SchNrNsPmaxList nrNsPmaxList[1];
837 }SchMultiFreqBandListSib;
839 /*Spec 38.331 'SCS-SpecificCarrier'*/
840 typedef struct schScsSpecificCarrier
842 uint16_t offsetToCarrier;
843 uint8_t subCarrierSpacing;
845 uint16_t txDirectCurrentLoc;
846 }SchScsSpecificCarrier;
848 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
849 typedef struct schFreqInfoDlSib
851 SchMultiFreqBandListSib mutiFreqBandList[1];
852 uint16_t offsetToPointA;
853 SchScsSpecificCarrier schSpcCarrier[1];
856 typedef struct schBcchCfg
861 /*Spec 38.331 'DownlinkConfigCommonSIB'*/
862 typedef struct schDlCfgCommon
864 SchFreqInfoDlSib schFreqInfoDlSib;
865 SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */
866 SchBcchCfg schBcchCfg;
867 SchPcchCfg schPcchCfg;
870 /*Spec 38.331 'FrequencyInfoUL-SIB'*/
871 typedef struct schFreqInfoUlSib
873 SchMultiFreqBandListSib mutiFreqBandList[1];
874 uint16_t absoluteFreqPointA;
875 SchScsSpecificCarrier schSpcCarrier[1];
877 bool frequencyShift7p5khz;
880 /*Spec 38.331 'UplinkConfigCommonSIB '*/
881 typedef struct schUlCfgCommon
883 SchFreqInfoUlSib schFreqInfoUlSib;
884 SchBwpUlCfg schInitialUlBwp; /* Initial DL BWP */
885 uint16_t schTimeAlignTimer;
888 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.1 Cell Conf Request*/
889 typedef struct schCellCfg
891 uint16_t cellId; /* Cell Id */
895 uint16_t phyCellId; /* Physical cell id */
896 SchPlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */
897 SchDuplexMode dupMode; /* Duplex type: TDD/FDD */
898 uint8_t dlBandwidth; /* Supported B/W */
899 uint8_t ulBandwidth; /* Supported B/W */
900 SchDlCfgCommon dlCfgCommon; /*Spec 38.331 DownlinkConfigCommonSIB*/
901 SchUlCfgCommon ulCfgCommon; /*Spec 38.331 UplinkConfigCommonSIB*/
903 TDDCfg tddCfg; /* Spec 38.331 tdd-UL-DL-ConfigurationCommon */
906 /*Ref:Spec 38.331 "ssb-PositionsInBurst", Value 0 in Bitmap => corresponding SS/PBCH block is not transmitted
907 *value 1 => corresponding SS/PBCH block is transmitted*/
908 uint32_t ssbPosInBurst[SCH_SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
909 SchSSBPeriod ssbPeriod; /* SSB Periodicity in msec */
910 uint32_t ssbFrequency; /* SB frequency in kHz*/
911 uint8_t dmrsTypeAPos;
912 uint8_t ssbScs; /* SSB subcarrier spacing*/
913 SchPdcchConfigSib1 pdcchCfgSib1; /* Req to configure CORESET#0 and SearchSpace#0*/
914 uint32_t ssbPbchPwr; /* SSB block power */
915 uint8_t ssbSubcOffset; /* Subcarrier Offset(Kssb) */
919 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.1 Cell Config Response*/
920 typedef struct schCellCfgCfm
922 uint16_t cellId; /* Cell Id */
927 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.2 Cell Del Req*/
928 typedef struct schCellDeleteReq
933 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.2 Cell Del Response*/
934 typedef struct schCellDeleteRsp
941 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.3*/
942 typedef struct schRrmPolicyRatio
946 uint8_t dedicatedRatio;
949 typedef struct schRrmPolicyOfSlice
952 SchRrmPolicyRatio rrmPolicyRatioInfo;
953 }SchRrmPolicyOfSlice;
955 typedef struct schSliceCfgReq
957 uint8_t numOfConfiguredSlice;
958 SchRrmPolicyOfSlice **listOfSlices;
961 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.3 Slice Cfg Response*/
962 typedef struct schSliceCfgRsp
969 /*As per ORAN-WG8 V7.0.0 Sec 11.2.4.3.4 , Slice Cfg and Recfg are same structures*/
970 typedef struct schSliceCfgReq SchSliceRecfgReq;
971 typedef struct schSliceCfgRsp SchSliceRecfgRsp;
973 typedef struct ssbInfo
975 uint8_t ssbIdx; /* SSB Index */
976 TimeDomainAlloc tdAlloc; /* Time domain allocation */
977 FreqDomainRsrc fdAlloc; /* Freq domain allocation */
980 typedef struct sib1AllocInfo
983 PdcchCfg *sib1PdcchCfg;
986 typedef struct prachSchInfo
988 uint8_t numPrachOcas; /* Num Prach Ocassions */
989 uint8_t prachFormat; /* PRACH Format */
990 uint8_t numRa; /* Freq domain ocassion */
991 uint8_t prachStartSymb; /* Freq domain ocassion */
994 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
995 typedef struct dlBrdcstAlloc
997 uint16_t crnti; /* SI-RNTI */
998 /* Ssb transmission is determined as follows:
999 * 0 : No tranamission
1000 * 1 : SSB Transmission
1001 * 2 : SSB Repetition */
1002 uint8_t ssbTransmissionMode;
1003 uint8_t ssbIdxSupported;
1004 SsbInfo ssbInfo[MAX_SSB_IDX];
1005 bool systemInfoIndicator;
1007 /* Sib1 transmission is determined as follows:
1008 * 0 : No tranamission
1009 * 1 : SIB1 Transmission
1010 * 2 : SIB1 Repetition */
1011 uint8_t sib1TransmissionMode;
1012 Sib1AllocInfo sib1Alloc;
1015 typedef struct msg3UlGrant
1017 uint8_t freqHopFlag;
1019 FreqDomainRsrc msg3FreqAlloc;
1026 typedef struct rarInfo
1030 Msg3UlGrant ulGrant;
1032 uint8_t rarPdu[RAR_PAYLOAD_SIZE];
1036 typedef struct rarAlloc
1041 PdcchCfg *rarPdcchCfg;
1042 PdschCfg *rarPdschCfg;
1045 typedef struct lcSchInfo
1051 typedef struct ceSchInfo
1057 typedef struct freqDomainAlloc
1059 uint8_t resAllocType; /* Resource allocation type */
1062 ResAllocType0 type0;
1063 ResAllocType1 type1;
1067 typedef struct transportBlock
1074 CeSchInfo ceSchInfo[MAX_NUM_LC];
1076 LcSchInfo lcSchInfo[MAX_NUM_LC];
1079 typedef struct dlMsgSchedInfo
1082 uint8_t dciFormatId;
1083 uint8_t harqProcNum;
1085 uint8_t dlAssignIdx;
1087 uint8_t pucchResInd;
1088 uint8_t harqFeedbackInd;
1089 uint16_t dlMsgPduLen;
1091 FreqDomainAlloc freqAlloc;
1092 TimeDomainAlloc timeAlloc;
1094 TransportBlock transportBlock[2];
1096 PdcchCfg *dlMsgPdcchCfg;
1097 PdschCfg *dlMsgPdschCfg;
1100 typedef struct schSlotValue
1102 SlotTimingInfo currentTime;
1103 SlotTimingInfo broadcastTime;
1104 SlotTimingInfo rarTime;
1105 SlotTimingInfo dlMsgTime;
1106 SlotTimingInfo ulDciTime;
1110 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-36 DCI Format0_0 Configuration */
1111 typedef struct format0_0
1113 uint8_t resourceAllocType;
1114 FreqDomainAlloc freqAlloc;
1115 TimeDomainAlloc timeAlloc;
1126 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-40 DCI Format 0_1 Configuration */
1127 typedef struct format0_1
1129 uint8_t carrierIndicator;
1131 uint8_t bwpIndicator;
1132 uint8_t resourceAlloc;
1133 FreqDomainRsrc freqAlloc;
1134 TimeDomainAlloc timeAlloc;
1141 uint8_t firstDownlinkAssignmentIndex;
1142 uint8_t secondDownlinkAssignmentIndex;
1144 uint8_t srsResourceSetIndicator;
1145 uint8_t srsResourceIndicator;
1147 uint8_t antennaPorts;
1150 uint8_t cbgTransmissionInfo;
1152 uint8_t betaOffsetIndicator;
1153 bool dmrsSequenceInitialization;
1154 bool ulschIndicatior;
1157 typedef struct dciFormat
1159 FormatType formatType; /* DCI Format */
1162 Format0_0 format0_0; /* Format 0_0 */
1163 Format0_1 format0_1; /* Format 0_1 */
1167 typedef struct dciInfo
1169 uint16_t crnti; /* CRNTI */
1170 BwpCfg bwpCfg; /* BWP Cfg */
1171 CoresetCfg coresetCfg; /* Coreset1 Cfg */
1172 DciFormat dciFormatInfo; /* Dci Format */
1173 DlDCI dciInfo; /* DlDCI */
1177 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.8 DL Scheduling Information */
1178 typedef struct dlSchedInfo
1180 uint16_t cellId; /* Cell Id */
1181 SchSlotValue schSlotValue;
1183 /* Allocation for broadcast messages */
1184 bool isBroadcastPres;
1185 DlBrdcstAlloc brdcstAlloc;
1187 /* Allocation for RAR message */
1188 RarAlloc *rarAlloc[MAX_NUM_UE];
1190 /* UL grant in response to BSR */
1193 /* Allocation from dedicated DL msg */
1194 DlMsgSchInfo *dlMsgAlloc[MAX_NUM_UE];
1198 /*Reference: O-RAN.WG8.AAD.v7.0.0, Sec 11.2.4.3.13 Downlink Paging Allocation*/
1199 typedef struct interleaved_t
1201 uint8_t regBundleSize;
1202 uint8_t interleaverSize;
1203 uint16_t shiftIndex;
1206 typedef struct pageDlDci
1208 uint8_t freqDomainResource[6];
1209 uint8_t durationSymbols;
1210 uint8_t cceRegMappingType;
1213 Interleaved interleaved;
1214 uint8_t nonInterleaved;
1216 uint8_t ssStartSymbolIndex;
1218 uint8_t aggregLevel;
1219 uint8_t precoderGranularity;
1220 uint8_t coreSetSize;
1223 typedef struct resAllocType1 PageFreqDomainAlloc;
1225 typedef struct pageTimeDomainAlloc
1227 uint8_t mappingType;
1230 }PageTimeDomainAlloc;
1232 typedef struct pageDmrsConfig
1236 uint8_t nrOfDmrsSymbols;
1239 typedef struct pageTbInfo
1245 typedef struct pageDlSch
1247 PageFreqDomainAlloc freqAlloc;
1248 PageTimeDomainAlloc timeAlloc;
1249 PageDmrsConfig dmrs;
1250 uint8_t vrbPrbMapping;
1253 uint16_t dlPagePduLen;
1257 typedef struct dlPageAlloc
1260 SlotTimingInfo dlPageTime;
1265 PageDlDci pageDlDci;
1266 PageDlSch pageDlSch;
1269 typedef struct tbInfo
1271 uint8_t mcs; /* MCS */
1272 uint8_t ndi; /* NDI */
1273 uint8_t rv; /* Redundancy Version */
1274 uint16_t tbSize; /* TB Size */
1275 uint8_t qamOrder; /* Modulation Order */
1276 SchMcsTable mcsTable; /* MCS Table */
1279 typedef struct schPuschInfo
1281 uint8_t harqProcId; /* HARQ Process ID */
1282 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1283 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1284 TbInfo tbInfo; /* TB info */
1286 uint8_t dmrsMappingType;
1287 uint8_t nrOfDmrsSymbols;
1292 typedef struct harqInfo
1294 uint16_t harqAckBitLength;
1295 uint8_t betaOffsetHarqAck;
1298 typedef struct csiInfo
1301 uint8_t betaOffsetCsi;
1304 typedef struct harqFdbkInfo
1306 uint16_t harqBitLength;
1309 typedef struct csiFdbkInfo
1314 typedef struct schPucchFormatCfg
1316 uint8_t interSlotFreqHop;
1318 uint8_t maxCodeRate;
1324 typedef struct schPucchInfo
1326 FreqDomainRsrc fdAlloc;
1327 TimeDomainAlloc tdAlloc;
1329 HarqFdbkInfo harqInfo;
1330 CsiFdbkInfo csiInfo;
1331 BeamformingInfo beamPucchInfo;
1332 uint8_t pucchFormat;
1333 uint8_t intraFreqHop;
1334 uint16_t secondPrbHop;
1335 uint8_t initialCyclicShift;
1343 typedef struct schPuschUci
1345 uint8_t harqProcId; /* HARQ Process ID */
1346 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1347 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1348 TbInfo tbInfo; /* TB information */
1349 HarqInfo harqInfo; /* Harq Information */
1350 CsiInfo csiInfo; /* Csi information*/
1353 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.9 UL Scheduling Information */
1354 typedef struct ulSchedInfo
1356 uint16_t cellId; /* Cell Id */
1357 uint16_t crnti; /* CRNI */
1358 SlotTimingInfo slotIndInfo; /* Slot Info: sfn, slot number */
1359 uint8_t dataType; /* Type of info being scheduled */
1360 SchPrachInfo prachSchInfo; /* Prach scheduling info */
1361 SchPuschInfo schPuschInfo; /* Pusch scheduling info */
1362 SchPuschUci schPuschUci; /* Pusch Uci */
1363 SchPucchInfo schPucchInfo; /* Pucch and Uci scheduling info */
1366 /* Info of Scheduling Request to Add/Modify */
1367 typedef struct schSchedReqInfo
1370 SchSrProhibitTimer srProhibitTmr;
1371 SchSrTransMax srTransMax;
1374 /* Scheduling Request Configuration */
1375 typedef struct schSchedReqCfg
1377 uint8_t addModListCount;
1378 SchSchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
1379 uint8_t relListCount;
1380 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
1383 /* Info of Tag to Add/Modify */
1384 typedef struct schTagInfo
1387 SchTimeAlignmentTimer timeAlignmentTmr;
1390 /* Timing Advance Group Configuration */
1391 typedef struct schTagCfg
1393 uint8_t addModListCount;
1394 SchTagInfo addModList[MAX_NUM_TAGS]; /* List of Tag to Add/Modify */
1395 uint8_t relListCount;
1396 uint8_t relList[MAX_NUM_TAGS]; /* list of Tag Id to release */
1399 /* Configuration for Power headroom reporting */
1400 typedef struct schPhrCfg
1402 SchPhrPeriodicTimer periodicTmr;
1403 SchPhrProhibitTimer prohibitTmr;
1404 SchPhrTxPwrFactorChange txpowerFactorChange;
1407 bool type2OtherCell;
1408 SchPhrModeOtherCG modeOtherCG;
1411 /* MAC cell Group configuration */
1412 typedef struct schMacCellGrpCfg
1414 SchSchedReqCfg schedReqCfg;
1416 SchPhrCfg phrCfg; /* To be used only if phrCfgSetupPres is true */
1419 SchDrxCfg drxCfg; /* Drx configuration */
1423 /* Physical Cell Group Configuration */
1424 typedef struct schPhyCellGrpCfg
1426 SchPdschHarqAckCodebook pdschHarqAckCodebook;
1430 /* Control resource set info */
1431 typedef struct schControlRsrcSet
1433 uint8_t cRSetId; /* Control resource set id */
1434 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
1436 SchREGMappingType cceRegMappingType;
1437 SchPrecoderGranul precoderGranularity;
1438 uint16_t dmrsScramblingId;
1441 /* Search Space info */
1442 typedef struct schSearchSpace
1444 uint8_t searchSpaceId;
1446 SchMSlotPeriodAndOffset mSlotPeriodicityAndOffset;
1447 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1448 SchAggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
1449 SchAggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
1450 SchAggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
1451 SchAggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
1452 SchAggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
1453 SchSearchSpaceType searchSpaceType;
1454 uint8_t ueSpecificDciFormat;
1457 /* PDCCH cofniguration */
1458 typedef struct schPdcchConfig
1460 uint8_t numCRsetToAddMod;
1461 SchControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
1462 uint8_t numCRsetToRel;
1463 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
1464 uint8_t numSearchSpcToAddMod;
1465 SchSearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
1466 uint8_t numSearchSpcToRel;
1467 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
1470 /* PDSCH time domain resource allocation */
1471 typedef struct schPdschTimeDomRsrcAlloc
1474 SchTimeDomRsrcAllocMappingType mappingType;
1475 uint8_t startSymbol;
1476 uint8_t symbolLength;
1477 }SchPdschTimeDomRsrcAlloc;
1480 typedef struct schPdschBundling
1482 struct schStaticBundling
1484 SchBundlingSizeSet2 size;
1486 struct schDynamicBundling
1488 SchBundlingSizeSet1 sizeSet1;
1489 SchBundlingSizeSet2 sizeSet2;
1490 }SchDynamicBundling;
1493 /* DMRS downlink configuration */
1494 typedef struct schDmrsDlCfg
1496 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1499 /* PDSCH Configuration */
1500 typedef struct schPdschConfig
1502 SchDmrsDlCfg dmrsDlCfgForPdschMapTypeA;
1503 SchResourceAllocType resourceAllocType;
1504 uint8_t numTimeDomRsrcAlloc;
1505 SchPdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1507 SchCodeWordsSchedByDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
1508 SchBundlingType bundlingType;
1509 SchPdschBundling bundlingInfo;
1512 /* Initial Downlink BWP */
1513 typedef struct schInitalDlBwp
1516 SchPdcchConfig pdcchCfg;
1518 SchPdschConfig pdschCfg;
1521 /*Spec 38.331 'RadioLinkMonitoringConfig'*/
1522 typedef uint8_t SchRadioLinkMonitoringRsId;
1524 typedef struct schRadioLinkMonRS
1526 SchRadioLinkMonitoringRsId radioLinkMonitoringRsId;
1527 SchPurposeOfFailureDet purpose;
1531 uint8_t nzpCsiRsResId;
1535 typedef struct schRadioLinkConfig
1537 SchRadioLinkMonRS failurDetResAddModList[MAX_FAILURE_DET_RESOURCES];
1538 SchRadioLinkMonitoringRsId failurDetResRelList[MAX_FAILURE_DET_RESOURCES];
1539 uint8_t beamFailureInstanceMaxCount;
1540 uint8_t beamFailureDetectionTimer;
1541 }SchRadioLinkConfig;
1543 /*Spec 38.331 "SPS-Config'*/
1544 typedef struct schSpsConfig
1546 uint16_t periodicity;
1547 uint8_t numOfHqProcess;
1549 SchMcsTable mcsTable;
1552 /* Spec 38.331, 'BWP-DownlinkDedicated'*/
1553 typedef struct schBwpDlCfgDed
1555 SchPdcchConfig pdcchCfgDed;
1556 SchPdschConfig pdschCfgDed;
1557 SchSpsConfig spsCfgDed;
1558 SchRadioLinkConfig radioLnkMonCfgDed;
1561 /* Spec 38.331, 'BWP-Downlink' Downlink BWP information */
1562 typedef struct schDlBwpInfo
1565 SchBwpDlCfg bwpCommon;
1566 SchBwpDlCfgDed bwpDedicated;
1569 /* PDCCH Serving Cell configuration */
1570 typedef struct schPdschServCellCfg
1572 uint8_t *maxMimoLayers;
1573 SchNumHarqProcForPdsch numHarqProcForPdsch;
1574 SchMaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
1575 bool *codeBlkGrpFlushInd;
1576 SchPdschXOverhead *xOverhead;
1577 }SchPdschServCellCfg;
1579 typedef struct schRaPrioritization
1581 uint8_t powerRampingStepHighPriority;
1582 uint8_t scalingFactorBI;
1583 }SchRaPrioritization;
1585 typedef struct schBfrCsiRsRes
1589 uint8_t raPreambleIndex;
1592 typedef struct schBfrSsbRes
1595 uint8_t raPreambleIndex;
1598 typedef struct schPrachResDedBfr
1601 SchBfrCsiRsRes csiRs;
1604 /*Spec 38.331 'BeamFailureRecoveryConfig' */
1605 typedef struct schBeamFailRecoveryCfg
1607 uint8_t rootSeqIndexBfr;
1608 SchRachCfgGeneric rachCfgBfr;
1609 uint8_t rsrpThreshSsbBfr; /* RSRP Threshold SSB */
1610 SchPrachResDedBfr candidateBeamRSList;
1611 uint8_t ssbPerRachBfr; /* SSB per RACH occassion */
1612 uint8_t raSsbOccMaskIndex;
1613 uint8_t recoverySearchSpaceId;
1614 SchRaPrioritization raPrioBfr;
1616 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
1617 }SchBeamFailRecoveryCfg;
1619 /* PUCCH Configuration */
1620 typedef struct schPucchResrcSetInfo
1623 uint8_t resrcListCount;
1624 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1625 uint8_t maxPayLoadSize;
1626 }SchPucchResrcSetInfo;
1628 typedef struct schPucchResrcSetCfg
1630 uint8_t resrcSetToAddModListCount;
1631 SchPucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1632 uint8_t resrcSetToRelListCount;
1633 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1634 }SchPucchResrcSetCfg;
1636 typedef struct schPucchFormat0
1638 uint8_t initialCyclicShift;
1640 uint8_t startSymbolIdx;
1643 typedef struct schPucchFormat1
1645 uint8_t initialCyclicShift;
1647 uint8_t startSymbolIdx;
1651 typedef struct schPucchFormat2_3
1655 uint8_t startSymbolIdx;
1658 typedef struct schPucchFormat4
1663 uint8_t startSymbolIdx;
1666 typedef struct schPucchResrcInfo
1670 uint8_t intraFreqHop;
1671 uint16_t secondPrbHop;
1672 uint8_t pucchFormat;
1674 SchPucchFormat0 *format0;
1675 SchPucchFormat1 *format1;
1676 SchPucchFormat2_3 *format2;
1677 SchPucchFormat2_3 *format3;
1678 SchPucchFormat4 *format4;
1682 typedef struct schPucchResrcCfg
1684 uint8_t resrcToAddModListCount;
1685 SchPucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1686 uint8_t resrcToRelListCount;
1687 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1691 typedef struct schSchedReqResrcInfo
1695 uint8_t periodicity;
1698 }SchSchedReqResrcInfo;
1700 typedef struct schPucchSchedReqCfg
1702 uint8_t schedAddModListCount;
1703 SchSchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1704 uint8_t schedRelListCount;
1705 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1706 }SchPucchSchedReqCfg;
1708 typedef struct schSpatialRelationInfo
1710 uint8_t spatialRelationId;
1711 uint8_t servCellIdx;
1712 uint8_t pathLossRefRSId;
1714 uint8_t closeLoopIdx;
1715 }SchSpatialRelationInfo;
1717 typedef struct schPucchSpatialCfg
1719 uint8_t spatialAddModListCount;
1720 SchSpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1721 uint8_t spatialRelListCount;
1722 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1723 }SchPucchSpatialCfg;
1725 typedef struct schP0PucchCfg
1731 typedef struct schPathLossRefRSCfg
1733 uint8_t pathLossRefRSId;
1734 }SchPathLossRefRSCfg;
1736 typedef struct schPucchMultiCsiCfg
1738 uint8_t multiCsiResrcListCount;
1739 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1740 }SchPucchMultiCsiCfg;
1742 typedef struct schPucchDlDataToUlAck
1744 uint8_t dlDataToUlAckListCount;
1745 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1746 }SchPucchDlDataToUlAck;
1748 typedef struct schPucchPowerControl
1756 SchP0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1757 uint8_t pathLossRefRSListCount;
1758 SchPathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1759 }SchPucchPowerControl;
1761 typedef struct schPucchCfg
1763 SchPucchResrcSetCfg *resrcSet;
1764 SchPucchResrcCfg *resrc;
1765 SchPucchFormatCfg *format1;
1766 SchPucchFormatCfg *format2;
1767 SchPucchFormatCfg *format3;
1768 SchPucchFormatCfg *format4;
1769 SchPucchSchedReqCfg *schedReq;
1770 SchPucchMultiCsiCfg *multiCsiCfg;
1771 SchPucchSpatialCfg *spatialInfo;
1772 SchPucchDlDataToUlAck *dlDataToUlAck;
1773 SchPucchPowerControl *powerControl;
1776 /* Transform precoding disabled */
1777 typedef struct schTransPrecodDisabled
1779 uint16_t scramblingId0;
1780 }SchTransPrecodDisabled;
1782 /* DMRS Uplink configuration */
1783 typedef struct SchDmrsUlCfg
1785 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1786 SchTransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1789 /* PUSCH Configuration */
1790 typedef struct schPuschCfg
1792 uint8_t dataScramblingId;
1793 SchDmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1794 SchResourceAllocType resourceAllocType;
1795 uint8_t numTimeDomRsrcAlloc;
1796 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1797 SchTransformPrecoder transformPrecoder;
1800 /* Initial Uplink BWP */
1801 typedef struct schInitialUlBwp
1804 SchPucchCfg pucchCfg;
1806 SchPuschCfg puschCfg;
1809 typedef struct schBwpCfgDedicated
1811 SchPucchCfg pucchCfg;
1812 SchPuschCfg puschCfg;
1813 }SchBwpCfgDedicated;
1815 /* Uplink BWP information */
1816 typedef struct schUlBwpInfo
1819 SchBwpUlCfg bwpCommon;
1820 SchBwpCfgDedicated bwpDed;
1823 typedef struct schBwpRelInfo
1828 /* Serving cell configuration */
1829 typedef struct schServCellRecfgInfo
1831 SchInitalDlBwp initDlBwp;
1832 SchRadioLinkConfig radioLinkMonConfig;
1833 uint8_t numDlBwpToAddOrMod;
1834 SchDlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP];
1835 uint8_t numDlBwpToRel;
1836 SchBwpRelInfo dlBwpToRelList[MAX_NUM_BWP];
1837 uint8_t firstActvDlBwpId;
1838 uint8_t defaultDlBwpId;
1839 uint8_t *bwpInactivityTmr;
1840 SchPdschServCellCfg pdschServCellCfg;
1841 SchInitialUlBwp initUlBwp;
1842 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1843 uint8_t numUlBwpToAddOrMod;
1844 SchUlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
1845 uint8_t numUlBwpToRel;
1846 SchBwpRelInfo ulBwpToRelList[MAX_NUM_BWP];
1847 uint8_t firstActvUlBwpId;
1848 }SchServCellRecfgInfo;
1850 /* Serving cell configuration */
1851 typedef struct schServCellCfgInfo
1853 SchInitalDlBwp initDlBwp;
1854 SchRadioLinkConfig radioLinkMonConfig;
1855 uint8_t numDlBwpToAdd;
1856 SchDlBwpInfo dlBwpToAddList[MAX_NUM_BWP];
1857 uint8_t firstActvDlBwpId;
1858 uint8_t defaultDlBwpId;
1859 uint8_t *bwpInactivityTmr;
1860 SchPdschServCellCfg pdschServCellCfg;
1861 SchInitialUlBwp initUlBwp;
1862 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1863 uint8_t numUlBwpToAdd;
1864 SchUlBwpInfo ulBwpToAddList[MAX_NUM_BWP];
1865 uint8_t firstActvUlBwpId;
1866 }SchServCellCfgInfo;
1868 typedef struct schNonDynFiveQi
1873 uint16_t maxDataBurstVol;
1876 typedef struct schDynFiveQi
1879 uint16_t packetDelayBudget;
1880 uint8_t packetErrRateScalar;
1881 uint8_t packetErrRateExp;
1883 uint8_t delayCritical;
1885 uint16_t maxDataBurstVol;
1888 typedef struct schNgRanAllocAndRetPri
1890 uint8_t priorityLevel;
1891 uint8_t preEmptionCap;
1892 uint8_t preEmptionVul;
1893 }SchNgRanAllocAndRetPri;
1895 typedef struct schGrbQosFlowInfo
1897 uint32_t maxFlowBitRateDl;
1898 uint32_t maxFlowBitRateUl;
1899 uint32_t guarFlowBitRateDl;
1900 uint32_t guarFlowBitRateUl;
1904 typedef struct schDrbQos
1906 SchQosType fiveQiType; /* Dynamic or non-dynamic */
1909 SchNonDynFiveQi nonDyn5Qi;
1910 SchDynFiveQi dyn5Qi;
1912 SchNgRanAllocAndRetPri ngRanRetPri;
1913 SchGrbQosFlowInfo grbQosFlowInfo;
1914 uint16_t pduSessionId;
1915 uint32_t ulPduSessAggMaxBitRate; /* UL PDU Session Aggregate max bit rate */
1918 /* Special cell configuration */
1919 typedef struct schSpCellCfg
1921 uint8_t servCellIdx;
1922 SchServCellCfgInfo servCellCfg;
1925 /* Special cell Reconfiguration */
1926 typedef struct schSpCellRecfg
1928 uint8_t servCellIdx;
1929 SchServCellRecfgInfo servCellRecfg;
1932 /* Uplink logical channel configuration */
1933 typedef struct SchUlLcCfg
1938 uint8_t pbr; // prioritisedBitRate
1939 uint8_t bsd; // bucketSizeDuration
1942 /* Downlink logical channel configuration */
1943 typedef struct schDlLcCfg
1945 uint8_t lcp; // logical Channel Prioritization
1948 /* Logical Channel configuration */
1949 typedef struct schLcCfg
1953 SchDrbQosInfo *drbQos;
1958 /* Aggregate max bit rate */
1959 typedef struct schAmbrCfg
1961 uint32_t ulBr; /* Ul BitRate */
1964 typedef struct schModulationInfo
1968 SchMcsTable mcsTable;
1971 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.5' UE Configuration Request*/
1972 typedef struct schUeCfgReq
1978 bool macCellGrpCfgPres;
1979 SchMacCellGrpCfg macCellGrpCfg;
1980 bool phyCellGrpCfgPres;
1981 SchPhyCellGrpCfg phyCellGrpCfg;
1983 SchSpCellCfg spCellCfg;
1984 SchAmbrCfg *ambrCfg;
1985 SchModulationInfo dlModInfo;
1986 SchModulationInfo ulModInfo;
1987 uint8_t numLcsToAdd;
1988 SchLcCfg schLcCfg[MAX_NUM_LC];
1991 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.6' UE Reconfiguration Request*/
1992 typedef struct schUeRecfgReq
1998 bool macCellGrpRecfgPres;
1999 SchMacCellGrpCfg macCellGrpRecfg;
2000 bool phyCellGrpRecfgPres;
2001 SchPhyCellGrpCfg phyCellGrpRecfg;
2002 bool spCellRecfgPres;
2003 SchSpCellRecfg spCellRecfg;
2004 SchAmbrCfg *ambrRecfg;
2005 SchModulationInfo dlModInfo;
2006 SchModulationInfo ulModInfo;
2007 uint8_t numLcsToAdd;
2008 SchLcCfg schLcCfgAdd[MAX_NUM_LC];
2009 uint8_t numLcsToDel;
2010 uint8_t lcIdToDel[MAX_NUM_LC];
2011 uint8_t numLcsToMod;
2012 SchLcCfg schLcCfgMod[MAX_NUM_LC];
2013 SchDataTransmission dataTransmissionInfo;
2015 bool drxConfigIndicatorRelease;
2019 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.5 UE Confg Response*/
2020 typedef struct schUeCfgRsp
2027 CauseOfResult cause;
2030 /*As per WG8 V7.0.0 Sec 11.2.4.3.6, UE ReCFG and UECFG have same structure definition*/
2031 typedef struct schUeCfgRsp SchUeRecfgRsp;
2033 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.7' Delete UE Request*/
2034 typedef struct schUeDelete
2040 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.7*/
2041 typedef struct schUeDeleteRsp
2046 CauseOfResult cause;
2049 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.8' DL HARQ Indication*/
2050 typedef struct dlHarqInd
2054 SlotTimingInfo slotInd;
2056 uint8_t harqPayload[MAX_HARQ_BITS_IN_BYTES];
2059 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.9' UL HARQ (CRC) Indication*/
2060 typedef struct crcIndInfo
2064 SlotTimingInfo timingInfo;
2066 uint8_t crcInd[MAX_NUMBER_OF_CRC_IND_BITS];
2069 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.10' UL Channel Quality Indication*/
2070 typedef struct ulCqiReport
2072 CqiUlReportType reportType;
2077 typedef struct schUlCqiInd
2081 SlotTimingInfo timingInfo;
2082 uint8_t numUlCqiReported;
2083 UlCqiReport ulCqiRpt;
2086 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.11' DL Channel Quality Indication*/
2087 typedef struct dlCqiReport
2089 uint8_t reportType; /*Bitmap for CQI, PMI, RI, CRI report*/
2096 typedef struct schDlCqiInd
2100 SlotTimingInfo timingInfo;
2101 uint8_t numDlCqiReported;
2102 DlCqiReport dlCqiRpt;
2105 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.12' Rach Ind contents*/
2106 typedef struct rachIndInfo
2110 SlotTimingInfo timingInfo;
2114 uint8_t preambleIdx;
2118 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.13' Paging Ind contents*/
2119 typedef struct schPageInd
2128 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.14 Rach Res Request*/
2129 typedef struct schRachRsrcReq
2131 SlotTimingInfo slotInd;
2135 uint8_t ssbIdx[MAX_NUM_SSB];
2138 typedef struct schCfraSsbResource
2141 uint8_t raPreambleIdx;
2142 }SchCfraSsbResource;
2144 typedef struct schCfraRsrc
2147 SchCfraSsbResource ssbResource[MAX_NUM_SSB];
2150 typedef struct schRachRsrcRsp
2155 SchCfraResource cfraResource;
2158 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.15 Rach Res Release*/
2159 typedef struct schRachRsrcRel
2161 SlotTimingInfo slotInd;
2164 SchCfraResource cfraResource;
2167 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.16 DL RLC Buffer Status Information*/
2168 typedef struct dlRlcBOInfo
2173 uint32_t dataVolume;
2176 /*O-RAN WG8 v7.0.0 Sec 11.2.4.2.17 Scheduling Request Indication*/
2177 typedef struct srUciIndInfo
2181 SlotTimingInfo slotInd;
2183 uint8_t srPayload[MAX_SR_BITS_IN_BYTES];
2186 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.18 UL RLC Buffer Status Information*/
2187 typedef struct dataVolInfo
2193 typedef struct ulBufferStatusRptInd
2199 DataVolInfo dataVolInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS];
2200 }UlBufferStatusRptInd;
2202 /**O-RAN WG* v7.0.0 Sec 11.2.4.2.19 Power Headroom Indication*/
2203 typedef struct phrData /*Spec 38.321 Sec 6.1.3.8*/
2209 typedef struct singlePhrInfo
2214 typedef struct multiPhr
2220 typedef struct multiplePhrInfo /*Spec 38.321 Sec 6.1.3.9*/
2222 uint8_t numPhrReported;
2223 MultiPhr multiPhrStat[MAX_PHR_REPORT];
2226 typedef struct schPwrHeadroomInd
2233 SinglePhrInfo singlePhr;
2234 MultiplePhrInfo multiPhr;
2238 typedef struct schUeHqInfo
2244 typedef struct schRlsHqInfo
2248 SchUeHqInfo *ueHqInfo;
2251 /* Statistics Request from MAC to SCH */
2252 typedef struct schStatsGrpInfo
2255 uint16_t periodicity; /* In milliseconds */
2257 SchMeasurementType statsList[MAX_NUM_STATS];
2260 typedef struct schStatsReq
2262 uint64_t subscriptionId;
2263 uint8_t numStatsGroup;
2264 SchStatsGrpInfo statsGrpList[MAX_NUM_STATS_GRP];
2267 /* Statistics Response from SCH to MAC */
2268 typedef struct schStatsGrpRejected
2271 CauseOfResult cause;
2272 }SchStatsGrpRejected;
2274 typedef struct schStatsRsp
2276 uint64_t subscriptionId;
2277 uint8_t numGrpAccepted;
2278 uint8_t statsGrpAcceptedList[MAX_NUM_STATS_GRP];
2279 uint8_t numGrpRejected;
2280 SchStatsGrpRejected statsGrpRejectedList[MAX_NUM_STATS_GRP];
2283 /* Statistics Indication from SCH to MAC */
2284 typedef struct schStats
2286 SchMeasurementType type;
2290 typedef struct schStatsInd
2292 uint64_t subscriptionId;
2295 SchStats measuredStatsList[MAX_NUM_STATS];
2299 /* function declarations */
2300 uint8_t MacMessageRouter(Pst *pst, void *msg);
2301 uint8_t SchMessageRouter(Pst *pst, void *msg);
2303 /**********************************************************************
2305 **********************************************************************/