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
ad1114c7
Commit
ad1114c7
authored
Jun 03, 2016
by
Sandeep Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added more structural changes
parent
7b3fe853
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
117 additions
and
43 deletions
+117
-43
openair1/PHY/LTE_TRANSPORT/if4_tools.c
openair1/PHY/LTE_TRANSPORT/if4_tools.c
+114
-42
openair1/PHY/LTE_TRANSPORT/if4_tools.h
openair1/PHY/LTE_TRANSPORT/if4_tools.h
+3
-1
No files found.
openair1/PHY/LTE_TRANSPORT/if4_tools.c
View file @
ad1114c7
...
@@ -29,28 +29,19 @@
...
@@ -29,28 +29,19 @@
/*! \file PHY/LTE_TRANSPORT/if4_tools.c
/*! \file PHY/LTE_TRANSPORT/if4_tools.c
* \brief
* \brief
* \author Mauricio Gunther,
Raymond Knopp, S. Sandeep Kumar
* \author Mauricio Gunther,
S. Sandeep Kumar, Raymond Knopp
* \date 2016
* \date 2016
* \version 0.1
* \version 0.1
* \company Eurecom
* \company Eurecom
* \email: knopp@eurecom.fr
, ee13b1025@iith.ac.in
* \email: knopp@eurecom.fr
* \note
* \note
* \warning
* \warning
*/
*/
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/LTE_TRANSPORT/if4_tools.h"
/*
// Define how data blocks are stored and transferred
typedef struct data_block_type {
} data_block;
*/
/*
void allocate_data_block(long *data_block ,int length){
data_block = malloc(length*sizeof(long));
}
*/
void
send_IF4
(
PHY_VARS_eNB
*
eNB
,
int
subframe
){
void
send_IF4
(
PHY_VARS_eNB
*
eNB
,
int
subframe
){
eNB_proc_t
*
proc
=
&
eNB
->
proc
;
eNB_proc_t
*
proc
=
&
eNB
->
proc
;
...
@@ -58,57 +49,138 @@ void send_IF4(PHY_VARS_eNB *eNB, int subframe){
...
@@ -58,57 +49,138 @@ void send_IF4(PHY_VARS_eNB *eNB, int subframe){
//int subframe=proc->subframe_tx;
//int subframe=proc->subframe_tx;
LTE_DL_FRAME_PARMS
*
fp
=&
eNB
->
frame_parms
;
LTE_DL_FRAME_PARMS
*
fp
=&
eNB
->
frame_parms
;
int
i
,
j
;
uint32_t
i
,
j
;
float
*
data_block
=
malloc
(
length
*
sizeof
(
long
));
float
*
data_block
=
malloc
(
length
*
sizeof
(
long
));
// Generate IF4 packet (for now DL) with frame status information
dl_packet
=
gen_IF4_dl_packet
(
/* ADD INFO and data_block pointer */
);
// find number of consecutive non zero in values in symbol
for
(
i
=
0
;
i
<
fp
->
symbols_per_tti
;
i
++
)
{
// NrOfNonZeroValues
// Do compression of the two parts and generate data blocks
// how many values does the atan function output?
symbol
=
eNB
->
common_vars
.
txdataF
[
0
][
0
/*antenna number*/
][
subframe
*
fp
->
ofdm_symbol_size
*
(
fp
->
symbols_per_tti
)]
for
(
i
=
0
;
i
<=
fp
->
symbols_per_tti
;
i
++
){
data_block
[
j
]
=
Atan
(
symbol
[
fp
->
ofmd_symbol_size
-
NrOfNonZeroValues
+
j
-
1
])
<<
16
+
Atan
(
symbol
[
fp
->
ofmd_symbol_size
-
NrOfNonZeroValues
+
j
]);
for
(
j
=
0
;
j
<
NrOfNonZeroValues
;
j
=
j
+
2
){
data_block
[
j
+
NrOfNonZeroValues
]
=
Atan
(
subframe
[
i
][
j
+
1
])
<<
16
+
Atan
(
subframe
[
i
][
j
+
2
]);
symbol
=
eNB
->
common_vars
.
txdataF
[
0
][
0
/*antenna number*/
][
subframe
*
fp
->
ofdm_symbol_size
*
(
fp
->
symbols_per_tti
)]
// Set data blocks and update subframe no./other information to generated packet
data_block
[
j
]
=
Atan
(
symbol
[
fp
->
ofmd_symbol_size
-
NrOfNonZeroValues
+
j
-
1
])
<<
16
+
Atan
(
symbol
[
fp
->
ofmd_symbol_size
-
NrOfNonZeroValues
+
j
]);
data_block
[
j
+
NrOfNonZeroValues
]
=
Atan
(
subframe
[
i
][
j
+
1
])
<<
16
+
Atan
(
subframe
[
i
][
j
+
2
]);
// Write the packet(s) to the fronthaul
// use memset?
}
}
/*
memset(&eNB->common_vars.txdataF[0][aa][subframe*fp->ofdm_symbol_size*(fp->symbols_per_tti)],
0,fp->ofdm_symbol_size*(fp->symbols_per_tti)*sizeof(int32_t));
}
*/
}
}
}
void
recv_IF4
(
)
{
void
recv_IF4
(
/* ADD INFO and data_block pointer */
)
{
// Read packet(s) from the fronthaul
// Apply reverse processing - decompression
// Generate and return the OFDM symbols (txdataF)
}
}
IF4_dl_packet
gen_IF4_dl_packet
(
)
{
IF4_dl_packet
gen_IF4_dl_packet
(
/* ADD INFO and data_block pointer */
)
{
IF4_dl_packet
dl_packet
;
IF4_dl_packet
dl_packet
;
// Set destination and source address
// Set Type and Sub-Type
dl_packet
.
type
=
;
//08_0A ?
dl_packet
.
sub_type
=
0x0020
;
// Leave reserved as it is
//dl_packet.rsvd = ;
// Set frame status
dl_packet
.
frame_status
.
ant_num
=
;
dl_packet
.
frame_status
.
ant_start
=
;
dl_packet
.
frame_status
.
rf_num
=
;
dl_packet
.
frame_status
.
sf_num
=
;
dl_packet
.
frame_status
.
sym_num
=
;
//dl_packet.frame_status.rsvd = ;
// Set data blocks if sent
if
(
data_block
!=
NULL
)
{
}
else
{
}
// Set frame check sequence
dl_packet
.
fcs
=
;
return
dl_packet
;
return
dl_packet
;
}
}
IF4_ul_packet
gen_IF4_ul_packet
(
)
{
IF4_ul_packet
gen_IF4_ul_packet
(
/* ADD INFO and data_block pointer */
)
{
IF4_ul_packet
ul_packet
;
IF4_ul_packet
ul_packet
;
// Set destination and source address
// Set Type and Sub-Type
ul_packet
.
type
=
;
//08_0A ?
ul_packet
.
sub_type
=
0x0019
;
// Leave reserved as it is
//ul_packet.rsvd = ;
// Set frame status
ul_packet
.
frame_status
.
ant_num
=
;
ul_packet
.
frame_status
.
ant_start
=
;
ul_packet
.
frame_status
.
rf_num
=
;
ul_packet
.
frame_status
.
sf_num
=
;
ul_packet
.
frame_status
.
sym_num
=
;
//ul_packet.frame_status.rsvd = ;
// Set antenna specific gain
ul_packet
.
gain0
.
exponent
=
;
//ul_packet.gain0.rsvd = ;
// Set data blocks if sent
if
(
data_block
!=
NULL
)
{
}
else
{
}
// Set frame check sequence
ul_packet
.
fcs
=
;
return
ul_packet
;
return
ul_packet
;
}
}
IF4_prach_packet
gen_IF4_prach_packet
(
)
{
IF4_prach_packet
gen_IF4_prach_packet
(
/* ADD INFO and data_block pointer */
)
{
IF4_prach_packet
prach_packet
;
IF4_prach_packet
prach_packet
;
// Set destination and source address
// Set Type and Sub-Type
prach_packet
.
type
=
;
//08_0A ?
prach_packet
.
sub_type
=
0x0021
;
// Leave reserved as it is
//prach_packet.rsvd = ;
// Set LTE Prach configuration
//prach_packet.prach_conf.rsvd = ;
prach_packet
.
prach_conf
.
ant
=
;
prach_packet
.
prach_conf
.
rf_num
=
;
prach_packet
.
prach_conf
.
sf_num
=
;
prach_packet
.
prach_conf
.
exponent
=
;
// Set data blocks if sent
if
(
data_block
!=
NULL
)
{
}
else
{
}
// Set frame check sequence
prach_packet
.
fcs
=
;
return
prach_packet
;
return
prach_packet
;
}
}
openair1/PHY/LTE_TRANSPORT/if4_tools.h
View file @
ad1114c7
...
@@ -56,7 +56,7 @@ struct IF4_frame_status {
...
@@ -56,7 +56,7 @@ struct IF4_frame_status {
uint32_t
rsvd
:
2
;
uint32_t
rsvd
:
2
;
};
};
/// IF4 Antenna Gain
/// IF4 Antenna Gain
(16 bits)
struct
IF4_gain
{
struct
IF4_gain
{
/// Reserved
/// Reserved
uint32_t
rsvd
:
10
;
uint32_t
rsvd
:
10
;
...
@@ -151,6 +151,8 @@ struct IF4_prach_packet {
...
@@ -151,6 +151,8 @@ struct IF4_prach_packet {
uint32_t
fcs
;
uint32_t
fcs
;
};
};
// Needs to be checked
IF4_dl_packet
gen_IF4_dl_packet
();
IF4_dl_packet
gen_IF4_dl_packet
();
IF4_ul_packet
gen_IF4_ul_packet
();
IF4_ul_packet
gen_IF4_ul_packet
();
...
...
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