Commit d28419cf authored by laurent's avatar laurent

usage of setAllfromTS in also monolitic version, RACH detected to the cu,...

usage of setAllfromTS in also monolitic version, RACH detected to the cu, several bugs fixed, still no attach complete
parent b9079220
This diff is collapsed.
This diff is collapsed.
...@@ -58,13 +58,43 @@ typedef struct { ...@@ -58,13 +58,43 @@ typedef struct {
DCI_ALLOC_t dci_alloc[32]; DCI_ALLOC_t dci_alloc[32];
int num_mdci; int num_mdci;
int amp; int amp;
int8_t UE_ul_active[NUMBER_OF_UE_MAX];
int8_t UE_ul_first_rb[NUMBER_OF_UE_MAX]; //
int8_t UE_ul_last_rb[NUMBER_OF_UE_MAX]; //
LTE_eNB_PHICH phich_vars; LTE_eNB_PHICH phich_vars;
} fs6_dl_t; } fs6_dl_t;
enum pckType {
fs6UlConfig=25,
fs6DlConfig=26,
};
typedef struct { typedef struct {
enum pckType type:8;
uint16_t UE_id;
int8_t harq_pid;
UE_type_t ue_type;
uint16_t harq_mask;
uint16_t nb_rb;
uint8_t Qm;
uint16_t first_rb;
uint8_t V_UL_DAI;
uint8_t srs_active;
uint32_t TBS;
uint8_t Nsymb_pusch;
uint8_t Mlimit;
uint8_t max_turbo_iterations;
uint8_t bundling;
uint16_t beta_offset_cqi_times8;
uint16_t beta_offset_ri_times8;
uint16_t beta_offset_harqack_times8;
uint8_t Msg3_active;
uint16_t rnti;
uint8_t cyclicShift;
uint8_t cooperation_flag;
uint8_t num_active_cba_groups;
uint16_t cba_rnti[4];//NUM_MAX_CBA_GROUP];
} fs6_dl_ulsched_t;
typedef struct {
enum pckType type:8;
int UE_id; int UE_id;
int8_t harq_pid; int8_t harq_pid;
uint16_t rnti; uint16_t rnti;
...@@ -76,10 +106,17 @@ typedef struct { ...@@ -76,10 +106,17 @@ typedef struct {
uint8_t pdsch_start; uint8_t pdsch_start;
uint8_t sib1_br_flag; uint8_t sib1_br_flag;
uint16_t i0; uint16_t i0;
uint32_t rb_alloc[4]; uint32_t rb_alloc[4];;
int dataLen; int dataLen;
} fs6_dl_uespec_t; } fs6_dl_uespec_t;
typedef struct {
short UE_id;
short harq_id;
short segment;
short segLen;
} fs6_ul_uespec_t;
bool createUDPsock (char *sourceIP, char *sourcePort, char *destIP, char *destPort, UDPsock_t *result); bool createUDPsock (char *sourceIP, char *sourcePort, char *destIP, char *destPort, UDPsock_t *result);
int receiveSubFrame(UDPsock_t *sock, void *bufferZone, int bufferSize, uint16_t contentType); int receiveSubFrame(UDPsock_t *sock, void *bufferZone, int bufferSize, uint16_t contentType);
int sendSubFrame(UDPsock_t *sock, void *bufferZone, ssize_t secondHeaderSize, uint16_t contentType); int sendSubFrame(UDPsock_t *sock, void *bufferZone, ssize_t secondHeaderSize, uint16_t contentType);
...@@ -92,6 +129,8 @@ int sendSubFrame(UDPsock_t *sock, void *bufferZone, ssize_t secondHeaderSize, ui ...@@ -92,6 +129,8 @@ int sendSubFrame(UDPsock_t *sock, void *bufferZone, ssize_t secondHeaderSize, ui
#define hDL(xBuf) ((fs6_dl_t*)(((commonUDP_t *)xBuf)+1)) #define hDL(xBuf) ((fs6_dl_t*)(((commonUDP_t *)xBuf)+1))
#define hUL(xBuf) ((fs6_ul_t*)(((commonUDP_t *)xBuf)+1)) #define hUL(xBuf) ((fs6_ul_t*)(((commonUDP_t *)xBuf)+1))
#define hDLUE(xBuf) ((fs6_dl_uespec_t*) (((fs6_dl_t*)(((commonUDP_t *)xBuf)+1))+1)) #define hDLUE(xBuf) ((fs6_dl_uespec_t*) (((fs6_dl_t*)(((commonUDP_t *)xBuf)+1))+1))
#define hTxULUE(xBuf) ((fs6_dl_ulsched_t*) (((fs6_dl_t*)(((commonUDP_t *)xBuf)+1))+1))
#define hULUE(xBuf) ((fs6_ul_uespec_t*) (((fs6_ul_t*)(((commonUDP_t *)xBuf)+1))+1))
static inline size_t alignedSize(uint8_t *ptr) { static inline size_t alignedSize(uint8_t *ptr) {
commonUDP_t *header=(commonUDP_t *) ptr; commonUDP_t *header=(commonUDP_t *) ptr;
...@@ -102,10 +141,11 @@ static inline void *commonUDPdata(uint8_t *ptr) { ...@@ -102,10 +141,11 @@ static inline void *commonUDPdata(uint8_t *ptr) {
return (void *) (((commonUDP_t *)ptr)+1); return (void *) (((commonUDP_t *)ptr)+1);
} }
void setAllfromTS(uint64_t TS);
void *cu_fs6(void *arg); void *cu_fs6(void *arg);
void *du_fs6(void *arg); void *du_fs6(void *arg);
void fill_rf_config(RU_t *ru, char *rf_config_file); void fill_rf_config(RU_t *ru, char *rf_config_file);
void rx_rf(RU_t *ru,int *frame,int *subframe); void rx_rf(RU_t *ru);
void tx_rf(RU_t *ru); void tx_rf(RU_t *ru);
void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe); void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe);
void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc); void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc);
...@@ -128,5 +168,6 @@ void phy_init_RU(RU_t *); ...@@ -128,5 +168,6 @@ void phy_init_RU(RU_t *);
void feptx_prec(RU_t *); void feptx_prec(RU_t *);
void feptx_ofdm(RU_t *); void feptx_ofdm(RU_t *);
void oai_subframe_ind(uint16_t sfn, uint16_t sf); void oai_subframe_ind(uint16_t sfn, uint16_t sf);
void fep_full(RU_t *ru);
extern uint16_t sf_ahead; extern uint16_t sf_ahead;
#endif #endif
...@@ -649,7 +649,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, ...@@ -649,7 +649,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
preamble_shift2 = ((preamble_shift==0) ? 0 : ((preamble_shift<<log2_ifft_size)/N_ZC)); preamble_shift2 = ((preamble_shift==0) ? 0 : ((preamble_shift<<log2_ifft_size)/N_ZC));
for (i=0; i<NCS2; i++) { for (i=0; i<NCS2; i++) {
lev = (int32_t)prach_ifft[(preamble_shift2+i)]; lev = (int32_t)prach_ifft[(preamble_shift2+i)];
avg_en += lev; avg_en += lev;
levdB = dB_fixed_times10(lev); levdB = dB_fixed_times10(lev);
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#define PRACH_DEBUG
uint16_t NCS_unrestricted[16] = {0,13,15,18,22,26,32,38,46,59,76,93,119,167,279,419}; uint16_t NCS_unrestricted[16] = {0,13,15,18,22,26,32,38,46,59,76,93,119,167,279,419};
uint16_t NCS_restricted[15] = {15,18,22,26,32,38,46,55,68,82,100,128,158,202,237}; // high-speed case uint16_t NCS_restricted[15] = {15,18,22,26,32,38,46,55,68,82,100,128,158,202,237}; // high-speed case
uint16_t NCS_4[7] = {2,4,6,8,10,12,15}; uint16_t NCS_4[7] = {2,4,6,8,10,12,15};
......
...@@ -266,15 +266,15 @@ typedef struct { ...@@ -266,15 +266,15 @@ typedef struct {
/// coded RI bits /// coded RI bits
int16_t q_RI[MAX_RI_PAYLOAD]; int16_t q_RI[MAX_RI_PAYLOAD];
/// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18) /// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
int16_t e[MAX_NUM_CHANNEL_BITS] __attribute__((aligned(32))); int16_t eE[MAX_NUM_CHANNEL_BITS] __attribute__((aligned(32)));
/// Temporary h sequence to flag PUSCH_x/PUSCH_y symbols which are not scrambled /// Temporary h sequence to flag PUSCH_x/PUSCH_y symbols which are not scrambled
uint8_t h[MAX_NUM_CHANNEL_BITS]; uint8_t h[MAX_NUM_CHANNEL_BITS];
/// Pointer to the payload /// Pointer to the payload
uint8_t *b; uint8_t *bb;
/// Pointers to transport block segments /// Pointers to transport block segments
uint8_t *c[MAX_NUM_ULSCH_SEGMENTS]; uint8_t *c[MAX_NUM_ULSCH_SEGMENTS];
/// RTC values for each segment (for definition see 36-212 V8.6 2009-03, p.15) /// RTC values for each segment (for definition see 36-212 V8.6 2009-03, p.15)
uint32_t RTC[MAX_NUM_ULSCH_SEGMENTS]; uint32_t RTCC[MAX_NUM_ULSCH_SEGMENTS];
/// Current Number of Symbols /// Current Number of Symbols
uint8_t Nsymb_pusch; uint8_t Nsymb_pusch;
/// SRS active flag /// SRS active flag
......
...@@ -53,9 +53,9 @@ void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch) { ...@@ -53,9 +53,9 @@ void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch) {
if (ulsch) { if (ulsch) {
for (i=0; i<8; i++) { for (i=0; i<8; i++) {
if (ulsch->harq_processes[i]) { if (ulsch->harq_processes[i]) {
if (ulsch->harq_processes[i]->b) { if (ulsch->harq_processes[i]->bb) {
free16(ulsch->harq_processes[i]->b,MAX_ULSCH_PAYLOAD_BYTES); free16(ulsch->harq_processes[i]->bb,MAX_ULSCH_PAYLOAD_BYTES);
ulsch->harq_processes[i]->b = NULL; ulsch->harq_processes[i]->bb = NULL;
} }
for (r=0; r<MAX_NUM_ULSCH_SEGMENTS; r++) { for (r=0; r<MAX_NUM_ULSCH_SEGMENTS; r++) {
...@@ -114,10 +114,10 @@ LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t max_turbo_iterations,uint8_t N_RB_UL, uin ...@@ -114,10 +114,10 @@ LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t max_turbo_iterations,uint8_t N_RB_UL, uin
if (ulsch->harq_processes[i]) { if (ulsch->harq_processes[i]) {
memset(ulsch->harq_processes[i],0,sizeof(LTE_UL_eNB_HARQ_t)); memset(ulsch->harq_processes[i],0,sizeof(LTE_UL_eNB_HARQ_t));
ulsch->harq_processes[i]->b = (uint8_t *)malloc16(MAX_ULSCH_PAYLOAD_BYTES/bw_scaling); ulsch->harq_processes[i]->bb = (uint8_t *)malloc16(MAX_ULSCH_PAYLOAD_BYTES/bw_scaling);
if (ulsch->harq_processes[i]->b) if (ulsch->harq_processes[i]->bb)
memset(ulsch->harq_processes[i]->b,0,MAX_ULSCH_PAYLOAD_BYTES/bw_scaling); memset(ulsch->harq_processes[i]->bb,0,MAX_ULSCH_PAYLOAD_BYTES/bw_scaling);
else else
exit_flag=3; exit_flag=3;
...@@ -274,7 +274,7 @@ int ulsch_decoding_data_2thread0(td_params *tdp) { ...@@ -274,7 +274,7 @@ int ulsch_decoding_data_2thread0(td_params *tdp) {
Kr_bytes = Kr>>3; Kr_bytes = Kr>>3;
memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short)); memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short));
ulsch_harq->RTC[r] = generate_dummy_w(4+(Kr_bytes*8), ulsch_harq->RTCC[r] = generate_dummy_w(4+(Kr_bytes*8),
(uint8_t *)&dummy_w[r][0], (uint8_t *)&dummy_w[r][0],
(r==0) ? ulsch_harq->F : 0); (r==0) ? ulsch_harq->F : 0);
#ifdef DEBUG_ULSCH_DECODING #ifdef DEBUG_ULSCH_DECODING
...@@ -286,11 +286,11 @@ int ulsch_decoding_data_2thread0(td_params *tdp) { ...@@ -286,11 +286,11 @@ int ulsch_decoding_data_2thread0(td_params *tdp) {
ulsch_harq->Nl); ulsch_harq->Nl);
#endif #endif
if (lte_rate_matching_turbo_rx(ulsch_harq->RTC[r], if (lte_rate_matching_turbo_rx(ulsch_harq->RTCC[r],
G, G,
ulsch_harq->w[r], ulsch_harq->w[r],
(uint8_t *) &dummy_w[r][0], (uint8_t *) &dummy_w[r][0],
ulsch_harq->e+r_offset, ulsch_harq->eE+r_offset,
ulsch_harq->C, ulsch_harq->C,
NSOFT, NSOFT,
0, //Uplink 0, //Uplink
...@@ -340,7 +340,7 @@ int ulsch_decoding_data_2thread0(td_params *tdp) { ...@@ -340,7 +340,7 @@ int ulsch_decoding_data_2thread0(td_params *tdp) {
Kr = ulsch_harq->Kplus; Kr = ulsch_harq->Kplus;
Kr_bytes = Kr>>3; Kr_bytes = Kr>>3;
memcpy(ulsch_harq->b+offset, memcpy(ulsch_harq->bb+offset,
ulsch_harq->c[r], ulsch_harq->c[r],
Kr_bytes - ((ulsch_harq->C>1)?3:0)); Kr_bytes - ((ulsch_harq->C>1)?3:0));
offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0)); offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0));
...@@ -448,7 +448,7 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr ...@@ -448,7 +448,7 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr
Kr_bytes = Kr>>3; Kr_bytes = Kr>>3;
memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short)); memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short));
ulsch_harq->RTC[r] = generate_dummy_w(4+(Kr_bytes*8), ulsch_harq->RTCC[r] = generate_dummy_w(4+(Kr_bytes*8),
(uint8_t *)&dummy_w[r][0], (uint8_t *)&dummy_w[r][0],
(r==0) ? ulsch_harq->F : 0); (r==0) ? ulsch_harq->F : 0);
#ifdef DEBUG_ULSCH_DECODING #ifdef DEBUG_ULSCH_DECODING
...@@ -461,11 +461,11 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr ...@@ -461,11 +461,11 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr
#endif #endif
start_meas(&eNB->ulsch_rate_unmatching_stats); start_meas(&eNB->ulsch_rate_unmatching_stats);
if (lte_rate_matching_turbo_rx(ulsch_harq->RTC[r], if (lte_rate_matching_turbo_rx(ulsch_harq->RTCC[r],
G, G,
ulsch_harq->w[r], ulsch_harq->w[r],
(uint8_t *) &dummy_w[r][0], (uint8_t *) &dummy_w[r][0],
ulsch_harq->e+r_offset, ulsch_harq->eE+r_offset,
ulsch_harq->C, ulsch_harq->C,
NSOFT, NSOFT,
0, //Uplink 0, //Uplink
...@@ -521,12 +521,12 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr ...@@ -521,12 +521,12 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr
Kr_bytes = Kr>>3; Kr_bytes = Kr>>3;
if (r==0) { if (r==0) {
memcpy(ulsch_harq->b, memcpy(ulsch_harq->bb,
&ulsch_harq->c[0][(ulsch_harq->F>>3)], &ulsch_harq->c[0][(ulsch_harq->F>>3)],
Kr_bytes - (ulsch_harq->F>>3) - ((ulsch_harq->C>1)?3:0)); 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); offset = Kr_bytes - (ulsch_harq->F>>3) - ((ulsch_harq->C>1)?3:0);
} else { } else {
memcpy(ulsch_harq->b+offset, memcpy(ulsch_harq->bb+offset,
ulsch_harq->c[r], ulsch_harq->c[r],
Kr_bytes - ((ulsch_harq->C>1)?3:0)); Kr_bytes - ((ulsch_harq->C>1)?3:0));
offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0)); offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0));
...@@ -553,7 +553,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) ...@@ -553,7 +553,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_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid]; LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
int G = ulsch_harq->G; int G = ulsch_harq->G;
unsigned int E; unsigned int EE;
decoder_if_t *tc; decoder_if_t *tc;
if (llr8_flag == 0) if (llr8_flag == 0)
...@@ -571,7 +571,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) ...@@ -571,7 +571,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
Kr_bytes = Kr>>3; Kr_bytes = Kr>>3;
memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short)); memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short));
ulsch_harq->RTC[r] = generate_dummy_w(4+(Kr_bytes*8), ulsch_harq->RTCC[r] = generate_dummy_w(4+(Kr_bytes*8),
(uint8_t *)&dummy_w[r][0], (uint8_t *)&dummy_w[r][0],
(r==0) ? ulsch_harq->F : 0); (r==0) ? ulsch_harq->F : 0);
#ifdef DEBUG_ULSCH_DECODING #ifdef DEBUG_ULSCH_DECODING
...@@ -584,11 +584,11 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) ...@@ -584,11 +584,11 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
#endif #endif
start_meas(&eNB->ulsch_rate_unmatching_stats); start_meas(&eNB->ulsch_rate_unmatching_stats);
if (lte_rate_matching_turbo_rx(ulsch_harq->RTC[r], if (lte_rate_matching_turbo_rx(ulsch_harq->RTCC[r],
G, G,
ulsch_harq->w[r], ulsch_harq->w[r],
(uint8_t *) &dummy_w[r][0], (uint8_t *) &dummy_w[r][0],
ulsch_harq->e+r_offset, ulsch_harq->eE+r_offset,
ulsch_harq->C, ulsch_harq->C,
NSOFT, NSOFT,
0, //Uplink 0, //Uplink
...@@ -598,13 +598,13 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) ...@@ -598,13 +598,13 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
ulsch_harq->Qm, ulsch_harq->Qm,
1, 1,
r, r,
&E)==-1) { &EE)==-1) {
LOG_E(PHY,"ulsch_decoding.c: Problem in rate matching\n"); LOG_E(PHY,"ulsch_decoding.c: Problem in rate matching\n");
return(-1); return(-1);
} }
stop_meas(&eNB->ulsch_rate_unmatching_stats); stop_meas(&eNB->ulsch_rate_unmatching_stats);
r_offset += E; r_offset += EE;
start_meas(&eNB->ulsch_deinterleaving_stats); start_meas(&eNB->ulsch_deinterleaving_stats);
sub_block_deinterleaving_turbo(4+Kr, sub_block_deinterleaving_turbo(4+Kr,
&ulsch_harq->d[r][96], &ulsch_harq->d[r][96],
...@@ -616,6 +616,13 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) ...@@ -616,6 +616,13 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
else else
crc_type = CRC24_B; crc_type = CRC24_B;
if ( getenv("fs6") != NULL && strncasecmp( getenv("fs6"), "du", 2) == 0 ) {
// r is the segment id,
// Kr is the segment length in short
sendFs6Ul(eNB, UE_id, harq_pid, r, &ulsch_harq->d[r][96], Kr*sizeof(int16_t));
return 0;
}
start_meas(&eNB->ulsch_turbo_decoding_stats); start_meas(&eNB->ulsch_turbo_decoding_stats);
ret = tc(&ulsch_harq->d[r][96], ret = tc(&ulsch_harq->d[r][96],
NULL, NULL,
...@@ -645,12 +652,12 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) ...@@ -645,12 +652,12 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
Kr_bytes = Kr>>3; Kr_bytes = Kr>>3;
if (r==0) { if (r==0) {
memcpy(ulsch_harq->b, memcpy(ulsch_harq->bb,
&ulsch_harq->c[0][(ulsch_harq->F>>3)], &ulsch_harq->c[0][(ulsch_harq->F>>3)],
Kr_bytes - (ulsch_harq->F>>3) - ((ulsch_harq->C>1)?3:0)); 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); offset = Kr_bytes - (ulsch_harq->F>>3) - ((ulsch_harq->C>1)?3:0);
} else { } else {
memcpy(ulsch_harq->b+offset, memcpy(ulsch_harq->bb+offset,
ulsch_harq->c[r], ulsch_harq->c[r],
Kr_bytes - ((ulsch_harq->C>1)?3:0)); Kr_bytes - ((ulsch_harq->C>1)?3:0));
offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0)); offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0));
...@@ -1190,8 +1197,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, ...@@ -1190,8 +1197,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
j2+=2; j2+=2;
} }
ulsch_harq->e[iprime++] = y[j2++]; ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++]; ulsch_harq->eE[iprime++] = y[j2++];
} }
break; break;
...@@ -1203,10 +1210,10 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, ...@@ -1203,10 +1210,10 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
j2+=4; j2+=4;
} }
ulsch_harq->e[iprime++] = y[j2++]; ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++]; ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++]; ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++]; ulsch_harq->eE[iprime++] = y[j2++];
} }
break; break;
...@@ -1218,12 +1225,12 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, ...@@ -1218,12 +1225,12 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
j2+=6; j2+=6;
} }
ulsch_harq->e[iprime++] = y[j2++]; ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++]; ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++]; ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++]; ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++]; ulsch_harq->eE[iprime++] = y[j2++];
ulsch_harq->e[iprime++] = y[j2++]; ulsch_harq->eE[iprime++] = y[j2++];
} }
break; break;
...@@ -1261,7 +1268,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, ...@@ -1261,7 +1268,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
*/ */
int16_t *yp,*ep; int16_t *yp,*ep;
for (iprime=0,yp=&y[j2],ep=&ulsch_harq->e[0]; for (iprime=0,yp=&y[j2],ep=&ulsch_harq->eE[0];
iprime<G; iprime<G;
iprime+=8,j2+=8,ep+=8,yp+=8) { iprime+=8,j2+=8,ep+=8,yp+=8) {
ep[0] = yp[0]; ep[0] = yp[0];
......
...@@ -1253,6 +1253,7 @@ typedef struct PHY_VARS_eNB_s { ...@@ -1253,6 +1253,7 @@ typedef struct PHY_VARS_eNB_s {
int32_t pusch_stats_mcs[NUMBER_OF_UE_MAX][10240]; int32_t pusch_stats_mcs[NUMBER_OF_UE_MAX][10240];
int32_t pusch_stats_bsr[NUMBER_OF_UE_MAX][10240]; int32_t pusch_stats_bsr[NUMBER_OF_UE_MAX][10240];
int32_t pusch_stats_BO[NUMBER_OF_UE_MAX][10240]; int32_t pusch_stats_BO[NUMBER_OF_UE_MAX][10240];
uint8_t *FS6bufferZone;
} PHY_VARS_eNB; } PHY_VARS_eNB;
......
...@@ -1417,7 +1417,7 @@ void fill_rx_indication(PHY_VARS_eNB *eNB,int UE_id,int frame,int subframe) { ...@@ -1417,7 +1417,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.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.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->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]->b; pdu->data = eNB->ulsch[UE_id]->harq_processes[harq_pid]->bb;
// estimate timing advance for MAC // estimate timing advance for MAC
sync_pos = lte_est_timing_advance_pusch(eNB,UE_id); sync_pos = lte_est_timing_advance_pusch(eNB,UE_id);
timing_advance_update = sync_pos; // - eNB->frame_parms.nb_prefix_samples/4; //to check timing_advance_update = sync_pos; // - eNB->frame_parms.nb_prefix_samples/4; //to check
......
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