Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG-RAN
Commits
b5fbdbe2
Commit
b5fbdbe2
authored
Jul 06, 2016
by
Sandeep Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test if5 send from BBU with new spp
parent
8dcc3ddb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
174 additions
and
6 deletions
+174
-6
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair1/PHY/LTE_TRANSPORT/if5_tools.c
openair1/PHY/LTE_TRANSPORT/if5_tools.c
+165
-0
openair1/PHY/LTE_TRANSPORT/if5_tools.h
openair1/PHY/LTE_TRANSPORT/if5_tools.h
+5
-2
targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h
targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h
+1
-1
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+2
-2
No files found.
cmake_targets/CMakeLists.txt
View file @
b5fbdbe2
...
...
@@ -963,7 +963,7 @@ set(PHY_SRC
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/print_stats.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/initial_sync.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/if4_tools.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/if5_
mobipass_
tools.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/if5_tools.c
${
OPENAIR1_DIR
}
/PHY/MODULATION/ofdm_mod.c
${
OPENAIR1_DIR
}
/PHY/MODULATION/slot_fep.c
${
OPENAIR1_DIR
}
/PHY/MODULATION/slot_fep_mbsfn.c
...
...
openair1/PHY/LTE_TRANSPORT/if5_
mobipass_
tools.c
→
openair1/PHY/LTE_TRANSPORT/if5_tools.c
View file @
b5fbdbe2
...
...
@@ -27,7 +27,7 @@
*******************************************************************************/
/*! \file PHY/LTE_TRANSPORT/if5_
mobipass_
tools.c
/*! \file PHY/LTE_TRANSPORT/if5_tools.c
* \brief
* \author S. Sandeep Kumar, Raymond Knopp
* \date 2016
...
...
@@ -43,57 +43,123 @@
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
void
send_IF5
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
uint8_t
*
seqno
)
{
void
send_IF5
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
uint8_t
*
seqno
,
uint16_t
packet_type
)
{
LTE_DL_FRAME_PARMS
*
fp
=&
eNB
->
frame_parms
;
void
*
txp
[
fp
->
nb_antennas_tx
];
void
*
tx_buffer
=
NULL
;
__m128i
*
data_block
=
NULL
,
*
data_block_head
=
NULL
;
__m128i
*
txp128
;
__m128i
t0
,
t1
;
uint16_t
packet_id
=
0
,
i
;
uint16_t
db_fulllength
=
640
;
tx_buffer
=
memalign
(
16
,
MAC_HEADER_SIZE_BYTES
+
sizeof_IF5_mobipass_header_t
+
db_fulllength
*
sizeof
(
int16_t
));
IF5_mobipass_header_t
*
header
=
(
IF5_mobipass_header_t
*
)(
tx_buffer
+
MAC_HEADER_SIZE_BYTES
);
data_block_head
=
(
__m128i
*
)(
tx_buffer
+
MAC_HEADER_SIZE_BYTES
+
sizeof_IF5_mobipass_header_t
+
4
);
uint16_t
packet_id
=
0
,
i
=
0
;
header
->
flags
=
0
;
header
->
fifo_status
=
0
;
header
->
seqno
=
*
seqno
;
header
->
ack
=
0
;
header
->
word0
=
0
;
txp
[
0
]
=
(
void
*
)
&
eNB
->
common_vars
.
txdata
[
0
][
0
][
proc
->
subframe_tx
*
eNB
->
frame_parms
.
samples_per_tti
];
txp128
=
(
__m128i
*
)
txp
[
0
];
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
;
data_block
=
data_block_head
;
for
(
i
=
0
;
i
<
db_fulllength
>>
3
;
i
+=
2
)
{
t0
=
_mm_srli_epi16
(
*
txp128
++
,
4
);
t1
=
_mm_srli_epi16
(
*
txp128
++
,
4
);
*
data_block
++
=
_mm_packs_epi16
(
t0
,
t1
);
}
if
(
packet_type
==
IF5_RRH_GW
)
{
unsigned
int
spp_eth
=
eNB
->
ifdevice
.
openair0_cfg
->
samples_per_packet
;
unsigned
int
spsf
=
eNB
->
ifdevice
.
openair0_cfg
->
samples_per_frame
/
10
;
// Write the packet to the fronthaul
if
((
eNB
->
ifdevice
.
trx_write_func
(
&
eNB
->
ifdevice
,
packet_id
,
&
tx_buffer
,
db_fulllength
,
1
,
IF5_MOBIPASS
))
<
0
)
{
perror
(
"ETHERNET write for IF5_MOBIPASS
\n
"
);
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
];
for
(
packet_id
=
0
;
packet_id
<
spsf
/
spp_eth
;
packet_id
++
)
{
eNB
->
ifdevice
.
trx_write_func
(
&
eNB
->
ifdevice
,
(
proc
->
timestamp_tx
-
eNB
->
ifdevice
.
openair0_cfg
->
tx_sample_advance
+
packet_id
*
spp_eth
),
txp
,
spp_eth
,
fp
->
nb_antennas_tx
,
0
);
}
printf
(
"SPP = %d and packet_id %d
\n
"
,
spp_eth
,
packet_id
);
header
->
seqno
+=
1
;
}
}
else
if
(
packet_type
==
IF5_MOBIPASS
)
{
uint16_t
db_fulllength
=
640
;
__m128i
*
data_block
=
NULL
,
*
data_block_head
=
NULL
;
__m128i
*
txp128
;
__m128i
t0
,
t1
;
tx_buffer
=
memalign
(
16
,
MAC_HEADER_SIZE_BYTES
+
sizeof_IF5_mobipass_header_t
+
db_fulllength
*
sizeof
(
int16_t
));
IF5_mobipass_header_t
*
header
=
(
IF5_mobipass_header_t
*
)(
tx_buffer
+
MAC_HEADER_SIZE_BYTES
);
data_block_head
=
(
__m128i
*
)(
tx_buffer
+
MAC_HEADER_SIZE_BYTES
+
sizeof_IF5_mobipass_header_t
+
4
);
header
->
flags
=
0
;
header
->
fifo_status
=
0
;
header
->
seqno
=
*
seqno
;
header
->
ack
=
0
;
header
->
word0
=
0
;
txp
[
0
]
=
(
void
*
)
&
eNB
->
common_vars
.
txdata
[
0
][
0
][
proc
->
subframe_tx
*
eNB
->
frame_parms
.
samples_per_tti
];
txp128
=
(
__m128i
*
)
txp
[
0
];
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
;
data_block
=
data_block_head
;
for
(
i
=
0
;
i
<
db_fulllength
>>
3
;
i
+=
2
)
{
t0
=
_mm_srli_epi16
(
*
txp128
++
,
4
);
t1
=
_mm_srli_epi16
(
*
txp128
++
,
4
);
*
data_block
++
=
_mm_packs_epi16
(
t0
,
t1
);
}
// Write the packet to the fronthaul
if
((
eNB
->
ifdevice
.
trx_write_func
(
&
eNB
->
ifdevice
,
packet_id
,
&
tx_buffer
,
db_fulllength
,
1
,
IF5_MOBIPASS
))
<
0
)
{
perror
(
"ETHERNET write for IF5_MOBIPASS
\n
"
);
}
header
->
seqno
+=
1
;
}
*
seqno
=
header
->
seqno
;
}
else
{
AssertFatal
(
1
==
0
,
"send_IF5 - Unknown packet_type %x"
,
packet_type
);
}
*
seqno
=
header
->
seqno
;
free
(
tx_buffer
);
return
;
}
void
recv_IF5
(
PHY_VARS_eNB
*
eNB
,
eNB_proc_t
*
proc
,
uint16_t
packet_type
)
{
LTE_DL_FRAME_PARMS
*
fp
=&
eNB
->
frame_parms
;
void
*
rxp
[
fp
->
nb_antennas_rx
];
void
*
rx_buffer
=
NULL
;
uint16_t
packet_id
=
0
,
i
=
0
;
if
(
packet_type
==
IF5_RRH_GW
)
{
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_rx
;
i
++
)
rxp
[
i
]
=
(
void
*
)
&
eNB
->
common_vars
.
rxdata
[
0
][
i
][
proc
->
subframe_rx
*
fp
->
samples_per_tti
];
for
(
packet_id
=
0
;
packet_id
<
spsf
/
spp_eth
;
packet_id
++
)
{
eNB
->
ifdevice
.
trx_read_func
(
&
eNB
->
ifdevice
,
&
timestamp
[
packet_id
],
rxp
,
spp_eth
,
fp
->
nb_antennas_rx
);
}
// proc->timestamp_rx = timestamp[0];
}
else
if
(
packet_type
==
IF5_MOBIPASS
)
{
}
else
{
AssertFatal
(
1
==
0
,
"recv_IF5 - Unknown packet_type %x"
,
packet_type
);
}
free
(
rx_buffer
);
return
;
}
openair1/PHY/LTE_TRANSPORT/if5_
mobipass_
tools.h
→
openair1/PHY/LTE_TRANSPORT/if5_tools.h
View file @
b5fbdbe2
...
...
@@ -27,7 +27,7 @@
*******************************************************************************/
/*! \file PHY/LTE_TRANSPORT/if5_
mobipass_
tools.h
/*! \file PHY/LTE_TRANSPORT/if5_tools.h
* \brief
* \author S. Sandeep Kumar, Raymond Knopp
* \date 2016
...
...
@@ -41,6 +41,7 @@
#include <stdint.h>
#include "PHY/defs.h"
#define IF5_RRH_GW 0x0022
#define IF5_MOBIPASS 0xbffe
struct
IF5_mobipass_header
{
...
...
@@ -62,4 +63,6 @@ struct IF5_mobipass_header {
typedef
struct
IF5_mobipass_header
IF5_mobipass_header_t
;
#define sizeof_IF5_mobipass_header_t 14
void
send_IF5
(
PHY_VARS_eNB
*
,
eNB_rxtx_proc_t
*
,
uint8_t
*
);
void
send_IF5
(
PHY_VARS_eNB
*
,
eNB_rxtx_proc_t
*
,
uint8_t
*
,
uint16_t
);
void
recv_IF5
(
PHY_VARS_eNB
*
,
eNB_proc_t
*
,
uint16_t
);
targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h
View file @
b5fbdbe2
...
...
@@ -42,7 +42,7 @@
#include <stdint.h>
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/LTE_TRANSPORT/if5_
mobipass_
tools.h"
#include "PHY/LTE_TRANSPORT/if5_tools.h"
// ETH transport preference modes
#define ETH_UDP_MODE 0
...
...
targets/RT/USER/lte-enb.c
View file @
b5fbdbe2
...
...
@@ -69,7 +69,7 @@
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/LTE_TRANSPORT/if5_
mobipass_
tools.h"
#include "PHY/LTE_TRANSPORT/if5_tools.h"
#include "PHY/extern.h"
#include "SCHED/extern.h"
...
...
@@ -549,7 +549,7 @@ static void* eNB_thread_rxtx( void* param ) {
}
else
if
(
PHY_vars_eNB_g
[
0
][
proc
->
CC_id
]
->
node_function
==
eNodeB_3GPP_BBU
)
{
/// **** trx_write_func to IF device **** ///
send_IF5
(
PHY_vars_eNB_g
[
0
][
proc
->
CC_id
],
proc
,
&
seqno
);
send_IF5
(
PHY_vars_eNB_g
[
0
][
proc
->
CC_id
],
proc
,
&
seqno
,
IF5_RRH_GW
);
}
else
{
/// **** send_IF4 of txdataF to RRU **** ///
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment