Commit 8f758785 authored by gabrielC's avatar gabrielC

Correction for dlsch dual buffer

parent 666ae5d0
...@@ -7209,7 +7209,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, ...@@ -7209,7 +7209,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
uint8_t transmission_mode = ue->transmission_mode[eNB_id]; uint8_t transmission_mode = ue->transmission_mode[eNB_id];
ANFBmode_t AckNackFBMode; ANFBmode_t AckNackFBMode;
LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id]; LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id];
LTE_UE_DLSCH_t **dlsch = ue->dlsch[subframe&0x1][0]; LTE_UE_DLSCH_t **dlsch = ue->dlsch[subframe_DL(&ue->frame_parms,subframe)&0x1][0];
PHY_MEASUREMENTS *meas = &ue->measurements; PHY_MEASUREMENTS *meas = &ue->measurements;
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
// uint32_t current_dlsch_cqi = ue->current_dlsch_cqi[eNB_id]; // uint32_t current_dlsch_cqi = ue->current_dlsch_cqi[eNB_id];
...@@ -8015,7 +8015,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, ...@@ -8015,7 +8015,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
if (frame_parms->frame_type == FDD) { if (frame_parms->frame_type == FDD) {
int dl_subframe = (subframe<4) ? (subframe+6) : (subframe-4); int dl_subframe = (subframe<4) ? (subframe+6) : (subframe-4);
if (ue->dlsch[dl_subframe&0x1][eNB_id][0]->harq_ack[dl_subframe].send_harq_status>0) { // we have downlink transmission if (ue->dlsch[subframe_DL(&ue->frame_parms,dl_subframe)&0x1][eNB_id][0]->harq_ack[dl_subframe].send_harq_status>0) { // we have downlink transmission
ulsch->harq_processes[harq_pid]->O_ACK = 1; ulsch->harq_processes[harq_pid]->O_ACK = 1;
} else { } else {
ulsch->harq_processes[harq_pid]->O_ACK = 0; ulsch->harq_processes[harq_pid]->O_ACK = 0;
......
...@@ -641,8 +641,8 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -641,8 +641,8 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
frame_rx_prev = frame_rx_prev%1024; frame_rx_prev = frame_rx_prev%1024;
if (err_flag == 1) { if (err_flag == 1) {
LOG_D(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, round %d, subframe %d)\n", LOG_D(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, round %d, TBS %d, mcs %d)\n",
phy_vars_ue->Mod_id, frame_rx_prev, subframe_rx_prev, harq_pid, harq_process->round, subframe); phy_vars_ue->Mod_id, frame, subframe, harq_pid, harq_process->round,harq_process->TBS,harq_process->mcs);
dlsch->harq_ack[subframe].ack = 0; dlsch->harq_ack[subframe].ack = 0;
dlsch->harq_ack[subframe].harq_id = harq_pid; dlsch->harq_ack[subframe].harq_id = harq_pid;
...@@ -670,8 +670,8 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -670,8 +670,8 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
dlsch->harq_ack[subframe].ack = 1; dlsch->harq_ack[subframe].ack = 1;
dlsch->harq_ack[subframe].harq_id = harq_pid; dlsch->harq_ack[subframe].harq_id = harq_pid;
dlsch->harq_ack[subframe].send_harq_status = 1; dlsch->harq_ack[subframe].send_harq_status = 1;
LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for SFN/SF %d/%d (pid %d, pid status %d, round %d, subframe %d)\n", LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for SFN/SF %d/%d (pid %d, pid status %d, round %d, , TBS %d, mcs %d)\n",
phy_vars_ue->Mod_id, frame_rx_prev, subframe_rx_prev, harq_pid, harq_process->status, harq_process->round, subframe); phy_vars_ue->Mod_id, frame, subframe, harq_pid, harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs);
if(is_crnti) if(is_crnti)
{ {
...@@ -926,7 +926,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -926,7 +926,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break; break;
case PDSCH: // TB0 case PDSCH: // TB0
dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]; dlsch_ue = phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0];
harq_pid = dlsch_ue->current_harq_pid; harq_pid = dlsch_ue->current_harq_pid;
ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->pdcch_vars[subframe & 0x1][(uint32_t)eNB_id]->crnti,PHY_vars_eNB_g[eNB_id2][CC_id]); ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->pdcch_vars[subframe & 0x1][(uint32_t)eNB_id]->crnti,PHY_vars_eNB_g[eNB_id2][CC_id]);
DevAssert( ue_id != (uint32_t)-1 ); DevAssert( ue_id != (uint32_t)-1 );
...@@ -972,7 +972,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -972,7 +972,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break; break;
case PDSCH1: { // TB1 case PDSCH1: { // TB1
dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]; dlsch_ue = phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][1];
harq_pid = dlsch_ue->current_harq_pid; harq_pid = dlsch_ue->current_harq_pid;
int8_t UE_id = find_ue( phy_vars_ue->pdcch_vars[subframe & 0x1][eNB_id]->crnti, PHY_vars_eNB_g[eNB_id2][CC_id] ); int8_t UE_id = find_ue( phy_vars_ue->pdcch_vars[subframe & 0x1][eNB_id]->crnti, PHY_vars_eNB_g[eNB_id2][CC_id] );
DevAssert( UE_id != -1 ); DevAssert( UE_id != -1 );
...@@ -1026,7 +1026,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -1026,7 +1026,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break; break;
default: default:
dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]; dlsch_ue = phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0];
LOG_E(PHY,"dlsch_decoding_emul: FATAL, unknown DLSCH_id %d\n",dlsch_id); LOG_E(PHY,"dlsch_decoding_emul: FATAL, unknown DLSCH_id %d\n",dlsch_id);
dlsch_ue->last_iteration_cnt = 1+dlsch_ue->max_turbo_iterations; dlsch_ue->last_iteration_cnt = 1+dlsch_ue->max_turbo_iterations;
return(1+dlsch_ue->max_turbo_iterations); return(1+dlsch_ue->max_turbo_iterations);
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
*/ */
//#include "PHY/defs.h" //#include "PHY/defs.h"
#include "PHY/extern.h" #include "PHY/extern.h"
#include "SCHED/defs.h"
#include "defs.h" #include "defs.h"
#include "extern.h" #include "extern.h"
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
...@@ -145,7 +146,7 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -145,7 +146,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
case PDSCH: case PDSCH:
pdsch_vars = ue->pdsch_vars[subframe&0x1]; pdsch_vars = ue->pdsch_vars[subframe&0x1];
dlsch = ue->dlsch[subframe&0x1][eNB_id]; dlsch = ue->dlsch[subframe_DL(&ue->frame_parms,subframe)&0x1][eNB_id];
LOG_D(PHY,"AbsSubframe %d.%d / Sym %d harq_pid %d, harq status %d.%d \n", LOG_D(PHY,"AbsSubframe %d.%d / Sym %d harq_pid %d, harq status %d.%d \n",
frame,subframe,symbol,harq_pid, frame,subframe,symbol,harq_pid,
dlsch[0]->harq_processes[harq_pid]->status, dlsch[0]->harq_processes[harq_pid]->status,
......
...@@ -514,16 +514,16 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -514,16 +514,16 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
int beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0; int beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0;
if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) { if (phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0]!=NULL) {
harq_pid = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid; harq_pid = phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0]->current_harq_pid;
if (harq_pid>=8) if (harq_pid>=8)
return; return;
mcs = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->mcs; mcs = phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0]->harq_processes[harq_pid]->mcs;
// Button 0 // Button 0
if(!phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->dl_power_off) { if(!phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0]->harq_processes[harq_pid]->dl_power_off) {
// we are in TM5 // we are in TM5
fl_show_object(form->button_0); fl_show_object(form->button_0);
} }
...@@ -534,12 +534,12 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -534,12 +534,12 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
} }
// coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti); // coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) { if (phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0]!=NULL) {
coded_bits_per_codeword = get_G(frame_parms, coded_bits_per_codeword = get_G(frame_parms,
phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->nb_rb, phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even, phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even,
get_Qm(mcs), get_Qm(mcs),
phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->Nl, phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols, num_pdcch_symbols,
frame, frame,
subframe, subframe,
......
...@@ -448,11 +448,11 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -448,11 +448,11 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
int mcs1=0; int mcs1=0;
unsigned char harq_pid = 0; unsigned char harq_pid = 0;
int beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0; int beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0;
if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) { if (phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0]!=NULL) {
harq_pid = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid; harq_pid = phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0]->current_harq_pid;
if (harq_pid>=8) if (harq_pid>=8)
return; return;
mcs0 = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->mcs; mcs0 = phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0]->harq_processes[harq_pid]->mcs;
// Button 0 // Button 0
/* /*
if(!phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->dl_power_off) { if(!phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->dl_power_off) {
...@@ -461,23 +461,23 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -461,23 +461,23 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
} }
*/ */
} }
if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]!=NULL) { if (phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][1]!=NULL) {
harq_pid = phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->current_harq_pid; harq_pid = phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][1]->current_harq_pid;
if (harq_pid>=8) if (harq_pid>=8)
return; return;
mcs1 = phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->mcs; mcs1 = phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][1]->harq_processes[harq_pid]->mcs;
} }
if (phy_vars_ue->pdcch_vars[subframe&0x1][eNB_id]!=NULL) { if (phy_vars_ue->pdcch_vars[subframe&0x1][eNB_id]!=NULL) {
num_pdcch_symbols = phy_vars_ue->pdcch_vars[subframe&0x1][eNB_id]->num_pdcch_symbols; num_pdcch_symbols = phy_vars_ue->pdcch_vars[subframe&0x1][eNB_id]->num_pdcch_symbols;
} }
// coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti); // coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) { if (phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0]!=NULL) {
mod0 = get_Qm(mcs0); mod0 = get_Qm(mcs0);
coded_bits_per_codeword0 = get_G(frame_parms, coded_bits_per_codeword0 = get_G(frame_parms,
phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->nb_rb, phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even, phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even,
get_Qm(mcs0), get_Qm(mcs0),
phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->Nl, phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][0]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols, num_pdcch_symbols,
frame, frame,
subframe, subframe,
...@@ -486,13 +486,13 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -486,13 +486,13 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
coded_bits_per_codeword0 = 0; //frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti); coded_bits_per_codeword0 = 0; //frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
mod0=0; mod0=0;
} }
if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]!=NULL) { if (phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][1]!=NULL) {
mod1 = get_Qm(mcs1); mod1 = get_Qm(mcs1);
coded_bits_per_codeword1 = get_G(frame_parms, coded_bits_per_codeword1 = get_G(frame_parms,
phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->nb_rb, phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][1]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->rb_alloc_even, phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][1]->harq_processes[harq_pid]->rb_alloc_even,
get_Qm(mcs1), get_Qm(mcs1),
phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->Nl, phy_vars_ue->dlsch[subframe_DL(&phy_vars_ue->frame_parms,subframe)&0x1][eNB_id][1]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols, num_pdcch_symbols,
frame, frame,
subframe, subframe,
......
...@@ -212,6 +212,12 @@ void prach_procedures(PHY_VARS_eNB *eNB); ...@@ -212,6 +212,12 @@ void prach_procedures(PHY_VARS_eNB *eNB);
lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe); lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
/*!
* \brief Function that return the DL SFN, used for TDD where the DL is not always 4 SFN before UL
*/
uint8_t subframe_DL(LTE_DL_FRAME_PARMS *frame_parms,uint8_t current_sfn);
/*! \brief Function to compute which type of DCIs to detect in the given subframe /*! \brief Function to compute which type of DCIs to detect in the given subframe
@param frame_parms Pointer to DL frame parameter descriptor @param frame_parms Pointer to DL frame parameter descriptor
@param subframe Subframe index @param subframe Subframe index
......
...@@ -374,19 +374,19 @@ uint8_t get_reset_ack(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -374,19 +374,19 @@ uint8_t get_reset_ack(LTE_DL_FRAME_PARMS *frame_parms,
} }
// report ACK/NACK status // report ACK/NACK status
o_ACK[0] = 1; o_ACK[cw_idx] = 1;
status = 0; status = 0;
if ((subframe_dl0 < 10) && (harq_ack[subframe_dl0].send_harq_status)) { if ((subframe_dl0 < 10) && (harq_ack[subframe_dl0].send_harq_status)) {
o_ACK[0] &= harq_ack[subframe_dl0].ack; o_ACK[cw_idx] &= harq_ack[subframe_dl0].ack;
status = harq_ack[subframe_dl0].send_harq_status; status = harq_ack[subframe_dl0].send_harq_status;
} }
if ((subframe_dl1 < 10) && (harq_ack[subframe_dl1].send_harq_status)) { if ((subframe_dl1 < 10) && (harq_ack[subframe_dl1].send_harq_status)) {
o_ACK[0] &= harq_ack[subframe_dl1].ack; o_ACK[cw_idx] &= harq_ack[subframe_dl1].ack;
status = harq_ack[subframe_dl1].send_harq_status; status = harq_ack[subframe_dl1].send_harq_status;
} }
// report status = Nbundled // report status = Nbundled
if (!status) { if (!status) {
o_ACK[0] = 0; o_ACK[cw_idx] = 0;
} else { } else {
if (harq_ack[subframe_ul].vDAI_UL < 0xff) { if (harq_ack[subframe_ul].vDAI_UL < 0xff) {
status = harq_ack[subframe_ul].vDAI_UL; status = harq_ack[subframe_ul].vDAI_UL;
...@@ -399,17 +399,17 @@ uint8_t get_reset_ack(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -399,17 +399,17 @@ uint8_t get_reset_ack(LTE_DL_FRAME_PARMS *frame_parms,
subframe, subframe_ul, harq_ack[subframe_ul].vDAI_UL, status, subframe, subframe_ul, harq_ack[subframe_ul].vDAI_UL, status,
subframe_dl0, harq_ack[subframe_dl0].ack, harq_ack[subframe_dl0].send_harq_status, harq_ack[subframe_dl0].vDAI_DL, subframe_dl0, harq_ack[subframe_dl0].ack, harq_ack[subframe_dl0].send_harq_status, harq_ack[subframe_dl0].vDAI_DL,
subframe_dl1, harq_ack[subframe_dl1].ack, harq_ack[subframe_dl1].send_harq_status, harq_ack[subframe_dl1].vDAI_DL, subframe_dl1, harq_ack[subframe_dl1].ack, harq_ack[subframe_dl1].send_harq_status, harq_ack[subframe_dl1].vDAI_DL,
o_ACK[0], status); o_ACK[cw_idx], status);
} else if (subframe_dl0 < 10) { } else if (subframe_dl0 < 10) {
LOG_D(PHY,"ul-sf#%d vDAI_UL[sf#%d]=%d Nbundled=%d: dlsf#%d ACK=%d status=%d vDAI_DL=%d, o_ACK[0]=%d status=%d\n", LOG_D(PHY,"ul-sf#%d vDAI_UL[sf#%d]=%d Nbundled=%d: dlsf#%d ACK=%d status=%d vDAI_DL=%d, o_ACK[0]=%d status=%d\n",
subframe, subframe_ul, harq_ack[subframe_ul].vDAI_UL, status, subframe, subframe_ul, harq_ack[subframe_ul].vDAI_UL, status,
subframe_dl0, harq_ack[subframe_dl0].ack, harq_ack[subframe_dl0].send_harq_status, harq_ack[subframe_dl0].vDAI_DL, subframe_dl0, harq_ack[subframe_dl0].ack, harq_ack[subframe_dl0].send_harq_status, harq_ack[subframe_dl0].vDAI_DL,
o_ACK[0], status); o_ACK[cw_idx], status);
}else if (subframe_dl1 < 10) { }else if (subframe_dl1 < 10) {
LOG_D(PHY,"ul-sf#%d vDAI_UL[sf#%d]=%d Nbundled=%d: dlsf#%d ACK=%d status=%d vDAI_DL=%d, o_ACK[0]=%d status=%d\n", LOG_D(PHY,"ul-sf#%d vDAI_UL[sf#%d]=%d Nbundled=%d: dlsf#%d ACK=%d status=%d vDAI_DL=%d, o_ACK[0]=%d status=%d\n",
subframe, subframe_ul, harq_ack[subframe_ul].vDAI_UL, status, subframe, subframe_ul, harq_ack[subframe_ul].vDAI_UL, status,
subframe_dl1, harq_ack[subframe_dl1].ack, harq_ack[subframe_dl1].send_harq_status, harq_ack[subframe_dl1].vDAI_DL, subframe_dl1, harq_ack[subframe_dl1].ack, harq_ack[subframe_dl1].send_harq_status, harq_ack[subframe_dl1].vDAI_DL,
o_ACK[0], status); o_ACK[cw_idx], status);
} }
} }
...@@ -604,6 +604,37 @@ lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms,unsigned char sub ...@@ -604,6 +604,37 @@ lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms,unsigned char sub
} }
} }
uint8_t subframe_DL(LTE_DL_FRAME_PARMS *frame_parms,uint8_t current_sfn)
{
// if FDD return dummy value
if (frame_parms->frame_type == FDD)
return(current_sfn);
switch (frame_parms->tdd_config) {
case 1:
switch (current_sfn) {
case 3:
case 8:
return(current_sfn-3);
break;
default:
return(current_sfn);
break;
}
case 3:
return(current_sfn);
break;
default:
AssertFatal(0,"TDD config %d not coded",frame_parms->tdd_config);
}
}
dci_detect_mode_t dci_detect_mode_select(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe) dci_detect_mode_t dci_detect_mode_select(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe)
{ {
dci_detect_mode_t ret = 0; dci_detect_mode_t ret = 0;
......
This diff is collapsed.
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
*/ */
#include "PHY/defs.h" #include "PHY/defs.h"
#include "SCHED/defs.h"
#include "PHY/LTE_TRANSPORT/proto.h" #include "PHY/LTE_TRANSPORT/proto.h"
#include "PHY/extern.h" #include "PHY/extern.h"
...@@ -51,7 +52,7 @@ int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,u ...@@ -51,7 +52,7 @@ int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,u
Po_PUCCH = get_PL(ue->Mod_id,ue->CC_id,eNB_id)+ Po_PUCCH = get_PL(ue->Mod_id,ue->CC_id,eNB_id)+
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH+ ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH+
ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->g_pucch; ue->dlsch[subframe_DL(&ue->frame_parms,proc->subframe_rx)&0x1][eNB_id][0]->g_pucch;
switch (pucch_fmt) { switch (pucch_fmt) {
case pucch_format1: case pucch_format1:
...@@ -90,19 +91,19 @@ int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,u ...@@ -90,19 +91,19 @@ int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,u
if (pucch_fmt!=pucch_format1) { if (pucch_fmt!=pucch_format1) {
LOG_D(PHY,"[UE %d][PDSCH %x] AbsSubframe %d.%d: Po_PUCCH %d dBm : Po_NOMINAL_PUCCH %d dBm, PL %d dB, g_pucch %d dB\n", LOG_D(PHY,"[UE %d][PDSCH %x] AbsSubframe %d.%d: Po_PUCCH %d dBm : Po_NOMINAL_PUCCH %d dBm, PL %d dB, g_pucch %d dB\n",
ue->Mod_id, ue->Mod_id,
ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti,proc->frame_tx%1024,subframe, ue->dlsch[subframe_DL(&ue->frame_parms,proc->subframe_rx)&0x1][eNB_id][0]->rnti,proc->frame_tx%1024,subframe,
Po_PUCCH, Po_PUCCH,
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH, ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
get_PL(ue->Mod_id,ue->CC_id,eNB_id), get_PL(ue->Mod_id,ue->CC_id,eNB_id),
ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->g_pucch); ue->dlsch[subframe_DL(&ue->frame_parms,proc->subframe_rx)&0x1][eNB_id][0]->g_pucch);
} else { } else {
LOG_D(PHY,"[UE %d][SR %x] AbsSubframe %d.%d: Po_PUCCH %d dBm : Po_NOMINAL_PUCCH %d dBm, PL %d dB g_pucch %d dB\n", LOG_D(PHY,"[UE %d][SR %x] AbsSubframe %d.%d: Po_PUCCH %d dBm : Po_NOMINAL_PUCCH %d dBm, PL %d dB g_pucch %d dB\n",
ue->Mod_id, ue->Mod_id,
ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti,proc->frame_tx%1024,subframe, ue->dlsch[subframe_DL(&ue->frame_parms,proc->subframe_rx)&0x1][eNB_id][0]->rnti,proc->frame_tx%1024,subframe,
Po_PUCCH, Po_PUCCH,
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH, ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
get_PL(ue->Mod_id,ue->CC_id,eNB_id), get_PL(ue->Mod_id,ue->CC_id,eNB_id),
ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->g_pucch); ue->dlsch[subframe_DL(&ue->frame_parms,proc->subframe_rx)&0x1][eNB_id][0]->g_pucch);
} }
return(Po_PUCCH); return(Po_PUCCH);
......
...@@ -2105,14 +2105,14 @@ int main(int argc, char **argv) ...@@ -2105,14 +2105,14 @@ int main(int argc, char **argv)
} }
for (i=0; i<2; i++) { for (i=0; i<2; i++) {
UE->dlsch[subframe&0x1][0][i] = new_ue_dlsch(Kmimo,8,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0); UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][i] = new_ue_dlsch(Kmimo,8,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0);
if (!UE->dlsch[subframe&0x1][0][i]) { if (!UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][i]) {
printf("Can't get ue dlsch structures\n"); printf("Can't get ue dlsch structures\n");
exit(-1); exit(-1);
} }
UE->dlsch[subframe&0x1][0][i]->rnti = n_rnti; UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][i]->rnti = n_rnti;
} }
UE->dlsch_SI[0] = new_ue_dlsch(1,1,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0); UE->dlsch_SI[0] = new_ue_dlsch(1,1,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0);
...@@ -2500,7 +2500,7 @@ int main(int argc, char **argv) ...@@ -2500,7 +2500,7 @@ int main(int argc, char **argv)
if (n_frames==1) printf("Running phy_procedures_UE_RX\n"); if (n_frames==1) printf("Running phy_procedures_UE_RX\n");
phy_procedures_UE_RX(UE,proc,0,0,normal_txrx,no_relay,NULL); phy_procedures_UE_RX(UE,proc,0,0,normal_txrx,no_relay,NULL);
if (UE->dlsch[subframe&0x1][0][0]->active == 0) { if (UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->active == 0) {
//printf("DCI not received\n"); //printf("DCI not received\n");
dci_errors[round]++; dci_errors[round]++;
UE->dlsch_errors[0] = 1; UE->dlsch_errors[0] = 1;
...@@ -2558,7 +2558,7 @@ int main(int argc, char **argv) ...@@ -2558,7 +2558,7 @@ int main(int argc, char **argv)
//pdsch_vars //pdsch_vars
dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round, UE->dlsch[subframe&0x1][0][0]->current_harq_pid); dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round, UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->current_harq_pid);
write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4); write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4);
...@@ -2576,13 +2576,13 @@ int main(int argc, char **argv) ...@@ -2576,13 +2576,13 @@ int main(int argc, char **argv)
if (UE->dlsch_errors[0] == 0) { if (UE->dlsch_errors[0] == 0) {
avg_iter += UE->dlsch[subframe&0x1][eNB_id][0]->last_iteration_cnt; avg_iter += UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][eNB_id][0]->last_iteration_cnt;
iter_trials++; iter_trials++;
if (n_frames==1) if (n_frames==1)
printf("No DLSCH errors found (round %d),uncoded ber %f\n",round,uncoded_ber); printf("No DLSCH errors found (round %d),uncoded ber %f\n",round,uncoded_ber);
UE->total_TBS[eNB_id] = UE->total_TBS[eNB_id] + UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->TBS; UE->total_TBS[eNB_id] = UE->total_TBS[eNB_id] + UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][eNB_id][0]->current_harq_pid]->TBS;
TB0_active = 0; TB0_active = 0;
...@@ -2590,25 +2590,25 @@ int main(int argc, char **argv) ...@@ -2590,25 +2590,25 @@ int main(int argc, char **argv)
else { else {
errs[round]++; errs[round]++;
avg_iter += UE->dlsch[subframe&0x1][eNB_id][0]->last_iteration_cnt-1; avg_iter += UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][eNB_id][0]->last_iteration_cnt-1;
iter_trials++; iter_trials++;
if (n_frames==1) { if (n_frames==1) {
//if ((n_frames==1) || (SNR>=30)) { //if ((n_frames==1) || (SNR>=30)) {
printf("DLSCH errors found (round %d), uncoded ber %f\n",round,uncoded_ber); printf("DLSCH errors found (round %d), uncoded ber %f\n",round,uncoded_ber);
for (s=0; s<UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->C; s++) { for (s=0; s<UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->harq_processes[0]->C; s++) {
if (s<UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Cminus) if (s<UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->harq_processes[0]->Cminus)
Kr = UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kminus; Kr = UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->harq_processes[0]->Kminus;
else else
Kr = UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kplus; Kr = UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->harq_processes[0]->Kplus;
Kr_bytes = Kr>>3; Kr_bytes = Kr>>3;
printf("Decoded_output (Segment %d):\n",s); printf("Decoded_output (Segment %d):\n",s);
for (i=0; i<Kr_bytes; i++) for (i=0; i<Kr_bytes; i++)
printf("%d : %x (%x)\n",i,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->c[s][i],UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->c[s][i]^eNB->dlsch[0][0]->harq_processes[0]->c[s][i]); printf("%d : %x (%x)\n",i,UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->harq_processes[0]->c[s][i],UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->harq_processes[0]->c[s][i]^eNB->dlsch[0][0]->harq_processes[0]->c[s][i]);
} }
sprintf(fname,"rxsig0_r%d.m",round); sprintf(fname,"rxsig0_r%d.m",round);
...@@ -2659,13 +2659,13 @@ int main(int argc, char **argv) ...@@ -2659,13 +2659,13 @@ int main(int argc, char **argv)
} }
//pdsch_vars //pdsch_vars
dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round, UE->dlsch[subframe&0x1][0][0]->current_harq_pid); dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round, UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->current_harq_pid);
//write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4); //write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4);
//write_output("dlsch_ber_bit.m","ber_bit",uncoded_ber_bit,coded_bits_per_codeword,1,0); //write_output("dlsch_ber_bit.m","ber_bit",uncoded_ber_bit,coded_bits_per_codeword,1,0);
//write_output("dlsch_w.m","w",eNB->dlsch[0][0]->harq_processes[0]->w[0],3*(tbs+64),1,4); //write_output("dlsch_w.m","w",eNB->dlsch[0][0]->harq_processes[0]->w[0],3*(tbs+64),1,4);
//write_output("dlsch_w.m","w",UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->w[0],3*(tbs+64),1,0); //write_output("dlsch_w.m","w",UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->harq_processes[0]->w[0],3*(tbs+64),1,0);
//pdcch_vars //pdcch_vars
write_output("pdcchF0_ext.m","pdcchF_ext", UE->pdcch_vars[0][eNB_id]->rxdataF_ext[0],2*3*UE->frame_parms.ofdm_symbol_size,1,1); write_output("pdcchF0_ext.m","pdcchF_ext", UE->pdcch_vars[0][eNB_id]->rxdataF_ext[0],2*3*UE->frame_parms.ofdm_symbol_size,1,1);
write_output("pdcch00_ch0_ext.m","pdcch00_ch0_ext",UE->pdcch_vars[0][eNB_id]->dl_ch_estimates_ext[0],300*3,1,1); write_output("pdcch00_ch0_ext.m","pdcch00_ch0_ext",UE->pdcch_vars[0][eNB_id]->dl_ch_estimates_ext[0],300*3,1,1);
...@@ -2679,7 +2679,7 @@ int main(int argc, char **argv) ...@@ -2679,7 +2679,7 @@ int main(int argc, char **argv)
// printf("round %d errors %d/%d\n",round,errs[round],trials); // printf("round %d errors %d/%d\n",round,errs[round],trials);
round++; round++;
// UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->round++; // UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->harq_processes[0]->round++;
} }
if (xforms==1) { if (xforms==1) {
...@@ -2869,7 +2869,7 @@ int main(int argc, char **argv) ...@@ -2869,7 +2869,7 @@ int main(int argc, char **argv)
//rate*effective_rate, //rate*effective_rate,
100*effective_rate, 100*effective_rate,
//rate, //rate,
//rate*get_Qm(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs), //rate*get_Qm(UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->harq_processes[UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->current_harq_pid]->mcs),
(1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])/ (1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])/
(double)eNB->dlsch[0][0]->harq_processes[0]->TBS, (double)eNB->dlsch[0][0]->harq_processes[0]->TBS,
(1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])); (1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0]));
...@@ -2946,7 +2946,7 @@ int main(int argc, char **argv) ...@@ -2946,7 +2946,7 @@ int main(int argc, char **argv)
printf("|__ DLSCH Rate Unmatching :%f us (%d trials)\n", printf("|__ DLSCH Rate Unmatching :%f us (%d trials)\n",
(double)UE->dlsch_rate_unmatching_stats.diff/UE->dlsch_rate_unmatching_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_rate_unmatching_stats.trials); (double)UE->dlsch_rate_unmatching_stats.diff/UE->dlsch_rate_unmatching_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_rate_unmatching_stats.trials);
printf("|__ DLSCH Turbo Decoding(%d bits) :%f us (%d trials)\n", printf("|__ DLSCH Turbo Decoding(%d bits) :%f us (%d trials)\n",
UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Cminus ? UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kminus : UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kplus, UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->harq_processes[0]->Cminus ? UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->harq_processes[0]->Kminus : UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][0]->harq_processes[0]->Kplus,
(double)UE->dlsch_turbo_decoding_stats.diff/UE->dlsch_turbo_decoding_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_turbo_decoding_stats.trials); (double)UE->dlsch_turbo_decoding_stats.diff/UE->dlsch_turbo_decoding_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_turbo_decoding_stats.trials);
printf(" |__ init %f us (cycles/iter %f, %d trials)\n", printf(" |__ init %f us (cycles/iter %f, %d trials)\n",
(double)UE->dlsch_tc_init_stats.diff/UE->dlsch_tc_init_stats.trials/cpu_freq_GHz/1000.0, (double)UE->dlsch_tc_init_stats.diff/UE->dlsch_tc_init_stats.trials/cpu_freq_GHz/1000.0,
...@@ -3235,7 +3235,7 @@ int main(int argc, char **argv) ...@@ -3235,7 +3235,7 @@ int main(int argc, char **argv)
printf("eNB %d\n",i); printf("eNB %d\n",i);
free_eNB_dlsch(eNB->dlsch[0][i]); free_eNB_dlsch(eNB->dlsch[0][i]);
printf("UE %d\n",i); printf("UE %d\n",i);
free_ue_dlsch(UE->dlsch[subframe&0x1][0][i]); free_ue_dlsch(UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&0x1][0][i]);
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -709,20 +709,20 @@ int main(int argc, char **argv) ...@@ -709,20 +709,20 @@ int main(int argc, char **argv)
// Create transport channel structures for 2 transport blocks (MIMO) // Create transport channel structures for 2 transport blocks (MIMO)
for (i=0; i<2; i++) { for (i=0; i<2; i++) {
eNB->dlsch[0][i] = new_eNB_dlsch(1,8,1827072,N_RB_DL,0,&eNB->frame_parms); eNB->dlsch[0][i] = new_eNB_dlsch(1,8,1827072,N_RB_DL,0,&eNB->frame_parms);
UE->dlsch[subframe&1][0][i] = new_ue_dlsch(1,8,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0); UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&1][0][i] = new_ue_dlsch(1,8,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0);
if (!eNB->dlsch[0][i]) { if (!eNB->dlsch[0][i]) {
printf("Can't get eNB dlsch structures\n"); printf("Can't get eNB dlsch structures\n");
exit(-1); exit(-1);
} }
if (!UE->dlsch[subframe&1][0][i]) { if (!UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&1][0][i]) {
printf("Can't get ue dlsch structures\n"); printf("Can't get ue dlsch structures\n");
exit(-1); exit(-1);
} }
eNB->dlsch[0][i]->rnti = 14; eNB->dlsch[0][i]->rnti = 14;
UE->dlsch[subframe&1][0][i]->rnti = 14; UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&1][0][i]->rnti = 14;
} }
...@@ -763,7 +763,7 @@ int main(int argc, char **argv) ...@@ -763,7 +763,7 @@ int main(int argc, char **argv)
init_ul_hopping(&eNB->frame_parms); init_ul_hopping(&eNB->frame_parms);
UE->dlsch[subframe&1][0][0]->harq_ack[ul_subframe2pdcch_alloc_subframe(&eNB->frame_parms,subframe)].send_harq_status = 1; UE->dlsch[subframe_DL(&UE->frame_parms,subframe)&1][0][0]->harq_ack[ul_subframe2pdcch_alloc_subframe(&eNB->frame_parms,subframe)].send_harq_status = 1;
UE->ulsch_Msg3_active[eNB_id] = 0; UE->ulsch_Msg3_active[eNB_id] = 0;
UE->ul_power_control_dedicated[eNB_id].accumulationEnabled=1; UE->ul_power_control_dedicated[eNB_id].accumulationEnabled=1;
......
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