nr: add NDI for PUSCH grant to sch cfg struct

This commit is contained in:
Andre Puschmann 2021-04-13 16:07:38 +02:00
parent a474a0f293
commit b7146c41b2
4 changed files with 12 additions and 2 deletions

View File

@ -40,11 +40,15 @@ public:
uint32_t tti;
} mac_nr_grant_dl_t;
// UL grant as conveyed between PHY and MAC
typedef struct {
uint32_t pid;
uint16_t rnti;
uint32_t tti;
uint32_t tbs; // transport block size in Bytes
uint8_t pid; // HARQ process ID
uint32_t tbs; // transport block size in Bytes
uint8_t ndi; // Raw new data indicator extracted from DCI
uint8_t rv; // Redundancy Version
bool is_rar_grant; // True if grant comes from RAR
} mac_nr_grant_ul_t;
/// For UL, payload buffer remains in MAC

View File

@ -30,6 +30,8 @@ typedef struct SRSRAN_API {
int tbs; ///< Payload size, TS 38.212 refers to it as A
double R; ///< Target LDPC rate
int rv; ///< Redundancy version
int ndi; ///< New Data Indicator
int pid; ///< HARQ Process ID
uint32_t nof_re; ///< Number of available resource elements to send, known as N_RE
uint32_t nof_bits; ///< Number of available bits to send, known as G
uint32_t cw_idx;

View File

@ -787,6 +787,8 @@ int srsran_ra_ul_dci_to_grant_nr(const srsran_carrier_nr_t* carrier,
pusch_grant->rnti_type = dci_ul->ctx.rnti_type;
pusch_grant->tb[0].rv = dci_ul->rv;
pusch_grant->tb[0].mcs = dci_ul->mcs;
pusch_grant->tb[0].ndi = dci_ul->ndi;
pusch_grant->tb[0].pid = dci_ul->pid;
// 5.1.6.2 DM-RS reception procedure
if (ra_ul_dmrs(pusch_hl_cfg, pusch_grant, pusch_cfg) < SRSRAN_SUCCESS) {

View File

@ -367,6 +367,8 @@ bool cc_worker::work_ul()
mac_ul_grant.rnti = pusch_cfg.grant.rnti;
mac_ul_grant.tti = ul_slot_cfg.idx;
mac_ul_grant.tbs = pusch_cfg.grant.tb[0].tbs / 8;
mac_ul_grant.ndi = pusch_cfg.grant.tb[0].ndi;
mac_ul_grant.rv = pusch_cfg.grant.tb[0].rv;
phy->stack->new_grant_ul(0, mac_ul_grant, &ul_action);
// Set UCI configuration following procedures