X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Flwr_mac_upr_inf.h;h=9d6a1b5437948e6276f62ef4471d98662783b2d7;hb=6b44407d464a5a4e060999255233a7cfe78bb0fa;hp=0666ba2bfa1ae6ff19f30ce8a83bb842b32adc10;hpb=a5530e70a9d414952dadd1688aa9b4280c0dbb5a;p=o-du%2Fl2.git diff --git a/src/5gnrmac/lwr_mac_upr_inf.h b/src/5gnrmac/lwr_mac_upr_inf.h index 0666ba2bf..9d6a1b543 100644 --- a/src/5gnrmac/lwr_mac_upr_inf.h +++ b/src/5gnrmac/lwr_mac_upr_inf.h @@ -26,6 +26,25 @@ #define MAX_CRCS_PER_SLOT 1 #define MAX_CB_PER_TTI_IN_BYTES 1 #define MAX_ULSCH_PDUS_PER_TTI 1 +#define MAX_ULCCH_PDUS_PER_TTI 1 +#define MAX_NUM_HARQS_PER_TTI 1 +#define MAX_HARQ_INFO_IN_BYTES 1 +#define MAX_CSI_PART1_DATA_IN_BYTES 1 +#define MAX_CSI_PART2_DATA_IN_BYTES 1 +#define MAX_UCI_PDUS_PER_TTI 1 +#define MAX_UCI_BIT_PER_TTI_IN_BYTES 2 +#define UCI_IND_PUSCH 0 /* UCI Indication carried on PUSCH */ +#define UCI_IND_PUCCH_F0F1 1 /* UCI Indication carried on PUCCH Format 0, 1 */ +#define UCI_IND_PUCCH_F2F3F4 2 /* UCI Indication carried on PUCCH Format 2, 3, 4 */ +#define SR_PDU_BITMASK 1 /* Bit Mask for SR_PDU */ +#define HARQ_PDU_BITMASK 2 /* Bit Mask for HARQ PDU */ +#define SR_NOT_DETECTED 0 /* SR not detected */ +#define SR_DETECTED 1 /* SR detected */ +#define CONFDC_LEVEL_GOOD 0 /* Confidence Level HARQ/SR */ +#define CONFDC_LEVEL_BAD 1 +#define HARQ_PASS 0 +#define HARQ_FAIL 1 +#define HARQ_NOT_PRESENT 3 /* events */ #define EVENT_RACH_IND_TO_MAC 0 @@ -33,6 +52,7 @@ #define EVENT_RX_DATA_IND_TO_MAC 2 #define EVENT_STOP_IND_TO_MAC 3 #define EVENT_SLOT_IND_TO_MAC 4 +#define EVENT_UCI_IND_TO_MAC 5 typedef struct rachPreamInfo { @@ -99,28 +119,122 @@ typedef struct RxDataIndPdu pdus[MAX_ULSCH_PDUS_PER_TTI]; }RxDataInd; +/* UCI Indication Structure */ +typedef struct +{ + uint8_t harqCrc; + uint16_t harqBitLen; + uint8_t harqPayload[MAX_HARQ_INFO_IN_BYTES]; +}PuschHarqInfo; + +typedef struct +{ + uint8_t csiPart1Crc; + uint16_t csiPart1BitLen; + uint8_t csiPart1Payload[MAX_CSI_PART1_DATA_IN_BYTES]; +}PuschCsiPart1Info; + +typedef struct +{ + uint8_t csiPart2Crc; + uint16_t csiPart2BitLen; + uint8_t csiPart2Payload[MAX_CSI_PART2_DATA_IN_BYTES]; +}PuschCsiPart2Info; + +typedef struct +{ + uint32_t handle; + uint8_t pduBitmap; + uint8_t ul_cqi; + uint16_t crnti; + uint16_t timingAdvance; + uint16_t rssi; + PuschHarqInfo harqInfo; + PuschCsiPart1Info csiPart1Info; + PuschCsiPart2Info csiPart2Info; +}UciPusch; + +typedef struct +{ + uint8_t srIndPres; + uint8_t srConfdcLevel; +}SrInfoF0F1; + +typedef struct +{ + uint8_t numHarq; + uint8_t harqConfdcLevel; + uint8_t harqValue[MAX_NUM_HARQS_PER_TTI]; +}HarqInfoF0F1; + +typedef struct +{ + uint32_t handle; + uint8_t pduBitmap; + uint8_t pucchFormat; + uint8_t ul_cqi; + uint16_t crnti; + uint16_t timingAdvance; + uint16_t rssi; + uint8_t uciBits[MAX_UCI_BIT_PER_TTI_IN_BYTES]; + SrInfoF0F1 srInfo; + HarqInfoF0F1 harqInfo; +}UciPucchF0F1; + +typedef struct +{ + uint32_t handle; + uint8_t pduBitmap; + uint8_t pucchFormat; + uint8_t ul_cqi; + uint16_t crnti; + uint16_t timingAdvance; + uint16_t rssi; + uint16_t num_uci_bits; + uint8_t uciBits[MAX_UCI_BIT_PER_TTI_IN_BYTES]; +}UciPucchF2F3F4; + +typedef struct +{ + uint16_t pduType; + uint16_t pduSize; + union + { + UciPusch uciPusch; /*TODO: UCI Ind for PUSCH to be handled separately */ + UciPucchF0F1 uciPucchF0F1; + UciPucchF2F3F4 uciPucchF2F3F4; + }uci; +}UciIndPduInfo; + +typedef struct +{ + uint16_t cellId; + SlotIndInfo slotInd; + uint16_t numUcis; + UciIndPduInfo pdus[MAX_UCI_PDUS_PER_TTI]; +}UciInd; + typedef uint8_t (*packSlotIndMsg)(Pst *pst, SlotIndInfo *slotInd); +typedef uint8_t (*packRachIndMsg)(Pst *pst, RachInd *rachInd); +typedef uint8_t (*packCrcIndMsg)(Pst *pst, CrcInd *crcInd); +typedef uint8_t (*packRxDataIndMsg)(Pst *pst, RxDataInd *rxDataInd); +typedef uint8_t (*packStopIndMsg)(Pst *pst, uint16_t cellId); +typedef uint8_t (*packMacUciIndMsg)(Pst *pst, UciInd *uciInd); + uint8_t packLcSlotInd (Pst *pst, SlotIndInfo *slotInd); uint8_t packLwlcSlotInd (Pst *pst, SlotIndInfo *slotInd); - uint8_t fapiMacSlotInd(Pst *pst, SlotIndInfo *slotInd); - -typedef uint8_t (*packRachIndMsg)(Pst *pst, RachInd *rachInd); uint8_t packRachInd(Pst *pst, RachInd *rachInd); uint8_t fapiMacRachInd(Pst *pst, RachInd *rachInd); - -typedef uint8_t (*packCrcIndMsg)(Pst *pst, CrcInd *crcInd); uint8_t packCrcInd(Pst *pst, CrcInd *crcInd); uint8_t fapiMacCrcInd(Pst *pst, CrcInd *crcInd); - - -typedef uint8_t (*packRxDataIndMsg)(Pst *pst, RxDataInd *rxDataInd); uint8_t packRxDataInd(Pst *pst, RxDataInd *rxDataInd); uint8_t fapiMacRxDataInd(Pst *pst, RxDataInd *rxDataInd); - -typedef uint8_t (*packStopIndMsg)(Pst *pst, uint16_t cellId); uint8_t packStopInd(Pst *pst, uint16_t cellId); uint8_t fapiMacStopInd(Pst *pst, uint16_t cellId); +uint8_t packMacUciInd(Pst *pst, UciInd *uciInd); +uint8_t FapiMacUciInd(Pst *pst, UciInd *uciInd); + #endif /********************************************************************** End of file