|
|
|
@ -366,14 +366,14 @@ uint32_t srslte_dci_dl_info(char *info_str, uint32_t len, srslte_ra_dl_dci_t *dc
|
|
|
|
|
|
|
|
|
|
switch(dci_msg->alloc_type) {
|
|
|
|
|
case SRSLTE_RA_ALLOC_TYPE0:
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "ra_type0={rbg_mask=0x%x}, ", dci_msg->type0_alloc.rbg_bitmask);
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "type0={rbg=0x%x}, ", dci_msg->type0_alloc.rbg_bitmask);
|
|
|
|
|
break;
|
|
|
|
|
case SRSLTE_RA_ALLOC_TYPE1:
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "ra_type1={vrb_mask=0x%x, rbg_subset=%d, shift=%d}, ",
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "type1={vrb=0x%x, rbg_s=%d, sh=%d}, ",
|
|
|
|
|
dci_msg->type1_alloc.vrb_bitmask, dci_msg->type1_alloc.rbg_subset, dci_msg->type1_alloc.shift);
|
|
|
|
|
break;
|
|
|
|
|
case SRSLTE_RA_ALLOC_TYPE2:
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "ra_type2={riv=0x%x, rb=(%d,%d), mode=%s",
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "type2={riv=%d, rb=(%d,%d), mode=%s",
|
|
|
|
|
dci_msg->type2_alloc.riv,
|
|
|
|
|
dci_msg->type2_alloc.RB_start, dci_msg->type2_alloc.RB_start+dci_msg->type2_alloc.L_crb-1,
|
|
|
|
|
dci_msg->type2_alloc.mode==SRSLTE_RA_TYPE2_LOC?"local":"dist");
|
|
|
|
@ -388,17 +388,17 @@ uint32_t srslte_dci_dl_info(char *info_str, uint32_t len, srslte_ra_dl_dci_t *dc
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "pid=%d, ", dci_msg->harq_process);
|
|
|
|
|
|
|
|
|
|
if (dci_msg->tb_en[0]) {
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "CW0={mcs=%d, rv=%d, ndi=%d}, ", dci_msg->mcs_idx, dci_msg->rv_idx, dci_msg->ndi);
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "TB0={mcs=%d, rv=%d, ndi=%d}, ", dci_msg->mcs_idx, dci_msg->rv_idx, dci_msg->ndi);
|
|
|
|
|
}
|
|
|
|
|
if (dci_msg->tb_en[1]) {
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "CW1={mcs=%d, rv=%d, ndi=%d}, ", dci_msg->mcs_idx_1, dci_msg->rv_idx_1, dci_msg->ndi_1);
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "TB1={mcs=%d, rv=%d, ndi=%d}, ", dci_msg->mcs_idx_1, dci_msg->rv_idx_1, dci_msg->ndi_1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (format == SRSLTE_DCI_FORMAT1 || format == SRSLTE_DCI_FORMAT1A || format == SRSLTE_DCI_FORMAT1B) {
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "tpc_pucch=%d, ", dci_msg->tpc_pucch);
|
|
|
|
|
}
|
|
|
|
|
if (format == SRSLTE_DCI_FORMAT2 || format == SRSLTE_DCI_FORMAT2A || format == SRSLTE_DCI_FORMAT2B) {
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "tb_swap=%d, pinfo=%d", dci_msg->tb_cw_swap, dci_msg->pinfo);
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "tb_sw=%d, pinfo=%d", dci_msg->tb_cw_swap, dci_msg->pinfo);
|
|
|
|
|
}
|
|
|
|
|
return n;
|
|
|
|
|
}
|
|
|
|
@ -407,19 +407,19 @@ uint32_t srslte_dci_ul_info(char *info_str, uint32_t len, srslte_ra_ul_dci_t *dc
|
|
|
|
|
{
|
|
|
|
|
int n = 0;
|
|
|
|
|
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "riv=0x%x, rb=(%d,%d), ", dci_msg->type2_alloc.riv,
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "riv=%d, rb=(%d,%d), ", dci_msg->type2_alloc.riv,
|
|
|
|
|
dci_msg->type2_alloc.RB_start, dci_msg->type2_alloc.RB_start+dci_msg->type2_alloc.L_crb-1);
|
|
|
|
|
|
|
|
|
|
switch(dci_msg->freq_hop_fl) {
|
|
|
|
|
case SRSLTE_RA_PUSCH_HOP_DISABLED:
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "freq_hop=n/a, ");
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "f_h=n/a, ");
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "freq_hop=%d, ", dci_msg->freq_hop_fl);
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "f_h=%d, ", dci_msg->freq_hop_fl);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "mcs=%d, rv=%d, ndi=%d, ", dci_msg->mcs_idx, dci_msg->rv_idx, dci_msg->ndi);
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "tpc_pusch=%d, dmrs_cs=%d, cqi_req=%s",
|
|
|
|
|
n += snprintf(&info_str[n], len-n, "tpc_pusch=%d, dmrs_cs=%d, cqi=%s",
|
|
|
|
|
dci_msg->tpc_pusch, dci_msg->n_dmrs, dci_msg->cqi_request?"yes":"no");
|
|
|
|
|
|
|
|
|
|
return n;
|
|
|
|
@ -1367,6 +1367,32 @@ char* srslte_dci_format_string(srslte_dci_format_t format) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char* srslte_dci_format_string_short(srslte_dci_format_t format) {
|
|
|
|
|
switch (format) {
|
|
|
|
|
case SRSLTE_DCI_FORMAT0:
|
|
|
|
|
return " 0";
|
|
|
|
|
case SRSLTE_DCI_FORMAT1:
|
|
|
|
|
return " 1";
|
|
|
|
|
case SRSLTE_DCI_FORMAT1A:
|
|
|
|
|
return "1A";
|
|
|
|
|
case SRSLTE_DCI_FORMAT1B:
|
|
|
|
|
return "1B";
|
|
|
|
|
case SRSLTE_DCI_FORMAT1C:
|
|
|
|
|
return "1C";
|
|
|
|
|
case SRSLTE_DCI_FORMAT1D:
|
|
|
|
|
return "1D";
|
|
|
|
|
case SRSLTE_DCI_FORMAT2:
|
|
|
|
|
return " 2";
|
|
|
|
|
case SRSLTE_DCI_FORMAT2A:
|
|
|
|
|
return "2A";
|
|
|
|
|
case SRSLTE_DCI_FORMAT2B:
|
|
|
|
|
return "2B";
|
|
|
|
|
default:
|
|
|
|
|
return "N/A"; // fatal error
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void srslte_dci_msg_type_fprint(FILE *f, srslte_dci_msg_type_t type) {
|
|
|
|
|
switch (type.type) {
|
|
|
|
|
case SRSLTE_DCI_MSG_TYPE_PUSCH_SCHED:
|
|
|
|
|