Commit 839a7997 authored by laurent's avatar laurent

UE attach complete, added traces ulsch coding, remove temporary renaming

parent f112de54
......@@ -171,7 +171,8 @@ void prach_eNB_fromsplit(uint8_t *bufferZone, int bufSize, PHY_VARS_eNB *eNB) {
}
}
void sendFs6Ulharq(enum pckType type, int UEid, PHY_VARS_eNB *eNB, int frame, int subframe, uint8_t *harq_ack, uint8_t tdd_mapping_mode, uint16_t tdd_multiplexing_mask, uint16_t rnti, int32_t stat) {
void sendFs6Ulharq(enum pckType type, int UEid, PHY_VARS_eNB *eNB, int frame, int subframe, uint8_t *harq_ack, uint8_t tdd_mapping_mode, uint16_t tdd_multiplexing_mask, uint16_t rnti,
int32_t stat) {
static int current_fsf=-1;
int fsf=frame*16+subframe;
uint8_t *bufferZone=eNB->FS6bufferZone;
......@@ -201,7 +202,7 @@ void sendFs6Ulharq(enum pckType type, int UEid, PHY_VARS_eNB *eNB, int frame, in
}
LOG_D(PHY,"FS6 du, block: %d: adding ul harq/sr: %d, rnti: %d, ueid: %d\n",
curBlock, type, rnti, UEid);
curBlock, type, rnti, UEid);
commonUDP_t *newUDPheader=(commonUDP_t *) firstFreeByte;
fs6_ul_uespec_uci_element_t *tmp=(fs6_ul_uespec_uci_element_t *)(hULUEuci(newUDPheader)+1);
tmp+=hULUEuci(newUDPheader)->nb_active_ue;
......@@ -209,8 +210,10 @@ void sendFs6Ulharq(enum pckType type, int UEid, PHY_VARS_eNB *eNB, int frame, in
tmp->UEid=UEid;
tmp->frame=frame;
tmp->subframe=subframe;
if (harq_ack != NULL)
memcpy(tmp->harq_ack, harq_ack, 4);
tmp->tdd_mapping_mode=tdd_mapping_mode;
tmp->tdd_multiplexing_mask=tdd_multiplexing_mask;
tmp->n0_subband_power_dB=eNB->measurements.n0_subband_power_dB[0][0];
......@@ -240,6 +243,9 @@ void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_
hULUE(newUDPheader)->type=fs6ULsch;
hULUE(newUDPheader)->UE_id=UE_id;
hULUE(newUDPheader)->harq_id=harq_pid;
memcpy(hULUE(newUDPheader)->ulsch_power,
eNB->pusch_vars[UE_id]->ulsch_power,
sizeof(int)*2);
hULUE(newUDPheader)->segment=segmentID;
memcpy(hULUE(newUDPheader)+1, data, dataLen);
hULUE(newUDPheader)->segLen=dataLen;
......@@ -444,12 +450,12 @@ int ulsch_decoding_process(PHY_VARS_eNB *eNB, int UE_id, int llr8_flag) {
Kr_bytes = Kr>>3;
if (r==0) {
memcpy(ulsch_harq->bb,
memcpy(ulsch_harq->b,
&ulsch_harq->c[0][(ulsch_harq->F>>3)],
Kr_bytes - (ulsch_harq->F>>3) - ((ulsch_harq->C>1)?3:0));
offset = Kr_bytes - (ulsch_harq->F>>3) - ((ulsch_harq->C>1)?3:0);
} else {
memcpy(ulsch_harq->bb+offset,
memcpy(ulsch_harq->b+offset,
ulsch_harq->c[r],
Kr_bytes - ((ulsch_harq->C>1)?3:0));
offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0));
......@@ -638,23 +644,28 @@ void recvFs6Ul(uint8_t *bufferZone, int nbBlocks, PHY_VARS_eNB *eNB) {
memcpy(&ulsch_harq->d[hULUE(bufPtr)->segment][96],
hULUE(bufPtr)+1,
hULUE(bufPtr)->segLen);
memcpy(eNB->pusch_vars[hULUE(bufPtr)->UE_id]->ulsch_power,
hULUE(bufPtr)->ulsch_power,
sizeof(int)*2);
LOG_W(PHY,"Received ulsch data for: rnti:%d, fsf: %d/%d\n", ulsch->rnti, eNB->proc.frame_rx, eNB->proc.subframe_rx);
} else if ( type == fs6ULcch ) {
int nb_uci=hULUEuci(bufPtr)->nb_active_ue;
fs6_ul_uespec_uci_element_t *tmp=(fs6_ul_uespec_uci_element_t *)(hULUEuci(bufPtr)+1);
for (int j=0; j < nb_uci ; j++) {
LOG_D(PHY,"FS6 cu, block: %d/%d: received ul harq/sr: %d, rnti: %d, ueid: %d\n",
i, j, type, tmp->rnti, tmp->UEid);
LOG_D(PHY,"FS6 cu, block: %d/%d: received ul harq/sr: %d, rnti: %d, ueid: %d\n",
i, j, type, tmp->rnti, tmp->UEid);
eNB->measurements.n0_subband_power_dB[0][0]=tmp->n0_subband_power_dB;
if ( tmp->type == fs6ULindicationHarq )
fill_uci_harq_indication (tmp->UEid, eNB, &eNB->uci_vars[tmp->UEid],
tmp->frame, tmp->subframe, tmp->harq_ack,
tmp->tdd_mapping_mode, tmp->tdd_multiplexing_mask);
else if ( tmp->type == fs6ULindicationSr )
fill_sr_indication(tmp->UEid, eNB,tmp->rnti,tmp->frame,tmp->subframe,tmp->stat);
else
LOG_E(PHY, "Split FS6: impossible UL harq type\n");
if ( tmp->type == fs6ULindicationHarq )
fill_uci_harq_indication (tmp->UEid, eNB, &eNB->uci_vars[tmp->UEid],
tmp->frame, tmp->subframe, tmp->harq_ack,
tmp->tdd_mapping_mode, tmp->tdd_multiplexing_mask);
else if ( tmp->type == fs6ULindicationSr )
fill_sr_indication(tmp->UEid, eNB,tmp->rnti,tmp->frame,tmp->subframe,tmp->stat);
else
LOG_E(PHY, "Split FS6: impossible UL harq type\n");
tmp++;
}
} else
......@@ -668,11 +679,11 @@ void recvFs6Ul(uint8_t *bufferZone, int nbBlocks, PHY_VARS_eNB *eNB) {
void phy_procedures_eNB_uespec_RX_fromsplit(uint8_t *bufferZone, int nbBlocks,PHY_VARS_eNB *eNB) {
// The configuration arrived in Dl, so we can extract the UL data
recvFs6Ul(bufferZone, nbBlocks, eNB);
// dirty memory allocation in OAI...
for (int i = 0; i < NUMBER_OF_UCI_VARS_MAX; i++)
if ( eNB->uci_vars[i].frame == eNB->proc.frame_rx &&
eNB->uci_vars[i].subframe == eNB->proc.subframe_rx )
eNB->uci_vars[i].subframe == eNB->proc.subframe_rx )
eNB->uci_vars[i].active=0;
pusch_procedures_fromsplit(bufferZone, nbBlocks, eNB);
......@@ -739,6 +750,10 @@ void rcvFs6DL(uint8_t *bufferZone, int nbBlocks, PHY_VARS_eNB *eNB, int frame, i
ulsch_harq->frame = frame;
ulsch_harq->subframe = subframe;
ulsch_harq->first_rb=hTxULUE(bufPtr)->first_rb;
ulsch_harq->O_RI=hTxULUE(bufPtr)->O_RI;
ulsch_harq->Or1=hTxULUE(bufPtr)->Or1;
ulsch_harq->Msc_initial=hTxULUE(bufPtr)->Msc_initial;
ulsch_harq->Nsymb_initial=hTxULUE(bufPtr)->Nsymb_initial;
ulsch_harq->V_UL_DAI=hTxULUE(bufPtr)->V_UL_DAI;
ulsch_harq->Qm=hTxULUE(bufPtr)->Qm;
ulsch_harq->srs_active=hTxULUE(bufPtr)->srs_active;
......@@ -913,6 +928,10 @@ void appendFs6TxULUE(uint8_t *bufferZone, LTE_DL_FRAME_PARMS *fp, int curUE, LTE
memcpy(hTxULUE(newUDPheader)->cba_rnti,ulsch->cba_rnti,sizeof(ulsch->cba_rnti));//NUM_MAX_CBA_GROUP];
cpyToDu(rnti);
cpyToDuHarq(nb_rb);
cpyToDuHarq(Msc_initial);
cpyToDuHarq(Nsymb_initial);
cpyToDuHarq(O_RI);
cpyToDuHarq(Or1);
cpyToDuHarq(first_rb);
cpyToDuHarq(V_UL_DAI);
cpyToDuHarq(Qm);
......@@ -1280,8 +1299,10 @@ void UL_cu_fs6(RU_t *ru, uint64_t *TS) {
setAllfromTS(hUDP(bufferZone)->timestamp);
PHY_VARS_eNB *eNB = RC.eNB[0][0];
if (is_prach_subframe(&eNB->frame_parms, eNB->proc.frame_prach,eNB->proc.subframe_prach)>0)
prach_eNB_fromsplit(bufferZone, sizeof(bufferZone), eNB);
release_UE_in_freeList(eNB->Mod_id);
if (NFAPI_MODE==NFAPI_MONOLITHIC || NFAPI_MODE==NFAPI_MODE_PNF) {
......@@ -1296,11 +1317,13 @@ void *cu_fs6(void *arg) {
init_frame_parms(&ru->frame_parms,1);
phy_init_RU(ru);
wait_sync("ru_thread");
char * remoteIP;
char *remoteIP;
if ( getenv("FS6_REMOTE_IP") )
remoteIP=getenv("FS6_REMOTE_IP");
else
remoteIP=DU_IP;
AssertFatal(createUDPsock(NULL, CU_PORT, remoteIP, DU_PORT, &sockFS6), "");
uint64_t timeStamp=0;
......@@ -1321,11 +1344,13 @@ void *du_fs6(void *arg) {
phy_init_RU(ru);
openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
wait_sync("ru_thread");
char * remoteIP;
char *remoteIP;
if ( getenv("FS6_REMOTE_IP") )
remoteIP=getenv("FS6_REMOTE_IP");
else
remoteIP=CU_IP;
AssertFatal(createUDPsock(NULL, DU_PORT, remoteIP, CU_PORT, &sockFS6), "");
if (ru->start_rf) {
......
......@@ -80,6 +80,10 @@ typedef struct {
uint16_t nb_rb;
uint8_t Qm;
uint16_t first_rb;
uint8_t O_RI;
uint8_t Or1;
uint16_t Msc_initial;
uint8_t Nsymb_initial;
uint8_t V_UL_DAI;
uint8_t srs_active;
uint32_t TBS;
......@@ -131,6 +135,7 @@ typedef struct {
short harq_id;
short segment;
short segLen;
int ulsch_power[2];
} fs6_ul_uespec_t;
typedef struct {
......
......@@ -266,11 +266,11 @@ typedef struct {
/// coded RI bits
int16_t q_RI[MAX_RI_PAYLOAD];
/// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
int16_t eE[MAX_NUM_CHANNEL_BITS] __attribute__((aligned(32)));
int16_t e[MAX_NUM_CHANNEL_BITS] __attribute__((aligned(32)));
/// Temporary h sequence to flag PUSCH_x/PUSCH_y symbols which are not scrambled
uint8_t h[MAX_NUM_CHANNEL_BITS];
/// Pointer to the payload
uint8_t *bb;
uint8_t *b;
/// Pointers to transport block segments
uint8_t *c[MAX_NUM_ULSCH_SEGMENTS];
/// RTC values for each segment (for definition see 36-212 V8.6 2009-03, p.15)
......
......@@ -55,9 +55,9 @@ void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch) {
if (ulsch) {
for (i=0; i<8; i++) {
if (ulsch->harq_processes[i]) {
if (ulsch->harq_processes[i]->bb) {
free16(ulsch->harq_processes[i]->bb,MAX_ULSCH_PAYLOAD_BYTES);
ulsch->harq_processes[i]->bb = NULL;
if (ulsch->harq_processes[i]->b) {
free16(ulsch->harq_processes[i]->b,MAX_ULSCH_PAYLOAD_BYTES);
ulsch->harq_processes[i]->b = NULL;
}
for (r=0; r<MAX_NUM_ULSCH_SEGMENTS; r++) {
......@@ -116,10 +116,10 @@ LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t max_turbo_iterations,uint8_t N_RB_UL, uin
if (ulsch->harq_processes[i]) {
memset(ulsch->harq_processes[i],0,sizeof(LTE_UL_eNB_HARQ_t));
ulsch->harq_processes[i]->bb = (uint8_t *)malloc16(MAX_ULSCH_PAYLOAD_BYTES/bw_scaling);
ulsch->harq_processes[i]->b = (uint8_t *)malloc16(MAX_ULSCH_PAYLOAD_BYTES/bw_scaling);
if (ulsch->harq_processes[i]->bb)
memset(ulsch->harq_processes[i]->bb,0,MAX_ULSCH_PAYLOAD_BYTES/bw_scaling);
if (ulsch->harq_processes[i]->b)
memset(ulsch->harq_processes[i]->b,0,MAX_ULSCH_PAYLOAD_BYTES/bw_scaling);
else
exit_flag=3;
......@@ -292,7 +292,7 @@ int ulsch_decoding_data_2thread0(td_params *tdp) {
G,
ulsch_harq->w[r],
(uint8_t *) &dummy_w[r][0],
ulsch_harq->eE+r_offset,
ulsch_harq->e+r_offset,
ulsch_harq->C,
NSOFT,
0, //Uplink
......@@ -342,7 +342,7 @@ int ulsch_decoding_data_2thread0(td_params *tdp) {
Kr = ulsch_harq->Kplus;
Kr_bytes = Kr>>3;
memcpy(ulsch_harq->bb+offset,
memcpy(ulsch_harq->b+offset,
ulsch_harq->c[r],
Kr_bytes - ((ulsch_harq->C>1)?3:0));
offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0));
......@@ -467,7 +467,7 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr
G,
ulsch_harq->w[r],
(uint8_t *) &dummy_w[r][0],
ulsch_harq->eE+r_offset,
ulsch_harq->e+r_offset,
ulsch_harq->C,
NSOFT,
0, //Uplink
......@@ -523,12 +523,12 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr
Kr_bytes = Kr>>3;
if (r==0) {
memcpy(ulsch_harq->bb,
memcpy(ulsch_harq->b,
&ulsch_harq->c[0][(ulsch_harq->F>>3)],
Kr_bytes - (ulsch_harq->F>>3) - ((ulsch_harq->C>1)?3:0));
offset = Kr_bytes - (ulsch_harq->F>>3) - ((ulsch_harq->C>1)?3:0);
} else {
memcpy(ulsch_harq->bb+offset,
memcpy(ulsch_harq->b+offset,
ulsch_harq->c[r],
Kr_bytes - ((ulsch_harq->C>1)?3:0));
offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0));
......@@ -555,7 +555,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
int G = ulsch_harq->G;
unsigned int EE;
unsigned int E;
decoder_if_t *tc;
if (llr8_flag == 0)
......@@ -580,8 +580,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
printf("Rate Matching Segment %u (coded bits (G) %d,unpunctured/repeated bits %u, Q_m %d, nb_rb %d, Nl %d)...\n",
r, G,
Kr*3,
Q_m,
nb_rb,
ulsch_harq->Qm,
ulsch_harq->Nl);
#endif
start_meas(&eNB->ulsch_rate_unmatching_stats);
......@@ -590,7 +589,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
G,
ulsch_harq->w[r],
(uint8_t *) &dummy_w[r][0],
ulsch_harq->eE+r_offset,
ulsch_harq->e+r_offset,
ulsch_harq->C,
NSOFT,
0, //Uplink
......@@ -600,13 +599,13 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
ulsch_harq->Qm,
1,
r,
&EE)==-1) {
&E)==-1) {
LOG_E(PHY,"ulsch_decoding.c: Problem in rate matching\n");
return(-1);
}
stop_meas(&eNB->ulsch_rate_unmatching_stats);
r_offset += EE;
r_offset += E;
start_meas(&eNB->ulsch_deinterleaving_stats);
sub_block_deinterleaving_turbo(4+Kr,
&ulsch_harq->d[r][96],
......@@ -623,6 +622,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
// Kr is the segment length in short
// *3 because LTE redudancy scheme
sendFs6Ul(eNB, UE_id, harq_pid, r, &ulsch_harq->d[r][96], Kr*sizeof(int16_t)*3);
/*
int iter=tc(&ulsch_harq->d[r][96],
NULL,
ulsch_harq->c[r],
......@@ -644,7 +644,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
printf("%hx:", ulsch_harq->d[r][96+i]);
printf("\n");
}
*/
return 0;
}
......@@ -679,12 +679,12 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
Kr_bytes = Kr>>3;
if (r==0) {
memcpy(ulsch_harq->bb,
memcpy(ulsch_harq->b,
&ulsch_harq->c[0][(ulsch_harq->F>>3)],
Kr_bytes - (ulsch_harq->F>>3) - ((ulsch_harq->C>1)?3:0));
offset = Kr_bytes - (ulsch_harq->F>>3) - ((ulsch_harq->C>1)?3:0);
} else {
memcpy(ulsch_harq->bb+offset,
memcpy(ulsch_harq->b+offset,
ulsch_harq->c[r],
Kr_bytes - ((ulsch_harq->C>1)?3:0));
offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0));
......@@ -794,6 +794,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
A = ulsch_harq->TBS;
Q_m = ulsch_harq->Qm;
G = nb_rb * (12 * Q_m) * ulsch_harq->Nsymb_pusch;
LOG_D(PHY, "PUSCH nb_rb %d Q_m %d ulsch_harq->Nsymb_pusch %d\n",nb_rb, Q_m, ulsch_harq->Nsymb_pusch);
//#ifdef DEBUG_ULSCH_DECODING
LOG_D(PHY,"[PUSCH harq %d] Frame %d, Subframe %d: ulsch_decoding (Nid_cell %d, rnti %x, x2 %x): TBS %d, round %d, RV %d, O_r1 %d, O_RI %d, O_ACK %d, G %d, Q_m %d Nsymb_pusch %d nb_rb %d\n",
harq_pid,
......@@ -848,6 +849,12 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
subframe);
// Compute Q_ri
Qprime = ulsch_harq->O_RI*ulsch_harq->Msc_initial*ulsch_harq->Nsymb_initial * ulsch->beta_offset_ri_times8;
LOG_D(PHY, "Qprime %d, O_RI %d, Msc %d, Nym %d beta %d\n",
Qprime,
ulsch_harq->O_RI,
ulsch_harq->Msc_initial,
ulsch_harq->Nsymb_initial,
ulsch->beta_offset_ri_times8);
if (Qprime > 0 ) {
if ((Qprime % (8*sumKr)) > 0)
......@@ -1224,8 +1231,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
j2+=2;
}
ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++];
}
break;
......@@ -1237,10 +1244,10 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
j2+=4;
}
ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++];
}
break;
......@@ -1252,12 +1259,12 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
j2+=6;
}
ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++];
}
break;
......@@ -1295,7 +1302,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
*/
int16_t *yp,*ep;
for (iprime=0,yp=&y[j2],ep=&ulsch_harq->eE[0];
for (iprime=0,yp=&y[j2],ep=&ulsch_harq->e[0];
iprime<G;
iprime+=8,j2+=8,ep+=8,yp+=8) {
ep[0] = yp[0];
......
......@@ -353,11 +353,6 @@ uint32_t ulsch_encoding(uint8_t *a,
(r==0) ? ulsch->harq_processes[harq_pid]->F : 0
);
stop_meas(te_stats);
/*
for (int i=0; i< Kr ; i++ )
printf("%hx", ulsch->harq_processes[harq_pid]->d[r][96+i]);
printf ("\n");
*/
#ifdef DEBUG_ULSCH_CODING
if (r==0)
......@@ -451,6 +446,13 @@ uint32_t ulsch_encoding(uint8_t *a,
Qprime = (ulsch->O + L) * ulsch->harq_processes[harq_pid]->Msc_initial*ulsch->harq_processes[harq_pid]->Nsymb_initial * ulsch->beta_offset_cqi_times8;
else
Qprime = 0;
LOG_D(PHY,"Qprime %d, O_RI %d + %d, Msc %d, Nym %d beta %d\n",
Qprime,
ulsch->O, L,
ulsch->harq_processes[harq_pid]->Msc_initial,
ulsch->harq_processes[harq_pid]->Nsymb_initial,
ulsch->beta_offset_cqi_times8);
if (Qprime > 0) {
if ((Qprime % (8*sumKr)) > 0)
......@@ -460,7 +462,7 @@ uint32_t ulsch_encoding(uint8_t *a,
}
G = ulsch->harq_processes[harq_pid]->nb_rb * (12 * Q_m) * (ulsch->Nsymb_pusch);
LOG_D(PHY,"G: rb %d * ( 12 * Qm %d ) * nsymb %d, Qprime %d, O_RI %d\n", ulsch->harq_processes[harq_pid]->nb_rb, Q_m, ulsch->Nsymb_pusch, Qprime, ulsch->O_RI);
if (Qprime > (G - ulsch->O_RI))
Qprime = G - ulsch->O_RI;
......@@ -470,6 +472,7 @@ uint32_t ulsch_encoding(uint8_t *a,
G = G - Q_RI - Q_CQI;
LOG_D(PHY,"new G: %d, Q_RI %d Q_CQI %d\n", G , Q_RI , Q_CQI);
ulsch->harq_processes[harq_pid]->G = G;
/*
......
......@@ -410,10 +410,10 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
ul_frame = pdcch_alloc2ul_frame (fp, frame, subframe);
// clear previous allocation information for all UEs
//for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
//if (eNB->dlsch[i][0])
//eNB->dlsch[i][0]->subframe_tx[subframe] = 0;
//}
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
if (eNB->dlsch[i][0])
eNB->dlsch[i][0]->subframe_tx[subframe] = 0;
}
/* TODO: check the following test - in the meantime it is put back as it was before */
//if ((ul_subframe < 10)&&
......@@ -549,7 +549,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
#endif
) {
// clear subframe TX flag since UE is not scheduled for PDSCH in this subframe (so that we don't look for PUCCH later)
//dlsch0->subframe_tx[subframe]=0;
dlsch0->subframe_tx[subframe]=0;
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0);
......@@ -1424,7 +1424,7 @@ void fill_rx_indication(PHY_VARS_eNB *eNB,int UE_id,int frame,int subframe) {
pdu->rx_indication_rel8.tl.tag = NFAPI_RX_INDICATION_REL8_TAG;
pdu->rx_indication_rel8.length = eNB->ulsch[UE_id]->harq_processes[harq_pid]->TBS>>3;
pdu->rx_indication_rel8.offset = 1; // DJP - I dont understand - but broken unless 1 ???? 0; // filled in at the end of the UL_INFO formation
pdu->data = eNB->ulsch[UE_id]->harq_processes[harq_pid]->bb;
pdu->data = eNB->ulsch[UE_id]->harq_processes[harq_pid]->b;
// estimate timing advance for MAC
sync_pos = lte_est_timing_advance_pusch(eNB,UE_id);
timing_advance_update = sync_pos; // - eNB->frame_parms.nb_prefix_samples/4; //to check
......
......@@ -2836,7 +2836,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
}
if (tpc!=1) {
LOG_D(MAC,"[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
LOG_D(MAC,"[eNB %d] ULSCH schedulerRR: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
module_idP,frameP,subframeP,harq_pid,tpc,
tpc_accumulated,snr,target_snr);
}
......
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