changes for TDD
This commit is contained in:
@@ -407,7 +407,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
|
|||||||
PRACH_BLOCK_SIZE_BYTES);
|
PRACH_BLOCK_SIZE_BYTES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_D(PHY,"PRACH_IF4p5: CC_id %d : frame %d, subframe %d => %d dB\n",ru->idx,*frame,*subframe,
|
LOG_I(PHY,"PRACH_IF4p5: CC_id %d : frame %d, subframe %d => %d dB\n",ru->idx,*frame,*subframe,
|
||||||
dB_fixed(signal_energy((int*)&prach_rxsigF[0][0],839)));
|
dB_fixed(signal_energy((int*)&prach_rxsigF[0][0],839)));
|
||||||
for (idx=0;idx<ru->num_eNB;idx++) ru->wakeup_prach_eNB(ru->eNB_list[idx],ru,*frame,*subframe);
|
for (idx=0;idx<ru->num_eNB;idx++) ru->wakeup_prach_eNB(ru->eNB_list[idx],ru,*frame,*subframe);
|
||||||
|
|
||||||
|
|||||||
@@ -38,9 +38,12 @@
|
|||||||
#include "SCHED/extern.h"
|
#include "SCHED/extern.h"
|
||||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||||
|
|
||||||
//#define PRACH_DEBUG 1
|
#define PRACH_DEBUG 1
|
||||||
//#define PRACH_WRITE_OUTPUT_DEBUG 1
|
//#define PRACH_WRITE_OUTPUT_DEBUG 1
|
||||||
|
|
||||||
|
#undef LOG_I
|
||||||
|
#define LOG_I(A,B,C...) printf(B,C)
|
||||||
|
|
||||||
uint16_t NCS_unrestricted[16] = {0,13,15,18,22,26,32,38,46,59,76,93,119,167,279,419};
|
uint16_t NCS_unrestricted[16] = {0,13,15,18,22,26,32,38,46,59,76,93,119,167,279,419};
|
||||||
uint16_t NCS_restricted[15] = {15,18,22,26,32,38,46,55,68,82,100,128,158,202,237}; // high-speed case
|
uint16_t NCS_restricted[15] = {15,18,22,26,32,38,46,55,68,82,100,128,158,202,237}; // high-speed case
|
||||||
uint16_t NCS_4[7] = {2,4,6,8,10,12,15};
|
uint16_t NCS_4[7] = {2,4,6,8,10,12,15};
|
||||||
@@ -1202,6 +1205,10 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
|||||||
int16_t *prach[nb_rx];
|
int16_t *prach[nb_rx];
|
||||||
uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type);
|
uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type);
|
||||||
uint16_t N_ZC = (prach_fmt <4)?839:139;
|
uint16_t N_ZC = (prach_fmt <4)?839:139;
|
||||||
|
|
||||||
|
#ifdef PRACH_DEBUG
|
||||||
|
int en;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (eNB) {
|
if (eNB) {
|
||||||
#ifdef Rel14
|
#ifdef Rel14
|
||||||
@@ -1275,7 +1282,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
|||||||
#ifdef PRACH_DEBUG
|
#ifdef PRACH_DEBUG
|
||||||
int32_t en0=signal_energy((int32_t*)prach[aa],fp->samples_per_tti);
|
int32_t en0=signal_energy((int32_t*)prach[aa],fp->samples_per_tti);
|
||||||
int8_t dbEn0 = dB_fixed(en0);
|
int8_t dbEn0 = dB_fixed(en0);
|
||||||
int8_t rach_dBm = dbEn0 - eNB->rx_total_gain_dB;
|
int8_t rach_dBm = dbEn0 - ru->rx_total_gain_dB;
|
||||||
|
|
||||||
#ifdef PRACH_WRITE_OUTPUT_DEBUG
|
#ifdef PRACH_WRITE_OUTPUT_DEBUG
|
||||||
if (dbEn0>32 && prach[0]!= NULL)
|
if (dbEn0>32 && prach[0]!= NULL)
|
||||||
@@ -1885,9 +1892,9 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef PRACH_DEBUG
|
//#ifdef PRACH_DEBUG
|
||||||
LOG_I( PHY, "compute_prach_seq: done init prach_tables\n" );
|
// LOG_I( PHY, "compute_prach_seq: done init prach_tables\n" );
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
if (highSpeedFlag== 0) {
|
if (highSpeedFlag== 0) {
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
|||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
LOG_D(PHY,"[RAPROC] Frame %d, subframe %d : Most likely preamble %d, energy %d dB delay %d (prach_energy counter %d)\n",
|
LOG_I(PHY,"[RAPROC] Frame %d, subframe %d : Most likely preamble %d, energy %d dB delay %d (prach_energy counter %d)\n",
|
||||||
frame,subframe,
|
frame,subframe,
|
||||||
max_preamble[0],
|
max_preamble[0],
|
||||||
max_preamble_energy[0]/10,
|
max_preamble_energy[0]/10,
|
||||||
|
|||||||
@@ -3280,7 +3280,7 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
|
|||||||
LOG_D(MAC, "Received %d for harq_pid %d\n", pdu[0],
|
LOG_D(MAC, "Received %d for harq_pid %d\n", pdu[0],
|
||||||
harq_pid);
|
harq_pid);
|
||||||
|
|
||||||
pdu = &harq_indication_fdd->harq_data[0].bundling.value_0;
|
pdu = &harq_indication_tdd->harq_data[0].bundling.value_0;
|
||||||
if (pdu[0] == 1) { // ACK
|
if (pdu[0] == 1) { // ACK
|
||||||
sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
|
sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
|
||||||
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
|
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
|
||||||
|
|||||||
@@ -630,7 +630,7 @@ static void* eNB_thread_prach( void* param ) {
|
|||||||
|
|
||||||
if (wait_on_condition(&proc->mutex_prach,&proc->cond_prach,&proc->instance_cnt_prach,"eNB_prach_thread") < 0) break;
|
if (wait_on_condition(&proc->mutex_prach,&proc->cond_prach,&proc->instance_cnt_prach,"eNB_prach_thread") < 0) break;
|
||||||
|
|
||||||
LOG_D(PHY,"Running eNB prach procedures\n");
|
LOG_I(PHY,"Running eNB prach procedures\n");
|
||||||
prach_procedures(eNB
|
prach_procedures(eNB
|
||||||
#ifdef Rel14
|
#ifdef Rel14
|
||||||
,0
|
,0
|
||||||
|
|||||||
@@ -1097,6 +1097,7 @@ static void* ru_thread_prach( void* param ) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
LOG_I(PHY,"Running rx_prach in %d.%d\n",proc->frame_prach,proc->subframe_prach);
|
||||||
rx_prach(NULL,
|
rx_prach(NULL,
|
||||||
ru,
|
ru,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -1905,10 +1906,11 @@ static void* ru_thread( void* param ) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
LOG_D(PHY,"RU thread %d, frame %d, subframe %d \n",
|
LOG_I(PHY,"RU thread %d, frame %d, subframe %d \n",
|
||||||
ru->idx,frame,subframe);
|
ru->idx,frame,subframe);
|
||||||
|
|
||||||
if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)==1)) {
|
if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)==1)) {
|
||||||
|
LOG_I(PHY,"Waking up prach for %d.%d\n",proc->frame_rx,proc->subframe_rx);
|
||||||
wakeup_prach_ru(ru);
|
wakeup_prach_ru(ru);
|
||||||
}
|
}
|
||||||
#ifdef Rel14
|
#ifdef Rel14
|
||||||
|
|||||||
Reference in New Issue
Block a user