Commit 4454627b authored by Mahesh's avatar Mahesh

Uplink constellation + CRC OK

parent b232c434
...@@ -428,7 +428,11 @@ static void *gNB_L1_thread( void *param ) { ...@@ -428,7 +428,11 @@ static void *gNB_L1_thread( void *param ) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0, 0 );
int frame_rx = L1_proc->frame_rx; int frame_rx = L1_proc->frame_rx;
int slot_rx = L1_proc->slot_rx; int slot_rx;
if (NFAPI_MODE == NFAPI_MODE_PNF)
slot_rx = (L1_proc->slot_rx) + 1;
else
slot_rx = L1_proc->slot_rx;
int frame_tx = L1_proc->frame_tx; int frame_tx = L1_proc->frame_tx;
int slot_tx = L1_proc->slot_tx; int slot_tx = L1_proc->slot_tx;
uint64_t timestamp_tx = L1_proc->timestamp_tx; uint64_t timestamp_tx = L1_proc->timestamp_tx;
......
...@@ -443,7 +443,9 @@ void nr_processULSegment(void* arg) { ...@@ -443,7 +443,9 @@ void nr_processULSegment(void* arg) {
for (int m=0; m < Kr>>3; m ++) { for (int m=0; m < Kr>>3; m ++) {
ulsch_harq->c[r][m]= (uint8_t) llrProcBuf[m]; ulsch_harq->c[r][m]= (uint8_t) llrProcBuf[m];
//printf("%x ", ulsch_harq->c[r][m]);
} }
//printf("\n");
//stop_meas(&phy_vars_gNB->ulsch_ldpc_decoding_stats); //stop_meas(&phy_vars_gNB->ulsch_ldpc_decoding_stats);
} }
...@@ -510,6 +512,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB, ...@@ -510,6 +512,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
A = (harq_process->TBS)<<3; A = (harq_process->TBS)<<3;
LOG_D(PHY,"ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, n_layers %d\n",harq_pid,A,G, mcs, n_layers, nb_rb, Qm, n_layers); LOG_D(PHY,"ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, n_layers %d\n",harq_pid,A,G, mcs, n_layers, nb_rb, Qm, n_layers);
//printf("ULSCH in %d.%d \n", frame, nr_tti_rx);
if (R<1024) if (R<1024)
Coderate = (float) R /(float) 1024; Coderate = (float) R /(float) 1024;
......
...@@ -275,13 +275,13 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch, ...@@ -275,13 +275,13 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
///////////////////////// a---->| add CRC |---->b ///////////////////////// ///////////////////////// a---->| add CRC |---->b /////////////////////////
/////////// ///////////
/*
int i; // int i;
printf("ulsch (tx): \n"); // printf("ulsch (tx): \n");
for (i=0;i<(A>>3);i++) // for (i=0;i<(A>>3);i++)
printf("%02x.",a[i]); // printf("%x ",harq_process->a[i]);
printf("\n"); // printf("\n");
*/
if (A > 3824) { if (A > 3824) {
// Add 24-bit crc (polynomial A) to payload // Add 24-bit crc (polynomial A) to payload
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
#include "common/ran_context.h" #include "common/ran_context.h"
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
uint8_t count = 0; uint8_t harq_pid_ul = -1; int flag = 0;
// Note the 2 scs values in the table names represent resp. scs_common and pdcch_scs // Note the 2 scs values in the table names represent resp. scs_common and pdcch_scs
/// LUT for the number of symbols in the coreset indexed by coreset index (4 MSB rmsi_pdcch_config) /// LUT for the number of symbols in the coreset indexed by coreset index (4 MSB rmsi_pdcch_config)
...@@ -1248,6 +1249,11 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc, ...@@ -1248,6 +1249,11 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc,
case NR_UL_DCI_FORMAT_0_1: case NR_UL_DCI_FORMAT_0_1:
switch (rnti_type) { switch (rnti_type) {
case NR_RNTI_C: case NR_RNTI_C:
harq_pid_ul = (harq_pid_ul + 1) % 16;
if (harq_pid_ul == 0)
flag = !flag;
dci_pdu_rel15->ndi = flag;
// Indicating a DL DCI format 1bit // Indicating a DL DCI format 1bit
pos = 1; pos = 1;
*dci_pdu |= ((uint64_t)dci_pdu_rel15->format_indicator & 0x1) << (dci_size - pos); *dci_pdu |= ((uint64_t)dci_pdu_rel15->format_indicator & 0x1) << (dci_size - pos);
...@@ -1280,6 +1286,7 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc, ...@@ -1280,6 +1286,7 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc,
*dci_pdu |= ((uint64_t)dci_pdu_rel15->rv & 0x3) << (dci_size - pos); *dci_pdu |= ((uint64_t)dci_pdu_rel15->rv & 0x3) << (dci_size - pos);
// HARQ process number 4bit // HARQ process number 4bit
pos += 4; pos += 4;
dci_pdu_rel15->harq_pid = harq_pid_ul;
*dci_pdu |= ((uint64_t)dci_pdu_rel15->harq_pid & 0xf) << (dci_size - pos); *dci_pdu |= ((uint64_t)dci_pdu_rel15->harq_pid & 0xf) << (dci_size - pos);
// 1st Downlink assignment index // 1st Downlink assignment index
pos += dci_pdu_rel15->dai[0].nbits; pos += dci_pdu_rel15->dai[0].nbits;
......
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