Commit 31134547 authored by Robert Schmidt's avatar Robert Schmidt

TX data request for length > 16bits

parent 5d10d031
......@@ -29,7 +29,7 @@ typedef struct {
/// Value: 0 -> 1, 0: Payload is carried directly in the value field, 1: Pointer to payload is in the value field
uint16_t tag;
/// Length of the actual payload in bytes, without the padding bytes Value: 0 → 65535
uint16_t length;
uint32_t length;
union {
uint32_t *ptr;
uint32_t direct[38016];
......
......@@ -2086,7 +2086,7 @@ static uint8_t pack_tx_data_pdu_list_value(void *tlv, uint8_t **ppWritePackedMsg
uint16_t total_number_of_tlvs = value->num_TLV;
for (; i < total_number_of_tlvs; ++i) {
if (!(push16(value->TLVs[i].tag, ppWritePackedMsg, end) && push16(value->TLVs[i].length, ppWritePackedMsg, end)))
if (!(push16(value->TLVs[i].tag, ppWritePackedMsg, end) && push32(value->TLVs[i].length, ppWritePackedMsg, end)))
return 0;
switch (value->TLVs[i].tag) {
......@@ -6007,7 +6007,7 @@ static uint8_t unpack_tx_data_pdu_list_value(uint8_t **ppReadPackedMsg, uint8_t
for(; i < total_number_of_tlvs; ++i) {
if (!(pull16(ppReadPackedMsg, &pNfapiMsg->TLVs[i].tag, end) &&
pull16(ppReadPackedMsg, &pNfapiMsg->TLVs[i].length, end)))
pull32(ppReadPackedMsg, &pNfapiMsg->TLVs[i].length, end)))
return 0;
switch(pNfapiMsg->TLVs[i].tag) {
......
......@@ -36,7 +36,7 @@
#include "PHY/defs_gNB.h"
void nr_fill_dlsch_dl_tti_req(processingData_L1tx_t *msgTx, nfapi_nr_dl_tti_pdsch_pdu *pdsch_pdu);
void nr_fill_dlsch_tx_req(processingData_L1tx_t *msgTx, int idx, uint8_t *sdu, uint16_t sdu_len);
void nr_fill_dlsch_tx_req(processingData_L1tx_t *msgTx, int idx, uint8_t *sdu, uint32_t sdu_len);
void nr_generate_pdsch(processingData_L1tx_t *msgTx,
int frame,
......
......@@ -273,7 +273,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
impp.Zc = harq->Z;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING, VCD_FUNCTION_IN);
uint32_t A = rel15->TBSize[0]<<3;
AssertError(A == harq->sdu_len * 8, return -1, "A %d bits sdu_len %d bytes %d bits\n", A, harq->sdu_len, harq->sdu_len * 8);
AssertError(A == harq->sdu_len * 8, return -1, "A %d bits TBSize %d sdu_len %d bytes %d bits\n", A, rel15->TBSize[0], harq->sdu_len, harq->sdu_len * 8);
unsigned char *a=harq->sdu;
if (rel15->rnti != SI_RNTI)
trace_NRpdu(DIRECTION_DOWNLINK, a, rel15->TBSize[0], WS_C_RNTI, rel15->rnti, frame, slot,0, 0);
......
......@@ -58,7 +58,7 @@ void nr_fill_dlsch_dl_tti_req(processingData_L1tx_t *msgTx, nfapi_nr_dl_tti_pdsc
harq->sdu_len = 0;
}
void nr_fill_dlsch_tx_req(processingData_L1tx_t *msgTx, int idx, uint8_t *sdu, uint16_t sdu_len)
void nr_fill_dlsch_tx_req(processingData_L1tx_t *msgTx, int idx, uint8_t *sdu, uint32_t sdu_len)
{
AssertFatal(sdu != NULL, "sdu is null\n");
......
......@@ -192,7 +192,7 @@ void nr_schedule_tx_req(PHY_VARS_gNB *gNB, nfapi_nr_tx_data_request_t *TX_req)
processingData_L1tx_t *msgTx = gNB->msgDataTx;
for (int idx = 0; idx < TX_req->Number_of_PDUs; ++idx) {
uint16_t len = TX_req->pdu_list[idx].TLVs[0].length;
uint32_t len = TX_req->pdu_list[idx].TLVs[0].length;
uint8_t *sdu = (uint8_t *)TX_req->pdu_list[idx].TLVs[0].value.direct;
nr_fill_dlsch_tx_req(msgTx, idx, sdu, len);
}
......
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