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
58 #define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */
59 #define SCH_SSB_MASK_SIZE 1
61 #define MAX_NUM_PRG 1 /* max value should be later 275 */
62 #define MAX_DIG_BF_INTERFACES 0 /* max value should be later 255 */
63 #define MAX_CODEWORDS 1 /* max should be 2 */
64 #define SCH_HARQ_PROC_ID 1 /* harq proc id */
65 #define SCH_ALLOC_TYPE_1 1 /*sch res alloc type */
67 /* Datatype in UL SCH Info */
68 #define SCH_DATATYPE_PUSCH 1
69 #define SCH_DATATYPE_PUSCH_UCI 2
70 #define SCH_DATATYPE_UCI 4
71 #define SCH_DATATYPE_SRS 8
72 #define SCH_DATATYPE_PRACH 16
74 #define MAX_NUMBER_OF_CRC_IND_BITS 1
75 #define MAX_NUMBER_OF_UCI_IND_BITS 1
76 #define MAX_SR_BITS_IN_BYTES 1
77 #define MAX_HARQ_BITS_IN_BYTES 1
78 #define MAX_NUM_LOGICAL_CHANNEL_GROUPS 8
79 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
80 #define MAX_NUM_TAGS 4 /* Max number of timing advance groups */
81 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
82 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
83 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
84 #define FREQ_DOM_RSRC_SIZE 6 /* i.e. 6 bytes because Size of frequency domain resource is 45 bits */
85 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
86 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
87 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
89 /* PUCCH Configuration Macro */
90 #define MAX_NUM_PUCCH_RESRC 128
91 #define MAX_NUM_PUCCH_RESRC_SET 4
92 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
93 #define MAX_NUM_SPATIAL_RELATIONS 8
94 #define MAX_NUM_PUCCH_P0_PER_SET 8
95 #define MAX_NUM_PATH_LOSS_REF_RS 4
96 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
97 #define QPSK_MODULATION 2
99 #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 */
100 #define TX_PAYLOAD_HDR_LEN 32 /* Intel L1 requires adding a 32 byte header to transmitted payload */
101 #define UL_TX_BUFFER_SIZE 5
103 #define MAX_NUM_CONFIG_SLOTS 160 /*Max number of slots as per the numerology*/
104 #define MAX_NUM_K0_IDX 16 /* Max number of pdsch time domain downlink allocation */
105 #define MAX_NUM_K1_IDX 8 /* As per spec 38.213 section 9.2.3 Max number of PDSCH-to-HARQ resource indication */
106 #define MIN_NUM_K1_IDX 4 /* Min K1 values */
107 #define MAX_NUM_K2_IDX 16 /* PUSCH time domain UL resource allocation list */
108 #define DEFAULT_K0_VALUE 0 /* As per 38.331, PDSCH-TimeDomainResourceAllocation field descriptions */
109 /* As per 38.331, PUSCH-TimeDomainResourceAllocationList field descriptions */
110 #define DEFAULT_K2_VALUE_FOR_SCS15 1
111 #define DEFAULT_K2_VALUE_FOR_SCS30 1
112 #define DEFAULT_K2_VALUE_FOR_SCS60 2
113 #define DEFAULT_K2_VALUE_FOR_SCS120 3
116 #define DL_DMRS_SYMBOL_POS 4 /* Bitmap value 00000000000100 i.e. using 3rd symbol for PDSCH DMRS */
118 #define MAX_PHR_REPORT 1 /*TODO: Range of PHR reports in multiple PHR.*/
119 #define MAX_FAILURE_DET_RESOURCES 10 /*Spec 38.331 'maxNrofFailureDetectionResources'*/
121 #define ADD_DELTA_TO_TIME(crntTime, toFill, incr, numOfSlot) \
123 if ((crntTime.slot + incr) > (numOfSlot - 1)) \
125 toFill.sfn = (crntTime.sfn + 1); \
129 toFill.sfn = crntTime.sfn; \
131 toFill.slot = (crntTime.slot + incr) % numOfSlot; \
132 if (toFill.sfn >= MAX_SFN) \
134 toFill.sfn%=MAX_SFN; \
142 RRC_CONNECTED_USERS_RSRC
178 TIME_ALIGNMENT_TIMER_MS500,
179 TIME_ALIGNMENT_TIMER_MS750,
180 TIME_ALIGNMENT_TIMER_MS1280,
181 TIME_ALIGNMENT_TIMER_MS1920,
182 TIME_ALIGNMENT_TIMER_MS2560,
183 TIME_ALIGNMENT_TIMER_MS5120,
184 TIME_ALIGNMENT_TIMER_MS10240,
185 TIME_ALIGNMENT_TIMER_INFINITE
186 }SchTimeAlignmentTimer;
190 PHR_PERIODIC_TIMER_SF10,
191 PHR_PERIODIC_TIMER_SF20,
192 PHR_PERIODIC_TIMER_SF50,
193 PHR_PERIODIC_TIMER_SF100,
194 PHR_PERIODIC_TIMER_SF200,
195 PHR_PERIODIC_TIMER_SF500,
196 PHR_PERIODIC_TIMER_SF1000,
197 PHR_PERIODIC_TIMER_INFINITE
198 }SchPhrPeriodicTimer;
202 PHR_PROHIBIT_TIMER_SF0,
203 PHR_PROHIBIT_TIMER_SF10,
204 PHR_PROHIBIT_TIMER_SF20,
205 PHR_PROHIBIT_TIMER_SF50,
206 PHR_PROHIBIT_TIMER_SF100,
207 PHR_PROHIBIT_TIMER_SF200,
208 PHR_PROHIBIT_TIMER_SF500,
209 PHR_PROHIBIT_TIMER_SF1000
210 }SchPhrProhibitTimer;
214 PHR_TX_PWR_FACTOR_CHANGE_DB1,
215 PHR_TX_PWR_FACTOR_CHANGE_DB3,
216 PHR_TX_PWR_FACTOR_CHANGE_DB6,
217 PHR_TX_PWR_FACTOR_CHANGE_INFINITE
218 }SchPhrTxPwrFactorChange;
228 HARQ_ACK_CODEBOOK_SEMISTATIC,
229 HARQ_ACK_CODEBOOK_DYNAMIC
230 }SchPdschHarqAckCodebook;
234 NUM_HARQ_PROC_FOR_PDSCH_N2,
235 NUM_HARQ_PROC_FOR_PDSCH_N4,
236 NUM_HARQ_PROC_FOR_PDSCH_N6,
237 NUM_HARQ_PROC_FOR_PDSCH_N10,
238 NUM_HARQ_PROC_FOR_PDSCH_N16
239 }SchNumHarqProcForPdsch;
243 MAX_CODE_BLOCK_GROUP_PER_TB_N2,
244 MAX_CODE_BLOCK_GROUP_PER_TB_N4,
245 MAX_CODE_BLOCK_GROUP_PER_TB_N6,
246 MAX_CODE_BLOCK_GROUP_PER_TB_N8
247 }SchMaxCodeBlkGrpPerTB;
251 PDSCH_X_OVERHEAD_XOH_6,
252 PDSCH_X_OVERHEAD_XOH_12,
253 PDSCH_X_OVERHEAD_XOH_18
258 DMRS_ADDITIONAL_POS0,
259 DMRS_ADDITIONAL_POS1,
261 }SchDmrsAdditionPosition;
265 RESOURCE_ALLOCTION_TYPE_0,
266 RESOURCE_ALLOCTION_TYPE_1,
267 RESOURCE_ALLOCTION_DYN_SWITCH
268 }SchResourceAllocType;
272 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_A,
273 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_B
274 }SchTimeDomRsrcAllocMappingType;
278 ENABLED_TRANSFORM_PRECODER,
279 DISABLED_TRANSFORM_PRECODER
280 }SchTransformPrecoder;
284 INTERLEAVED_CCE_REG_MAPPING = 1,
285 NONINTERLEAVED_CCE_REG_MAPPING
290 SLOT_PERIODICITY_AND_OFFSET_SL_1 = 1,
291 SLOT_PERIODICITY_AND_OFFSET_SL_2,
292 SLOT_PERIODICITY_AND_OFFSET_SL_4,
293 SLOT_PERIODICITY_AND_OFFSET_SL_5,
294 SLOT_PERIODICITY_AND_OFFSET_SL_8,
295 SLOT_PERIODICITY_AND_OFFSET_SL_10,
296 SLOT_PERIODICITY_AND_OFFSET_SL_16,
297 SLOT_PERIODICITY_AND_OFFSET_SL_20,
298 SLOT_PERIODICITY_AND_OFFSET_SL_40,
299 SLOT_PERIODICITY_AND_OFFSET_SL_80,
300 SLOT_PERIODICITY_AND_OFFSET_SL_160,
301 SLOT_PERIODICITY_AND_OFFSET_SL_320,
302 SLOT_PERIODICITY_AND_OFFSET_SL_640,
303 SLOT_PERIODICITY_AND_OFFSET_SL_1280,
304 SLOT_PERIODICITY_AND_OFFSET_SL_2560
305 }SchMSlotPeriodAndOffset;
315 SEARCH_SPACE_TYPE_COMMON = 1,
316 SEARCH_SPACE_TYPE_UE_SPECIFIC
321 SCH_QOS_NON_DYNAMIC = 1,
327 AGGREGATION_LEVEL_N0,
328 AGGREGATION_LEVEL_N1,
329 AGGREGATION_LEVEL_N2,
330 AGGREGATION_LEVEL_N3,
331 AGGREGATION_LEVEL_N4,
332 AGGREGATION_LEVEL_N5,
333 AGGREGATION_LEVEL_N6,
345 CODE_WORDS_SCHED_BY_DCI_N1,
346 CODE_WORDS_SCHED_BY_DCI_N2
347 }SchCodeWordsSchedByDci;
351 STATIC_BUNDLING_TYPE = 1,
352 DYNAMIC_BUNDLING_TYPE
358 SCH_SET1_SIZE_WIDEBAND,
359 SCH_SET1_SIZE_N2_WIDEBAND,
360 SCH_SET1_SIZE_N4_WIDEBAND
361 }SchBundlingSizeSet1;
366 SCH_SET2_SIZE_WIDEBAND
367 }SchBundlingSizeSet2;
421 SCH_MCS_TABLE_QAM_64,
422 SCH_MCS_TABLE_QAM_256,
423 SCH_MCS_TABLE_QAM_64_LOW_SE
436 DATA_TRANSMISSION_ALLOWED,
437 STOP_DATA_TRANSMISSION,
438 RESTART_DATA_TRANSMISSION
439 }SchDataTransmission;
446 }SchPurposeOfFailureDet;
454 /* Performance measurements from 3GPP TS 28.552 Release 15 */
457 SCH_DL_TOTAL_PRB_USAGE,
458 SCH_UL_TOTAL_PRB_USAGE
462 typedef struct timeDomainAlloc
468 typedef struct resAllocType0
470 uint8_t rbBitmap[36];
473 typedef struct resAllocType1
479 typedef struct resAllocType1 FreqDomainRsrc;
481 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-32 BWP Information */
482 typedef struct bwpCfg
484 uint8_t subcarrierSpacing;
485 uint8_t cyclicPrefix;
486 FreqDomainRsrc freqAlloc;
492 uint16_t beamIdx[MAX_DIG_BF_INTERFACES];
495 typedef struct beamformingInfo
499 uint8_t digBfInterfaces;
500 Prg prg[MAX_NUM_PRG];
503 /* SIB1 PDSCH structures */
505 typedef struct codewordinfo
507 uint16_t targetCodeRate;
515 typedef struct dmrsInfo
517 uint16_t dlDmrsSymbPos;
518 uint8_t dmrsConfigType;
519 uint16_t dlDmrsScramblingId;
521 uint8_t numDmrsCdmGrpsNoData;
524 uint8_t nrOfDmrsSymbols;
528 typedef struct pdschFreqAlloc
530 uint8_t resourceAllocType;
531 /* since we are using type-1, rbBitmap excluded */
532 uint8_t rbBitmap[36];
535 uint8_t vrbPrbMapping;
538 typedef struct pdschTimeAlloc
545 typedef struct txPowerPdschInfo
547 uint8_t powerControlOffset;
548 uint8_t powerControlOffsetSS;
551 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-43 PDSCH Configuration */
552 typedef struct pdschCfg
557 uint8_t numCodewords;
558 CodewordInfo codeword[MAX_CODEWORDS];
559 uint16_t dataScramblingId;
561 uint8_t transmissionScheme;
564 PdschFreqAlloc pdschFreqAlloc;
565 PdschTimeAlloc pdschTimeAlloc;
566 BeamformingInfo beamPdschInfo;
567 TxPowerPdschInfo txPdschPower;
569 /* SIB1 PDSCH structures end */
571 /* SIB1 interface structure */
573 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-35 CORESET Configuration */
574 typedef struct coresetCfg
577 uint8_t startSymbolIndex;
578 uint8_t durationSymbols;
579 uint8_t freqDomainResource[6];
580 uint8_t cceRegMappingType;
581 uint8_t regBundleSize;
582 uint8_t interleaverSize;
585 uint8_t coresetPoolIndex;
586 uint8_t precoderGranularity;
588 uint8_t aggregationLevel;
591 typedef struct txPowerPdcchInfo
593 uint8_t beta_pdcch_1_0;
594 uint8_t powerControlOffsetSS;
597 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-42 DL-DCI Configuration */
601 uint16_t scramblingId;
602 uint16_t scramblingRnti;
605 BeamformingInfo beamPdcchInfo;
606 TxPowerPdcchInfo txPdcchPower;
610 typedef struct pdcchCfg
612 /* coreset-0 configuration */
613 CoresetCfg coresetCfg;
615 DlDCI dci; /* as of now its only one DCI, later it will be numDlCi */
617 /* end of SIB1 PDCCH structures */
619 typedef struct schPcchCfg
621 uint8_t numPO; /*Derived from Ns*/
622 bool poPresent; /*FirstPDCCH-MonitoringPO is present or not*/
623 uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
626 typedef struct schPdcchConfigSib1
628 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
629 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
632 typedef struct schRachCfgGeneric
634 uint8_t prachCfgIdx; /* PRACH config idx */
635 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
636 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
637 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
638 int16_t preambleRcvdTargetPower;
639 uint8_t preambleTransMax;
640 uint8_t pwrRampingStep;
641 uint8_t raRspWindow; /* RA Response Window */
644 typedef struct schRachCfg
646 SchRachCfgGeneric prachCfgGeneric;
647 uint8_t totalNumRaPreamble; /* Total number of RA preambles */
648 uint8_t ssbPerRach; /* SSB per RACH occassion */
649 uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */
650 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
651 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
652 uint16_t rootSeqIdx; /* Root sequence index */
653 uint16_t rootSeqLen; /* root sequence length */
654 uint8_t numRootSeq; /* Number of root sequences required for FD */
655 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
658 typedef struct schBwpParams
660 FreqDomainRsrc freqAlloc;
662 uint8_t cyclicPrefix;
665 typedef struct schCandidatesInfo
674 typedef struct schSearchSpaceCfg
676 uint8_t searchSpaceId;
678 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
679 uint16_t monitoringSlot;
681 uint16_t monitoringSymbol;
682 SchCandidatesInfo candidate;
685 typedef struct schPdcchCfgCmn
687 SchSearchSpaceCfg commonSearchSpace;
688 uint8_t raSearchSpaceId;
691 typedef struct schPdschCfgCmnTimeDomRsrcAlloc
696 uint8_t lengthSymbol;
697 }SchPdschCfgCmnTimeDomRsrcAlloc;
699 typedef struct schPdschCfgCmn
701 uint8_t numTimeDomAlloc;
702 SchPdschCfgCmnTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
705 typedef struct schPucchCfgCmn
707 uint8_t pucchResourceCommon;
708 uint8_t pucchGroupHopping;
711 /* PUSCH Time Domain Resource Allocation */
712 typedef struct schPuschTimeDomRsrcAlloc
715 SchTimeDomRsrcAllocMappingType mappingType;
717 uint8_t symbolLength;
718 }SchPuschTimeDomRsrcAlloc;
720 typedef struct schPuschCfgCmn
722 uint8_t numTimeDomRsrcAlloc;
723 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
726 typedef struct schK1TimingInfo
729 uint8_t k1Indexes[MAX_NUM_K1_IDX];
732 typedef struct schK0TimingInfo
735 SchK1TimingInfo k1TimingInfo;
738 typedef struct schK0K1TimingInfo
741 SchK0TimingInfo k0Indexes[MAX_NUM_K0_IDX];
744 typedef struct schK0K1TimingInfoTbl
747 SchK0K1TimingInfo k0k1TimingInfo[MAX_NUM_CONFIG_SLOTS];
748 }SchK0K1TimingInfoTbl;
750 typedef struct schBwpDlCfg
753 SchPdcchCfgCmn pdcchCommon;
754 SchPdschCfgCmn pdschCommon;
757 typedef struct schK2TimingInfo
760 uint8_t k2Indexes[MAX_NUM_K2_IDX];
763 typedef struct schK2TimingInfoTbl
766 SchK2TimingInfo k2TimingInfo[MAX_NUM_CONFIG_SLOTS];
769 typedef struct schBwpUlCfg
772 SchRachCfg schRachCfg; /* PRACH config */
773 SchPucchCfgCmn pucchCommon;
774 SchPuschCfgCmn puschCommon;
777 typedef struct schPlmnInfoList
780 uint8_t numSliceSupport; /* Total slice supporting */
781 Snssai **snssai; /* List of supporting snssai*/
785 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
787 typedef struct schDrxOnDurationTimer
789 bool onDurationTimerValInMs;
792 uint8_t subMilliSeconds;
793 uint16_t milliSeconds;
794 }onDurationtimerValue;
795 }SchDrxOnDurationTimer;
797 typedef struct schDrxLongCycleStartOffset
799 uint16_t drxLongCycleStartOffsetChoice;
800 uint16_t drxLongCycleStartOffsetVal;
801 }SchDrxLongCycleStartOffset;
803 typedef struct schShortDrx
805 uint16_t drxShortCycle;
806 uint8_t drxShortCycleTimer;
809 typedef struct schDrxCfg
811 SchDrxOnDurationTimer drxOnDurationTimer;
812 uint16_t drxInactivityTimer;
813 uint8_t drxHarqRttTimerDl;
814 uint8_t drxHarqRttTimerUl;
815 uint16_t drxRetransmissionTimerDl;
816 uint16_t drxRetransmissionTimerUl;
817 SchDrxLongCycleStartOffset drxLongCycleStartOffset;
819 SchShortDrx shortDrx;
820 uint8_t drxSlotOffset;
824 /*Spec 38.331 'NrNsPmaxList'*/
825 typedef struct schNrNsPmaxList
828 long additionalSpectrumEmission;
831 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
832 typedef struct schMultiFreqBandListSib
835 SchNrNsPmaxList nrNsPmaxList[1];
836 }SchMultiFreqBandListSib;
838 /*Spec 38.331 'SCS-SpecificCarrier'*/
839 typedef struct schScsSpecificCarrier
841 uint16_t offsetToCarrier;
842 uint8_t subCarrierSpacing;
844 uint16_t txDirectCurrentLoc;
845 }SchScsSpecificCarrier;
847 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
848 typedef struct schFreqInfoDlSib
850 SchMultiFreqBandListSib mutiFreqBandList[1];
851 uint16_t offsetToPointA;
852 SchScsSpecificCarrier schSpcCarrier[1];
855 typedef struct schBcchCfg
860 /*Spec 38.331 'DownlinkConfigCommonSIB'*/
861 typedef struct schDlCfgCommon
863 SchFreqInfoDlSib schFreqInfoDlSib;
864 SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */
865 SchBcchCfg schBcchCfg;
866 SchPcchCfg schPcchCfg;
869 /*Spec 38.331 'FrequencyInfoUL-SIB'*/
870 typedef struct schFreqInfoUlSib
872 SchMultiFreqBandListSib mutiFreqBandList[1];
873 uint16_t absoluteFreqPointA;
874 SchScsSpecificCarrier schSpcCarrier[1];
876 bool frequencyShift7p5khz;
879 /*Spec 38.331 'UplinkConfigCommonSIB '*/
880 typedef struct schUlCfgCommon
882 SchFreqInfoUlSib schFreqInfoUlSib;
883 SchBwpUlCfg schInitialUlBwp; /* Initial DL BWP */
884 uint16_t schTimeAlignTimer;
887 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.1 Cell Conf Request*/
888 typedef struct schCellCfg
890 uint16_t cellId; /* Cell Id */
894 uint16_t phyCellId; /* Physical cell id */
895 SchPlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */
896 SchDuplexMode dupMode; /* Duplex type: TDD/FDD */
897 uint8_t dlBandwidth; /* Supported B/W */
898 uint8_t ulBandwidth; /* Supported B/W */
899 SchDlCfgCommon dlCfgCommon; /*Spec 38.331 DownlinkConfigCommonSIB*/
900 SchUlCfgCommon ulCfgCommon; /*Spec 38.331 UplinkConfigCommonSIB*/
902 TDDCfg tddCfg; /* Spec 38.331 tdd-UL-DL-ConfigurationCommon */
905 /*Ref:Spec 38.331 "ssb-PositionsInBurst", Value 0 in Bitmap => corresponding SS/PBCH block is not transmitted
906 *value 1 => corresponding SS/PBCH block is transmitted*/
907 uint32_t ssbPosInBurst[SCH_SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
908 SchSSBPeriod ssbPeriod; /* SSB Periodicity in msec */
909 uint32_t ssbFrequency; /* SB frequency in kHz*/
910 uint8_t dmrsTypeAPos;
911 uint8_t ssbScs; /* SSB subcarrier spacing*/
912 SchPdcchConfigSib1 pdcchCfgSib1; /* Req to configure CORESET#0 and SearchSpace#0*/
913 uint32_t ssbPbchPwr; /* SSB block power */
914 uint8_t ssbSubcOffset; /* Subcarrier Offset(Kssb) */
918 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.1 Cell Config Response*/
919 typedef struct schCellCfgCfm
921 uint16_t cellId; /* Cell Id */
926 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.2 Cell Del Req*/
927 typedef struct schCellDeleteReq
932 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.2 Cell Del Response*/
933 typedef struct schCellDeleteRsp
940 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.3*/
941 typedef struct schRrmPolicyRatio
945 uint8_t dedicatedRatio;
948 typedef struct schRrmPolicyOfSlice
951 SchRrmPolicyRatio rrmPolicyRatioInfo;
952 }SchRrmPolicyOfSlice;
954 typedef struct schSliceCfgReq
956 uint8_t numOfConfiguredSlice;
957 SchRrmPolicyOfSlice **listOfSlices;
960 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.3 Slice Cfg Response*/
961 typedef struct schSliceCfgRsp
968 /*As per ORAN-WG8 V7.0.0 Sec 11.2.4.3.4 , Slice Cfg and Recfg are same structures*/
969 typedef struct schSliceCfgReq SchSliceRecfgReq;
970 typedef struct schSliceCfgRsp SchSliceRecfgRsp;
972 typedef struct ssbInfo
974 uint8_t ssbIdx; /* SSB Index */
975 TimeDomainAlloc tdAlloc; /* Time domain allocation */
976 FreqDomainRsrc fdAlloc; /* Freq domain allocation */
979 typedef struct sib1AllocInfo
982 PdcchCfg *sib1PdcchCfg;
985 typedef struct prachSchInfo
987 uint8_t numPrachOcas; /* Num Prach Ocassions */
988 uint8_t prachFormat; /* PRACH Format */
989 uint8_t numRa; /* Freq domain ocassion */
990 uint8_t prachStartSymb; /* Freq domain ocassion */
993 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
994 typedef struct dlBrdcstAlloc
996 uint16_t crnti; /* SI-RNTI */
997 /* Ssb transmission is determined as follows:
998 * 0 : No tranamission
999 * 1 : SSB Transmission
1000 * 2 : SSB Repetition */
1001 uint8_t ssbTransmissionMode;
1002 uint8_t ssbIdxSupported;
1003 SsbInfo ssbInfo[MAX_SSB_IDX];
1004 bool systemInfoIndicator;
1006 /* Sib1 transmission is determined as follows:
1007 * 0 : No tranamission
1008 * 1 : SIB1 Transmission
1009 * 2 : SIB1 Repetition */
1010 uint8_t sib1TransmissionMode;
1011 Sib1AllocInfo sib1Alloc;
1014 typedef struct msg3UlGrant
1016 uint8_t freqHopFlag;
1018 FreqDomainRsrc msg3FreqAlloc;
1025 typedef struct rarInfo
1029 Msg3UlGrant ulGrant;
1031 uint8_t rarPdu[RAR_PAYLOAD_SIZE];
1035 typedef struct rarAlloc
1040 PdcchCfg *rarPdcchCfg;
1041 PdschCfg *rarPdschCfg;
1044 typedef struct lcSchInfo
1050 typedef struct ceSchInfo
1056 typedef struct freqDomainAlloc
1058 uint8_t resAllocType; /* Resource allocation type */
1061 ResAllocType0 type0;
1062 ResAllocType1 type1;
1066 typedef struct transportBlock
1073 CeSchInfo ceSchInfo[MAX_NUM_LC];
1075 LcSchInfo lcSchInfo[MAX_NUM_LC];
1078 typedef struct dlMsgSchedInfo
1081 uint8_t dciFormatId;
1082 uint8_t harqProcNum;
1084 uint8_t dlAssignIdx;
1086 uint8_t pucchResInd;
1087 uint8_t harqFeedbackInd;
1088 uint16_t dlMsgPduLen;
1090 FreqDomainAlloc freqAlloc;
1091 TimeDomainAlloc timeAlloc;
1093 TransportBlock transportBlock[2];
1095 PdcchCfg *dlMsgPdcchCfg;
1096 PdschCfg *dlMsgPdschCfg;
1099 typedef struct schSlotValue
1101 SlotTimingInfo currentTime;
1102 SlotTimingInfo broadcastTime;
1103 SlotTimingInfo rarTime;
1104 SlotTimingInfo dlMsgTime;
1105 SlotTimingInfo ulDciTime;
1109 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-36 DCI Format0_0 Configuration */
1110 typedef struct format0_0
1112 uint8_t resourceAllocType;
1113 FreqDomainAlloc freqAlloc;
1114 TimeDomainAlloc timeAlloc;
1125 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-40 DCI Format 0_1 Configuration */
1126 typedef struct format0_1
1128 uint8_t carrierIndicator;
1130 uint8_t bwpIndicator;
1131 uint8_t resourceAlloc;
1132 FreqDomainRsrc freqAlloc;
1133 TimeDomainAlloc timeAlloc;
1140 uint8_t firstDownlinkAssignmentIndex;
1141 uint8_t secondDownlinkAssignmentIndex;
1143 uint8_t srsResourceSetIndicator;
1144 uint8_t srsResourceIndicator;
1146 uint8_t antennaPorts;
1149 uint8_t cbgTransmissionInfo;
1151 uint8_t betaOffsetIndicator;
1152 bool dmrsSequenceInitialization;
1153 bool ulschIndicatior;
1156 typedef struct dciFormat
1158 FormatType formatType; /* DCI Format */
1161 Format0_0 format0_0; /* Format 0_0 */
1162 Format0_1 format0_1; /* Format 0_1 */
1166 typedef struct dciInfo
1168 uint16_t crnti; /* CRNTI */
1169 BwpCfg bwpCfg; /* BWP Cfg */
1170 CoresetCfg coresetCfg; /* Coreset1 Cfg */
1171 DciFormat dciFormatInfo; /* Dci Format */
1172 DlDCI dciInfo; /* DlDCI */
1176 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.8 DL Scheduling Information */
1177 typedef struct dlSchedInfo
1179 uint16_t cellId; /* Cell Id */
1180 SchSlotValue schSlotValue;
1182 /* Allocation for broadcast messages */
1183 bool isBroadcastPres;
1184 DlBrdcstAlloc brdcstAlloc;
1186 /* Allocation for RAR message */
1187 RarAlloc *rarAlloc[MAX_NUM_UE];
1189 /* UL grant in response to BSR */
1192 /* Allocation from dedicated DL msg */
1193 DlMsgSchInfo *dlMsgAlloc[MAX_NUM_UE];
1197 /*Reference: O-RAN.WG8.AAD.v7.0.0, Sec 11.2.4.3.13 Downlink Paging Allocation*/
1198 typedef struct interleaved_t
1200 uint8_t regBundleSize;
1201 uint8_t interleaverSize;
1202 uint16_t shiftIndex;
1205 typedef struct pageDlDci
1207 uint8_t freqDomainResource[6];
1208 uint8_t durationSymbols;
1209 uint8_t cceRegMappingType;
1212 Interleaved interleaved;
1213 uint8_t nonInterleaved;
1215 uint8_t ssStartSymbolIndex;
1217 uint8_t aggregLevel;
1218 uint8_t precoderGranularity;
1219 uint8_t coreSetSize;
1222 typedef struct resAllocType1 PageFreqDomainAlloc;
1224 typedef struct pageTimeDomainAlloc
1226 uint8_t mappingType;
1229 }PageTimeDomainAlloc;
1231 typedef struct pageDmrsConfig
1235 uint8_t nrOfDmrsSymbols;
1238 typedef struct pageTbInfo
1244 typedef struct pageDlSch
1246 PageFreqDomainAlloc freqAlloc;
1247 PageTimeDomainAlloc timeAlloc;
1248 PageDmrsConfig dmrs;
1249 uint8_t vrbPrbMapping;
1252 uint16_t dlPagePduLen;
1256 typedef struct dlPageAlloc
1259 SlotTimingInfo dlPageTime;
1264 PageDlDci pageDlDci;
1265 PageDlSch pageDlSch;
1268 typedef struct tbInfo
1270 uint8_t mcs; /* MCS */
1271 uint8_t ndi; /* NDI */
1272 uint8_t rv; /* Redundancy Version */
1273 uint16_t tbSize; /* TB Size */
1274 uint8_t qamOrder; /* Modulation Order */
1275 SchMcsTable mcsTable; /* MCS Table */
1278 typedef struct schPuschInfo
1280 uint8_t harqProcId; /* HARQ Process ID */
1281 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1282 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1283 TbInfo tbInfo; /* TB info */
1285 uint8_t dmrsMappingType;
1286 uint8_t nrOfDmrsSymbols;
1291 typedef struct harqInfo
1293 uint16_t harqAckBitLength;
1294 uint8_t betaOffsetHarqAck;
1297 typedef struct csiInfo
1300 uint8_t betaOffsetCsi;
1303 typedef struct harqFdbkInfo
1305 uint16_t harqBitLength;
1308 typedef struct csiFdbkInfo
1313 typedef struct schPucchFormatCfg
1315 uint8_t interSlotFreqHop;
1317 uint8_t maxCodeRate;
1323 typedef struct schPucchInfo
1325 FreqDomainRsrc fdAlloc;
1326 TimeDomainAlloc tdAlloc;
1328 HarqFdbkInfo harqInfo;
1329 CsiFdbkInfo csiInfo;
1330 BeamformingInfo beamPucchInfo;
1331 uint8_t pucchFormat;
1332 uint8_t intraFreqHop;
1333 uint16_t secondPrbHop;
1334 uint8_t initialCyclicShift;
1342 typedef struct schPuschUci
1344 uint8_t harqProcId; /* HARQ Process ID */
1345 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1346 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1347 TbInfo tbInfo; /* TB information */
1348 HarqInfo harqInfo; /* Harq Information */
1349 CsiInfo csiInfo; /* Csi information*/
1352 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.9 UL Scheduling Information */
1353 typedef struct ulSchedInfo
1355 uint16_t cellId; /* Cell Id */
1356 uint16_t crnti; /* CRNI */
1357 SlotTimingInfo slotIndInfo; /* Slot Info: sfn, slot number */
1358 uint8_t dataType; /* Type of info being scheduled */
1359 SchPrachInfo prachSchInfo; /* Prach scheduling info */
1360 SchPuschInfo schPuschInfo; /* Pusch scheduling info */
1361 SchPuschUci schPuschUci; /* Pusch Uci */
1362 SchPucchInfo schPucchInfo; /* Pucch and Uci scheduling info */
1365 /* Info of Scheduling Request to Add/Modify */
1366 typedef struct schSchedReqInfo
1369 SchSrProhibitTimer srProhibitTmr;
1370 SchSrTransMax srTransMax;
1373 /* Scheduling Request Configuration */
1374 typedef struct schSchedReqCfg
1376 uint8_t addModListCount;
1377 SchSchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
1378 uint8_t relListCount;
1379 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
1382 /* Info of Tag to Add/Modify */
1383 typedef struct schTagInfo
1386 SchTimeAlignmentTimer timeAlignmentTmr;
1389 /* Timing Advance Group Configuration */
1390 typedef struct schTagCfg
1392 uint8_t addModListCount;
1393 SchTagInfo addModList[MAX_NUM_TAGS]; /* List of Tag to Add/Modify */
1394 uint8_t relListCount;
1395 uint8_t relList[MAX_NUM_TAGS]; /* list of Tag Id to release */
1398 /* Configuration for Power headroom reporting */
1399 typedef struct schPhrCfg
1401 SchPhrPeriodicTimer periodicTmr;
1402 SchPhrProhibitTimer prohibitTmr;
1403 SchPhrTxPwrFactorChange txpowerFactorChange;
1406 bool type2OtherCell;
1407 SchPhrModeOtherCG modeOtherCG;
1410 /* MAC cell Group configuration */
1411 typedef struct schMacCellGrpCfg
1413 SchSchedReqCfg schedReqCfg;
1415 SchPhrCfg phrCfg; /* To be used only if phrCfgSetupPres is true */
1418 SchDrxCfg drxCfg; /* Drx configuration */
1422 /* Physical Cell Group Configuration */
1423 typedef struct schPhyCellGrpCfg
1425 SchPdschHarqAckCodebook pdschHarqAckCodebook;
1429 /* Control resource set info */
1430 typedef struct schControlRsrcSet
1432 uint8_t cRSetId; /* Control resource set id */
1433 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
1435 SchREGMappingType cceRegMappingType;
1436 SchPrecoderGranul precoderGranularity;
1437 uint16_t dmrsScramblingId;
1440 /* Search Space info */
1441 typedef struct schSearchSpace
1443 uint8_t searchSpaceId;
1445 SchMSlotPeriodAndOffset mSlotPeriodicityAndOffset;
1446 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1447 SchAggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
1448 SchAggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
1449 SchAggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
1450 SchAggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
1451 SchAggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
1452 SchSearchSpaceType searchSpaceType;
1453 uint8_t ueSpecificDciFormat;
1456 /* PDCCH cofniguration */
1457 typedef struct schPdcchConfig
1459 uint8_t numCRsetToAddMod;
1460 SchControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
1461 uint8_t numCRsetToRel;
1462 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
1463 uint8_t numSearchSpcToAddMod;
1464 SchSearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
1465 uint8_t numSearchSpcToRel;
1466 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
1469 /* PDSCH time domain resource allocation */
1470 typedef struct schPdschTimeDomRsrcAlloc
1473 SchTimeDomRsrcAllocMappingType mappingType;
1474 uint8_t startSymbol;
1475 uint8_t symbolLength;
1476 }SchPdschTimeDomRsrcAlloc;
1479 typedef struct schPdschBundling
1481 struct schStaticBundling
1483 SchBundlingSizeSet2 size;
1485 struct schDynamicBundling
1487 SchBundlingSizeSet1 sizeSet1;
1488 SchBundlingSizeSet2 sizeSet2;
1489 }SchDynamicBundling;
1492 /* DMRS downlink configuration */
1493 typedef struct schDmrsDlCfg
1495 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1498 /* PDSCH Configuration */
1499 typedef struct schPdschConfig
1501 SchDmrsDlCfg dmrsDlCfgForPdschMapTypeA;
1502 SchResourceAllocType resourceAllocType;
1503 uint8_t numTimeDomRsrcAlloc;
1504 SchPdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1506 SchCodeWordsSchedByDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
1507 SchBundlingType bundlingType;
1508 SchPdschBundling bundlingInfo;
1511 /* Initial Downlink BWP */
1512 typedef struct schInitalDlBwp
1515 SchPdcchConfig pdcchCfg;
1517 SchPdschConfig pdschCfg;
1520 /*Spec 38.331 'RadioLinkMonitoringConfig'*/
1521 typedef uint8_t SchRadioLinkMonitoringRsId;
1523 typedef struct schRadioLinkMonRS
1525 SchRadioLinkMonitoringRsId radioLinkMonitoringRsId;
1526 SchPurposeOfFailureDet purpose;
1530 uint8_t nzpCsiRsResId;
1534 typedef struct schRadioLinkConfig
1536 SchRadioLinkMonRS failurDetResAddModList[MAX_FAILURE_DET_RESOURCES];
1537 SchRadioLinkMonitoringRsId failurDetResRelList[MAX_FAILURE_DET_RESOURCES];
1538 uint8_t beamFailureInstanceMaxCount;
1539 uint8_t beamFailureDetectionTimer;
1540 }SchRadioLinkConfig;
1542 /*Spec 38.331 "SPS-Config'*/
1543 typedef struct schSpsConfig
1545 uint16_t periodicity;
1546 uint8_t numOfHqProcess;
1548 SchMcsTable mcsTable;
1551 /* Spec 38.331, 'BWP-DownlinkDedicated'*/
1552 typedef struct schBwpDlCfgDed
1554 SchPdcchConfig pdcchCfgDed;
1555 SchPdschConfig pdschCfgDed;
1556 SchSpsConfig spsCfgDed;
1557 SchRadioLinkConfig radioLnkMonCfgDed;
1560 /* Spec 38.331, 'BWP-Downlink' Downlink BWP information */
1561 typedef struct schDlBwpInfo
1564 SchBwpDlCfg bwpCommon;
1565 SchBwpDlCfgDed bwpDedicated;
1568 /* PDCCH Serving Cell configuration */
1569 typedef struct schPdschServCellCfg
1571 uint8_t *maxMimoLayers;
1572 SchNumHarqProcForPdsch numHarqProcForPdsch;
1573 SchMaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
1574 bool *codeBlkGrpFlushInd;
1575 SchPdschXOverhead *xOverhead;
1576 }SchPdschServCellCfg;
1578 typedef struct schRaPrioritization
1580 uint8_t powerRampingStepHighPriority;
1581 uint8_t scalingFactorBI;
1582 }SchRaPrioritization;
1584 typedef struct schBfrCsiRsRes
1588 uint8_t raPreambleIndex;
1591 typedef struct schBfrSsbRes
1594 uint8_t raPreambleIndex;
1597 typedef struct schPrachResDedBfr
1600 SchBfrCsiRsRes csiRs;
1603 /*Spec 38.331 'BeamFailureRecoveryConfig' */
1604 typedef struct schBeamFailRecoveryCfg
1606 uint8_t rootSeqIndexBfr;
1607 SchRachCfgGeneric rachCfgBfr;
1608 uint8_t rsrpThreshSsbBfr; /* RSRP Threshold SSB */
1609 SchPrachResDedBfr candidateBeamRSList;
1610 uint8_t ssbPerRachBfr; /* SSB per RACH occassion */
1611 uint8_t raSsbOccMaskIndex;
1612 uint8_t recoverySearchSpaceId;
1613 SchRaPrioritization raPrioBfr;
1615 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
1616 }SchBeamFailRecoveryCfg;
1618 /* PUCCH Configuration */
1619 typedef struct schPucchResrcSetInfo
1622 uint8_t resrcListCount;
1623 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1624 uint8_t maxPayLoadSize;
1625 }SchPucchResrcSetInfo;
1627 typedef struct schPucchResrcSetCfg
1629 uint8_t resrcSetToAddModListCount;
1630 SchPucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1631 uint8_t resrcSetToRelListCount;
1632 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1633 }SchPucchResrcSetCfg;
1635 typedef struct schPucchFormat0
1637 uint8_t initialCyclicShift;
1639 uint8_t startSymbolIdx;
1642 typedef struct schPucchFormat1
1644 uint8_t initialCyclicShift;
1646 uint8_t startSymbolIdx;
1650 typedef struct schPucchFormat2_3
1654 uint8_t startSymbolIdx;
1657 typedef struct schPucchFormat4
1662 uint8_t startSymbolIdx;
1665 typedef struct schPucchResrcInfo
1669 uint8_t intraFreqHop;
1670 uint16_t secondPrbHop;
1671 uint8_t pucchFormat;
1673 SchPucchFormat0 *format0;
1674 SchPucchFormat1 *format1;
1675 SchPucchFormat2_3 *format2;
1676 SchPucchFormat2_3 *format3;
1677 SchPucchFormat4 *format4;
1681 typedef struct schPucchResrcCfg
1683 uint8_t resrcToAddModListCount;
1684 SchPucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1685 uint8_t resrcToRelListCount;
1686 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1690 typedef struct schSchedReqResrcInfo
1694 uint8_t periodicity;
1697 }SchSchedReqResrcInfo;
1699 typedef struct schPucchSchedReqCfg
1701 uint8_t schedAddModListCount;
1702 SchSchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1703 uint8_t schedRelListCount;
1704 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1705 }SchPucchSchedReqCfg;
1707 typedef struct schSpatialRelationInfo
1709 uint8_t spatialRelationId;
1710 uint8_t servCellIdx;
1711 uint8_t pathLossRefRSId;
1713 uint8_t closeLoopIdx;
1714 }SchSpatialRelationInfo;
1716 typedef struct schPucchSpatialCfg
1718 uint8_t spatialAddModListCount;
1719 SchSpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1720 uint8_t spatialRelListCount;
1721 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1722 }SchPucchSpatialCfg;
1724 typedef struct schP0PucchCfg
1730 typedef struct schPathLossRefRSCfg
1732 uint8_t pathLossRefRSId;
1733 }SchPathLossRefRSCfg;
1735 typedef struct schPucchMultiCsiCfg
1737 uint8_t multiCsiResrcListCount;
1738 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1739 }SchPucchMultiCsiCfg;
1741 typedef struct schPucchDlDataToUlAck
1743 uint8_t dlDataToUlAckListCount;
1744 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1745 }SchPucchDlDataToUlAck;
1747 typedef struct schPucchPowerControl
1755 SchP0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1756 uint8_t pathLossRefRSListCount;
1757 SchPathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1758 }SchPucchPowerControl;
1760 typedef struct schPucchCfg
1762 SchPucchResrcSetCfg *resrcSet;
1763 SchPucchResrcCfg *resrc;
1764 SchPucchFormatCfg *format1;
1765 SchPucchFormatCfg *format2;
1766 SchPucchFormatCfg *format3;
1767 SchPucchFormatCfg *format4;
1768 SchPucchSchedReqCfg *schedReq;
1769 SchPucchMultiCsiCfg *multiCsiCfg;
1770 SchPucchSpatialCfg *spatialInfo;
1771 SchPucchDlDataToUlAck *dlDataToUlAck;
1772 SchPucchPowerControl *powerControl;
1775 /* Transform precoding disabled */
1776 typedef struct schTransPrecodDisabled
1778 uint16_t scramblingId0;
1779 }SchTransPrecodDisabled;
1781 /* DMRS Uplink configuration */
1782 typedef struct SchDmrsUlCfg
1784 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1785 SchTransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1788 /* PUSCH Configuration */
1789 typedef struct schPuschCfg
1791 uint8_t dataScramblingId;
1792 SchDmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1793 SchResourceAllocType resourceAllocType;
1794 uint8_t numTimeDomRsrcAlloc;
1795 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1796 SchTransformPrecoder transformPrecoder;
1799 /* Initial Uplink BWP */
1800 typedef struct schInitialUlBwp
1803 SchPucchCfg pucchCfg;
1805 SchPuschCfg puschCfg;
1808 typedef struct schBwpCfgDedicated
1810 SchPucchCfg pucchCfg;
1811 SchPuschCfg puschCfg;
1812 }SchBwpCfgDedicated;
1814 /* Uplink BWP information */
1815 typedef struct schUlBwpInfo
1818 SchBwpUlCfg bwpCommon;
1819 SchBwpCfgDedicated bwpDed;
1822 typedef struct schBwpRelInfo
1827 /* Serving cell configuration */
1828 typedef struct schServCellRecfgInfo
1830 SchInitalDlBwp initDlBwp;
1831 SchRadioLinkConfig radioLinkMonConfig;
1832 uint8_t numDlBwpToAddOrMod;
1833 SchDlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP];
1834 uint8_t numDlBwpToRel;
1835 SchBwpRelInfo dlBwpToRelList[MAX_NUM_BWP];
1836 uint8_t firstActvDlBwpId;
1837 uint8_t defaultDlBwpId;
1838 uint8_t *bwpInactivityTmr;
1839 SchPdschServCellCfg pdschServCellCfg;
1840 SchInitialUlBwp initUlBwp;
1841 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1842 uint8_t numUlBwpToAddOrMod;
1843 SchUlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
1844 uint8_t numUlBwpToRel;
1845 SchBwpRelInfo ulBwpToRelList[MAX_NUM_BWP];
1846 uint8_t firstActvUlBwpId;
1847 }SchServCellRecfgInfo;
1849 /* Serving cell configuration */
1850 typedef struct schServCellCfgInfo
1852 SchInitalDlBwp initDlBwp;
1853 SchRadioLinkConfig radioLinkMonConfig;
1854 uint8_t numDlBwpToAdd;
1855 SchDlBwpInfo dlBwpToAddList[MAX_NUM_BWP];
1856 uint8_t firstActvDlBwpId;
1857 uint8_t defaultDlBwpId;
1858 uint8_t *bwpInactivityTmr;
1859 SchPdschServCellCfg pdschServCellCfg;
1860 SchInitialUlBwp initUlBwp;
1861 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1862 uint8_t numUlBwpToAdd;
1863 SchUlBwpInfo ulBwpToAddList[MAX_NUM_BWP];
1864 uint8_t firstActvUlBwpId;
1865 }SchServCellCfgInfo;
1867 typedef struct schNonDynFiveQi
1872 uint16_t maxDataBurstVol;
1875 typedef struct schDynFiveQi
1878 uint16_t packetDelayBudget;
1879 uint8_t packetErrRateScalar;
1880 uint8_t packetErrRateExp;
1882 uint8_t delayCritical;
1884 uint16_t maxDataBurstVol;
1887 typedef struct schNgRanAllocAndRetPri
1889 uint8_t priorityLevel;
1890 uint8_t preEmptionCap;
1891 uint8_t preEmptionVul;
1892 }SchNgRanAllocAndRetPri;
1894 typedef struct schGrbQosFlowInfo
1896 uint32_t maxFlowBitRateDl;
1897 uint32_t maxFlowBitRateUl;
1898 uint32_t guarFlowBitRateDl;
1899 uint32_t guarFlowBitRateUl;
1903 typedef struct schDrbQos
1905 SchQosType fiveQiType; /* Dynamic or non-dynamic */
1908 SchNonDynFiveQi nonDyn5Qi;
1909 SchDynFiveQi dyn5Qi;
1911 SchNgRanAllocAndRetPri ngRanRetPri;
1912 SchGrbQosFlowInfo grbQosFlowInfo;
1913 uint16_t pduSessionId;
1914 uint32_t ulPduSessAggMaxBitRate; /* UL PDU Session Aggregate max bit rate */
1917 /* Special cell configuration */
1918 typedef struct schSpCellCfg
1920 uint8_t servCellIdx;
1921 SchServCellCfgInfo servCellCfg;
1924 /* Special cell Reconfiguration */
1925 typedef struct schSpCellRecfg
1927 uint8_t servCellIdx;
1928 SchServCellRecfgInfo servCellRecfg;
1931 /* Uplink logical channel configuration */
1932 typedef struct SchUlLcCfg
1937 uint8_t pbr; // prioritisedBitRate
1938 uint8_t bsd; // bucketSizeDuration
1941 /* Downlink logical channel configuration */
1942 typedef struct schDlLcCfg
1944 uint8_t lcp; // logical Channel Prioritization
1947 /* Logical Channel configuration */
1948 typedef struct schLcCfg
1952 SchDrbQosInfo *drbQos;
1957 /* Aggregate max bit rate */
1958 typedef struct schAmbrCfg
1960 uint32_t ulBr; /* Ul BitRate */
1963 typedef struct schModulationInfo
1967 SchMcsTable mcsTable;
1970 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.5' UE Configuration Request*/
1971 typedef struct schUeCfgReq
1977 bool macCellGrpCfgPres;
1978 SchMacCellGrpCfg macCellGrpCfg;
1979 bool phyCellGrpCfgPres;
1980 SchPhyCellGrpCfg phyCellGrpCfg;
1982 SchSpCellCfg spCellCfg;
1983 SchAmbrCfg *ambrCfg;
1984 SchModulationInfo dlModInfo;
1985 SchModulationInfo ulModInfo;
1986 uint8_t numLcsToAdd;
1987 SchLcCfg schLcCfg[MAX_NUM_LC];
1990 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.6' UE Reconfiguration Request*/
1991 typedef struct schUeRecfgReq
1997 bool macCellGrpRecfgPres;
1998 SchMacCellGrpCfg macCellGrpRecfg;
1999 bool phyCellGrpRecfgPres;
2000 SchPhyCellGrpCfg phyCellGrpRecfg;
2001 bool spCellRecfgPres;
2002 SchSpCellRecfg spCellRecfg;
2003 SchAmbrCfg *ambrRecfg;
2004 SchModulationInfo dlModInfo;
2005 SchModulationInfo ulModInfo;
2006 uint8_t numLcsToAdd;
2007 SchLcCfg schLcCfgAdd[MAX_NUM_LC];
2008 uint8_t numLcsToDel;
2009 uint8_t lcIdToDel[MAX_NUM_LC];
2010 uint8_t numLcsToMod;
2011 SchLcCfg schLcCfgMod[MAX_NUM_LC];
2012 SchDataTransmission dataTransmissionInfo;
2014 bool drxConfigIndicatorRelease;
2018 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.5 UE Confg Response*/
2019 typedef struct schUeCfgRsp
2026 CauseOfResult cause;
2029 /*As per WG8 V7.0.0 Sec 11.2.4.3.6, UE ReCFG and UECFG have same structure definition*/
2030 typedef struct schUeCfgRsp SchUeRecfgRsp;
2032 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.7' Delete UE Request*/
2033 typedef struct schUeDelete
2039 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.7*/
2040 typedef struct schUeDeleteRsp
2045 CauseOfResult cause;
2048 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.8' DL HARQ Indication*/
2049 typedef struct dlHarqInd
2053 SlotTimingInfo slotInd;
2055 uint8_t harqPayload[MAX_HARQ_BITS_IN_BYTES];
2058 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.9' UL HARQ (CRC) Indication*/
2059 typedef struct crcIndInfo
2063 SlotTimingInfo timingInfo;
2065 uint8_t crcInd[MAX_NUMBER_OF_CRC_IND_BITS];
2068 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.10' UL Channel Quality Indication*/
2069 typedef struct ulCqiReport
2071 CqiUlReportType reportType;
2076 typedef struct schUlCqiInd
2080 SlotTimingInfo timingInfo;
2081 uint8_t numUlCqiReported;
2082 UlCqiReport ulCqiRpt;
2085 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.11' DL Channel Quality Indication*/
2086 typedef struct dlCqiReport
2088 uint8_t reportType; /*Bitmap for CQI, PMI, RI, CRI report*/
2095 typedef struct schDlCqiInd
2099 SlotTimingInfo timingInfo;
2100 uint8_t numDlCqiReported;
2101 DlCqiReport dlCqiRpt;
2104 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.12' Rach Ind contents*/
2105 typedef struct rachIndInfo
2109 SlotTimingInfo timingInfo;
2113 uint8_t preambleIdx;
2117 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.13' Paging Ind contents*/
2118 typedef struct schPageInd
2127 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.14 Rach Res Request*/
2128 typedef struct schRachRsrcReq
2130 SlotTimingInfo slotInd;
2134 uint8_t ssbIdx[MAX_NUM_SSB];
2137 typedef struct schCfraSsbResource
2140 uint8_t raPreambleIdx;
2141 }SchCfraSsbResource;
2143 typedef struct schCfraRsrc
2146 SchCfraSsbResource ssbResource[MAX_NUM_SSB];
2149 typedef struct schRachRsrcRsp
2154 SchCfraResource cfraResource;
2157 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.15 Rach Res Release*/
2158 typedef struct schRachRsrcRel
2160 SlotTimingInfo slotInd;
2163 SchCfraResource cfraResource;
2166 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.16 DL RLC Buffer Status Information*/
2167 typedef struct dlRlcBOInfo
2172 uint32_t dataVolume;
2175 /*O-RAN WG8 v7.0.0 Sec 11.2.4.2.17 Scheduling Request Indication*/
2176 typedef struct srUciIndInfo
2180 SlotTimingInfo slotInd;
2182 uint8_t srPayload[MAX_SR_BITS_IN_BYTES];
2185 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.18 UL RLC Buffer Status Information*/
2186 typedef struct dataVolInfo
2192 typedef struct ulBufferStatusRptInd
2198 DataVolInfo dataVolInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS];
2199 }UlBufferStatusRptInd;
2201 /**O-RAN WG* v7.0.0 Sec 11.2.4.2.19 Power Headroom Indication*/
2202 typedef struct phrData /*Spec 38.321 Sec 6.1.3.8*/
2208 typedef struct singlePhrInfo
2213 typedef struct multiPhr
2219 typedef struct multiplePhrInfo /*Spec 38.321 Sec 6.1.3.9*/
2221 uint8_t numPhrReported;
2222 MultiPhr multiPhrStat[MAX_PHR_REPORT];
2225 typedef struct schPwrHeadroomInd
2232 SinglePhrInfo singlePhr;
2233 MultiplePhrInfo multiPhr;
2237 typedef struct schUeHqInfo
2243 typedef struct schRlsHqInfo
2247 SchUeHqInfo *ueHqInfo;
2250 typedef struct schStatsInfo
2252 SchMeasurementType type;
2253 uint16_t periodicity; /* In milliseconds */
2256 typedef struct schStatsReq
2259 SchStatsInfo statsList[MAX_NUM_STATS];
2262 typedef struct schStatsRsp
2265 CauseOfResult cause;
2268 /* function declarations */
2269 uint8_t MacMessageRouter(Pst *pst, void *msg);
2270 uint8_t SchMessageRouter(Pst *pst, void *msg);
2272 /**********************************************************************
2274 **********************************************************************/