Commit b0766d70 authored by Raymond Knopp's avatar Raymond Knopp

added prach buffer for if4p5 processing in RRU. This fixed a critical bug...

added prach buffer for if4p5 processing in RRU. This fixed a critical bug which was seen for bandwidths greater than 5 MHz.  RRU tested with 5/10 MHz on 1.5 GHz Atom.
parent 54057dce
...@@ -40,10 +40,11 @@ ...@@ -40,10 +40,11 @@
void send_IF4p5(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; LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
int32_t **txdataF = (eNB->CC_id==0) ? eNB->common_vars.txdataF[0] : PHY_vars_eNB_g[0][0]->common_vars.txdataF[0]; int32_t **txdataF = (eNB->CC_id==0) ? eNB->common_vars.txdataF[0] : PHY_vars_eNB_g[0][0]->common_vars.txdataF[0];
int32_t **rxdataF = eNB->common_vars.rxdataF[0]; int32_t **rxdataF = eNB->common_vars.rxdataF[0];
int16_t **rxsigF = eNB->prach_vars.rxsigF; int16_t **rxsigF = eNB->prach_vars.rxsigF;
void *tx_buffer = eNB->ifbuffer.tx; void *tx_buffer = eNB->ifbuffer.tx;
void *tx_buffer_prach = eNB->ifbuffer.tx_prach;
uint16_t symbol_id=0, element_id=0; uint16_t symbol_id=0, element_id=0;
uint16_t db_fulllength, db_halflength; uint16_t db_fulllength, db_halflength;
...@@ -145,27 +146,27 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type ...@@ -145,27 +146,27 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type
db_fulllength = PRACH_HARD_CODED_NUM_SAMPLES; db_fulllength = PRACH_HARD_CODED_NUM_SAMPLES;
if (eth->flags == ETH_RAW_IF4p5_MODE) { if (eth->flags == ETH_RAW_IF4p5_MODE) {
packet_header = (IF4p5_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES); packet_header = (IF4p5_header_t *)(tx_buffer_prach + MAC_HEADER_SIZE_BYTES);
data_block = (uint16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t); data_block = (uint16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t);
} else { } else {
packet_header = (IF4p5_header_t *)(tx_buffer); packet_header = (IF4p5_header_t *)(tx_buffer_prach);
data_block = (uint16_t*)(tx_buffer + sizeof_IF4p5_header_t); data_block = (uint16_t*)(tx_buffer_prach + sizeof_IF4p5_header_t);
} }
gen_IF4p5_prach_header(packet_header, frame, subframe); gen_IF4p5_prach_header(packet_header, frame, subframe);
if (eth->flags == ETH_RAW_IF4p5_MODE) { if (eth->flags == ETH_RAW_IF4p5_MODE) {
memcpy((int16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t), memcpy((int16_t*)(tx_buffer_prach + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t),
(&rxsigF[0][k]), (&rxsigF[0][k]),
PRACH_BLOCK_SIZE_BYTES); PRACH_BLOCK_SIZE_BYTES);
} else { } else {
memcpy((int16_t*)(tx_buffer + sizeof_IF4p5_header_t), memcpy((int16_t*)(tx_buffer_prach + sizeof_IF4p5_header_t),
(&rxsigF[0][k]), (&rxsigF[0][k]),
PRACH_BLOCK_SIZE_BYTES); PRACH_BLOCK_SIZE_BYTES);
} }
if ((eNB->ifdevice.trx_write_func(&eNB->ifdevice, if ((eNB->ifdevice.trx_write_func(&eNB->ifdevice,
symbol_id, symbol_id,
&tx_buffer, &tx_buffer_prach,
db_fulllength, db_fulllength,
1, 1,
IF4p5_PRACH)) < 0) { IF4p5_PRACH)) < 0) {
...@@ -331,10 +332,12 @@ void malloc_IF4p5_buffer(PHY_VARS_eNB *eNB) { ...@@ -331,10 +332,12 @@ void malloc_IF4p5_buffer(PHY_VARS_eNB *eNB) {
// Keep the size large enough // Keep the size large enough
eth_state_t *eth = (eth_state_t*) (eNB->ifdevice.priv); eth_state_t *eth = (eth_state_t*) (eNB->ifdevice.priv);
if (eth->flags == ETH_RAW_IF4p5_MODE) { if (eth->flags == ETH_RAW_IF4p5_MODE) {
eNB->ifbuffer.tx = malloc(RAW_IF4p5_PRACH_SIZE_BYTES); eNB->ifbuffer.tx = malloc(RAW_IF4p5_PRACH_SIZE_BYTES);
eNB->ifbuffer.rx = malloc(RAW_IF4p5_PRACH_SIZE_BYTES); eNB->ifbuffer.tx_prach = malloc(RAW_IF4p5_PRACH_SIZE_BYTES);
eNB->ifbuffer.rx = malloc(RAW_IF4p5_PRACH_SIZE_BYTES);
} else { } else {
eNB->ifbuffer.tx = malloc(UDP_IF4p5_PRACH_SIZE_BYTES); eNB->ifbuffer.tx = malloc(UDP_IF4p5_PRACH_SIZE_BYTES);
eNB->ifbuffer.rx = malloc(UDP_IF4p5_PRACH_SIZE_BYTES); eNB->ifbuffer.tx_prach = malloc(UDP_IF4p5_PRACH_SIZE_BYTES);
eNB->ifbuffer.rx = malloc(UDP_IF4p5_PRACH_SIZE_BYTES);
} }
} }
...@@ -249,6 +249,8 @@ typedef struct { ...@@ -249,6 +249,8 @@ typedef struct {
typedef struct { typedef struct {
//! Tx buffer for if device //! Tx buffer for if device
void *tx; void *tx;
//! Tx buffer (PRACH) for if device
void *tx_prach;
//! Rx buffer for if device //! Rx buffer for if device
void *rx; void *rx;
} if_buffer_t; } if_buffer_t;
......
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