Merge remote-tracking branch 'origin' into enhancement-10-harmony
Merge in develop too. Conflicts: cmake_targets/CMakeLists.txt openair1/PHY/CODING/3gpplte_sse.c openair1/PHY/LTE_TRANSPORT/phich.c openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c openair1/SCHED/phy_mac_stub.c openair1/SCHED/phy_procedures_lte_eNb.c targets/RT/USER/lte-softmodem.c
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "PHY/sse_intrin.h"
|
||||
//#define DEBUG_CH
|
||||
|
||||
#include "T.h"
|
||||
|
||||
// For Channel Estimation in Distributed Alamouti Scheme
|
||||
//static int16_t temp_out_ifft[2048*4] __attribute__((aligned(16)));
|
||||
@@ -331,6 +332,13 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
|
||||
break;
|
||||
}
|
||||
|
||||
#if T_TRACER
|
||||
if (aa == 0)
|
||||
T(T_ENB_PHY_UL_CHANNEL_ESTIMATE, T_INT(eNB_id), T_INT(UE_id),
|
||||
T_INT(phy_vars_eNB->proc[sched_subframe].frame_rx), T_INT(subframe),
|
||||
T_INT(0), T_BUFFER(ul_ch_estimates_time[0], 512 * 4));
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_CH
|
||||
|
||||
if (aa==0) {
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
#include "ARCH/CBMIMO1/DEVICE_DRIVER/extern.h"
|
||||
#endif
|
||||
|
||||
#include "T.h"
|
||||
|
||||
//#define DEBUG_PHICH 1
|
||||
|
||||
//extern unsigned short pcfich_reg[4];
|
||||
@@ -1501,9 +1503,12 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
|
||||
// if no format0 DCI was transmitted by MAC, prepare the
|
||||
// MCS parameters for the retransmission
|
||||
|
||||
|
||||
if ((ulsch[UE_id]->harq_processes[harq_pid]->dci_alloc == 0) &&
|
||||
(ulsch[UE_id]->harq_processes[harq_pid]->rar_alloc == 0) ) {
|
||||
if (ulsch[UE_id]->harq_processes[harq_pid]->phich_ACK==0 ) {
|
||||
T(T_ENB_PHY_ULSCH_UE_NO_DCI_RETRANSMISSION, T_INT(eNB->Mod_id), T_INT(eNB->proc->frame_tx),
|
||||
T_INT(subframe), T_INT(UE_id), T_INT(ulsch[UE_id]->rnti), T_INT(harq_pid));
|
||||
LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d, subframe %d : PHICH NACK / (no format0 DCI) Setting subframe_scheduling_flag\n",
|
||||
eNB->Mod_id,harq_pid,proc->frame_tx,subframe);
|
||||
ulsch[UE_id]->harq_processes[harq_pid]->subframe_scheduling_flag = 1;
|
||||
|
||||
@@ -1667,6 +1667,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
|
||||
uint16_t n2_pucch,
|
||||
uint8_t shortened_format,
|
||||
uint8_t *payload,
|
||||
int frame,
|
||||
uint8_t subframe,
|
||||
uint8_t pucch1_thres);
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#include "T.h"
|
||||
|
||||
//uint8_t ncs_cell[20][7];
|
||||
//#define DEBUG_PUCCH_TX
|
||||
//#define DEBUG_PUCCH_RX
|
||||
@@ -440,6 +442,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
|
||||
uint16_t n2_pucch,
|
||||
uint8_t shortened_format,
|
||||
uint8_t *payload,
|
||||
int frame,
|
||||
uint8_t subframe,
|
||||
uint8_t pucch1_thres)
|
||||
{
|
||||
@@ -796,6 +799,9 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
|
||||
eNB->pucch1_stats_thres[UE_id][(subframe<<10)+eNB->pucch1_stats_cnt[UE_id][subframe]] = sigma2_dB+pucch1_thres;
|
||||
eNB->pucch1_stats_cnt[UE_id][subframe] = (eNB->pucch1_stats_cnt[UE_id][subframe]+1)&1023;
|
||||
|
||||
T(T_ENB_PHY_PUCCH_1_ENERGY, T_INT(phy_vars_eNB->Mod_id), T_INT(UE_id), T_INT(frame), T_INT(subframe),
|
||||
T_INT(stat_max), T_INT(sigma2_dB+pucch1_thres));
|
||||
|
||||
/*
|
||||
if (eNB->pucch1_stats_cnt[UE_id][subframe] == 0) {
|
||||
write_output("pucch_debug.m","pucch_energy",
|
||||
@@ -1037,6 +1043,8 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
|
||||
eNB->pucch1ab_stats[UE_id][(subframe<<11) + 1+2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_im);
|
||||
eNB->pucch1ab_stats_cnt[UE_id][subframe] = (eNB->pucch1ab_stats_cnt[UE_id][subframe]+1)&1023;
|
||||
|
||||
/* frame not available here - set to -1 for the moment */
|
||||
T(T_ENB_PHY_PUCCH_1AB_IQ, T_INT(phy_vars_eNB->Mod_id), T_INT(UE_id), T_INT(-1), T_INT(subframe), T_INT(stat_re), T_INT(stat_im));
|
||||
|
||||
|
||||
*payload = (stat_re<0) ? 1 : 0;
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
//#define DEBUG_ULSCH
|
||||
#include "PHY/sse_intrin.h"
|
||||
|
||||
#include "T.h"
|
||||
|
||||
//extern char* namepointer_chMag ;
|
||||
//eren
|
||||
//extern int **ulchmag_eren;
|
||||
@@ -1615,7 +1617,7 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
rx_power_correction = 1;
|
||||
|
||||
if (ulsch[UE_id]->harq_processes[harq_pid]->nb_rb == 0) {
|
||||
LOG_E(PHY,"PUSCH (%d/%x) nb_rb=0!\n", harq_pid,ulsch[UE_id]->rnti,harq_pid);
|
||||
LOG_E(PHY,"PUSCH (%d/%x) nb_rb=0!\n", harq_pid,ulsch[UE_id]->rnti);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1837,8 +1839,14 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
llrp = (int16_t*)&pusch_vars->llr[0];
|
||||
|
||||
T(T_ENB_PHY_PUSCH_IQ, T_INT(eNB_id), T_INT(UE_id), T_INT(phy_vars_eNB->proc[sched_subframe].frame_rx),
|
||||
T_INT(subframe), T_INT(ulsch[UE_id]->harq_processes[harq_pid]->nb_rb),
|
||||
T_BUFFER(eNB_pusch_vars->rxdataF_comp[eNB_id][0],
|
||||
2 * /* ulsch[UE_id]->harq_processes[harq_pid]->nb_rb */ frame_parms->N_RB_UL *12*frame_parms->symbols_per_tti*2));
|
||||
|
||||
for (l=0; l<frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active; l++) {
|
||||
|
||||
if (((frame_parms->Ncp == 0) && ((l==3) || (l==10)))|| // skip pilots
|
||||
|
||||
@@ -57,6 +57,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
|
||||
uint32_t rballoc = 0x7FFF;
|
||||
//uint32_t rballoc2 = 0x000F;
|
||||
|
||||
int subframe = proc->subframe_tx;
|
||||
|
||||
LTE_eNB_DLSCH_t *DLSCH_ptr = eNB->dlsch[0][0];
|
||||
@@ -143,7 +144,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1A_10MHz_FDD_t;
|
||||
((DCI1A_10MHz_FDD_t*)&bcch_pdu)->type = 1;
|
||||
((DCI1A_10MHz_FDD_t*)&bcch_pdu)->vrb_type = 0;
|
||||
((DCI1A_10MHz_FDD_t*)&bcch_pdu)->rballoc = computeRIV(25,10,3);
|
||||
((DCI1A_10MHz_FDD_t*)&bcch_pdu)->rballoc = computeRIV(50,10,3);
|
||||
((DCI1A_10MHz_FDD_t*)&bcch_pdu)->ndi = proc->frame_tx&1;
|
||||
((DCI1A_10MHz_FDD_t*)&bcch_pdu)->rv = 1;
|
||||
((DCI1A_10MHz_FDD_t*)&bcch_pdu)->mcs = 1;
|
||||
@@ -154,7 +155,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1A_10MHz_TDD_1_6_t;
|
||||
((DCI1A_10MHz_TDD_1_6_t*)&bcch_pdu)->type = 1;
|
||||
((DCI1A_10MHz_TDD_1_6_t*)&bcch_pdu)->vrb_type = 0;
|
||||
((DCI1A_10MHz_TDD_1_6_t*)&bcch_pdu)->rballoc = computeRIV(25,10,3);
|
||||
((DCI1A_10MHz_TDD_1_6_t*)&bcch_pdu)->rballoc = computeRIV(50,10,3);
|
||||
((DCI1A_10MHz_TDD_1_6_t*)&bcch_pdu)->ndi = proc->frame_tx&1;
|
||||
((DCI1A_10MHz_TDD_1_6_t*)&bcch_pdu)->rv = 1;
|
||||
((DCI1A_10MHz_TDD_1_6_t*)&bcch_pdu)->mcs = 1;
|
||||
@@ -170,7 +171,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1A_20MHz_FDD_t;
|
||||
((DCI1A_20MHz_FDD_t*)&bcch_pdu)->type = 1;
|
||||
((DCI1A_20MHz_FDD_t*)&bcch_pdu)->vrb_type = 0;
|
||||
((DCI1A_20MHz_FDD_t*)&bcch_pdu)->rballoc = computeRIV(25,10,3);
|
||||
((DCI1A_20MHz_FDD_t*)&bcch_pdu)->rballoc = computeRIV(100,10,3);
|
||||
((DCI1A_20MHz_FDD_t*)&bcch_pdu)->ndi = proc->frame_tx&1;
|
||||
((DCI1A_20MHz_FDD_t*)&bcch_pdu)->rv = 1;
|
||||
((DCI1A_20MHz_FDD_t*)&bcch_pdu)->mcs = 1;
|
||||
@@ -181,7 +182,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1A_20MHz_TDD_1_6_t;
|
||||
((DCI1A_20MHz_TDD_1_6_t*)&bcch_pdu)->type = 1;
|
||||
((DCI1A_20MHz_TDD_1_6_t*)&bcch_pdu)->vrb_type = 0;
|
||||
((DCI1A_20MHz_TDD_1_6_t*)&bcch_pdu)->rballoc = computeRIV(25,10,3);
|
||||
((DCI1A_20MHz_TDD_1_6_t*)&bcch_pdu)->rballoc = computeRIV(100,10,3);
|
||||
((DCI1A_20MHz_TDD_1_6_t*)&bcch_pdu)->ndi = proc->frame_tx&1;
|
||||
((DCI1A_20MHz_TDD_1_6_t*)&bcch_pdu)->rv = 1;
|
||||
((DCI1A_20MHz_TDD_1_6_t*)&bcch_pdu)->mcs = 1;
|
||||
@@ -231,14 +232,16 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
if (eNB->frame_parms.frame_type == FDD) {
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1_5MHz_FDD_t;
|
||||
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->rballoc = rballoc;
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->rballoc = rballoc; //computeRIV(25,10,3);
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->TPC = 0;
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->harq_pid = DLSCH_ptr->harq_pid_freelist[DLSCH_ptr->head_freelist];
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->mcs = eNB->target_ue_dl_mcs;
|
||||
//((DCI1_5MHz_FDD_t *)&dlsch_pdu)->mcs = (unsigned char) ((eNB->frame%1024)%28);
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->ndi = proc->frame_tx&1;
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->rv = 0;
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[0].dci_pdu[0],(void *)&dlsch_pdu,sizeof(DCI1_5MHz_TDD_t));
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->rah = 0;
|
||||
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[0].dci_pdu[0],(void *)&dlsch_pdu,sizeof(DCI1_5MHz_FDD_t));
|
||||
|
||||
/*
|
||||
//user2
|
||||
@@ -261,7 +264,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
} else {
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1_5MHz_TDD_t;
|
||||
|
||||
((DCI1_5MHz_TDD_t *)&dlsch_pdu)->rballoc = rballoc;
|
||||
((DCI1_5MHz_TDD_t *)&dlsch_pdu)->rballoc = rballoc; //computeRIV(25,10,3);
|
||||
((DCI1_5MHz_TDD_t *)&dlsch_pdu)->TPC = 0;
|
||||
((DCI1_5MHz_TDD_t *)&dlsch_pdu)->dai = 0;
|
||||
((DCI1_5MHz_TDD_t *)&dlsch_pdu)->harq_pid = DLSCH_ptr->harq_pid_freelist[DLSCH_ptr->head_freelist];
|
||||
@@ -269,6 +272,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
//((DCI1_5MHz_TDD_t *)&dlsch_pdu)->mcs = (unsigned char) ((eNB->frame%1024)%28);
|
||||
((DCI1_5MHz_TDD_t *)&dlsch_pdu)->ndi = proc->frame_tx&1;
|
||||
((DCI1_5MHz_TDD_t *)&dlsch_pdu)->rv = 0;
|
||||
((DCI1_5MHz_TDD_t *)&dlsch_pdu)->rah = 0;
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[0].dci_pdu[0],(void *)&dlsch_pdu,sizeof(DCI1_5MHz_TDD_t));
|
||||
|
||||
/*
|
||||
@@ -287,6 +291,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->mcs = eNB->target_ue_dl_mcs;
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->ndi = 1;
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->rv = 0;
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->rah = 0;
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[1].dci_pdu[0],(void *)&((DCI1_5MHz_FDD_t *)&dlsch_pdu)->,sizeof(DCI1_5MHz_TDD_t));
|
||||
*/
|
||||
}
|
||||
@@ -298,14 +303,16 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
if (eNB->frame_parms.frame_type == FDD) {
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1_10MHz_FDD_t;
|
||||
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->rballoc = rballoc;
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->rballoc = rballoc; //computeRIV(50,10,3);
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->TPC = 0;
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->harq_pid = DLSCH_ptr->harq_pid_freelist[DLSCH_ptr->head_freelist];
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->mcs = eNB->target_ue_dl_mcs;
|
||||
//((DCI1_10MHz_FDD_t *)&dlsch_pdu)->mcs = (unsigned char) ((eNB->frame%1024)%28);
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->ndi = proc->frame_tx&1;
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->rv = 0;
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[0].dci_pdu[0],(void *)&dlsch_pdu,sizeof(DCI1_10MHz_TDD_t));
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->rah = 0;
|
||||
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[0].dci_pdu[0],(void *)&dlsch_pdu,sizeof(DCI1_10MHz_FDD_t));
|
||||
|
||||
/*
|
||||
//user2
|
||||
@@ -323,12 +330,13 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->mcs = eNB->target_ue_dl_mcs;
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->ndi = 1;
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->rv = 0;
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->rah = 0;
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[1].dci_pdu[0],(void *)&((DCI1_10MHz_FDD_t *)&dlsch_pdu)->,sizeof(DCI1_10MHz_TDD_t));
|
||||
*/
|
||||
} else {
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1_10MHz_TDD_t;
|
||||
|
||||
((DCI1_10MHz_TDD_t *)&dlsch_pdu)->rballoc = rballoc;
|
||||
((DCI1_10MHz_TDD_t *)&dlsch_pdu)->rballoc = rballoc; //computeRIV(50,10,3);
|
||||
((DCI1_10MHz_TDD_t *)&dlsch_pdu)->TPC = 0;
|
||||
((DCI1_10MHz_TDD_t *)&dlsch_pdu)->dai = 0;
|
||||
((DCI1_10MHz_TDD_t *)&dlsch_pdu)->harq_pid = DLSCH_ptr->harq_pid_freelist[DLSCH_ptr->head_freelist];
|
||||
@@ -336,6 +344,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
//((DCI1_10MHz_TDD_t *)&dlsch_pdu)->mcs = (unsigned char) ((eNB->frame%1024)%28);
|
||||
((DCI1_10MHz_TDD_t *)&dlsch_pdu)->ndi = proc->frame_tx&1;
|
||||
((DCI1_10MHz_TDD_t *)&dlsch_pdu)->rv = 0;
|
||||
((DCI1_10MHz_TDD_t *)&dlsch_pdu)->rah = 0;
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[0].dci_pdu[0],(void *)&dlsch_pdu,sizeof(DCI1_10MHz_TDD_t));
|
||||
|
||||
/*
|
||||
@@ -354,6 +363,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->mcs = eNB->target_ue_dl_mcs;
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->ndi = 1;
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->rv = 0;
|
||||
((DCI1_10MHz_FDD_t *)&dlsch_pdu)->rah = 0;
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[1].dci_pdu[0],(void *)&((DCI1_10MHz_FDD_t *)&dlsch_pdu)->,sizeof(DCI1_10MHz_TDD_t));
|
||||
*/
|
||||
}
|
||||
@@ -366,13 +376,12 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->rballoc = rballoc;
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->TPC = 0;
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->harq_pid = DLSCH_ptr->harq_pid_freelist[DLSCH_ptr->head_freelist];
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->harq_pid = DLSCH_ptr->harq_pid_freelist[DLSCH_ptr->head_freelist];
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->mcs = eNB->target_ue_dl_mcs;
|
||||
//((DCI1_5MHz_FDD_t *)&dlsch_pdu)->mcs = (unsigned char) ((eNB->frame%1024)%28);
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->ndi = proc->frame_tx&1;
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->rv = 0;
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[0].dci_pdu[0],(void *)&dlsch_pdu,sizeof(DCI1_5MHz_TDD_t));
|
||||
|
||||
/*
|
||||
//user2
|
||||
DCI_pdu->dci_alloc[1].dci_length = sizeof_DCI1_5MHz_TDD_t;
|
||||
@@ -389,12 +398,13 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->mcs = eNB->target_ue_dl_mcs;
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->ndi = 1;
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->rv = 0;
|
||||
((DCI1_5MHz_FDD_t *)&dlsch_pdu)->rah = 0;
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[1].dci_pdu[0],(void *)&((DCI1_5MHz_FDD_t *)&dlsch_pdu)->,sizeof(DCI1_5MHz_TDD_t));
|
||||
*/
|
||||
} else {
|
||||
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1_20MHz_TDD_t;
|
||||
|
||||
((DCI1_20MHz_TDD_t *)&dlsch_pdu)->rballoc = rballoc;
|
||||
((DCI1_20MHz_TDD_t *)&dlsch_pdu)->rballoc = rballoc; //computeRIV(100,10,3);
|
||||
((DCI1_20MHz_TDD_t *)&dlsch_pdu)->TPC = 0;
|
||||
((DCI1_20MHz_TDD_t *)&dlsch_pdu)->dai = 0;
|
||||
((DCI1_20MHz_TDD_t *)&dlsch_pdu)->harq_pid = DLSCH_ptr->harq_pid_freelist[DLSCH_ptr->head_freelist];
|
||||
@@ -402,6 +412,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
//((DCI1_20MHz_TDD_t *)&dlsch_pdu)->mcs = (unsigned char) ((eNB->frame%1024)%28);
|
||||
((DCI1_20MHz_TDD_t *)&dlsch_pdu)->ndi = proc->frame_tx&1;
|
||||
((DCI1_20MHz_TDD_t *)&dlsch_pdu)->rv = 0;
|
||||
((DCI1_20MHz_TDD_t *)&dlsch_pdu)->rah = 0;
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[0].dci_pdu[0],(void *)&dlsch_pdu,sizeof(DCI1_20MHz_TDD_t));
|
||||
|
||||
/*
|
||||
@@ -420,6 +431,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
((DCI1_20MHz_FDD_t *)&dlsch_pdu)->mcs = eNB->target_ue_dl_mcs;
|
||||
((DCI1_20MHz_FDD_t *)&dlsch_pdu)->ndi = 1;
|
||||
((DCI1_20MHz_FDD_t *)&dlsch_pdu)->rv = 0;
|
||||
((DCI1_20MHz_FDD_t *)&dlsch_pdu)->rah = 0;
|
||||
memcpy((void*)&DCI_pdu->dci_alloc[1].dci_pdu[0],(void *)&((DCI1_20MHz_FDD_t *)&dlsch_pdu)->,sizeof(DCI1_5MHz_TDD_t));
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#include "T.h"
|
||||
|
||||
#include "assertions.h"
|
||||
#include "msc.h"
|
||||
|
||||
@@ -436,14 +438,18 @@ int QPSK2[4]= {AMP_OVER_2|(AMP_OVER_2<<16),AMP_OVER_2|((65536-AMP_OVER_2)<<16),(
|
||||
|
||||
|
||||
unsigned int taus(void);
|
||||
DCI_PDU DCI_pdu_tmp;
|
||||
|
||||
|
||||
void pmch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,PHY_VARS_RN *rn, int abstraction_flag,relaying_type_t r_type) {
|
||||
|
||||
|
||||
#ifdef Rel10
|
||||
MCH_PDU *mch_pduP;
|
||||
MCH_PDU mch_pdu;
|
||||
// uint8_t sync_area=255;
|
||||
#endif
|
||||
|
||||
int subframe = proc->subframe_tx;
|
||||
|
||||
if (abstraction_flag==0) {
|
||||
@@ -1035,10 +1041,21 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef DEBUG_PHY_PROC
|
||||
#ifdef DEBUG_DLSCH
|
||||
LOG_T(PHY,"eNB DLSCH SDU: \n");
|
||||
|
||||
T(T_ENB_PHY_DLSCH_UE_DCI, T_INT(phy_vars_eNB->Mod_id), T_INT(frame), T_INT(subframe), T_INT(UE_id),
|
||||
T_INT(DCI_pdu->dci_alloc[i].rnti), T_INT(DCI_pdu->dci_alloc[i].format),
|
||||
T_INT(phy_vars_eNB->dlsch_eNB[(int)UE_id][0]->current_harq_pid));
|
||||
|
||||
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->nCCE[subframe] = DCI_pdu->dci_alloc[i].firstCCE;
|
||||
|
||||
LOG_D(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : CCE resource for ue DCI (PDSCH %"PRIx16") => %"PRIu8"/%u\n",phy_vars_eNB->Mod_id,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe,
|
||||
DCI_pdu->dci_alloc[i].rnti,phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->nCCE[subframe],DCI_pdu->dci_alloc[i].firstCCE);
|
||||
|
||||
|
||||
for (i=0; i<dlsch_harq->TBS>>3; i++)
|
||||
LOG_T(PHY,"%"PRIx8".",DLSCH_pdu[i]);
|
||||
|
||||
@@ -1096,6 +1113,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d
|
||||
stop_meas(&eNB->dlsch_modulation_stats);
|
||||
}
|
||||
|
||||
|
||||
#ifdef PHY_ABSTRACTION
|
||||
else {
|
||||
start_meas(&eNB->dlsch_encoding_stats);
|
||||
@@ -1657,6 +1675,9 @@ void process_HARQ_feedback(uint8_t UE_id,
|
||||
dlsch->rnti,dl_harq_pid[m],M,m,mp,dlsch_harq_proc->round);
|
||||
#endif
|
||||
|
||||
T(T_ENB_PHY_DLSCH_UE_NACK, T_INT(phy_vars_eNB->Mod_id), T_INT(frame), T_INT(subframe), T_INT(UE_id), T_INT(dlsch->rnti),
|
||||
T_INT(dl_harq_pid[m]));
|
||||
|
||||
if (dlsch_harq_proc->round == 0)
|
||||
ue_stats->dlsch_NAK_round0++;
|
||||
|
||||
@@ -1690,6 +1711,10 @@ void process_HARQ_feedback(uint8_t UE_id,
|
||||
LOG_D(PHY,"[eNB %d][PDSCH %x/%d] ACK Received in round %d, resetting process\n",eNB->Mod_id,
|
||||
dlsch->rnti,dl_harq_pid[m],dlsch_harq_proc->round);
|
||||
#endif
|
||||
|
||||
T(T_ENB_PHY_DLSCH_UE_ACK, T_INT(phy_vars_eNB->Mod_id), T_INT(frame), T_INT(subframe), T_INT(UE_id), T_INT(dlsch->rnti),
|
||||
T_INT(dl_harq_pid[m]));
|
||||
|
||||
ue_stats->dlsch_ACK[dl_harq_pid[m]][dlsch_harq_proc->round]++;
|
||||
|
||||
// Received ACK so set round to 0 and set dlsch_harq_pid IDLE
|
||||
@@ -2025,6 +2050,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
|
||||
|
||||
// Now ACK/NAK
|
||||
// First check subframe_tx flag for earlier subframes
|
||||
|
||||
get_n1_pucch_eNB(eNB,
|
||||
proc,
|
||||
UE_id,
|
||||
@@ -2073,6 +2099,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
|
||||
if (do_SR == 1) {
|
||||
eNB->UE_stats[UE_id].sr_total++;
|
||||
|
||||
|
||||
if (abstraction_flag == 0)
|
||||
metric0_SR = rx_pucch(eNB,
|
||||
pucch_format1,
|
||||
@@ -2081,6 +2108,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
|
||||
0, // n2_pucch
|
||||
0, // shortened format, should be use_srs flag, later
|
||||
&SR_payload,
|
||||
frame,
|
||||
subframe,
|
||||
PUCCH1_THRES);
|
||||
|
||||
@@ -2096,6 +2124,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
if (SR_payload == 1) {
|
||||
LOG_D(PHY,"[eNB %d][SR %x] Frame %d subframe %d Got SR for PUSCH, transmitting to MAC\n",eNB->Mod_id,
|
||||
@@ -2141,6 +2170,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
|
||||
0, //n2_pucch
|
||||
0, // shortened format
|
||||
pucch_payload0,
|
||||
frame,
|
||||
subframe,
|
||||
PUCCH1a_THRES);
|
||||
|
||||
@@ -2152,6 +2182,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
|
||||
0, //n2_pucch
|
||||
0, // shortened format
|
||||
pucch_payload0,
|
||||
frame,
|
||||
subframe,
|
||||
PUCCH1a_THRES);
|
||||
}
|
||||
@@ -2211,6 +2242,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
|
||||
0, //n2_pucch
|
||||
0, // shortened format
|
||||
pucch_payload0,
|
||||
frame,
|
||||
subframe,
|
||||
PUCCH1a_THRES);
|
||||
else {
|
||||
@@ -2242,6 +2274,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
|
||||
0, // n2_pucch
|
||||
0, // shortened format
|
||||
pucch_payload0,
|
||||
frame,
|
||||
subframe,
|
||||
PUCCH1a_THRES);
|
||||
else {
|
||||
@@ -2265,6 +2298,7 @@ void pucch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq
|
||||
0, //n2_pucch
|
||||
0, // shortened format
|
||||
pucch_payload1,
|
||||
frame,
|
||||
subframe,
|
||||
PUCCH1a_THRES);
|
||||
else {
|
||||
@@ -2697,6 +2731,11 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
|
||||
LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_RX(%d)\n",eNB->Mod_id,frame, subframe);
|
||||
#endif
|
||||
|
||||
T(T_ENB_PHY_UL_TICK, T_INT(phy_vars_eNB->Mod_id), T_INT(frame), T_INT(subframe));
|
||||
|
||||
T(T_ENB_PHY_INPUT_SIGNAL, T_INT(phy_vars_eNB->Mod_id), T_INT(frame), T_INT(subframe), T_INT(0),
|
||||
T_BUFFER(&phy_vars_eNB->lte_eNB_common_vars.rxdata[0][0][subframe*phy_vars_eNB->lte_frame_parms.samples_per_tti],
|
||||
phy_vars_eNB->lte_frame_parms.samples_per_tti * 4));
|
||||
|
||||
eNB->rb_mask_ul[0]=0;
|
||||
eNB->rb_mask_ul[1]=0;
|
||||
@@ -2885,6 +2924,8 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_MSG3,0);
|
||||
|
||||
if (ret == (1+MAX_TURBO_ITERATIONS)) {
|
||||
T(T_ENB_PHY_ULSCH_UE_NACK, T_INT(phy_vars_eNB->Mod_id), T_INT(frame), T_INT(subframe), T_INT(i), T_INT(phy_vars_eNB->ulsch_eNB[i]->rnti),
|
||||
T_INT(harq_pid));
|
||||
|
||||
eNB->UE_stats[i].ulsch_round_errors[harq_pid][eNB->ulsch[i]->harq_processes[harq_pid]->round]++;
|
||||
eNB->ulsch[i]->harq_processes[harq_pid]->phich_active = 1;
|
||||
@@ -2988,6 +3029,12 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
|
||||
}
|
||||
} // ulsch in error
|
||||
else {
|
||||
|
||||
|
||||
|
||||
T(T_ENB_PHY_ULSCH_UE_ACK, T_INT(phy_vars_eNB->Mod_id), T_INT(frame), T_INT(subframe), T_INT(i), T_INT(phy_vars_eNB->ulsch_eNB[i]->rnti),
|
||||
T_INT(harq_pid));
|
||||
|
||||
if (eNB->ulsch[i]->Msg3_flag == 1) {
|
||||
LOG_D(PHY,"[eNB %d][PUSCH %d] Frame %d subframe %d ULSCH received, setting round to 0, PHICH ACK\n",
|
||||
eNB->Mod_id,harq_pid,
|
||||
|
||||
@@ -557,6 +557,7 @@ int main(int argc, char **argv)
|
||||
n2_pucch,
|
||||
0, //shortened_format,
|
||||
&pucch_payload_rx, //payload,
|
||||
0 /* frame not defined, let's pass 0 */,
|
||||
subframe,
|
||||
pucch1_thres);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user