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
alex037yang
OpenXG-RAN
Commits
848f7846
Commit
848f7846
authored
Jan 13, 2017
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addition of IF4p5 ULTICK packet for TDD fronthaul
parent
de8ab34d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
83 additions
and
49 deletions
+83
-49
openair1/PHY/LTE_TRANSPORT/if4_tools.c
openair1/PHY/LTE_TRANSPORT/if4_tools.c
+40
-27
openair1/PHY/LTE_TRANSPORT/if4_tools.h
openair1/PHY/LTE_TRANSPORT/if4_tools.h
+2
-1
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
+2
-0
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
+2
-0
targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h
targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h
+2
-0
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+11
-1
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+24
-20
No files found.
openair1/PHY/LTE_TRANSPORT/if4_tools.c
View file @
848f7846
...
@@ -100,7 +100,8 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type
...
@@ -100,7 +100,8 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type
slotoffsetF
+=
fp
->
ofdm_symbol_size
;
slotoffsetF
+=
fp
->
ofdm_symbol_size
;
blockoffsetF
+=
fp
->
ofdm_symbol_size
;
blockoffsetF
+=
fp
->
ofdm_symbol_size
;
}
}
}
else
if
(
packet_type
==
IF4p5_PULFFT
)
{
}
else
if
((
packet_type
==
IF4p5_PULFFT
)
||
(
packet_type
==
IF4p5_PULTICK
)){
db_fulllength
=
12
*
fp
->
N_RB_UL
;
db_fulllength
=
12
*
fp
->
N_RB_UL
;
db_halflength
=
(
db_fulllength
)
>>
1
;
db_halflength
=
(
db_fulllength
)
>>
1
;
slotoffsetF
=
1
;
slotoffsetF
=
1
;
...
@@ -113,33 +114,45 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type
...
@@ -113,33 +114,45 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type
packet_header
=
(
IF4p5_header_t
*
)(
tx_buffer
);
packet_header
=
(
IF4p5_header_t
*
)(
tx_buffer
);
data_block
=
(
uint16_t
*
)(
tx_buffer
+
sizeof_IF4p5_header_t
);
data_block
=
(
uint16_t
*
)(
tx_buffer
+
sizeof_IF4p5_header_t
);
}
}
gen_IF4p5_ul_header
(
packet_header
,
frame
,
subframe
);
gen_IF4p5_ul_header
(
packet_header
,
packet_type
,
frame
,
subframe
);
for
(
symbol_id
=
0
;
symbol_id
<
fp
->
symbols_per_tti
;
symbol_id
++
)
{
if
(
packet_type
==
IF4p5_PULFFT
)
{
LOG_D
(
PHY
,
"IF4p5_PULFFT: frame %d, subframe %d, symbol %d
\n
"
,
frame
,
subframe
,
symbol_id
);
for
(
symbol_id
=
0
;
symbol_id
<
fp
->
symbols_per_tti
;
symbol_id
++
)
{
for
(
element_id
=
0
;
element_id
<
db_halflength
;
element_id
++
)
{
LOG_D
(
PHY
,
"IF4p5_PULFFT: frame %d, subframe %d, symbol %d
\n
"
,
frame
,
subframe
,
symbol_id
);
i
=
(
uint16_t
*
)
&
rxdataF
[
0
][
blockoffsetF
+
element_id
];
for
(
element_id
=
0
;
element_id
<
db_halflength
;
element_id
++
)
{
data_block
[
element_id
]
=
((
uint16_t
)
lin2alaw
[
*
i
])
|
(
lin2alaw
[
*
(
i
+
1
)]
<<
8
);
i
=
(
uint16_t
*
)
&
rxdataF
[
0
][
blockoffsetF
+
element_id
];
data_block
[
element_id
]
=
((
uint16_t
)
lin2alaw
[
*
i
])
|
(
lin2alaw
[
*
(
i
+
1
)]
<<
8
);
i
=
(
uint16_t
*
)
&
rxdataF
[
0
][
slotoffsetF
+
element_id
];
data_block
[
element_id
+
db_halflength
]
=
((
uint16_t
)
lin2alaw
[
*
i
])
|
(
lin2alaw
[
*
(
i
+
1
)]
<<
8
);
i
=
(
uint16_t
*
)
&
rxdataF
[
0
][
slotoffsetF
+
element_id
];
}
data_block
[
element_id
+
db_halflength
]
=
((
uint16_t
)
lin2alaw
[
*
i
])
|
(
lin2alaw
[
*
(
i
+
1
)]
<<
8
);
}
packet_header
->
frame_status
&=
~
(
0x000f
<<
26
);
packet_header
->
frame_status
|=
(
symbol_id
&
0x000f
)
<<
26
;
packet_header
->
frame_status
&=
~
(
0x000f
<<
26
);
packet_header
->
frame_status
|=
(
symbol_id
&
0x000f
)
<<
26
;
if
((
eNB
->
ifdevice
.
trx_write_func
(
&
eNB
->
ifdevice
,
symbol_id
,
&
tx_buffer
,
db_fulllength
,
1
,
IF4p5_PULFFT
))
<
0
)
{
perror
(
"ETHERNET write for IF4p5_PULFFT
\n
"
);
}
slotoffsetF
+=
fp
->
ofdm_symbol_size
;
blockoffsetF
+=
fp
->
ofdm_symbol_size
;
}
}
else
{
if
((
eNB
->
ifdevice
.
trx_write_func
(
&
eNB
->
ifdevice
,
if
((
eNB
->
ifdevice
.
trx_write_func
(
&
eNB
->
ifdevice
,
symbol_id
,
0
,
&
tx_buffer
,
&
tx_buffer
,
db_fulllength
,
0
,
1
,
1
,
IF4p5_PULFFT
))
<
0
)
{
IF4p5_PULTICK
))
<
0
)
{
perror
(
"ETHERNET write for IF4p5_PULFFT
\n
"
);
perror
(
"ETHERNET write for IF4p5_PULFFT
\n
"
);
}
}
}
slotoffsetF
+=
fp
->
ofdm_symbol_size
;
blockoffsetF
+=
fp
->
ofdm_symbol_size
;
}
}
else
if
(
packet_type
==
IF4p5_PRACH
)
{
}
else
if
(
packet_type
==
IF4p5_PRACH
)
{
// FIX: hard coded prach samples length
// FIX: hard coded prach samples length
LOG_D
(
PHY
,
"IF4p5_PRACH: frame %d, subframe %d
\n
"
,
frame
,
subframe
);
LOG_D
(
PHY
,
"IF4p5_PRACH: frame %d, subframe %d
\n
"
,
frame
,
subframe
);
...
@@ -303,10 +316,10 @@ void gen_IF4p5_dl_header(IF4p5_header_t *dl_packet, int frame, int subframe) {
...
@@ -303,10 +316,10 @@ void gen_IF4p5_dl_header(IF4p5_header_t *dl_packet, int frame, int subframe) {
}
}
void
gen_IF4p5_ul_header
(
IF4p5_header_t
*
ul_packet
,
int
frame
,
int
subframe
)
{
void
gen_IF4p5_ul_header
(
IF4p5_header_t
*
ul_packet
,
uint16_t
packet_subtype
,
int
frame
,
int
subframe
)
{
ul_packet
->
type
=
IF4p5_PACKET_TYPE
;
ul_packet
->
type
=
IF4p5_PACKET_TYPE
;
ul_packet
->
sub_type
=
IF4p5_PULFFT
;
ul_packet
->
sub_type
=
packet_subtype
;
ul_packet
->
rsvd
=
0
;
ul_packet
->
rsvd
=
0
;
...
...
openair1/PHY/LTE_TRANSPORT/if4_tools.h
View file @
848f7846
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#define IF4p5_PULFFT 0x0019
#define IF4p5_PULFFT 0x0019
#define IF4p5_PDLFFT 0x0020
#define IF4p5_PDLFFT 0x0020
#define IF4p5_PRACH 0x0021
#define IF4p5_PRACH 0x0021
#define IF4p5_PULTICK 0x0022
struct
IF4p5_header
{
struct
IF4p5_header
{
/// Type
/// Type
...
@@ -55,7 +56,7 @@ typedef struct IF4p5_header IF4p5_header_t;
...
@@ -55,7 +56,7 @@ typedef struct IF4p5_header IF4p5_header_t;
void
gen_IF4p5_dl_header
(
IF4p5_header_t
*
,
int
,
int
);
void
gen_IF4p5_dl_header
(
IF4p5_header_t
*
,
int
,
int
);
void
gen_IF4p5_ul_header
(
IF4p5_header_t
*
,
int
,
int
);
void
gen_IF4p5_ul_header
(
IF4p5_header_t
*
,
uint16_t
,
int
,
int
);
void
gen_IF4p5_prach_header
(
IF4p5_header_t
*
,
int
,
int
);
void
gen_IF4p5_prach_header
(
IF4p5_header_t
*
,
int
,
int
);
...
...
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
View file @
848f7846
...
@@ -198,6 +198,8 @@ int trx_eth_write_raw_IF4p5(openair0_device *device, openair0_timestamp timestam
...
@@ -198,6 +198,8 @@ int trx_eth_write_raw_IF4p5(openair0_device *device, openair0_timestamp timestam
packet_size
=
RAW_IF4p5_PDLFFT_SIZE_BYTES
(
nblocks
);
packet_size
=
RAW_IF4p5_PDLFFT_SIZE_BYTES
(
nblocks
);
}
else
if
(
flags
==
IF4p5_PULFFT
)
{
}
else
if
(
flags
==
IF4p5_PULFFT
)
{
packet_size
=
RAW_IF4p5_PULFFT_SIZE_BYTES
(
nblocks
);
packet_size
=
RAW_IF4p5_PULFFT_SIZE_BYTES
(
nblocks
);
}
else
if
(
flags
==
IF4p5_PULTICK
)
{
packet_size
=
RAW_IF4p5_PULTICK_SIZE_BYTES
;
}
else
if
(
flags
==
IF5_MOBIPASS
)
{
}
else
if
(
flags
==
IF5_MOBIPASS
)
{
packet_size
=
RAW_IF5_MOBIPASS_SIZE_BYTES
;
packet_size
=
RAW_IF5_MOBIPASS_SIZE_BYTES
;
}
else
{
}
else
{
...
...
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
View file @
848f7846
...
@@ -206,6 +206,8 @@ int trx_eth_write_udp_IF4p5(openair0_device *device, openair0_timestamp timestam
...
@@ -206,6 +206,8 @@ int trx_eth_write_udp_IF4p5(openair0_device *device, openair0_timestamp timestam
packet_size
=
UDP_IF4p5_PDLFFT_SIZE_BYTES
(
nblocks
);
packet_size
=
UDP_IF4p5_PDLFFT_SIZE_BYTES
(
nblocks
);
}
else
if
(
flags
==
IF4p5_PULFFT
)
{
}
else
if
(
flags
==
IF4p5_PULFFT
)
{
packet_size
=
UDP_IF4p5_PULFFT_SIZE_BYTES
(
nblocks
);
packet_size
=
UDP_IF4p5_PULFFT_SIZE_BYTES
(
nblocks
);
}
else
if
(
flags
==
IF4p5_PULTICK
)
{
packet_size
=
UDP_IF4p5_PULTICK_SIZE_BYTES
;
}
else
if
(
flags
==
IF4p5_PRACH
)
{
}
else
if
(
flags
==
IF4p5_PRACH
)
{
packet_size
=
UDP_IF4p5_PRACH_SIZE_BYTES
;
packet_size
=
UDP_IF4p5_PRACH_SIZE_BYTES
;
}
else
{
}
else
{
...
...
targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h
View file @
848f7846
...
@@ -61,9 +61,11 @@
...
@@ -61,9 +61,11 @@
#define RAW_IF4p5_PDLFFT_SIZE_BYTES(nblocks) (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define RAW_IF4p5_PDLFFT_SIZE_BYTES(nblocks) (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define RAW_IF4p5_PULFFT_SIZE_BYTES(nblocks) (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define RAW_IF4p5_PULFFT_SIZE_BYTES(nblocks) (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define RAW_IF4p5_PULTICK_SIZE_BYTES (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t)
#define RAW_IF4p5_PRACH_SIZE_BYTES (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + PRACH_BLOCK_SIZE_BYTES)
#define RAW_IF4p5_PRACH_SIZE_BYTES (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + PRACH_BLOCK_SIZE_BYTES)
#define UDP_IF4p5_PDLFFT_SIZE_BYTES(nblocks) (sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define UDP_IF4p5_PDLFFT_SIZE_BYTES(nblocks) (sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define UDP_IF4p5_PULFFT_SIZE_BYTES(nblocks) (sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define UDP_IF4p5_PULFFT_SIZE_BYTES(nblocks) (sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define UDP_IF4p5_PULTICK_SIZE_BYTES (sizeof_IF4p5_header_t)
#define UDP_IF4p5_PRACH_SIZE_BYTES (sizeof_IF4p5_header_t + PRACH_BLOCK_SIZE_BYTES)
#define UDP_IF4p5_PRACH_SIZE_BYTES (sizeof_IF4p5_header_t + PRACH_BLOCK_SIZE_BYTES)
// Mobipass packet sizes
// Mobipass packet sizes
...
...
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
848f7846
...
@@ -181,6 +181,16 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
...
@@ -181,6 +181,16 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
s
->
tx_md
.
has_time_spec
=
true
;
s
->
tx_md
.
has_time_spec
=
true
;
else
else
s
->
tx_md
.
has_time_spec
=
false
;
s
->
tx_md
.
has_time_spec
=
false
;
if
(
device
->
openair0_cfg
[
0
].
tx_freq
[
0
]
==
device
->
openair0_cfg
[
0
].
rx_freq
[
0
])
{
// for TDD each write should be considered as a burst to trigger the switch on GPIO
s
->
tx_md
.
start_of_burst
=
true
;
s
->
tx_md
.
end_of_burst
=
true
;
}
else
{
s
->
tx_md
.
start_of_burst
=
false
;
s
->
tx_md
.
end_of_burst
=
false
;
}
if
(
cc
>
1
)
{
if
(
cc
>
1
)
{
std
::
vector
<
void
*>
buff_ptrs
;
std
::
vector
<
void
*>
buff_ptrs
;
...
@@ -190,7 +200,7 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
...
@@ -190,7 +200,7 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
else
else
ret
=
(
int
)
s
->
tx_stream
->
send
(
buff
[
0
],
nsamps
,
s
->
tx_md
,
1e-3
);
ret
=
(
int
)
s
->
tx_stream
->
send
(
buff
[
0
],
nsamps
,
s
->
tx_md
,
1e-3
);
s
->
tx_md
.
start_of_burst
=
false
;
if
(
ret
!=
nsamps
)
{
if
(
ret
!=
nsamps
)
{
printf
(
"[xmit] tx samples %d != %d
\n
"
,
ret
,
nsamps
);
printf
(
"[xmit] tx samples %d != %d
\n
"
,
ret
,
nsamps
);
...
...
targets/RT/USER/lte-enb.c
View file @
848f7846
...
@@ -875,29 +875,33 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
...
@@ -875,29 +875,33 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
// Transmit TX buffer based on timestamp from RX
// Transmit TX buffer based on timestamp from RX
// printf("trx_write -> USRP TS %llu (sf %d)\n", (proc->timestamp_rx+(3*fp->samples_per_tti)),(proc->subframe_rx+2)%10);
// printf("trx_write -> USRP TS %llu (sf %d)\n", (proc->timestamp_rx+(3*fp->samples_per_tti)),(proc->subframe_rx+2)%10);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST
,
(
proc
->
timestamp_rx
+
(
tx_sfoffset
*
fp
->
samples_per_tti
)
-
openair0_cfg
[
0
].
tx_sample_advance
)
&
0xffffffff
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST
,
(
proc
->
timestamp_rx
+
(
tx_sfoffset
*
fp
->
samples_per_tti
)
-
openair0_cfg
[
0
].
tx_sample_advance
)
&
0xffffffff
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
1
);
// prepare tx buffer pointers
// prepare tx buffer pointers
for
(
i
=
0
;
i
<
fp
->
nb_antennas_tx
;
i
++
)
if
((
subframe_select
(
fp
,
proc
->
subframe_rx
+
tx_sfoffset
)
==
SF_DL
)
||
txp
[
i
]
=
(
void
*
)
&
eNB
->
common_vars
.
txdata
[
0
][
i
][((
proc
->
subframe_rx
+
tx_sfoffset
)
%
10
)
*
fp
->
samples_per_tti
];
(
subframe_select
(
fp
,
proc
->
subframe_rx
+
tx_sfoffset
)
==
SF_S
))
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
1
);
txs
=
eNB
->
rfdevice
.
trx_write_func
(
&
eNB
->
rfdevice
,
proc
->
timestamp_rx
+
eNB
->
ts_offset
+
(
tx_sfoffset
*
fp
->
samples_per_tti
)
-
openair0_cfg
[
0
].
tx_sample_advance
,
for
(
i
=
0
;
i
<
fp
->
nb_antennas_tx
;
i
++
)
txp
,
txp
[
i
]
=
(
void
*
)
&
eNB
->
common_vars
.
txdata
[
0
][
i
][((
proc
->
subframe_rx
+
tx_sfoffset
)
%
10
)
*
fp
->
samples_per_tti
];
fp
->
samples_per_tti
,
fp
->
nb_antennas_tx
,
txs
=
eNB
->
rfdevice
.
trx_write_func
(
&
eNB
->
rfdevice
,
1
);
proc
->
timestamp_rx
+
eNB
->
ts_offset
+
(
tx_sfoffset
*
fp
->
samples_per_tti
)
-
openair0_cfg
[
0
].
tx_sample_advance
,
txp
,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
0
);
fp
->
samples_per_tti
,
fp
->
nb_antennas_tx
,
1
);
if
(
txs
!=
fp
->
samples_per_tti
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
0
);
LOG_E
(
PHY
,
"TX : Timeout (sent %d/%d)
\n
"
,
txs
,
fp
->
samples_per_tti
);
exit_fun
(
"problem transmitting samples"
);
}
if
(
txs
!=
fp
->
samples_per_tti
)
{
LOG_E
(
PHY
,
"TX : Timeout (sent %d/%d)
\n
"
,
txs
,
fp
->
samples_per_tti
);
exit_fun
(
"problem transmitting samples"
);
}
}
}
}
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
][
*
subframe
*
fp
->
samples_per_tti
];
rxp
[
i
]
=
(
void
*
)
&
eNB
->
common_vars
.
rxdata
[
0
][
i
][
*
subframe
*
fp
->
samples_per_tti
];
...
...
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