Commit bf343691 authored by Raymond Knopp's avatar Raymond Knopp

updates from Agilent IoT

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4648 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 6f0ac498
...@@ -2061,9 +2061,9 @@ u8 generate_dci_top(u8 num_ue_spec_dci, ...@@ -2061,9 +2061,9 @@ u8 generate_dci_top(u8 num_ue_spec_dci,
y[1] = &yseq1[0]; y[1] = &yseq1[0];
// reset all bits to <NIL>, here we set <NIL> elements as 2 // reset all bits to <NIL>, here we set <NIL> elements as 2
//memset(e, 2, DCI_BITS_MAX); memset(e, 2, DCI_BITS_MAX);
// here we interpred NIL as a random QPSK sequence. That makes power estimation easier. // here we interpred NIL as a random QPSK sequence. That makes power estimation easier.
for (i=0;i<DCI_BITS_MAX;i++) e[i]=taus()&1; //for (i=0;i<DCI_BITS_MAX;i++) e[i]=taus()&1;
e_ptr = e; e_ptr = e;
// generate DCIs in order of decreasing aggregation level, then common/ue spec // generate DCIs in order of decreasing aggregation level, then common/ue spec
......
...@@ -3334,10 +3334,10 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu, ...@@ -3334,10 +3334,10 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
// uint32_t hopping; // uint32_t hopping;
// uint32_t type; // uint32_t type;
#ifdef DEBUG_DCI //#ifdef DEBUG_DCI
msg("dci_tools.c: filling eNB ulsch params for rnti %x, dci format %d, dci %x, subframe %d\n", LOG_I(PHY,"filling eNB ulsch params for rnti %x, dci format %d, dci %x, subframe %d\n",
rnti,dci_format,*(uint32_t*)dci_pdu,subframe); rnti,dci_format,*(uint32_t*)dci_pdu,subframe);
#endif //#endif
if (dci_format == format0) { if (dci_format == format0) {
...@@ -3472,9 +3472,9 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu, ...@@ -3472,9 +3472,9 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
return(-1); return(-1);
} }
#ifdef DEBUG_DCI //#ifdef DEBUG_DCI
msg("generate_eNB_ulsch_params_from_dci: subframe %d, rnti %x,harq_pid %d\n",subframe,rnti,harq_pid); LOG_I(PHY,"generate_eNB_ulsch_params_from_dci: subframe %d, rnti %x,harq_pid %d,ndi %d,cqi_req %d\n",subframe,rnti,harq_pid,ndi,cqi_req);
#endif //#endif
ulsch->harq_processes[harq_pid]->dci_alloc = 1; ulsch->harq_processes[harq_pid]->dci_alloc = 1;
ulsch->harq_processes[harq_pid]->rar_alloc = 0; ulsch->harq_processes[harq_pid]->rar_alloc = 0;
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
#include "PHY/CODING/lte_interleaver_inline.h" #include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/LTE_TRANSPORT/defs.h" #include "PHY/LTE_TRANSPORT/defs.h"
#include "defs.h" #include "defs.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
//#define DEBUG_DLSCH_CODING //#define DEBUG_DLSCH_CODING
//#define DEBUG_DLSCH_FREE 1 //#define DEBUG_DLSCH_FREE 1
...@@ -75,12 +74,11 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) { ...@@ -75,12 +74,11 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) {
msg("Freeing dlsch process %d (%p)\n",i,dlsch->harq_processes[i]); msg("Freeing dlsch process %d (%p)\n",i,dlsch->harq_processes[i]);
#endif #endif
if (dlsch->harq_processes[i]->b) { if (dlsch->harq_processes[i]->b) {
free16(dlsch->harq_processes[i]->b,MAX_DLSCH_PAYLOAD_BYTES); free16(dlsch->harq_processes[i]->b,MAX_DLSCH_PAYLOAD_BYTES);
dlsch->harq_processes[i]->b = NULL;
#ifdef DEBUG_DLSCH_FREE #ifdef DEBUG_DLSCH_FREE
msg("Freeing dlsch process %d b (%p)\n",i,dlsch->harq_processes[i]->b); msg("Freeing dlsch process %d b (%p)\n",i,dlsch->harq_processes[i]->b);
#endif #endif
} }
if (dlsch->harq_processes[i]->c) { if (dlsch->harq_processes[i]->c) {
#ifdef DEBUG_DLSCH_FREE #ifdef DEBUG_DLSCH_FREE
msg("Freeing dlsch process %d c (%p)\n",i,dlsch->harq_processes[i]->c); msg("Freeing dlsch process %d c (%p)\n",i,dlsch->harq_processes[i]->c);
...@@ -90,18 +88,14 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) { ...@@ -90,18 +88,14 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) {
#ifdef DEBUG_DLSCH_FREE #ifdef DEBUG_DLSCH_FREE
msg("Freeing dlsch process %d c[%d] (%p)\n",i,r,dlsch->harq_processes[i]->c[r]); msg("Freeing dlsch process %d c[%d] (%p)\n",i,r,dlsch->harq_processes[i]->c[r]);
#endif #endif
if (dlsch->harq_processes[i]->c[r]) { if (dlsch->harq_processes[i]->c[r])
free16(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+768); free16(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+768);
dlsch->harq_processes[i]->c[r] = NULL;
}
} }
} }
free16(dlsch->harq_processes[i],sizeof(LTE_DL_eNB_HARQ_t)); free16(dlsch->harq_processes[i],sizeof(LTE_DL_eNB_HARQ_t));
dlsch->harq_processes[i] = NULL;
} }
} }
free16(dlsch,sizeof(LTE_eNB_DLSCH_t)); free16(dlsch,sizeof(LTE_eNB_DLSCH_t));
dlsch = NULL;
} }
} }
...@@ -143,10 +137,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne ...@@ -143,10 +137,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne
bzero(dlsch->harq_processes[i],sizeof(LTE_DL_eNB_HARQ_t)); bzero(dlsch->harq_processes[i],sizeof(LTE_DL_eNB_HARQ_t));
// dlsch->harq_processes[i]->first_tx=1; // dlsch->harq_processes[i]->first_tx=1;
dlsch->harq_processes[i]->b = (unsigned char*)malloc16(MAX_DLSCH_PAYLOAD_BYTES/bw_scaling); dlsch->harq_processes[i]->b = (unsigned char*)malloc16(MAX_DLSCH_PAYLOAD_BYTES/bw_scaling);
if (dlsch->harq_processes[i]->b) { if (!dlsch->harq_processes[i]->b) {
bzero(dlsch->harq_processes[i]->b,MAX_DLSCH_PAYLOAD_BYTES/bw_scaling);
}
else {
msg("Can't get b\n"); msg("Can't get b\n");
exit_flag=1; exit_flag=1;
} }
...@@ -154,10 +145,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne ...@@ -154,10 +145,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne
for (r=0;r<MAX_NUM_DLSCH_SEGMENTS/bw_scaling;r++) { for (r=0;r<MAX_NUM_DLSCH_SEGMENTS/bw_scaling;r++) {
// account for filler in first segment and CRCs for multiple segment case // account for filler in first segment and CRCs for multiple segment case
dlsch->harq_processes[i]->c[r] = (unsigned char*)malloc16(((r==0)?8:0) + 3+ 768); dlsch->harq_processes[i]->c[r] = (unsigned char*)malloc16(((r==0)?8:0) + 3+ 768);
if (dlsch->harq_processes[i]->c[r]) { if (!dlsch->harq_processes[i]->c[r]) {
bzero(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+ 768);
}
else {
msg("Can't get c\n"); msg("Can't get c\n");
exit_flag=2; exit_flag=2;
} }
...@@ -181,8 +169,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne ...@@ -181,8 +169,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne
return(dlsch); return(dlsch);
} }
} }
LOG_D(PHY, "new_eNB_dlsch exit flag %d, size of %ld\n", msg("new_eNB_dlsch exit flag %d, size of %d\n",exit_flag, sizeof(LTE_eNB_DLSCH_t));
exit_flag, sizeof(LTE_eNB_DLSCH_t));
free_eNB_dlsch(dlsch); free_eNB_dlsch(dlsch);
return(NULL); return(NULL);
...@@ -237,8 +224,6 @@ int dlsch_encoding(unsigned char *a, ...@@ -237,8 +224,6 @@ int dlsch_encoding(unsigned char *a,
unsigned int Kr=0,Kr_bytes,r,r_offset=0; unsigned int Kr=0,Kr_bytes,r,r_offset=0;
unsigned short m=dlsch->harq_processes[harq_pid]->mcs; unsigned short m=dlsch->harq_processes[harq_pid]->mcs;
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
A = dlsch->harq_processes[harq_pid]->TBS; //6228 A = dlsch->harq_processes[harq_pid]->TBS; //6228
// printf("Encoder: A: %d\n",A); // printf("Encoder: A: %d\n",A);
mod_order = get_Qm(dlsch->harq_processes[harq_pid]->mcs); mod_order = get_Qm(dlsch->harq_processes[harq_pid]->mcs);
...@@ -370,8 +355,6 @@ int dlsch_encoding(unsigned char *a, ...@@ -370,8 +355,6 @@ int dlsch_encoding(unsigned char *a,
write_output("enc_output.m","enc",dlsch->e,r_offset,1,4); write_output("enc_output.m","enc",dlsch->e,r_offset,1,4);
#endif #endif
} }
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_OUT);
return(0); return(0);
} }
......
...@@ -272,7 +272,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB, ...@@ -272,7 +272,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
x2 = ((uint32_t)ulsch->rnti<<14) + ((uint32_t)subframe<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1 x2 = ((uint32_t)ulsch->rnti<<14) + ((uint32_t)subframe<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1
// harq_pid = (ulsch->RRCConnRequest_flag == 0) ? subframe2harq_pid_tdd(frame_parms->tdd_config,subframe) : 0; // harq_pid = (ulsch->RRCConnRequest_flag == 0) ? subframe2harq_pid_tdd(frame_parms->tdd_config,subframe) : 0;
harq_pid = subframe2harq_pid(frame_parms,(((subframe)==9)?-1:0)+phy_vars_eNB->frame,subframe); harq_pid = subframe2harq_pid(frame_parms,(((subframe)>=8)?-1:0)+phy_vars_eNB->frame,subframe);
if (harq_pid==255) { if (harq_pid==255) {
LOG_E(PHY, "ulsch_decoding.c: FATAL ERROR: illegal harq_pid, returning\n"); LOG_E(PHY, "ulsch_decoding.c: FATAL ERROR: illegal harq_pid, returning\n");
...@@ -1184,12 +1184,12 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1184,12 +1184,12 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
ulsch->harq_processes[harq_pid]->w[r]); ulsch->harq_processes[harq_pid]->w[r]);
stop_meas(&phy_vars_eNB->ulsch_deinterleaving_stats); stop_meas(&phy_vars_eNB->ulsch_deinterleaving_stats);
#ifdef DEBUG_ULSCH_DECODING /*#ifdef DEBUG_ULSCH_DECODING
msg("decoder input(segment %d) :",r); msg("decoder input(segment %d) :",r);
for (i=0;i<(3*8*Kr_bytes)+12;i++) for (i=0;i<(3*8*Kr_bytes)+12;i++)
msg("%d : %d\n",i,ulsch->harq_processes[harq_pid]->d[r][96+i]); msg("%d : %d\n",i,ulsch->harq_processes[harq_pid]->d[r][96+i]);
msg("\n"); msg("\n");
#endif #endif*/
} }
...@@ -1670,7 +1670,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1670,7 +1670,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *phy_vars_eNB,
uint8_t UE_id; uint8_t UE_id;
uint16_t rnti; uint16_t rnti;
uint8_t harq_pid = subframe2harq_pid(&phy_vars_eNB->lte_frame_parms,((subframe==9)?-1:0)+phy_vars_eNB->frame,subframe); uint8_t harq_pid = subframe2harq_pid(&phy_vars_eNB->lte_frame_parms,((subframe>=8)?-1:0)+phy_vars_eNB->frame,subframe);
rnti = phy_vars_eNB->ulsch_eNB[UE_index]->rnti; rnti = phy_vars_eNB->ulsch_eNB[UE_index]->rnti;
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
......
...@@ -1302,7 +1302,7 @@ void rx_ulsch(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1302,7 +1302,7 @@ void rx_ulsch(PHY_VARS_eNB *phy_vars_eNB,
// uint8_t harq_pid = ( ulsch->RRCConnRequest_flag== 0) ? subframe2harq_pid_tdd(frame_parms->tdd_config,subframe) : 0; // uint8_t harq_pid = ( ulsch->RRCConnRequest_flag== 0) ? subframe2harq_pid_tdd(frame_parms->tdd_config,subframe) : 0;
uint8_t harq_pid = subframe2harq_pid(frame_parms,((subframe==9)?-1:0)+phy_vars_eNB->frame,subframe); uint8_t harq_pid = subframe2harq_pid(frame_parms,((subframe>=8)?-1:0)+phy_vars_eNB->frame,subframe);
uint8_t Qm = get_Qm_ul(ulsch[UE_id]->harq_processes[harq_pid]->mcs); uint8_t Qm = get_Qm_ul(ulsch[UE_id]->harq_processes[harq_pid]->mcs);
uint16_t rx_power_correction; uint16_t rx_power_correction;
int16_t *llrp; int16_t *llrp;
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
#ifdef BIT8_TX #ifdef BIT8_TX
#define AMP 128 #define AMP 128
#else #else
#define AMP 1024 //4096 #define AMP 512//1024 //4096
#endif #endif
#ifndef OPENAIR_LTE #ifndef OPENAIR_LTE
......
...@@ -131,7 +131,7 @@ u8 is_SR_subframe(PHY_VARS_eNB *phy_vars_eNB,u8 UE_id,u8 subframe) { ...@@ -131,7 +131,7 @@ u8 is_SR_subframe(PHY_VARS_eNB *phy_vars_eNB,u8 UE_id,u8 subframe) {
return(0); return(0);
} }
s32 add_ue(s16 rnti, PHY_VARS_eNB *phy_vars_eNB) { s32 add_ue(s16 rnti, PHY_VARS_eNB *phy_vars_eNB) {
u8 i; u8 i;
...@@ -957,18 +957,6 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -957,18 +957,6 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
memset(&phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id][aa][next_slot*phy_vars_eNB->lte_frame_parms.ofdm_symbol_size*(phy_vars_eNB->lte_frame_parms.symbols_per_tti>>1)], memset(&phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id][aa][next_slot*phy_vars_eNB->lte_frame_parms.ofdm_symbol_size*(phy_vars_eNB->lte_frame_parms.symbols_per_tti>>1)],
0,phy_vars_eNB->lte_frame_parms.ofdm_symbol_size*(phy_vars_eNB->lte_frame_parms.symbols_per_tti)*sizeof(mod_sym_t)); 0,phy_vars_eNB->lte_frame_parms.ofdm_symbol_size*(phy_vars_eNB->lte_frame_parms.symbols_per_tti)*sizeof(mod_sym_t));
// fill first symbol of each TX subframe with random QPSK data (overwritten by TX routines later). This guarantees that the first symbol is full power
// in case of transmission mode > 1, this all data is filled by the PDCCH routine (which always assumes that pilots are transmitted on all antenna ports)
if (phy_vars_eNB->lte_frame_parms.mode1_flag==1) {
re_offset = phy_vars_eNB->lte_frame_parms.first_carrier_offset;
txptr = (uint32_t*)&phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id][aa][next_slot*phy_vars_eNB->lte_frame_parms.ofdm_symbol_size*(phy_vars_eNB->lte_frame_parms.symbols_per_tti>>1)];
for (i=0;i<phy_vars_eNB->lte_frame_parms.N_RB_DL*6;i++)
txptr[re_offset++] = QPSK[taus()&3];
re_offset=1; //skip DC
for (i=0;i<phy_vars_eNB->lte_frame_parms.N_RB_DL*6;i++)
txptr[re_offset++] = QPSK[taus()&3];
}
#endif #endif
} }
} }
...@@ -1046,10 +1034,16 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1046,10 +1034,16 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
} }
} }
else { else {
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,1);
generate_pilots_slot(phy_vars_eNB, generate_pilots_slot(phy_vars_eNB,
phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id],
AMP, AMP,
next_slot,0); next_slot,0);
generate_pilots_slot(phy_vars_eNB,
phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id],
AMP,
next_slot+1,0);
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,0);
if (next_slot == 0) { if (next_slot == 0) {
...@@ -1059,16 +1053,16 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1059,16 +1053,16 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
AMP, AMP,
&phy_vars_eNB->lte_frame_parms, &phy_vars_eNB->lte_frame_parms,
(phy_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5, (phy_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5,
next_slot); 0);
generate_sss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], generate_sss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id],
AMP, AMP,
&phy_vars_eNB->lte_frame_parms, &phy_vars_eNB->lte_frame_parms,
(phy_vars_eNB->lte_frame_parms.Ncp==0) ? 5 : 4, (phy_vars_eNB->lte_frame_parms.Ncp==0) ? 5 : 4,
next_slot); 0);
} }
} }
} }
if (next_slot == 1) { if (next_slot == 0) {
if ((phy_vars_eNB->frame&3) == 0) { if ((phy_vars_eNB->frame&3) == 0) {
((u8*) pbch_pdu)[2] = 0; ((u8*) pbch_pdu)[2] = 0;
...@@ -1122,12 +1116,12 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1122,12 +1116,12 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
/// First half of SSS (TDD) /// First half of SSS (TDD)
if (abstraction_flag==0) { if (abstraction_flag==0) {
if (phy_vars_eNB->lte_frame_parms.frame_type == 1) { if (phy_vars_eNB->lte_frame_parms.frame_type == TDD) {
generate_sss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], generate_sss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id],
AMP, AMP,
&phy_vars_eNB->lte_frame_parms, &phy_vars_eNB->lte_frame_parms,
(phy_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5, (phy_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5,
next_slot); 1);
} }
} }
...@@ -1175,7 +1169,7 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1175,7 +1169,7 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
AMP, AMP,
&phy_vars_eNB->lte_frame_parms, &phy_vars_eNB->lte_frame_parms,
2, 2,
next_slot); 2);
} }
} }
} }
...@@ -1190,26 +1184,26 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1190,26 +1184,26 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
AMP, AMP,
&phy_vars_eNB->lte_frame_parms, &phy_vars_eNB->lte_frame_parms,
(phy_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5, (phy_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5,
next_slot); 10);
generate_sss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], generate_sss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id],
AMP, AMP,
&phy_vars_eNB->lte_frame_parms, &phy_vars_eNB->lte_frame_parms,
(phy_vars_eNB->lte_frame_parms.Ncp==0) ? 5 : 4, (phy_vars_eNB->lte_frame_parms.Ncp==0) ? 5 : 4,
next_slot); 10);
} }
} }
} }
// Second-half of SSS (TDD) // Second-half of SSS (TDD)
if (next_slot == 11) { if (next_slot == 10) {
if (abstraction_flag==0) { if (abstraction_flag==0) {
if (phy_vars_eNB->lte_frame_parms.frame_type == 1) { if (phy_vars_eNB->lte_frame_parms.frame_type == TDD) {
generate_sss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], generate_sss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id],
AMP, AMP,
&phy_vars_eNB->lte_frame_parms, &phy_vars_eNB->lte_frame_parms,
(phy_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5, (phy_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5,
next_slot); 11);
} }
} }
} }
...@@ -1218,13 +1212,13 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1218,13 +1212,13 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
if (abstraction_flag==0) { if (abstraction_flag==0) {
if (phy_vars_eNB->lte_frame_parms.frame_type == 1) { if (phy_vars_eNB->lte_frame_parms.frame_type == TDD) {
// printf("Generating PSS (frame %d, subframe %d)\n",phy_vars_eNB->frame,next_slot>>1); // printf("Generating PSS (frame %d, subframe %d)\n",phy_vars_eNB->frame,next_slot>>1);
generate_pss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], generate_pss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id],
AMP, AMP,
&phy_vars_eNB->lte_frame_parms, &phy_vars_eNB->lte_frame_parms,
2, 2,
next_slot); 12);
} }
} }
} }
...@@ -1257,6 +1251,7 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1257,6 +1251,7 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
// Parse DCI received from MAC // Parse DCI received from MAC
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,1);
DCI_pdu = mac_xface->get_dci_sdu(phy_vars_eNB->Mod_id, DCI_pdu = mac_xface->get_dci_sdu(phy_vars_eNB->Mod_id,
phy_vars_eNB->frame, phy_vars_eNB->frame,
next_slot>>1); next_slot>>1);
...@@ -1326,8 +1321,10 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1326,8 +1321,10 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
for (i=0;i<DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci ; i++) { for (i=0;i<DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci ; i++) {
#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[eNB] Subframe %d : Doing DCI index %d/%d\n",next_slot>>1,i,DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci); if (DCI_pdu->dci_alloc[i].rnti != SI_RNTI) {
// dump_dci(&phy_vars_eNB->lte_frame_parms,&DCI_pdu->dci_alloc[i]); LOG_D(PHY,"[eNB] Subframe %d : Doing DCI index %d/%d\n",next_slot>>1,i,DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci);
dump_dci(&phy_vars_eNB->lte_frame_parms,&DCI_pdu->dci_alloc[i]);
}
#endif #endif
if (DCI_pdu->dci_alloc[i].rnti == SI_RNTI) { if (DCI_pdu->dci_alloc[i].rnti == SI_RNTI) {
...@@ -1384,7 +1381,8 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1384,7 +1381,8 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
P_RNTI, P_RNTI,
phy_vars_eNB->eNB_UE_stats[0].DL_pmi_single); phy_vars_eNB->eNB_UE_stats[0].DL_pmi_single);
// mac_xface->macphy_exit("Transmitted RAR, exiting\n");
if ((phy_vars_eNB->dlsch_eNB_ra->nCCE[next_slot>>1] = get_nCCE_offset(1<<DCI_pdu->dci_alloc[i].L, if ((phy_vars_eNB->dlsch_eNB_ra->nCCE[next_slot>>1] = get_nCCE_offset(1<<DCI_pdu->dci_alloc[i].L,
DCI_pdu->nCCE, DCI_pdu->nCCE,
1, 1,
...@@ -1393,7 +1391,7 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1393,7 +1391,7 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
LOG_E(PHY,"[eNB %d] Frame %d subframe %d : No available CCE resources for common DCI (RA) !!!\n",phy_vars_eNB->Mod_id,phy_vars_eNB->frame,next_slot>>1); LOG_E(PHY,"[eNB %d] Frame %d subframe %d : No available CCE resources for common DCI (RA) !!!\n",phy_vars_eNB->Mod_id,phy_vars_eNB->frame,next_slot>>1);
} }
else { else {
LOG_D(PHY,"[eNB %d] Frame %d subframe %d : CCE resource for common DCI (RA) => %d/%d\n",phy_vars_eNB->Mod_id,phy_vars_eNB->frame,next_slot>>1, LOG_I(PHY,"[eNB %d] Frame %d subframe %d : CCE resource for common DCI (RA) => %d/%d\n",phy_vars_eNB->Mod_id,phy_vars_eNB->frame,next_slot>>1,
phy_vars_eNB->dlsch_eNB_ra->nCCE[next_slot>>1],DCI_pdu->nCCE); phy_vars_eNB->dlsch_eNB_ra->nCCE[next_slot>>1],DCI_pdu->nCCE);
#if defined(SMBV) && !defined(EXMIMO) #if defined(SMBV) && !defined(EXMIMO)
// configure RA DCI // configure RA DCI
...@@ -1405,6 +1403,7 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1405,6 +1403,7 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
} }
DCI_pdu->dci_alloc[i].nCCE = phy_vars_eNB->dlsch_eNB_ra->nCCE[next_slot>>1]; DCI_pdu->dci_alloc[i].nCCE = phy_vars_eNB->dlsch_eNB_ra->nCCE[next_slot>>1];
} }
else if (DCI_pdu->dci_alloc[i].format != format0){ // this is a normal DLSCH allocation else if (DCI_pdu->dci_alloc[i].format != format0){ // this is a normal DLSCH allocation
...@@ -1583,7 +1582,8 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1583,7 +1582,8 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
if (abstraction_flag == 0) { if (abstraction_flag == 0) {
#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[eNB %d] Frame %d, subframe %d: Calling generate_dci_top (pdcch) (common %d,ue_spec %d)\n",phy_vars_eNB->Mod_id,phy_vars_eNB->frame, next_slot>>1,DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci); if (DCI_pdu->Num_ue_spec_dci+DCI_pdu->Num_common_dci > 0)
LOG_I(PHY,"[eNB %d] Frame %d, subframe %d: Calling generate_dci_top (pdcch) (common %d,ue_spec %d)\n",phy_vars_eNB->Mod_id,phy_vars_eNB->frame, next_slot>>1,DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci);
#endif #endif
for (sect_id=0;sect_id<number_of_cards;sect_id++) for (sect_id=0;sect_id<number_of_cards;sect_id++)
...@@ -1595,6 +1595,11 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1595,6 +1595,11 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
&phy_vars_eNB->lte_frame_parms, &phy_vars_eNB->lte_frame_parms,
phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id],
next_slot>>1); next_slot>>1);
#ifdef DEBUG_PHY_PROC
// LOG_I(PHY,"[eNB %d] Frame %d, subframe %d: num_pdcch_symbols %d)\n",phy_vars_eNB->Mod_id,phy_vars_eNB->frame, next_slot>>1,num_pdcch_symbols);
#endif
} }
#ifdef PHY_ABSTRACTION #ifdef PHY_ABSTRACTION
...@@ -1604,10 +1609,10 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1604,10 +1609,10 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
} }
#endif #endif
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,0);
#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[eNB %d] Frame %d, slot %d: num_pdcch_symbols=%d\n",phy_vars_eNB->Mod_id,phy_vars_eNB->frame, next_slot,num_pdcch_symbols); //LOG_D(PHY,"[eNB %d] Frame %d, slot %d: num_pdcch_symbols=%d\n",phy_vars_eNB->Mod_id,phy_vars_eNB->frame, next_slot,num_pdcch_symbols);
#endif #endif
// Check for SI activity // Check for SI activity
...@@ -2393,8 +2398,8 @@ void prach_procedures(PHY_VARS_eNB *phy_vars_eNB,u8 subframe,u8 abstraction_flag ...@@ -2393,8 +2398,8 @@ void prach_procedures(PHY_VARS_eNB *phy_vars_eNB,u8 subframe,u8 abstraction_flag
memset(&preamble_energy_list[0],0,64*sizeof(u16)); memset(&preamble_energy_list[0],0,64*sizeof(u16));
memset(&preamble_delay_list[0],0,64*sizeof(u16)); memset(&preamble_delay_list[0],0,64*sizeof(u16));
if (abstraction_flag == 0) { if (abstraction_flag == 0) {
LOG_I(PHY,"[eNB %d][RAPROC] Frame %d, Subframe %d : PRACH RX Signal Power : %d dBm\n",phy_vars_eNB->Mod_id, // LOG_I(PHY,"[eNB %d][RAPROC] Frame %d, Subframe %d : PRACH RX Signal Power : %d dBm\n",phy_vars_eNB->Mod_id,
frame,subframe,dB_fixed(signal_energy(&phy_vars_eNB->lte_eNB_common_vars.rxdata[0][0][subframe*phy_vars_eNB->lte_frame_parms.samples_per_tti],512)) - phy_vars_eNB->rx_total_gain_eNB_dB); // frame,subframe,dB_fixed(signal_energy(&phy_vars_eNB->lte_eNB_common_vars.rxdata[0][0][subframe*phy_vars_eNB->lte_frame_parms.samples_per_tti],512)) - phy_vars_eNB->rx_total_gain_eNB_dB);
// LOG_I(PHY,"[eNB %d][RAPROC] PRACH: rootSequenceIndex %d, prach_ConfigIndex %d, zeroCorrelationZoneConfig %d, highSpeedFlag %d, prach_FreqOffset %d\n",phy_vars_eNB->Mod_id,phy_vars_eNB->lte_frame_parms.prach_config_common.rootSequenceIndex,phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex, phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.highSpeedFlag,phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset); // LOG_I(PHY,"[eNB %d][RAPROC] PRACH: rootSequenceIndex %d, prach_ConfigIndex %d, zeroCorrelationZoneConfig %d, highSpeedFlag %d, prach_FreqOffset %d\n",phy_vars_eNB->Mod_id,phy_vars_eNB->lte_frame_parms.prach_config_common.rootSequenceIndex,phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex, phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.highSpeedFlag,phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset);
...@@ -2495,10 +2500,11 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -2495,10 +2500,11 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX,1); vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX,1);
#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_RX(%d)\n",phy_vars_eNB->Mod_id,phy_vars_eNB->frame, last_slot); LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_RX(%d)\n",phy_vars_eNB->Mod_id,frame, last_slot);
#endif #endif
if (abstraction_flag == 0) { if (abstraction_flag == 0) {
remove_7_5_kHz(phy_vars_eNB,last_slot-1);
remove_7_5_kHz(phy_vars_eNB,last_slot); remove_7_5_kHz(phy_vars_eNB,last_slot);
} }
//#ifdef OPENAIR2 //#ifdef OPENAIR2
...@@ -2507,7 +2513,9 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -2507,7 +2513,9 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8
// printf("Checking PRACH for eNB %d, subframe %d\n",phy_vars_eNB->Mod_id,last_slot>>1); // printf("Checking PRACH for eNB %d, subframe %d\n",phy_vars_eNB->Mod_id,last_slot>>1);
if (is_prach_subframe(&phy_vars_eNB->lte_frame_parms,frame,last_slot>>1)>0) { if (is_prach_subframe(&phy_vars_eNB->lte_frame_parms,frame,last_slot>>1)>0) {
// printf("Running prach procedures\n"); // printf("Running prach procedures\n");
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,1);
prach_procedures(phy_vars_eNB,last_slot>>1,abstraction_flag); prach_procedures(phy_vars_eNB,last_slot>>1,abstraction_flag);
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,0);
} }
} }
//#endif //#endif
...@@ -2526,6 +2534,18 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -2526,6 +2534,18 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8
0 0
#endif #endif
); );
slot_fep_ul(&phy_vars_eNB->lte_frame_parms,
&phy_vars_eNB->lte_eNB_common_vars,
l,
last_slot-1,
sect_id,
#ifdef HW_PREFIX_REMOVAL
1
#else
0
#endif
);
} }
} }
} }
...@@ -2614,6 +2634,8 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -2614,6 +2634,8 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8
for (i=0; i < NUM_MAX_CBA_GROUP; i++){ for (i=0; i < NUM_MAX_CBA_GROUP; i++){
phy_vars_eNB->cba_last_reception[i]=0; phy_vars_eNB->cba_last_reception[i]=0;
} }
// LOG_I(PHY,"subframe %d: nPRS %d\n",last_slot>>1,phy_vars_eNB->lte_frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[last_slot-1]);
for (i=0;i<NUMBER_OF_UE_MAX;i++) { for (i=0;i<NUMBER_OF_UE_MAX;i++) {
/* /*
...@@ -2625,16 +2647,17 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -2625,16 +2647,17 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8
process_Msg3(phy_vars_eNB,last_slot,i,harq_pid); process_Msg3(phy_vars_eNB,last_slot,i,harq_pid);
#endif #endif
/* /*
#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
if (phy_vars_eNB->ulsch_eNB[i]) { if (phy_vars_eNB->ulsch_eNB[i]) {
printf("[PHY][eNB %d][PUSCH %d] frame %d, subframe %d rnti %x, alloc %d\n",phy_vars_eNB->Mod_id,
harq_pid,phy_vars_eNB->frame,last_slot>>1, LOG_I(PHY,"[eNB %d][PUSCH %d] frame %d, subframe %d rnti %x, alloc %d\n",phy_vars_eNB->Mod_id,
(phy_vars_eNB->ulsch_eNB[i]->rnti), harq_pid,frame,last_slot>>1,
(phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->subframe_scheduling_flag) (phy_vars_eNB->ulsch_eNB[i]->rnti),
); (phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->subframe_scheduling_flag)
} );
#endif }
#endif
*/ */
if ((phy_vars_eNB->ulsch_eNB[i]) && if ((phy_vars_eNB->ulsch_eNB[i]) &&
(phy_vars_eNB->ulsch_eNB[i]->rnti>0) && (phy_vars_eNB->ulsch_eNB[i]->rnti>0) &&
...@@ -2672,6 +2695,18 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -2672,6 +2695,18 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8
phy_vars_eNB->ulsch_eNB[i]->cyclicShift = (phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->n_DMRS2 + phy_vars_eNB->lte_frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift + nPRS)%12; phy_vars_eNB->ulsch_eNB[i]->cyclicShift = (phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->n_DMRS2 + phy_vars_eNB->lte_frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift + nPRS)%12;
if (frame_parms->frame_type == FDD ) {
int subframe = last_slot >> 1;
int sf = (subframe<4) ? (subframe+6) : (subframe-4);
if (phy_vars_eNB->dlsch_eNB[i][0]->subframe_tx[sf]>0) { // we have downlink transmission
phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->O_ACK = 1;
}
else {
phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->O_ACK = 0;
}
}
#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
LOG_I(PHY,"[eNB %d][PUSCH %d] Frame %d Subframe %d Demodulating PUSCH: dci_alloc %d, rar_alloc %d, round %d, first_rb %d, nb_rb %d, mcs %d, TBS %d, rv %d, cyclic_shift %d (n_DMRS2 %d, cyclicShift_common %d, nprs %d), O_ACK %d \n", LOG_I(PHY,"[eNB %d][PUSCH %d] Frame %d Subframe %d Demodulating PUSCH: dci_alloc %d, rar_alloc %d, round %d, first_rb %d, nb_rb %d, mcs %d, TBS %d, rv %d, cyclic_shift %d (n_DMRS2 %d, cyclicShift_common %d, nprs %d), O_ACK %d \n",
phy_vars_eNB->Mod_id,harq_pid,frame,last_slot>>1, phy_vars_eNB->Mod_id,harq_pid,frame,last_slot>>1,
...@@ -2798,7 +2833,7 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -2798,7 +2833,7 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8
// exit(-1); // exit(-1);
if (phy_vars_eNB->ulsch_eNB[i]->Msg3_flag == 1) { if (phy_vars_eNB->ulsch_eNB[i]->Msg3_flag == 1) {
LOG_D(PHY,"[eNB %d][RAPROC] frame %d, slot %d, subframe %d, UE %d: Error receiving ULSCH (Msg3), round %d/%d\n", LOG_I(PHY,"[eNB %d][RAPROC] frame %d, slot %d, subframe %d, UE %d: Error receiving ULSCH (Msg3), round %d/%d\n",
phy_vars_eNB->Mod_id, phy_vars_eNB->Mod_id,
frame,last_slot,last_slot>>1, i, frame,last_slot,last_slot>>1, i,
phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->round-1, phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->round-1,
...@@ -2829,6 +2864,13 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -2829,6 +2864,13 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8
&phy_vars_eNB->ulsch_eNB[i]->Msg3_frame, &phy_vars_eNB->ulsch_eNB[i]->Msg3_frame,
&phy_vars_eNB->ulsch_eNB[i]->Msg3_subframe); &phy_vars_eNB->ulsch_eNB[i]->Msg3_subframe);
} }
LOG_I(PHY,"[eNB] Frame %d, Subframe %d : ULSCH SDU (RX harq_pid %d) %d bytes:",frame,last_slot>>1,
harq_pid,phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->TBS>>3);
for (j=0;j<phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->TBS>>3;j++)
printf("%x.",phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->c[0][j]);
printf("\n");
dump_ulsch(phy_vars_eNB,last_slot>>1,i);
mac_xface->macphy_exit("");
} // This is Msg3 error } // This is Msg3 error
else { //normal ULSCH else { //normal ULSCH
LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d UE %d Error receiving ULSCH, round %d/%d (ACK %d,%d)\n", LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d UE %d Error receiving ULSCH, round %d/%d (ACK %d,%d)\n",
...@@ -2839,7 +2881,7 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -2839,7 +2881,7 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8
phy_vars_eNB->ulsch_eNB[i]->o_ACK[0], phy_vars_eNB->ulsch_eNB[i]->o_ACK[0],
phy_vars_eNB->ulsch_eNB[i]->o_ACK[1]); phy_vars_eNB->ulsch_eNB[i]->o_ACK[1]);
LOG_I(PHY,"[eNB] Frame %d, Subframe %d : ULSCH SDU (RX harq_pid %d) %d bytes:\n",phy_vars_eNB->frame,last_slot>>1, LOG_I(PHY,"[eNB] Frame %d, Subframe %d : ULSCH SDU (RX harq_pid %d) %d bytes:\n",frame,last_slot>>1,
harq_pid,phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->TBS>>3); harq_pid,phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->TBS>>3);
if (phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->c[0]!=NULL){ if (phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->c[0]!=NULL){
for (j=0;j<phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->TBS>>3;j++) for (j=0;j<phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->TBS>>3;j++)
...@@ -2847,8 +2889,10 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -2847,8 +2889,10 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8
LOG_T(PHY,"\n"); LOG_T(PHY,"\n");
} }
//dump_ulsch(phy_vars_eNB, last_slot>>1, i);
// dump_ulsch(phy_vars_eNB,last_slot>>1,i);
// mac_xface->macphy_exit("");
if (phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->round== phy_vars_eNB->ulsch_eNB[i]->Mdlharq) { if (phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->round== phy_vars_eNB->ulsch_eNB[i]->Mdlharq) {
LOG_I(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d UE %d ULSCH Mdlharq %d reached\n", LOG_I(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d UE %d ULSCH Mdlharq %d reached\n",
phy_vars_eNB->Mod_id,harq_pid, phy_vars_eNB->Mod_id,harq_pid,
...@@ -2927,7 +2971,9 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -2927,7 +2971,9 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8
LOG_T(PHY,"\n"); LOG_T(PHY,"\n");
#endif #endif
#endif #endif
//dump_ulsch(phy_vars_eNB,last_slot>>1,i);
//mac_xface->macphy_exit("");
#ifdef OPENAIR2 #ifdef OPENAIR2
// if (phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->calibration_flag == 0) { // if (phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->calibration_flag == 0) {
...@@ -2953,7 +2999,7 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -2953,7 +2999,7 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8
} }
#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[eNB %d] frame %d, slot %d: user %d in sector %d: timing advance = %d\n", LOG_I(PHY,"[eNB %d] frame %d, slot %d: user %d in sector %d: timing advance = %d\n",
phy_vars_eNB->Mod_id, phy_vars_eNB->Mod_id,
frame, last_slot, frame, last_slot,
i, sect_id, i, sect_id,
...@@ -3030,7 +3076,7 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -3030,7 +3076,7 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,u8
&n1_pucch2, &n1_pucch2,
&n1_pucch3); &n1_pucch3);
LOG_I(PHY,"[eNB %d][PDSCH %x] Frame %d, subframe %d Checking for PUCCH (%d,%d,%d,%d) SR %d\n", LOG_D(PHY,"[eNB %d][PDSCH %x] Frame %d, subframe %d Checking for PUCCH (%d,%d,%d,%d) SR %d\n",
phy_vars_eNB->Mod_id,phy_vars_eNB->dlsch_eNB[i][0]->rnti, phy_vars_eNB->Mod_id,phy_vars_eNB->dlsch_eNB[i][0]->rnti,
frame,last_slot>>1, frame,last_slot>>1,
n1_pucch0,n1_pucch1,n1_pucch2,n1_pucch3,do_SR); n1_pucch0,n1_pucch1,n1_pucch2,n1_pucch3,do_SR);
...@@ -3492,8 +3538,10 @@ void phy_procedures_eNB_lte(unsigned char last_slot, unsigned char next_slot,PHY ...@@ -3492,8 +3538,10 @@ void phy_procedures_eNB_lte(unsigned char last_slot, unsigned char next_slot,PHY
} }
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_LTE,0); vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_LTE,0);
if (next_slot == 19) if (next_slot == 18)
phy_vars_eNB->frame++; phy_vars_eNB->frame++;
if (phy_vars_eNB->frame==1024)
phy_vars_eNB->frame=0;
} }
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