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
9246b16c
Commit
9246b16c
authored
Jun 20, 2016
by
Sandeep Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added logic for recv_if4 function
parent
fc13e200
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
19 deletions
+62
-19
openair1/PHY/LTE_TRANSPORT/if4_tools.c
openair1/PHY/LTE_TRANSPORT/if4_tools.c
+62
-19
No files found.
openair1/PHY/LTE_TRANSPORT/if4_tools.c
View file @
9246b16c
...
@@ -96,7 +96,7 @@ void send_IF4(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, uint16_t packet_type) {
...
@@ -96,7 +96,7 @@ void send_IF4(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, uint16_t packet_type) {
1
,
1
,
1
,
1
,
0
))
<
0
)
{
0
))
<
0
)
{
perror
(
"
RCC :
ETHERNET write"
);
perror
(
"ETHERNET write"
);
}
}
slotoffsetF
+=
fp
->
ofdm_symbol_size
;
slotoffsetF
+=
fp
->
ofdm_symbol_size
;
...
@@ -142,35 +142,78 @@ void send_IF4(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, uint16_t packet_type) {
...
@@ -142,35 +142,78 @@ void send_IF4(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, uint16_t packet_type) {
}
}
void
recv_IF4
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
uint16_t
*
packet_type
,
uint32_t
*
symbol_number
)
{
void
recv_IF4
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
uint16_t
*
packet_type
,
uint32_t
*
symbol_number
)
{
LTE_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms
;
int32_t
**
txdataF
=
eNB
->
common_vars
.
txdataF
[
0
];
int32_t
**
rxdataF
=
eNB
->
common_vars
.
rxdataF
[
0
];
uint16_t
element_id
;
uint16_t
db_halflength
;
int
slotoffsetF
,
blockoffsetF
;
*
packet_type
=
0
;
*
packet_type
=
0
;
//int16_t *data_block=NULL;
void
*
rxbuffer
=
NULL
;
int16_t
*
data_block
=
NULL
;
// Read packet(s) from the fronthaul
// Read packet(s) from the fronthaul
// for(i=0; i<fp->symbols_per_tti; i++) {
if
(
eNB
->
ifdevice
.
trx_read_func
(
&
eNB
->
ifdevice
,
// if (dev->eth_dev.trx_read_func (&dev->eth_dev,
symbol_number
,
// timestamp_rx,
rxbuffer
,
// rx_eNB,
fp
->
symbols_per_tti
,
// spp_eth,
eNB
->
ifdevice
.
openair0_cfg
->
rx_num_channels
// dev->eth_dev.openair0_cfg->rx_num_channels
)
<
0
)
{
// ) < 0) {
perror
(
"ETHERNET read"
);
// perror("RRU : ETHERNET read");
}
// }
// printf("\n Recv IF4 for frame %d, subframe %d and symbol %d\n", proc->frame_tx, proc->subframe_tx, symbol_id);
packet_type
=
(
uint16_t
*
)
(
rxbuffer
+
2
);
//*packet_type = ;
if
(
*
packet_type
==
IF4_PDLFFT
)
{
if
(
*
packet_type
==
IF4_PDLFFT
)
{
data_block
=
(
int16_t
*
)
(
rxbuffer
+
sizeof_IF4_dl_header_t
);
// Apply reverse processing - decompression
db_halflength
=
(
12
*
fp
->
N_RB_DL
)
>>
1
;
// txAlawtolinear( Datablock )
// Calculate from received packet
// Generate and return the OFDM symbols (txdataF)
slotoffsetF
=
(
proc
->
subframe_tx
)
*
(
fp
->
ofdm_symbol_size
)
*
((
fp
->
Ncp
==
1
)
?
12
:
14
)
+
1
;
// txDataF
blockoffsetF
=
slotoffsetF
+
fp
->
ofdm_symbol_size
-
db_halflength
;
data_block
=
(
int16_t
*
)
malloc
(
db_halflength
*
sizeof
(
int16_t
));
// Do decompression of the two parts and generate data blocks
for
(
element_id
=
0
;
element_id
<
db_halflength
;
element_id
++
)
{
txdataF
[
0
][
blockoffsetF
+
element_id
]
=
alaw2lin
[
(
data_block
[
element_id
]
&
0xff
)
];
txdataF
[
0
][
blockoffsetF
+
element_id
]
|=
alaw2lin
[
(
data_block
[
element_id
]
>>
8
)
]
<<
16
;
txdataF
[
0
][
slotoffsetF
+
element_id
]
=
alaw2lin
[
(
data_block
[
element_id
+
db_halflength
]
&
0xff
)
];
txdataF
[
0
][
slotoffsetF
+
element_id
]
|=
alaw2lin
[
(
data_block
[
element_id
+
db_halflength
]
>>
8
)
]
<<
16
;
}
// Find and return symbol_number
*
symbol_number
=
0
;
}
else
if
(
*
packet_type
==
IF4_PULFFT
)
{
}
else
if
(
*
packet_type
==
IF4_PULFFT
)
{
data_block
=
(
int16_t
*
)
(
rxbuffer
+
sizeof_IF4_ul_header_t
);
db_halflength
=
(
12
*
fp
->
N_RB_UL
)
>>
1
;
// Calculate from received packet
slotoffsetF
=
(
proc
->
subframe_rx
)
*
(
fp
->
ofdm_symbol_size
)
*
((
fp
->
Ncp
==
1
)
?
12
:
14
)
+
1
;
blockoffsetF
=
slotoffsetF
+
fp
->
ofdm_symbol_size
-
db_halflength
;
data_block
=
(
int16_t
*
)
malloc
(
db_halflength
*
sizeof
(
int16_t
));
// Do decompression of the two parts and generate data blocks
for
(
element_id
=
0
;
element_id
<
db_halflength
;
element_id
++
)
{
rxdataF
[
0
][
blockoffsetF
+
element_id
]
=
alaw2lin
[
(
data_block
[
element_id
]
&
0xff
)
];
rxdataF
[
0
][
blockoffsetF
+
element_id
]
|=
alaw2lin
[
(
data_block
[
element_id
]
>>
8
)
]
<<
16
;
rxdataF
[
0
][
slotoffsetF
+
element_id
]
=
alaw2lin
[
(
data_block
[
element_id
+
db_halflength
]
&
0xff
)
];
rxdataF
[
0
][
slotoffsetF
+
element_id
]
|=
alaw2lin
[
(
data_block
[
element_id
+
db_halflength
]
>>
8
)
]
<<
16
;
}
// Find and return symbol_number
*
symbol_number
=
0
;
}
else
if
(
*
packet_type
==
IF4_PRACH
)
{
}
else
if
(
*
packet_type
==
IF4_PRACH
)
{
data_block
=
(
int16_t
*
)
(
rxbuffer
+
sizeof_IF4_prach_header_t
);
}
else
{
}
else
{
AssertFatal
(
1
==
0
,
"recv_IF4 - Unknown packet_type %x"
,
*
packet_type
);
AssertFatal
(
1
==
0
,
"recv_IF4 - Unknown packet_type %x"
,
*
packet_type
);
...
...
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