Commit 34cc0528 authored by Robert Schmidt's avatar Robert Schmidt

debugging code

parent f3ff98af
...@@ -545,6 +545,14 @@ uint8_t unpackarray(uint8_t **ppReadPackedMsg, void *array, uint16_t array_eleme ...@@ -545,6 +545,14 @@ uint8_t unpackarray(uint8_t **ppReadPackedMsg, void *array, uint16_t array_eleme
return 1; return 1;
} }
static void print_dci_bytes_inverted(uint8_t dci[], uint8_t dci_byte_len)
{
printf("inverted :");
for (int i = 0; i < dci_byte_len; ++i)
printf("%02x ", dci[i]);
printf("\n");
}
uint32_t pack_dci_payload(uint8_t payload[], uint16_t payloadSizeBits, uint8_t **out, uint8_t *end) uint32_t pack_dci_payload(uint8_t payload[], uint16_t payloadSizeBits, uint8_t **out, uint8_t *end)
{ {
// Helper vars for DCI Payload // Helper vars for DCI Payload
...@@ -589,6 +597,14 @@ uint32_t unpack_dci_payload(uint8_t payload[], uint16_t payloadSizeBits, uint8_t ...@@ -589,6 +597,14 @@ uint32_t unpack_dci_payload(uint8_t payload[], uint16_t payloadSizeBits, uint8_t
return pullresult; return pullresult;
} }
void dump_dci_payload(uint8_t payload[], uint16_t payloadSizeBits)
{
uint8_t dci_byte_len = (payloadSizeBits + 7) / 8;
for (int i = 0; i < dci_byte_len; ++i)
printf("%02x ", payload[i]);
printf("\n");
}
uint32_t pack_vendor_extension_tlv(nfapi_tl_t *ve, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config) { uint32_t pack_vendor_extension_tlv(nfapi_tl_t *ve, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config) {
if(ve != 0 && config != 0) { if(ve != 0 && config != 0) {
if(config->pack_vendor_extension_tlv) { if(config->pack_vendor_extension_tlv) {
......
...@@ -1906,6 +1906,49 @@ static uint8_t pack_hi_dci0_request_body_value(void *tlv, uint8_t **ppWritePacke ...@@ -1906,6 +1906,49 @@ static uint8_t pack_hi_dci0_request_body_value(void *tlv, uint8_t **ppWritePacke
return 1; return 1;
} }
void dump_ul_dci_pdu_list_value(nfapi_nr_ul_dci_request_pdus_t *r)
{
printf("PDUType %d\n", r->PDUType);
printf("PDUSize %d\n", r->PDUSize);
nfapi_nr_dl_tti_pdcch_pdu_rel15_t *p = &r->pdcch_pdu.pdcch_pdu_rel15;
printf("BWPSize %d\n", p->BWPSize);
printf("BWPStart %d\n", p->BWPStart);
printf("SubcarrierSpacing %d\n", p->SubcarrierSpacing);
printf("CyclicPrefix %d\n", p->CyclicPrefix);
printf("StartSymbolIndex %d\n", p->StartSymbolIndex);
printf("DurationSymbols %d\n", p->DurationSymbols);
printf("FreqDomainResource %d %d %d %d %d %d\n",
p->FreqDomainResource[0],
p->FreqDomainResource[1],
p->FreqDomainResource[2],
p->FreqDomainResource[3],
p->FreqDomainResource[4],
p->FreqDomainResource[5]);
printf("CceRegMappingType %d\n", p->CceRegMappingType);
printf("RegBundleSize %d\n", p->RegBundleSize);
printf("InterleaverSize %d\n", p->InterleaverSize);
printf("CoreSetType %d\n", p->CoreSetType);
printf("ShiftIndex %d\n", p->ShiftIndex);
printf("precoderGranularity %d\n", p->precoderGranularity);
printf("numDlDci %d\n", p->numDlDci);
for (int i = 0; i < p->numDlDci; ++i) {
nfapi_nr_dl_dci_pdu_t *dci = &p->dci_pdu[i];
printf("RNTI %d\n", dci->RNTI);
printf("ScramblingId %d\n", dci->ScramblingId);
printf("ScramblingRNTI %d\n", dci->ScramblingRNTI);
printf("CceIndex %d\n", dci->CceIndex);
printf("AggregationLevel %d\n", dci->AggregationLevel);
//nfapi_nr_tx_precoding_and_beamforming_t precodingAndBeamforming;
printf("beta_PDCCH_1_0 %d\n", dci->beta_PDCCH_1_0);
printf("powerControlOffsetSS %d\n", dci->powerControlOffsetSS);
printf("PayloadSizeBits %d\n", dci->PayloadSizeBits);
printf(" ***** DCI payload: ");
dump_dci_payload(dci->Payload, dci->PayloadSizeBits);
}
//nfapi_nr_dl_dci_pdu_t dci_pdu[MAX_DCI_CORESET];
}
static uint8_t pack_ul_dci_pdu_list_value(void *tlv, uint8_t **ppWritePackedMsg, uint8_t *end) static uint8_t pack_ul_dci_pdu_list_value(void *tlv, uint8_t **ppWritePackedMsg, uint8_t *end)
{ {
nfapi_nr_ul_dci_request_pdus_t *value = (nfapi_nr_ul_dci_request_pdus_t *)tlv; nfapi_nr_ul_dci_request_pdus_t *value = (nfapi_nr_ul_dci_request_pdus_t *)tlv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment