fix warnings and revert commented logs
This commit is contained in:
@@ -42,6 +42,7 @@
|
|||||||
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
|
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
|
||||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||||
#include "SCHED_NR/sched_nr.h"
|
#include "SCHED_NR/sched_nr.h"
|
||||||
|
#include "SCHED_NR/fapi_nr_l1.h"
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
@@ -408,7 +409,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
int8_t l_ol [68*384];
|
int8_t l_ol [68*384];
|
||||||
__m128i *pv_ol128 = (__m128i*)&z_ol;
|
__m128i *pv_ol128 = (__m128i*)&z_ol;
|
||||||
__m128i *pl_ol128 = (__m128i*)&l_ol;
|
__m128i *pl_ol128 = (__m128i*)&l_ol;
|
||||||
int no_iteration_ldpc;
|
int no_iteration_ldpc = 2;
|
||||||
int length_dec;
|
int length_dec;
|
||||||
uint8_t crc_type;
|
uint8_t crc_type;
|
||||||
int K_bits_F;
|
int K_bits_F;
|
||||||
@@ -623,6 +624,11 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
Qm,
|
Qm,
|
||||||
(int8_t*)&pl_ol128[0],
|
(int8_t*)&pl_ol128[0],
|
||||||
llrProcBuf, 1);
|
llrProcBuf, 1);
|
||||||
|
if (ret<0) {
|
||||||
|
LOG_E(PHY,"ulsch_decoding.c: Problem in LDPC decoder offload\n");
|
||||||
|
no_iteration_ldpc = ulsch->max_ldpc_iterations + 1;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
K_bits_F = Kr-harq_process->F;
|
K_bits_F = Kr-harq_process->F;
|
||||||
@@ -650,7 +656,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
|
|
||||||
LOG_E(PHY,"ulsch_decoding.c: Problem in rate_matching\n");
|
LOG_E(PHY,"ulsch_decoding.c: Problem in rate_matching\n");
|
||||||
no_iteration_ldpc = ulsch->max_ldpc_iterations + 1;
|
no_iteration_ldpc = ulsch->max_ldpc_iterations + 1;
|
||||||
return;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//set first 2*Z_c bits to zeros
|
//set first 2*Z_c bits to zeros
|
||||||
@@ -674,10 +680,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
p_procTime);
|
p_procTime);
|
||||||
|
|
||||||
}
|
}
|
||||||
/*if (ret<0) {
|
|
||||||
no_iteration_ldpc = ulsch->max_ldpc_iterations + 1;
|
|
||||||
}
|
|
||||||
else {*/
|
|
||||||
|
|
||||||
for (int m=0; m < Kr>>3; m ++) {
|
for (int m=0; m < Kr>>3; m ++) {
|
||||||
harq_process->c[r][m]= (uint8_t) llrProcBuf[m];
|
harq_process->c[r][m]= (uint8_t) llrProcBuf[m];
|
||||||
@@ -708,8 +710,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
else{
|
else{
|
||||||
dtx_det = 0;
|
dtx_det = 0;
|
||||||
no_iteration_ldpc = ulsch->max_ldpc_iterations+1;
|
no_iteration_ldpc = ulsch->max_ldpc_iterations+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool decodeSuccess = (no_iteration_ldpc <= ulsch->max_ldpc_iterations);
|
bool decodeSuccess = (no_iteration_ldpc <= ulsch->max_ldpc_iterations);
|
||||||
if (decodeSuccess) {
|
if (decodeSuccess) {
|
||||||
memcpy(harq_process->b+offset,
|
memcpy(harq_process->b+offset,
|
||||||
@@ -723,7 +724,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
LOG_D(PHY, "ULSCH %d in error\n",ULSCH_id);
|
LOG_D(PHY, "ULSCH %d in error\n",ULSCH_id);
|
||||||
break; //don't even attempt to decode other segments
|
break; //don't even attempt to decode other segments
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING,0);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING,0);
|
||||||
|
|
||||||
|
|||||||
@@ -464,7 +464,7 @@ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHI
|
|||||||
write_package[end].buff[i] = buff[i];
|
write_package[end].buff[i] = buff[i];
|
||||||
write_thread->count_write++;
|
write_thread->count_write++;
|
||||||
write_thread->end = (write_thread->end + 1)% MAX_WRITE_THREAD_PACKAGE;
|
write_thread->end = (write_thread->end + 1)% MAX_WRITE_THREAD_PACKAGE;
|
||||||
// LOG_D(HW,"Signaling TX TS %llu\n",(unsigned long long)timestamp);
|
LOG_D(HW,"Signaling TX TS %llu\n",(unsigned long long)timestamp);
|
||||||
pthread_cond_signal(&write_thread->cond_write);
|
pthread_cond_signal(&write_thread->cond_write);
|
||||||
pthread_mutex_unlock(&write_thread->mutex_write);
|
pthread_mutex_unlock(&write_thread->mutex_write);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -555,7 +555,7 @@ void *trx_usrp_write_thread(void * arg){
|
|||||||
s->tx_md.start_of_burst = (s->tx_count==0) ? true : first_packet;
|
s->tx_md.start_of_burst = (s->tx_count==0) ? true : first_packet;
|
||||||
s->tx_md.end_of_burst = last_packet;
|
s->tx_md.end_of_burst = last_packet;
|
||||||
s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate);
|
s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate);
|
||||||
// LOG_D(PHY,"usrp_tx_write: tx_count %llu SoB %d, EoB %d, TS %llu\n",(unsigned long long)s->tx_count,s->tx_md.start_of_burst,s->tx_md.end_of_burst,(unsigned long long)timestamp);
|
LOG_D(PHY,"usrp_tx_write: tx_count %llu SoB %d, EoB %d, TS %llu\n",(unsigned long long)s->tx_count,s->tx_md.start_of_burst,s->tx_md.end_of_burst,(unsigned long long)timestamp);
|
||||||
s->tx_count++;
|
s->tx_count++;
|
||||||
|
|
||||||
// bit 3 enables gpio (for backward compatibility)
|
// bit 3 enables gpio (for backward compatibility)
|
||||||
|
|||||||
@@ -429,7 +429,7 @@ static int rfsimulator_write_internal(rfsimulator_state_t *t, openair0_timestamp
|
|||||||
if (!alreadyLocked)
|
if (!alreadyLocked)
|
||||||
pthread_mutex_lock(&Sockmutex);
|
pthread_mutex_lock(&Sockmutex);
|
||||||
|
|
||||||
//LOG_D(HW,"sending %d samples at time: %ld\n", nsamps, timestamp);
|
LOG_D(HW,"sending %d samples at time: %ld\n", nsamps, timestamp);
|
||||||
|
|
||||||
for (int i=0; i<FD_SETSIZE; i++) {
|
for (int i=0; i<FD_SETSIZE; i++) {
|
||||||
buffer_t *b=&t->buf[i];
|
buffer_t *b=&t->buf[i];
|
||||||
@@ -464,8 +464,8 @@ static int rfsimulator_write_internal(rfsimulator_state_t *t, openair0_timestamp
|
|||||||
if (!alreadyLocked)
|
if (!alreadyLocked)
|
||||||
pthread_mutex_unlock(&Sockmutex);
|
pthread_mutex_unlock(&Sockmutex);
|
||||||
|
|
||||||
//LOG_D(HW,"sent %d samples at time: %ld->%ld, energy in first antenna: %d\n",
|
LOG_D(HW,"sent %d samples at time: %ld->%ld, energy in first antenna: %d\n",
|
||||||
// nsamps, timestamp, timestamp+nsamps, signal_energy(samplesVoid[0], nsamps) );
|
nsamps, timestamp, timestamp+nsamps, signal_energy(samplesVoid[0], nsamps) );
|
||||||
return nsamps;
|
return nsamps;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -536,7 +536,7 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi
|
|||||||
} else if ( sz == 0 )
|
} else if ( sz == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
//LOG_D(HW, "Socket rcv %zd bytes\n", sz);
|
LOG_D(HW, "Socket rcv %zd bytes\n", sz);
|
||||||
AssertFatal((b->remainToTransfer-=sz) >= 0, "");
|
AssertFatal((b->remainToTransfer-=sz) >= 0, "");
|
||||||
b->transferPtr+=sz;
|
b->transferPtr+=sz;
|
||||||
|
|
||||||
@@ -599,11 +599,11 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi
|
|||||||
if ( b->headerMode==false ) {
|
if ( b->headerMode==false ) {
|
||||||
if ( ! b->trashingPacket ) {
|
if ( ! b->trashingPacket ) {
|
||||||
b->lastReceivedTS=b->th.timestamp+b->th.size-byteToSample(b->remainToTransfer,b->th.nbAnt);
|
b->lastReceivedTS=b->th.timestamp+b->th.size-byteToSample(b->remainToTransfer,b->th.nbAnt);
|
||||||
//LOG_D(HW,"UEsock: %d Set b->lastReceivedTS %ld\n", fd, b->lastReceivedTS);
|
LOG_D(HW,"UEsock: %d Set b->lastReceivedTS %ld\n", fd, b->lastReceivedTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( b->remainToTransfer==0) {
|
if ( b->remainToTransfer==0) {
|
||||||
//LOG_D(HW,"UEsock: %d Completed block reception: %ld\n", fd, b->lastReceivedTS);
|
LOG_D(HW,"UEsock: %d Completed block reception: %ld\n", fd, b->lastReceivedTS);
|
||||||
b->headerMode=true;
|
b->headerMode=true;
|
||||||
b->transferPtr=(char *)&b->th;
|
b->transferPtr=(char *)&b->th;
|
||||||
b->remainToTransfer=sizeof(samplesBlockHeader_t);
|
b->remainToTransfer=sizeof(samplesBlockHeader_t);
|
||||||
|
|||||||
Reference in New Issue
Block a user