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
promise
OpenXG-RAN
Commits
cfd45a1d
Commit
cfd45a1d
authored
Jul 04, 2016
by
Sandeep Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small fixes and mid save
parent
5ae509b2
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
123 additions
and
47 deletions
+123
-47
openair1/PHY/LTE_TRANSPORT/if4_tools.c
openair1/PHY/LTE_TRANSPORT/if4_tools.c
+0
-2
openair1/PHY/LTE_TRANSPORT/if4_tools.h
openair1/PHY/LTE_TRANSPORT/if4_tools.h
+1
-2
openair1/PHY/LTE_TRANSPORT/if5_mobipass_tools.c
openair1/PHY/LTE_TRANSPORT/if5_mobipass_tools.c
+51
-16
openair1/PHY/LTE_TRANSPORT/if5_mobipass_tools.h
openair1/PHY/LTE_TRANSPORT/if5_mobipass_tools.h
+49
-10
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+14
-1
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
+4
-4
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+4
-12
No files found.
openair1/PHY/LTE_TRANSPORT/if4_tools.c
View file @
cfd45a1d
...
@@ -38,8 +38,6 @@
...
@@ -38,8 +38,6 @@
* \warning
* \warning
*/
*/
#include <stdint.h>
#include "PHY/defs.h"
#include "PHY/defs.h"
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/TOOLS/ALAW/alaw_lut.h"
#include "PHY/TOOLS/ALAW/alaw_lut.h"
...
...
openair1/PHY/LTE_TRANSPORT/if4_tools.h
View file @
cfd45a1d
...
@@ -38,7 +38,6 @@
...
@@ -38,7 +38,6 @@
* \warning
* \warning
*/
*/
#include <stdint.h>
#include "PHY/defs.h"
#include "PHY/defs.h"
/// Macro for IF4 packet type
/// Macro for IF4 packet type
...
@@ -57,7 +56,7 @@ struct IF4_header {
...
@@ -57,7 +56,7 @@ struct IF4_header {
/// Frame Status
/// Frame Status
uint32_t
frame_status
;
uint32_t
frame_status
;
};
}
__attribute__
((
__packed__
))
;
typedef
struct
IF4_header
IF4_header_t
;
typedef
struct
IF4_header
IF4_header_t
;
#define sizeof_IF4_header_t 12
#define sizeof_IF4_header_t 12
...
...
openair1/PHY/LTE_TRANSPORT/if5_mobipass_tools.c
View file @
cfd45a1d
/*******************************************************************************
#include <stdint.h>
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*! \file PHY/LTE_TRANSPORT/if5_mobipass_tools.c
* \brief
* \author S. Sandeep Kumar, Raymond Knopp
* \date 2016
* \version 0.1
* \company Eurecom
* \email: ee13b1025@iith.ac.in, knopp@eurecom.fr
* \note
* \warning
*/
#include "PHY/defs.h"
#include "PHY/defs.h"
#include "PHY/LTE_TRANSPORT/if5_mobipass_tools.h"
#include "PHY/LTE_TRANSPORT/if5_mobipass_tools.h"
...
@@ -7,36 +44,35 @@
...
@@ -7,36 +44,35 @@
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
uint8_t
send_IF5
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
uint8_t
init_seq
)
{
void
send_IF5
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
uint8_t
*
seqno
)
{
uint8_t
seqno
=
init_seq
;
LTE_DL_FRAME_PARMS
*
fp
=&
eNB
->
frame_parms
;
void
*
txp
[
2
];
void
*
txp
[
fp
->
nb_antennas_tx
];
void
*
tx_buffer
=
NULL
;
void
*
tx_buffer
=
NULL
;
__m128i
*
data_block
=
NULL
,
*
main_data_block
=
NULL
;
__m128i
*
data_block
=
NULL
,
*
data_block_head
=
NULL
;
__m128i
*
txp128
;
__m128i
*
txp128
;
__m128i
t0
,
t1
;
__m128i
t0
,
t1
;
uint16_t
packet_id
=
0
,
i
;
uint16_t
packet_id
=
0
,
i
;
uint16_t
db_fulllength
=
640
;
uint16_t
db_fulllength
=
640
;
tx_buffer
=
memalign
(
16
,
MAC_HEADER_SIZE_BYTES
+
sizeof_IF5_mobipass_header_t
+
db_fulllength
*
sizeof
(
int16_t
));
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
);
IF5_mobipass_header_t
*
header
=
(
IF5_mobipass_header_t
*
)(
tx_buffer
+
MAC_HEADER_SIZE_BYTES
);
data_block
=
(
__m128i
*
)(
tx_buffer
+
MAC_HEADER_SIZE_BYTES
+
sizeof_IF5_mobipass_header_t
+
4
);
data_block_head
=
(
__m128i
*
)(
tx_buffer
+
MAC_HEADER_SIZE_BYTES
+
sizeof_IF5_mobipass_header_t
+
4
);
main_data_block
=
data_block
;
header
->
flags
=
0
;
header
->
flags
=
0
;
header
->
fifo_status
=
0
;
header
->
fifo_status
=
0
;
header
->
seqno
=
*
seqno
;
header
->
ack
=
0
;
header
->
ack
=
0
;
header
->
seqno
=
seqno
;
header
->
word0
=
0
;
header
->
rsvd
=
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
][
proc
->
subframe_tx
*
eNB
->
frame_parms
.
samples_per_tti
];
txp128
=
(
__m128i
*
)
txp
[
0
];
txp128
=
(
__m128i
*
)
txp
[
0
];
for
(
packet_id
=
0
;
packet_id
<
(
7680
*
2
)
/
640
;
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
*
640
;
header
->
time_stamp
=
proc
->
timestamp_tx
+
packet_id
*
db_fulllength
;
data_block
=
main_data_block
;
data_block
=
data_block_head
;
for
(
i
=
0
;
i
<
db_fulllength
>>
3
;
i
+=
2
)
{
for
(
i
=
0
;
i
<
db_fulllength
>>
3
;
i
+=
2
)
{
t0
=
_mm_srli_epi16
(
*
txp128
++
,
4
);
t0
=
_mm_srli_epi16
(
*
txp128
++
,
4
);
...
@@ -58,8 +94,7 @@ uint8_t send_IF5(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, uint8_t init_seq) {
...
@@ -58,8 +94,7 @@ uint8_t send_IF5(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, uint8_t init_seq) {
header
->
seqno
+=
1
;
header
->
seqno
+=
1
;
}
}
seqno
=
header
->
seqno
;
*
seqno
=
header
->
seqno
;
free
(
tx_buffer
);
free
(
tx_buffer
);
return
(
seqno
)
;
return
;
}
}
openair1/PHY/LTE_TRANSPORT/if5_mobipass_tools.h
View file @
cfd45a1d
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*! \file PHY/LTE_TRANSPORT/if5_mobipass_tools.h
* \brief
* \author S. Sandeep Kumar, Raymond Knopp
* \date 2016
* \version 0.1
* \company Eurecom
* \email: ee13b1025@iith.ac.in, knopp@eurecom.fr
* \note
* \warning
*/
#include <stdint.h>
#include <stdint.h>
#include "PHY/defs.h"
#include "PHY/defs.h"
#define IF5_MOBIPASS 0x
0050
#define IF5_MOBIPASS 0x
bffe
struct
IF5_mobipass_header
{
struct
IF5_mobipass_header
{
///
Type
///
uint16_t
flags
;
uint16_t
flags
;
///
Sub-Type
///
uint16_t
fifo_status
;
uint16_t
fifo_status
;
///
Reserved
///
uint8_t
seqno
;
uint8_t
seqno
;
///
uint8_t
ack
;
uint8_t
ack
;
///
uint32_t
rsvd
;
uint32_t
word0
;
///
Frame Status
///
uint32_t
time_stamp
;
uint32_t
time_stamp
;
}
__attribute__
((
__packed__
));
}
__attribute__
((
__packed__
));
...
@@ -23,4 +62,4 @@ struct IF5_mobipass_header {
...
@@ -23,4 +62,4 @@ 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
uint8_t
send_IF5
(
PHY_VARS_eNB
*
,
eNB_rxtx_proc_t
*
,
uint8_t
);
void
send_IF5
(
PHY_VARS_eNB
*
,
eNB_rxtx_proc_t
*
,
uint8_t
*
);
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
cfd45a1d
...
@@ -2525,6 +2525,10 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
...
@@ -2525,6 +2525,10 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
uint32_t
symbol_number
=
0
;
uint32_t
symbol_number
=
0
;
uint32_t
symbol_mask
,
symbol_mask_full
;
uint32_t
symbol_mask
,
symbol_mask_full
;
struct
timespec
time_req
,
time_rem
;
time_req
.
tv_sec
=
0
;
time_req
.
tv_nsec
=
900000
;
if
(
subframe
==
9
)
{
if
(
subframe
==
9
)
{
subframe
=
0
;
subframe
=
0
;
frame
++
;
frame
++
;
...
@@ -2583,7 +2587,16 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
...
@@ -2583,7 +2587,16 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
}
else
if
(
eNB
->
node_function
==
eNodeB_3GPP_BBU
)
{
// acquisition from IF
}
else
if
(
eNB
->
node_function
==
eNodeB_3GPP_BBU
)
{
// acquisition from IF
/// **** trx_read_func from IF device **** ///
/// **** trx_read_func from IF device **** ///
nanosleep
(
&
time_req
,
&
time_rem
);
proc
->
timestamp_rx
+=
fp
->
samples_per_tti
;
proc
->
frame_rx
=
(
proc
->
timestamp_rx
/
(
fp
->
samples_per_tti
*
10
))
&
1023
;
proc
->
subframe_rx
=
(
proc
->
timestamp_rx
/
fp
->
samples_per_tti
)
%
10
;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS
,
proc
->
timestamp_rx
&
0xffffffff
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX_ENB
,
proc
->
frame_rx
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX_ENB
,
proc
->
subframe_rx
);
}
}
...
...
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
View file @
cfd45a1d
...
@@ -124,11 +124,11 @@ int eth_socket_init_raw(openair0_device *device) {
...
@@ -124,11 +124,11 @@ int eth_socket_init_raw(openair0_device *device) {
/* Construct the Ethernet header */
/* Construct the Ethernet header */
ether_aton_r
(
local_mac
,
(
struct
ether_addr
*
)(
&
(
eth
->
eh
.
ether_shost
)));
ether_aton_r
(
local_mac
,
(
struct
ether_addr
*
)(
&
(
eth
->
eh
.
ether_shost
)));
ether_aton_r
(
remote_mac
,
(
struct
ether_addr
*
)(
&
(
eth
->
eh
.
ether_dhost
)));
ether_aton_r
(
remote_mac
,
(
struct
ether_addr
*
)(
&
(
eth
->
eh
.
ether_dhost
)));
// if (((*) device->priv)
->flags == ETH_RAW_IF5_MOBIPASS) {
if
(
eth
->
flags
==
ETH_RAW_IF5_MOBIPASS
)
{
eth
->
eh
.
ether_type
=
htons
(
0xbffe
);
eth
->
eh
.
ether_type
=
htons
(
0xbffe
);
//
} else {
}
else
{
//
eth->eh.ether_type = htons((short)device->openair0_cfg->my_port);
eth
->
eh
.
ether_type
=
htons
((
short
)
device
->
openair0_cfg
->
my_port
);
//
}
}
printf
(
"[%s] binding mod_%d to hardware address %x:%x:%x:%x:%x:%x
\n
"
,((
device
->
host_type
==
BBU_HOST
)
?
"BBU"
:
"RRH"
),
Mod_id
,
eth
->
eh
.
ether_shost
[
0
],
eth
->
eh
.
ether_shost
[
1
],
eth
->
eh
.
ether_shost
[
2
],
eth
->
eh
.
ether_shost
[
3
],
eth
->
eh
.
ether_shost
[
4
],
eth
->
eh
.
ether_shost
[
5
]);
printf
(
"[%s] binding mod_%d to hardware address %x:%x:%x:%x:%x:%x
\n
"
,((
device
->
host_type
==
BBU_HOST
)
?
"BBU"
:
"RRH"
),
Mod_id
,
eth
->
eh
.
ether_shost
[
0
],
eth
->
eh
.
ether_shost
[
1
],
eth
->
eh
.
ether_shost
[
2
],
eth
->
eh
.
ether_shost
[
3
],
eth
->
eh
.
ether_shost
[
4
],
eth
->
eh
.
ether_shost
[
5
]);
return
0
;
return
0
;
...
...
targets/RT/USER/lte-enb.c
View file @
cfd45a1d
...
@@ -302,6 +302,8 @@ static void* eNB_thread_rxtx( void* param ) {
...
@@ -302,6 +302,8 @@ static void* eNB_thread_rxtx( void* param ) {
uint16_t
packet_type
;
uint16_t
packet_type
;
uint32_t
symbol_number
=
0
;
uint32_t
symbol_number
=
0
;
uint8_t
seqno
=
0
;
if
(
opp_enabled
==
1
)
{
if
(
opp_enabled
==
1
)
{
snprintf
(
tx_time_name
,
100
,
"/tmp/%s_tx_time_thread_sf"
,
"eNB"
);
snprintf
(
tx_time_name
,
100
,
"/tmp/%s_tx_time_thread_sf"
,
"eNB"
);
tx_time_file
=
fopen
(
tx_time_name
,
"w"
);
tx_time_file
=
fopen
(
tx_time_name
,
"w"
);
...
@@ -548,7 +550,7 @@ static void* eNB_thread_rxtx( void* param ) {
...
@@ -548,7 +550,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
)
{
/// **** trx_write_func to IF device **** ///
/// **** trx_write_func to IF device **** ///
// send_IF5(PHY_vars_eNB_g[0][proc->CC_id], proc, 0
);
send_IF5
(
PHY_vars_eNB_g
[
0
][
proc
->
CC_id
],
proc
,
&
seqno
);
}
else
{
}
else
{
/// **** send_IF4 of txdataF to RRU **** ///
/// **** send_IF4 of txdataF to RRU **** ///
...
@@ -626,10 +628,8 @@ static void* eNB_thread_rx_common( void* param ) {
...
@@ -626,10 +628,8 @@ static void* eNB_thread_rx_common( void* param ) {
PHY_VARS_eNB
*
eNB
=
PHY_vars_eNB_g
[
0
][
proc
->
CC_id
];
PHY_VARS_eNB
*
eNB
=
PHY_vars_eNB_g
[
0
][
proc
->
CC_id
];
LTE_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms
;
LTE_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms
;
uint8_t
seqno
=
0
;
FILE
*
rx_time_file
=
NULL
;
FILE
*
rx_time_file
=
NULL
;
char
rx_time_name
[
101
];
char
rx_time_name
[
101
];
int
i
;
struct
timespec
wait
;
struct
timespec
wait
;
wait
.
tv_sec
=
0
;
wait
.
tv_sec
=
0
;
...
@@ -765,14 +765,6 @@ static void* eNB_thread_rx_common( void* param ) {
...
@@ -765,14 +765,6 @@ static void* eNB_thread_rx_common( void* param ) {
LOG_E
(
HW
,
"Could not start the RF device
\n
"
);
LOG_E
(
HW
,
"Could not start the RF device
\n
"
);
}
}
// proc->proc_rxtx[0].timestamp_tx = 0;
// seqno = send_IF5(eNB, &proc->proc_rxtx[0], 0);
// for (i=0; i<1000;i++) {
// seqno = send_IF5(eNB, &proc->proc_rxtx[0], seqno);
// proc->proc_rxtx[0].timestamp_tx += 7680*2;
// }
// This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices
// This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices
while
(
!
oai_exit
)
{
while
(
!
oai_exit
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX
,
0
);
...
...
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