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
zzha zzha
OpenXG-RAN
Commits
dd6e1f9d
Commit
dd6e1f9d
authored
Jun 16, 2016
by
Sandeep Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for if4_tools for compilation
parent
b70b2ac4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
28 deletions
+32
-28
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+2
-1
openair1/PHY/LTE_TRANSPORT/if4_tools.c
openair1/PHY/LTE_TRANSPORT/if4_tools.c
+25
-24
openair1/PHY/LTE_TRANSPORT/if4_tools.h
openair1/PHY/LTE_TRANSPORT/if4_tools.h
+5
-3
No files found.
cmake_targets/CMakeLists.txt
View file @
dd6e1f9d
...
...
@@ -138,7 +138,7 @@ else (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
set
(
C_FLAGS_PROCESSOR
"
${
C_FLAGS_PROCESSOR
}
-mavx2"
)
endif
()
if
(
CPUINFO MATCHES
"sse4_1"
)
set
(
C_FLAGS_PROCESSOR
"
${
C_FLAGS_PROCESSOR
}
-msse4.1
-mavx2
"
)
set
(
C_FLAGS_PROCESSOR
"
${
C_FLAGS_PROCESSOR
}
-msse4.1"
)
endif
()
if
(
CPUINFO MATCHES
"ssse3"
)
set
(
C_FLAGS_PROCESSOR
"
${
C_FLAGS_PROCESSOR
}
-mssse3"
)
...
...
@@ -959,6 +959,7 @@ add_boolean_option(OAI_NW_DRIVER_USE_NETLINK True "????")
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/rar_tools.c
${
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/MODULATION/ofdm_mod.c
${
OPENAIR1_DIR
}
/PHY/MODULATION/slot_fep.c
${
OPENAIR1_DIR
}
/PHY/MODULATION/slot_fep_mbsfn.c
...
...
openair1/PHY/LTE_TRANSPORT/if4_tools.c
View file @
dd6e1f9d
...
...
@@ -42,21 +42,22 @@
#include "if4_tools.h"
#include <stdint.h>
#else
#include <stdint.h>
#include "PHY/defs.h"
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/TOOLS/ALAW/alaw_lut.h"
#endif
// Get device information
void
send_IF4
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
)
{
int
frame
=
proc
->
frame_tx
;
int
subframe
=
proc
->
subframe_tx
;
LTE_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms
;
int32_t
**
txdataF
=
eNB
->
common_vars
.
txdataF
[
0
];
uint16_t
symbol_id
,
element_id
;
uint16_t
db_fulllength
=
12
*
fp
->
N_RB_DL
;
uint16_t
db_halflength
=
db_fulllength
>>
1
;
int
slotoffsetF
=
(
subframe_tx
)
*
(
fp
->
ofdm_symbol_size
)
*
((
fp
->
Ncp
==
1
)
?
12
:
14
)
+
1
;
int
slotoffsetF
=
(
proc
->
subframe_tx
)
*
(
fp
->
ofdm_symbol_size
)
*
((
fp
->
Ncp
==
1
)
?
12
:
14
)
+
1
;
int
blockoffsetF
=
slotoffsetF
+
fp
->
ofdm_symbol_size
-
db_halflength
;
int16_t
*
data_block
=
(
int16_t
*
)
malloc
(
db_fulllength
*
sizeof
(
int16_t
));
...
...
@@ -72,15 +73,15 @@ void send_IF4(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc) {
// Do compression of the two parts and generate data blocks
for
(
element_id
=
0
;
element_id
<
db_halflength
;
element_id
++
)
{
data_block
[
element_id
]
=
lin2alaw
[
(
txdataF
[
0
][
blockoffsetF
+
element_id
]
)
&
0xffff
+
32768
];
data_block
[
element_id
]
|=
lin2alaw
[
(
txdataF
[
0
][
blockoffsetF
+
element_id
]
)
>>
16
+
32768
]
<<
8
;
data_block
[
element_id
]
=
lin2alaw
[
(
txdataF
[
0
][
blockoffsetF
+
element_id
]
&
0xffff
)
+
32768
];
data_block
[
element_id
]
|=
lin2alaw
[
(
txdataF
[
0
][
blockoffsetF
+
element_id
]
>>
16
)
+
32768
]
<<
8
;
data_block
[
element_id
+
db_halflength
]
=
lin2alaw
[
(
txdataF
[
0
][
slotoffsetF
+
element_id
]
)
&
0xffff
+
32768
];
data_block
[
element_id
+
db_halflength
]
|=
lin2alaw
[
(
txdataF
[
0
][
slotoffsetF
+
element_id
]
)
>>
16
+
32768
]
<<
8
;
data_block
[
element_id
+
db_halflength
]
=
lin2alaw
[
(
txdataF
[
0
][
slotoffsetF
+
element_id
]
&
0xffff
)
+
32768
];
data_block
[
element_id
+
db_halflength
]
|=
lin2alaw
[
(
txdataF
[
0
][
slotoffsetF
+
element_id
]
>>
16
)
+
32768
]
<<
8
;
}
// Update information in generated packet
dl_packet
->
frame_status
.
sym_num
=
i
;
dl_packet
->
frame_status
.
sym_num
=
symbol_id
;
// Write the packet(s) to the fronthaul
//if ((bytes_sent = dev->eth_dev.trx_write_func (&dev->eth_dev,
...
...
@@ -105,15 +106,15 @@ void send_IF4(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc) {
// Do compression of the two parts and generate data blocks
for
(
element_id
=
0
;
element_id
<
db_halflength
;
element_id
++
)
{
data_block
[
element_id
]
=
lin2alaw
[
(
txdataF
[
0
][
blockoffsetF
+
element_id
]
)
&
0xffff
+
32768
];
data_block
[
element_id
]
|=
lin2alaw
[
(
txdataF
[
0
][
blockoffsetF
+
element_id
]
)
>>
16
+
32768
]
<<
8
;
data_block
[
element_id
]
=
lin2alaw
[
(
txdataF
[
0
][
blockoffsetF
+
element_id
]
&
0xffff
)
+
32768
];
data_block
[
element_id
]
|=
lin2alaw
[
(
txdataF
[
0
][
blockoffsetF
+
element_id
]
>>
16
)
+
32768
]
<<
8
;
data_block
[
element_id
+
db_halflength
]
=
lin2alaw
[
(
txdataF
[
0
][
slotoffsetF
+
element_id
]
)
&
0xffff
+
32768
];
data_block
[
element_id
+
db_halflength
]
|=
lin2alaw
[
(
txdataF
[
0
][
slotoffsetF
+
element_id
]
)
>>
16
+
32768
]
<<
8
;
data_block
[
element_id
+
db_halflength
]
=
lin2alaw
[
(
txdataF
[
0
][
slotoffsetF
+
element_id
]
&
0xffff
)
+
32768
];
data_block
[
element_id
+
db_halflength
]
|=
lin2alaw
[
(
txdataF
[
0
][
slotoffsetF
+
element_id
]
>>
16
)
+
32768
]
<<
8
;
}
// Update information in generated packet
ul_packet
->
frame_status
.
sym_num
=
i
;
ul_packet
->
frame_status
.
sym_num
=
symbol_id
;
// Write the packet(s) to the fronthaul
...
...
@@ -129,23 +130,23 @@ void recv_IF4(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, uint16_t *packet_type, u
// Caller: RRU - DL *** handle RCC case - UL and PRACH ***
if
(
eNB
->
node_function
==
NGFI_RRU_IF4
)
{
for
(
i
=
0
;
i
<
fp
->
symbols_per_tti
;
i
++
)
{
//
for(i=0; i<fp->symbols_per_tti; i++) {
// Read packet(s) from the fronthaul
if
(
dev
->
eth_dev
.
trx_read_func
(
&
dev
->
eth_dev
,
timestamp_rx
,
rx_eNB
,
spp_eth
,
dev
->
eth_dev
.
openair0_cfg
->
rx_num_channels
)
<
0
)
{
perror
(
"RRU : ETHERNET read"
);
}
//
if (dev->eth_dev.trx_read_func (&dev->eth_dev,
//
timestamp_rx,
//
rx_eNB,
//
spp_eth,
//
dev->eth_dev.openair0_cfg->rx_num_channels
//
) < 0) {
//
perror("RRU : ETHERNET read");
//
}
// Apply reverse processing - decompression
// txAlawtolinear( Datablock )
// Generate and return the OFDM symbols (txdataF)
txDataF
}
//
txDataF
//
}
}
else
{
}
...
...
openair1/PHY/LTE_TRANSPORT/if4_tools.h
View file @
dd6e1f9d
...
...
@@ -38,6 +38,8 @@
* \warning
*/
#include <stdint.h>
/// Macro for IF4 packet type
#define IF4_PACKET_TYPE 0x080A
#define IF4_PULFFT 0x0019
...
...
@@ -105,7 +107,7 @@ struct IF4_dl_packet {
/// Frame Status
IF4_frame_status_t
frame_status
;
/// Data Blocks
u
int16_t
*
data_block
;
int16_t
*
data_block
;
/// Frame Check Sequence
uint32_t
fcs
;
};
...
...
@@ -143,7 +145,7 @@ struct IF4_ul_packet {
/// Gain 7
IF4_gain_t
gain7
;
/// Data Blocks
u
int16_t
*
data_block
;
int16_t
*
data_block
;
/// Frame Check Sequence
uint32_t
fcs
;
};
...
...
@@ -165,7 +167,7 @@ struct IF4_prach_packet {
/// LTE Prach Configuration
IF4_lte_prach_conf_t
prach_conf
;
/// Prach Data Block (one antenna)
u
int16_t
*
data_block
;
int16_t
*
data_block
;
/// Frame Check Sequence
uint32_t
fcs
;
};
...
...
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