changes to send/recv if5
This commit is contained in:
@@ -43,35 +43,47 @@
|
|||||||
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
|
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||||
|
|
||||||
|
|
||||||
void send_IF5(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, uint8_t *seqno, uint16_t packet_type) {
|
void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe, uint8_t *seqno, uint16_t packet_type) {
|
||||||
|
|
||||||
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
|
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
|
||||||
void *txp[fp->nb_antennas_tx];
|
void *txp[fp->nb_antennas_tx], *rxp[fp->nb_antennas_rx];
|
||||||
void *tx_buffer=NULL;
|
void *tx_buffer=NULL;
|
||||||
|
|
||||||
uint16_t packet_id=0, i=0;
|
uint16_t packet_id=0, i=0;
|
||||||
|
|
||||||
if (packet_type == IF5_RRH_GW) {
|
if (packet_type == IF5_RRH_GW_DL) {
|
||||||
|
|
||||||
unsigned int spp_eth = eNB->ifdevice.openair0_cfg->samples_per_packet;
|
unsigned int spp_eth = eNB->ifdevice.openair0_cfg->samples_per_packet;
|
||||||
unsigned int spsf = eNB->ifdevice.openair0_cfg->samples_per_frame/10;
|
unsigned int spsf = eNB->ifdevice.openair0_cfg->samples_per_frame/10;
|
||||||
|
|
||||||
for (i=0; i < fp->nb_antennas_tx; i++)
|
for (i=0; i < fp->nb_antennas_tx; i++)
|
||||||
txp[i] = (void*)&eNB->common_vars.txdata[0][i][proc->subframe_tx*fp->samples_per_tti];
|
txp[i] = (void*)&eNB->common_vars.txdata[0][i][subframe*fp->samples_per_tti];
|
||||||
|
|
||||||
for (packet_id=0; packet_id < spsf / spp_eth; packet_id++) {
|
for (packet_id=0; packet_id < spsf / spp_eth; packet_id++) {
|
||||||
eNB->ifdevice.trx_write_func(&eNB->ifdevice,
|
eNB->ifdevice.trx_write_func(&eNB->ifdevice,
|
||||||
(proc->timestamp_tx-eNB->ifdevice.openair0_cfg->tx_sample_advance + packet_id*spp_eth),
|
(proc_timestamp - eNB->ifdevice.openair0_cfg->tx_sample_advance + packet_id*spp_eth),
|
||||||
txp,
|
(txp + packet_id*spp_eth),
|
||||||
spp_eth,
|
spp_eth,
|
||||||
fp->nb_antennas_tx,
|
fp->nb_antennas_tx,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("SPP = %d and packet_id %d\n", spp_eth, packet_id);
|
} else if (packet_type == IF5_RRH_GW_UL) {
|
||||||
|
unsigned int spp_eth = eNB->ifdevice.openair0_cfg->samples_per_packet;
|
||||||
} else if (packet_type == IF5_MOBIPASS) {
|
unsigned int spsf = eNB->ifdevice.openair0_cfg->samples_per_frame/10;
|
||||||
|
|
||||||
|
for (i=0; i < fp->nb_antennas_rx; i++)
|
||||||
|
rxp[i] = (void*)&eNB->common_vars.rxdata[0][i][subframe*fp->samples_per_tti];
|
||||||
|
|
||||||
|
for (packet_id=0; packet_id < spsf / spp_eth; packet_id++) {
|
||||||
|
eNB->ifdevice.trx_write_func(&eNB->ifdevice,
|
||||||
|
(proc_timestamp + packet_id*spp_eth),
|
||||||
|
(rxp + packet_id*spp_eth),
|
||||||
|
spp_eth,
|
||||||
|
fp->nb_antennas_rx,
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (packet_type == IF5_MOBIPASS) {
|
||||||
uint16_t db_fulllength=640;
|
uint16_t db_fulllength=640;
|
||||||
|
|
||||||
__m128i *data_block=NULL, *data_block_head=NULL;
|
__m128i *data_block=NULL, *data_block_head=NULL;
|
||||||
@@ -89,11 +101,11 @@ void send_IF5(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, uint8_t *seqno, uint16_t
|
|||||||
header->ack = 0;
|
header->ack = 0;
|
||||||
header->word0 = 0;
|
header->word0 = 0;
|
||||||
|
|
||||||
txp[0] = (void*)&eNB->common_vars.txdata[0][0][proc->subframe_tx*eNB->frame_parms.samples_per_tti];
|
txp[0] = (void*)&eNB->common_vars.txdata[0][0][subframe*eNB->frame_parms.samples_per_tti];
|
||||||
txp128 = (__m128i *) txp[0];
|
txp128 = (__m128i *) txp[0];
|
||||||
|
|
||||||
for (packet_id=0; packet_id<(fp->samples_per_tti*2)/db_fulllength; packet_id++) {
|
for (packet_id=0; packet_id<(fp->samples_per_tti*2)/db_fulllength; packet_id++) {
|
||||||
header->time_stamp = proc->timestamp_tx + packet_id * db_fulllength;
|
header->time_stamp = proc_timestamp + packet_id*db_fulllength;
|
||||||
data_block = data_block_head;
|
data_block = data_block_head;
|
||||||
|
|
||||||
for (i=0; i<db_fulllength>>3; i+=2) {
|
for (i=0; i<db_fulllength>>3; i+=2) {
|
||||||
@@ -116,6 +128,7 @@ void send_IF5(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, uint8_t *seqno, uint16_t
|
|||||||
header->seqno += 1;
|
header->seqno += 1;
|
||||||
}
|
}
|
||||||
*seqno = header->seqno;
|
*seqno = header->seqno;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
AssertFatal(1==0, "send_IF5 - Unknown packet_type %x", packet_type);
|
AssertFatal(1==0, "send_IF5 - Unknown packet_type %x", packet_type);
|
||||||
}
|
}
|
||||||
@@ -125,34 +138,52 @@ void send_IF5(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, uint8_t *seqno, uint16_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void recv_IF5(PHY_VARS_eNB *eNB, eNB_proc_t *proc, uint16_t packet_type) {
|
void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subframe, uint16_t packet_type) {
|
||||||
|
|
||||||
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
|
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
|
||||||
void *rxp[fp->nb_antennas_rx];
|
void *txp[fp->nb_antennas_tx], *rxp[fp->nb_antennas_rx];
|
||||||
void *rx_buffer=NULL;
|
void *rx_buffer=NULL;
|
||||||
|
|
||||||
uint16_t packet_id=0, i=0;
|
uint16_t packet_id=0, i=0;
|
||||||
|
|
||||||
if (packet_type == IF5_RRH_GW) {
|
if (packet_type == IF5_RRH_GW_DL) {
|
||||||
|
unsigned int spp_eth = eNB->ifdevice.openair0_cfg->samples_per_packet;
|
||||||
|
unsigned int spsf = eNB->ifdevice.openair0_cfg->samples_per_frame/10;
|
||||||
|
|
||||||
|
openair0_timestamp timestamp[spsf / spp_eth];
|
||||||
|
|
||||||
|
for (i=0; i < fp->nb_antennas_tx; i++)
|
||||||
|
txp[i] = (void*)&eNB->common_vars.txdata[0][i][subframe*fp->samples_per_tti];
|
||||||
|
|
||||||
|
for (packet_id=0; packet_id < spsf / spp_eth; packet_id++) {
|
||||||
|
eNB->ifdevice.trx_read_func(&eNB->ifdevice,
|
||||||
|
×tamp[packet_id],
|
||||||
|
(txp + packet_id*spp_eth),
|
||||||
|
spp_eth,
|
||||||
|
fp->nb_antennas_tx);
|
||||||
|
}
|
||||||
|
|
||||||
|
*proc_timestamp = timestamp[0];
|
||||||
|
|
||||||
|
} else if (packet_type == IF5_RRH_GW_UL) {
|
||||||
unsigned int spp_eth = eNB->ifdevice.openair0_cfg->samples_per_packet;
|
unsigned int spp_eth = eNB->ifdevice.openair0_cfg->samples_per_packet;
|
||||||
unsigned int spsf = eNB->ifdevice.openair0_cfg->samples_per_frame/10;
|
unsigned int spsf = eNB->ifdevice.openair0_cfg->samples_per_frame/10;
|
||||||
|
|
||||||
openair0_timestamp timestamp[spsf / spp_eth];
|
openair0_timestamp timestamp[spsf / spp_eth];
|
||||||
|
|
||||||
for (i=0; i < fp->nb_antennas_rx; i++)
|
for (i=0; i < fp->nb_antennas_rx; i++)
|
||||||
rxp[i] = (void*)&eNB->common_vars.rxdata[0][i][proc->subframe_rx*fp->samples_per_tti];
|
rxp[i] = (void*)&eNB->common_vars.rxdata[0][i][subframe*fp->samples_per_tti];
|
||||||
|
|
||||||
for (packet_id=0; packet_id < spsf / spp_eth; packet_id++) {
|
for (packet_id=0; packet_id < spsf / spp_eth; packet_id++) {
|
||||||
eNB->ifdevice.trx_read_func(&eNB->ifdevice,
|
eNB->ifdevice.trx_read_func(&eNB->ifdevice,
|
||||||
×tamp[packet_id],
|
×tamp[packet_id],
|
||||||
rxp,
|
(rxp + packet_id*spp_eth),
|
||||||
spp_eth,
|
spp_eth,
|
||||||
fp->nb_antennas_rx);
|
fp->nb_antennas_rx);
|
||||||
}
|
}
|
||||||
|
|
||||||
// proc->timestamp_rx = timestamp[0];
|
*proc_timestamp = timestamp[0];
|
||||||
|
|
||||||
} else if (packet_type == IF5_MOBIPASS) {
|
} else if (packet_type == IF5_MOBIPASS) {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,8 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
|
|
||||||
#define IF5_RRH_GW 0x0022
|
#define IF5_RRH_GW_DL 0x0022
|
||||||
|
#define IF5_RRH_GW_UL 0x0023
|
||||||
#define IF5_MOBIPASS 0xbffe
|
#define IF5_MOBIPASS 0xbffe
|
||||||
|
|
||||||
struct IF5_mobipass_header {
|
struct IF5_mobipass_header {
|
||||||
@@ -63,6 +64,6 @@ struct IF5_mobipass_header {
|
|||||||
typedef struct IF5_mobipass_header IF5_mobipass_header_t;
|
typedef struct IF5_mobipass_header IF5_mobipass_header_t;
|
||||||
#define sizeof_IF5_mobipass_header_t 14
|
#define sizeof_IF5_mobipass_header_t 14
|
||||||
|
|
||||||
void send_IF5(PHY_VARS_eNB*, eNB_rxtx_proc_t*, uint8_t*, uint16_t);
|
void send_IF5(PHY_VARS_eNB*, openair0_timestamp, int, uint8_t*, uint16_t);
|
||||||
|
|
||||||
void recv_IF5(PHY_VARS_eNB*, eNB_proc_t*, uint16_t);
|
void recv_IF5(PHY_VARS_eNB*, openair0_timestamp*, int, uint16_t);
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
#include "SCHED/extern.h"
|
#include "SCHED/extern.h"
|
||||||
|
|
||||||
#include "PHY/LTE_TRANSPORT/if4_tools.h"
|
#include "PHY/LTE_TRANSPORT/if4_tools.h"
|
||||||
|
#include "PHY/LTE_TRANSPORT/if5_tools.h"
|
||||||
|
|
||||||
#ifdef EMOS
|
#ifdef EMOS
|
||||||
#include "SCHED/phy_procedures_emos.h"
|
#include "SCHED/phy_procedures_emos.h"
|
||||||
@@ -2521,6 +2522,8 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
|
|||||||
|
|
||||||
int prach_rx;
|
int prach_rx;
|
||||||
|
|
||||||
|
uint8_t seqno=0;
|
||||||
|
|
||||||
uint16_t packet_type;
|
uint16_t packet_type;
|
||||||
uint32_t symbol_number=0;
|
uint32_t symbol_number=0;
|
||||||
uint32_t symbol_mask, symbol_mask_full;
|
uint32_t symbol_mask, symbol_mask_full;
|
||||||
@@ -2607,7 +2610,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
|
|||||||
if (eNB->node_function == NGFI_RRU_IF5) {
|
if (eNB->node_function == NGFI_RRU_IF5) {
|
||||||
/// **** send_IF5 of rxdata to BBU **** ///
|
/// **** send_IF5 of rxdata to BBU **** ///
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 1 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 1 );
|
||||||
//send_IF5(eNB, proc, );
|
send_IF5(eNB, proc->timestamp_rx, proc->subframe_rx, &seqno, IF5_RRH_GW_UL);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 0 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 0 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -506,7 +506,7 @@ static void* eNB_thread_rxtx( void* param ) {
|
|||||||
} else if (PHY_vars_eNB_g[0][proc->CC_id]->node_function == NGFI_RRU_IF5) {
|
} else if (PHY_vars_eNB_g[0][proc->CC_id]->node_function == NGFI_RRU_IF5) {
|
||||||
/// **** recv_IF5 of txdata from BBU **** ///
|
/// **** recv_IF5 of txdata from BBU **** ///
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 1 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 1 );
|
||||||
//recv_IF5();
|
recv_IF5(PHY_vars_eNB_g[0][proc->CC_id], &proc->timestamp_tx, proc->subframe_tx, IF5_RRH_GW_DL);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 0 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 0 );
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -562,7 +562,7 @@ static void* eNB_thread_rxtx( void* param ) {
|
|||||||
} else if (PHY_vars_eNB_g[0][proc->CC_id]->node_function == eNodeB_3GPP_BBU) {
|
} else if (PHY_vars_eNB_g[0][proc->CC_id]->node_function == eNodeB_3GPP_BBU) {
|
||||||
/// **** send_IF5 of txdata to RRH **** ///
|
/// **** send_IF5 of txdata to RRH **** ///
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 1 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 1 );
|
||||||
send_IF5(PHY_vars_eNB_g[0][proc->CC_id], proc, &seqno, IF5_RRH_GW);
|
send_IF5(PHY_vars_eNB_g[0][proc->CC_id], proc->timestamp_tx, proc->subframe_tx, &seqno, IF5_RRH_GW_DL);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 0 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 0 );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user