Commit 025f56d2 authored by Raymond Knopp's avatar Raymond Knopp

node function interfaces via function pointers. Suggestions from L. Thomas, B. Mongazon, C. Roux.

parent f33e9a70
......@@ -1167,7 +1167,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
frame_parms->phich_config_common.phich_duration);
LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_eNB][MOD %02"PRIu8"][]\n", eNB->Mod_id);
if (eNB->node_function != NGFI_RRU_IF4) {
if (eNB->node_function != NGFI_RRU_IF4p5) {
lte_gold(frame_parms,eNB->lte_gold_table,frame_parms->Nid_cell);
generate_pcfich_reg_mapping(frame_parms);
generate_phich_reg_mapping(frame_parms);
......@@ -1191,12 +1191,12 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
if (abstraction_flag==0) {
// TX vars
if (eNB->node_function != NGFI_RCC_IF4)
if (eNB->node_function != NGFI_RCC_IF4p5)
common_vars->txdata[eNB_id] = (int32_t**)malloc16( frame_parms->nb_antennas_tx*sizeof(int32_t*) );
common_vars->txdataF[eNB_id] = (int32_t **)malloc16( frame_parms->nb_antennas_tx*sizeof(int32_t*) );
for (i=0; i<frame_parms->nb_antennas_tx; i++) {
if (eNB->node_function != NGFI_RCC_IF4)
if (eNB->node_function != NGFI_RCC_IF4p5)
common_vars->txdata[eNB_id][i] = (int32_t*)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(int32_t) );
common_vars->txdataF[eNB_id][i] = (int32_t*)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(int32_t) );
#ifdef DEBUG_PHY
......@@ -1208,14 +1208,14 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
}
// RX vars
if (eNB->node_function != NGFI_RCC_IF4) {
if (eNB->node_function != NGFI_RCC_IF4p5) {
common_vars->rxdata[eNB_id] = (int32_t**)malloc16( frame_parms->nb_antennas_rx*sizeof(int32_t*) );
common_vars->rxdata_7_5kHz[eNB_id] = (int32_t**)malloc16( frame_parms->nb_antennas_rx*sizeof(int32_t*) );
}
common_vars->rxdataF[eNB_id] = (int32_t**)malloc16( frame_parms->nb_antennas_rx*sizeof(int32_t*) );
for (i=0; i<frame_parms->nb_antennas_rx; i++) {
if (eNB->node_function != NGFI_RCC_IF4) {
if (eNB->node_function != NGFI_RCC_IF4p5) {
common_vars->rxdata[eNB_id][i] = (int32_t*)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(int32_t) );
common_vars->rxdata_7_5kHz[eNB_id][i] = (int32_t*)malloc16_clear( frame_parms->samples_per_tti*sizeof(int32_t) );
}
......@@ -1227,7 +1227,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
#endif
}
if (eNB->node_function != NGFI_RRU_IF4) {
if (eNB->node_function != NGFI_RRU_IF4p5) {
// Channel estimates for SRS
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
......@@ -1250,7 +1250,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
if (abstraction_flag==0) {
if (eNB->node_function != NGFI_RRU_IF4) {
if (eNB->node_function != NGFI_RRU_IF4p5) {
generate_ul_ref_sigs_rx();
// SRS
......@@ -1264,7 +1264,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
// ULSCH VARS, skip if NFGI_RRU_IF4
if (eNB->node_function!=NGFI_RRU_IF4)
if (eNB->node_function!=NGFI_RRU_IF4p5)
prach_vars->prachF = (int16_t*)malloc16_clear( 1024*2*sizeof(int16_t) );
/* number of elements of an array X is computed as sizeof(X) / sizeof(X[0]) */
......@@ -1277,7 +1277,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
#endif
}
if (eNB->node_function != NGFI_RRU_IF4) {
if (eNB->node_function != NGFI_RRU_IF4p5) {
AssertFatal(frame_parms->nb_antennas_rx <= sizeof(prach_vars->prach_ifft) / sizeof(prach_vars->prach_ifft[0]),
"nb_antennas_rx too large");
for (i=0; i<frame_parms->nb_antennas_rx; i++) {
......@@ -1399,7 +1399,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
eNB->pdsch_config_dedicated->p_a = dB0; //defaul value until overwritten by RRCConnectionReconfiguration
init_prach_tables(839);
} // node_function != NGFI_RRU_IF4
} // node_function != NGFI_RRU_IF4p5
return (0);
}
......
......@@ -42,9 +42,9 @@
#include "PHY/TOOLS/alaw_lut.h"
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
void send_IF4(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type, int k) {
void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type, int k) {
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
int32_t **txdataF = eNB->common_vars.txdataF[0];
int32_t **rxdataF = eNB->common_vars.rxdataF[0];
......@@ -57,16 +57,18 @@ void send_IF4(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type,
uint16_t *data_block=NULL, *i=NULL;
if (packet_type == IF4_PDLFFT) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 1 );
if (packet_type == IF4p5_PDLFFT) {
db_fulllength = 12*fp->N_RB_DL;
db_halflength = (db_fulllength)>>1;
slotoffsetF = (subframe)*(fp->ofdm_symbol_size)*((fp->Ncp==1) ? 12 : 14) + 1;
blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength - 1;
IF4_header_t *dl_header = (IF4_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES);
data_block = (uint16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4_header_t);
IF4p5_header_t *dl_header = (IF4p5_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES);
data_block = (uint16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t);
gen_IF4_dl_header(dl_header, frame, subframe);
gen_IF4p5_dl_header(dl_header, frame, subframe);
for (symbol_id=0; symbol_id<fp->symbols_per_tti; symbol_id++) {
......@@ -86,23 +88,23 @@ void send_IF4(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type,
&tx_buffer,
db_fulllength,
1,
IF4_PDLFFT)) < 0) {
perror("ETHERNET write for IF4_PDLFFT\n");
IF4p5_PDLFFT)) < 0) {
perror("ETHERNET write for IF4p5_PDLFFT\n");
}
slotoffsetF += fp->ofdm_symbol_size;
blockoffsetF += fp->ofdm_symbol_size;
}
} else if (packet_type == IF4_PULFFT) {
} else if (packet_type == IF4p5_PULFFT) {
db_fulllength = 12*fp->N_RB_UL;
db_halflength = (db_fulllength)>>1;
slotoffsetF = 1;
blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength - 1;
IF4_header_t *ul_header = (IF4_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES);
data_block = (uint16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4_header_t);
IF4p5_header_t *ul_header = (IF4p5_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES);
data_block = (uint16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t);
gen_IF4_ul_header(ul_header, frame, subframe);
gen_IF4p5_ul_header(ul_header, frame, subframe);
for (symbol_id=0; symbol_id<fp->symbols_per_tti; symbol_id++) {
......@@ -122,23 +124,23 @@ void send_IF4(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type,
&tx_buffer,
db_fulllength,
1,
IF4_PULFFT)) < 0) {
perror("ETHERNET write for IF4_PULFFT\n");
IF4p5_PULFFT)) < 0) {
perror("ETHERNET write for IF4p5_PULFFT\n");
}
slotoffsetF += fp->ofdm_symbol_size;
blockoffsetF += fp->ofdm_symbol_size;
}
} else if (packet_type == IF4_PRACH) {
} else if (packet_type == IF4p5_PRACH) {
// FIX: hard coded prach samples length
db_fulllength = 839*2;
IF4_header_t *prach_header = (IF4_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES);
data_block = (uint16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4_header_t);
IF4p5_header_t *prach_header = (IF4p5_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES);
data_block = (uint16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t);
gen_IF4_prach_header(prach_header, frame, subframe);
gen_IF4p5_prach_header(prach_header, frame, subframe);
memcpy((int16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4_header_t),
memcpy((int16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t),
(&rxsigF[0][k]),
db_fulllength*sizeof(int16_t));
......@@ -147,18 +149,19 @@ void send_IF4(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type,
&tx_buffer,
db_fulllength,
1,
IF4_PRACH)) < 0) {
perror("ETHERNET write for IF4_PRACH\n");
IF4p5_PRACH)) < 0) {
perror("ETHERNET write for IF4p5_PRACH\n");
}
} else {
AssertFatal(1==0, "send_IF4 - Unknown packet_type %x", packet_type);
AssertFatal(1==0, "send_IF4p5 - Unknown packet_type %x", packet_type);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 0 );
return;
}
void recv_IF4(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_type, uint32_t *symbol_number) {
void recv_IF4p5(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_type, uint32_t *symbol_number) {
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
int32_t **txdataF = eNB->common_vars.txdataF[0];
int32_t **rxdataF = eNB->common_vars.rxdataF[0];
......@@ -168,15 +171,17 @@ void recv_IF4(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_typ
uint16_t element_id;
uint16_t db_fulllength, db_halflength;
int slotoffsetF=0, blockoffsetF=0;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 1 );
if (eNB->node_function == NGFI_RRU_IF4) {
if (eNB->node_function == NGFI_RRU_IF4p5) {
db_fulllength = (12*fp->N_RB_DL);
} else {
db_fulllength = (12*fp->N_RB_UL);
}
db_halflength = db_fulllength>>1;
IF4_header_t *packet_header=NULL;
IF4p5_header_t *packet_header=NULL;
uint16_t *data_block=NULL, *i=NULL;
if (eNB->ifdevice.trx_read_func(&eNB->ifdevice,
......@@ -187,13 +192,13 @@ void recv_IF4(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_typ
perror("ETHERNET read");
}
packet_header = (IF4_header_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES);
data_block = (uint16_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES+sizeof_IF4_header_t);
packet_header = (IF4p5_header_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES);
data_block = (uint16_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES+sizeof_IF4p5_header_t);
*frame = ((packet_header->frame_status)>>6)&0xffff;
*subframe = ((packet_header->frame_status)>>22)&0x000f;
if (*packet_type == IF4_PDLFFT) {
if (*packet_type == IF4p5_PDLFFT) {
*symbol_number = ((packet_header->frame_status)>>26)&0x000f;
slotoffsetF = (*symbol_number)*(fp->ofdm_symbol_size) + (*subframe)*(fp->ofdm_symbol_size)*((fp->Ncp==1) ? 12 : 14) + 1;
......@@ -209,7 +214,7 @@ void recv_IF4(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_typ
*(i+1) = alaw2lin[ (data_block[element_id+db_halflength]>>8) ];
}
} else if (*packet_type == IF4_PULFFT) {
} else if (*packet_type == IF4p5_PULFFT) {
*symbol_number = ((packet_header->frame_status)>>26)&0x000f;
slotoffsetF = (*symbol_number)*(fp->ofdm_symbol_size) + 1;
......@@ -225,25 +230,26 @@ void recv_IF4(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_typ
*(i+1) = alaw2lin[ (data_block[element_id+db_halflength]>>8) ];
}
} else if (*packet_type == IF4_PRACH) {
} else if (*packet_type == IF4p5_PRACH) {
// FIX: hard coded prach samples length
db_fulllength = 839*2;
memcpy((&rxsigF[0][0]),
(int16_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES+sizeof_IF4_header_t),
(int16_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES+sizeof_IF4p5_header_t),
db_fulllength*sizeof(int16_t));
} else {
AssertFatal(1==0, "recv_IF4 - Unknown packet_type %x", *packet_type);
AssertFatal(1==0, "recv_IF4p5 - Unknown packet_type %x", *packet_type);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 0 );
return;
}
void gen_IF4_dl_header(IF4_header_t *dl_packet, int frame, int subframe) {
dl_packet->type = IF4_PACKET_TYPE;
dl_packet->sub_type = IF4_PDLFFT;
void gen_IF4p5_dl_header(IF4p5_header_t *dl_packet, int frame, int subframe) {
dl_packet->type = IF4p5_PACKET_TYPE;
dl_packet->sub_type = IF4p5_PDLFFT;
dl_packet->rsvd = 0;
......@@ -254,9 +260,9 @@ void gen_IF4_dl_header(IF4_header_t *dl_packet, int frame, int subframe) {
}
void gen_IF4_ul_header(IF4_header_t *ul_packet, int frame, int subframe) {
ul_packet->type = IF4_PACKET_TYPE;
ul_packet->sub_type = IF4_PULFFT;
void gen_IF4p5_ul_header(IF4p5_header_t *ul_packet, int frame, int subframe) {
ul_packet->type = IF4p5_PACKET_TYPE;
ul_packet->sub_type = IF4p5_PULFFT;
ul_packet->rsvd = 0;
......@@ -267,9 +273,9 @@ void gen_IF4_ul_header(IF4_header_t *ul_packet, int frame, int subframe) {
}
void gen_IF4_prach_header(IF4_header_t *prach_packet, int frame, int subframe) {
prach_packet->type = IF4_PACKET_TYPE;
prach_packet->sub_type = IF4_PRACH;
void gen_IF4p5_prach_header(IF4p5_header_t *prach_packet, int frame, int subframe) {
prach_packet->type = IF4p5_PACKET_TYPE;
prach_packet->sub_type = IF4p5_PRACH;
prach_packet->rsvd = 0;
......@@ -280,8 +286,8 @@ void gen_IF4_prach_header(IF4_header_t *prach_packet, int frame, int subframe) {
}
void malloc_IF4_buffer(PHY_VARS_eNB *eNB) {
void malloc_IF4p5_buffer(PHY_VARS_eNB *eNB) {
// Keep the size large enough
eNB->ifbuffer.tx = malloc(RAW_IF4_PRACH_SIZE_BYTES);
eNB->ifbuffer.rx = malloc(RAW_IF4_PRACH_SIZE_BYTES);
eNB->ifbuffer.tx = malloc(RAW_IF4p5_PRACH_SIZE_BYTES);
eNB->ifbuffer.rx = malloc(RAW_IF4p5_PRACH_SIZE_BYTES);
}
......@@ -41,12 +41,12 @@
#include "PHY/defs.h"
/// Macro for IF4 packet type
#define IF4_PACKET_TYPE 0x080A
#define IF4_PULFFT 0x0019
#define IF4_PDLFFT 0x0020
#define IF4_PRACH 0x0021
#define IF4p5_PACKET_TYPE 0x080A
#define IF4p5_PULFFT 0x0019
#define IF4p5_PDLFFT 0x0020
#define IF4p5_PRACH 0x0021
struct IF4_header {
struct IF4p5_header {
/// Type
uint16_t type;
/// Sub-Type
......@@ -58,17 +58,17 @@ struct IF4_header {
} __attribute__ ((__packed__));
typedef struct IF4_header IF4_header_t;
#define sizeof_IF4_header_t 12
typedef struct IF4p5_header IF4p5_header_t;
#define sizeof_IF4p5_header_t 12
void gen_IF4_dl_header(IF4_header_t*, int, int);
void gen_IF4p5_dl_header(IF4p5_header_t*, int, int);
void gen_IF4_ul_header(IF4_header_t*, int, int);
void gen_IF4p5_ul_header(IF4p5_header_t*, int, int);
void gen_IF4_prach_header(IF4_header_t*, int, int);
void gen_IF4p5_prach_header(IF4p5_header_t*, int, int);
void send_IF4(PHY_VARS_eNB*, int, int, uint16_t, int);
void send_IF4p5(PHY_VARS_eNB*, int, int, uint16_t, int);
void recv_IF4(PHY_VARS_eNB*, int*, int*, uint16_t*, uint32_t*);
void recv_IF4p5(PHY_VARS_eNB*, int*, int*, uint16_t*, uint32_t*);
void malloc_IF4_buffer(PHY_VARS_eNB*);
void malloc_IF4p5_buffer(PHY_VARS_eNB*);
......@@ -41,7 +41,7 @@
#include "PHY/defs.h"
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe, uint8_t *seqno, uint16_t packet_type) {
......@@ -54,6 +54,8 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe
uint32_t spp_eth = (uint32_t) eNB->ifdevice.openair0_cfg->samples_per_packet;
uint32_t spsf = (uint32_t) eNB->ifdevice.openair0_cfg->samples_per_frame/10;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 1 );
if (packet_type == IF5_RRH_GW_DL) {
for (i=0; i < fp->nb_antennas_tx; i++)
......@@ -143,6 +145,8 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe
}
free(tx_buffer);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 0 );
return;
}
......@@ -158,6 +162,8 @@ void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subfram
int32_t spsf = (int32_t) eNB->ifdevice.openair0_cfg->samples_per_frame/10;
openair0_timestamp timestamp[spsf / spp_eth];
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 1 );
if (packet_type == IF5_RRH_GW_DL) {
......@@ -205,6 +211,8 @@ void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subfram
} else {
AssertFatal(1==0, "recv_IF5 - Unknown packet_type %x", packet_type);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 0 );
return;
}
......@@ -1424,8 +1424,7 @@ void rx_phich(PHY_VARS_UE *ue,
void generate_phich_top(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc,
int16_t amp,
uint8_t sect_id,
uint8_t abstraction_flag)
uint8_t sect_id)
{
......@@ -1486,7 +1485,7 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
ulsch[UE_id]->harq_processes[harq_pid]->first_rb);
}
if (abstraction_flag == 0) {
if (eNB->abstraction_flag == 0) {
generate_phich(frame_parms,
amp,//amp*2,
nseq_PHICH,
......
......@@ -190,7 +190,7 @@ int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_par
return(0);
}
void fill_eNB_dlsch_MCH(PHY_VARS_eNB *eNB,int mcs,int ndi,int rvidx, int abstraction_flag)
void fill_eNB_dlsch_MCH(PHY_VARS_eNB *eNB,int mcs,int ndi,int rvidx)
{
LTE_eNB_DLSCH_t *dlsch = eNB->dlsch_MCH;
......@@ -227,7 +227,7 @@ void fill_eNB_dlsch_MCH(PHY_VARS_eNB *eNB,int mcs,int ndi,int rvidx, int abstrac
break;
}
if (abstraction_flag) {
if (eNB->abstraction_flag) {
eNB_transport_info[eNB->Mod_id][eNB->CC_id].cntl.pmch_flag=1;
eNB_transport_info[eNB->Mod_id][eNB->CC_id].num_pmch=1; // assumption: there is always one pmch in each SF
eNB_transport_info[eNB->Mod_id][eNB->CC_id].num_common_dci=0;
......@@ -286,13 +286,13 @@ void fill_UE_dlsch_MCH(PHY_VARS_UE *ue,int mcs,int ndi,int rvidx,int eNB_id)
}
}
void generate_mch(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t *a,int abstraction_flag)
void generate_mch(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t *a)
{
int G;
int subframe = proc->subframe_tx;
if (abstraction_flag != 0) {
if (eNB->abstraction_flag != 0) {
if (eNB_transport_info_TB_index[eNB->Mod_id][eNB->CC_id]!=0)
printf("[PHY][EMU] PMCH transport block position is different than zero %d \n", eNB_transport_info_TB_index[eNB->Mod_id][eNB->CC_id]);
......
......@@ -1183,7 +1183,7 @@ void rx_prach(PHY_VARS_eNB *eNB,
if ((eNB->node_function == eNodeB_3GPP) ||
(eNB->node_function == NGFI_RRU_IF4)) { // compute the DFTs of the PRACH temporal resources
(eNB->node_function == NGFI_RRU_IF4p5)) { // compute the DFTs of the PRACH temporal resources
// Do forward transform
for (aa=0; aa<nb_ant_rx; aa++) {
prach2 = prach[aa] + (Ncp<<1);
......@@ -1269,7 +1269,7 @@ void rx_prach(PHY_VARS_eNB *eNB,
}
}
if (eNB->node_function == NGFI_RRU_IF4) {
if (eNB->node_function == NGFI_RRU_IF4p5) {
k = (12*n_ra_prb) - 6*eNB->frame_parms.N_RB_UL;
if (k<0) {
......@@ -1281,12 +1281,10 @@ void rx_prach(PHY_VARS_eNB *eNB,
k*=2;
/// **** send_IF4 of rxsigF to RCC **** ///
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 1 );
send_IF4(eNB, eNB->proc.frame_rx, eNB->proc.subframe_rx, IF4_PRACH, k);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 0 );
send_IF4p5(eNB, eNB->proc.frame_rx, eNB->proc.subframe_rx, IF4p5_PRACH, k);
return;
} else if (eNB->node_function == NGFI_RCC_IF4) {
} else if (eNB->node_function == NGFI_RCC_IF4p5) {
k = (12*n_ra_prb) - 6*eNB->frame_parms.N_RB_UL;
if (k<0) {
......@@ -1305,7 +1303,7 @@ void rx_prach(PHY_VARS_eNB *eNB,
// in case of RCC and prach received rx_thread wakes up prach
// here onwards is for eNodeB_3GPP or NGFI_RCC_IF4
// here onwards is for eNodeB_3GPP or NGFI_RCC_IF4p5
preamble_offset_old = 99;
......
......@@ -232,7 +232,7 @@ int mch_modulation(int32_t **txdataF,
@param abstraction_flag
*/
void generate_mch(PHY_VARS_eNB *phy_vars_eNB,eNB_rxtx_proc_t *proc,uint8_t *a,int abstraction_flag);
void generate_mch(PHY_VARS_eNB *phy_vars_eNB,eNB_rxtx_proc_t *proc,uint8_t *a);
/** \brief This function generates the frequency-domain pilots (cell-specific downlink reference signals)
@param phy_vars_eNB Pointer to eNB variables
......@@ -240,10 +240,8 @@ void generate_mch(PHY_VARS_eNB *phy_vars_eNB,eNB_rxtx_proc_t *proc,uint8_t *a,in
@param mcs MCS for MBSFN
@param ndi new data indicator
@param rdvix
@param abstraction_flag
*/
void fill_eNB_dlsch_MCH(PHY_VARS_eNB *phy_vars_eNB,int mcs,int ndi,int rvidx,int abstraction_flag);
void fill_eNB_dlsch_MCH(PHY_VARS_eNB *phy_vars_eNB,int mcs,int ndi,int rvidx);
/** \brief This function generates the frequency-domain pilots (cell-specific downlink reference signals)
@param phy_vars_ue Pointer to UE variables
......@@ -1546,8 +1544,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *phy_vars_eNB,
void generate_phich_top(PHY_VARS_eNB *phy_vars_eNB,
eNB_rxtx_proc_t *proc,
int16_t amp,
uint8_t sect_id,
uint8_t abstraction_flag);
uint8_t sect_id);
/* \brief This routine demodulates the PHICH and updates PUSCH/ULSCH parameters.
@param phy_vars_ue Pointer to UE variables
......
......@@ -161,8 +161,9 @@ typedef enum {
eNodeB_3GPP=0, // classical eNodeB function
eNodeB_3GPP_BBU, // eNodeB with NGFI IF5
NGFI_RRU_IF5, // NGFI_RRU with IF5
NGFI_RRU_IF4, // NGFI_RRU (NGFI remote radio-unit, currently split at common - ue_specific interface, IF4)
NGFI_RCC_IF4 // NGFI_RCC (NGFI radio cloud center, currently split at common - ue_specific interface, IF4)
NGFI_RRU_IF4p5, // NGFI_RRU (NGFI remote radio-unit, currently split at common - ue_specific interface, IF4p5)
NGFI_RCC_IF4p5, // NGFI_RCC (NGFI radio cloud center, currently split at common - ue_specific interface, IF4p5)
NGFI_RAU_IF4p5
} eNB_func_t;
typedef enum {
......@@ -187,6 +188,20 @@ typedef struct ral_threshold_phy_s {
} ral_threshold_phy_t;
#endif
/// Top-level PHY Data Structure for RN
typedef struct {
/// Module ID indicator for this instance
uint8_t Mod_id;
uint32_t frame;
// phy_vars_eNB
// phy_vars ue
// cuurently only used to store and forward the PMCH
uint8_t mch_avtive[10];
uint8_t sync_area[10]; // num SF
LTE_UE_DLSCH_t *dlsch_rn_MCH[10];
} PHY_VARS_RN;
/// Context data structure for RX/TX portion of subframe processing
typedef struct {
/// Component Carrier index
......@@ -340,6 +355,15 @@ typedef struct PHY_VARS_eNB_s {
eNB_proc_t proc;
eNB_func_t node_function;
eNB_timing_t node_timing;
int abstraction_flag;
void (*do_prach)(struct PHY_VARS_eNB_s *eNB,eNB_proc_t *proc);
void (*fep)(struct PHY_VARS_eNB_s *eNB,eNB_proc_t *proc);
void (*proc_uespec_rx)(struct PHY_VARS_eNB_s *eNB,eNB_rxtx_proc_t *proc,const relaying_type_t r_type);
void (*proc_tx)(struct PHY_VARS_eNB_s *eNB,eNB_rxtx_proc_t *proc,relaying_type_t r_type,PHY_VARS_RN *rn);
void (*tx_fh)(struct PHY_VARS_eNB_s *eNB,eNB_rxtx_proc_t *proc);
void (*rx_fh)(struct PHY_VARS_eNB_s *eNB,eNB_proc_t *proc,int *frame, int *subframe);
int (*start_rf)(struct PHY_VARS_eNB_s *eNB);
int (*start_if)(struct PHY_VARS_eNB_s *eNB);
uint8_t local_flag;
uint32_t rx_total_gain_dB;
LTE_DL_FRAME_PARMS frame_parms;
......@@ -785,19 +809,7 @@ typedef struct {
#endif
} PHY_VARS_UE;
/// Top-level PHY Data Structure for RN
typedef struct {
/// Module ID indicator for this instance
uint8_t Mod_id;
uint32_t frame;
// phy_vars_eNB
// phy_vars ue
// cuurently only used to store and forward the PMCH
uint8_t mch_avtive[10];
uint8_t sync_area[10]; // num SF
LTE_UE_DLSCH_t *dlsch_rn_MCH[10];
} PHY_VARS_RN;
#include "PHY/INIT/defs.h"
#include "PHY/LTE_REFSIG/defs.h"
......
......@@ -164,20 +164,18 @@ void phy_procedures_UE_S_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abst
@param r_type indicates the relaying operation: 0: no_relaying, 1: unicast relaying type 1, 2: unicast relaying type 2, 3: multicast relaying
@param phy_vars_rn pointer to the RN variables
*/
void phy_procedures_eNB_TX(PHY_VARS_eNB *phy_vars_eNB,eNB_rxtx_proc_t *proc,uint8_t abstraction_flag,relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn);
void phy_procedures_eNB_TX(PHY_VARS_eNB *phy_vars_eNB,eNB_rxtx_proc_t *proc,relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn);