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
......
This diff is collapsed.
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