Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dyyu
openairinterface5G
Commits
5ae509b2
Commit
5ae509b2
authored
8 years ago
by
Sandeep Kumar
Browse files
Options
Downloads
Patches
Plain Diff
if5_mobipass tools
parent
55c194b0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openair1/PHY/LTE_TRANSPORT/if5_mobipass_tools.c
+65
-0
65 additions, 0 deletions
openair1/PHY/LTE_TRANSPORT/if5_mobipass_tools.c
openair1/PHY/LTE_TRANSPORT/if5_mobipass_tools.h
+26
-0
26 additions, 0 deletions
openair1/PHY/LTE_TRANSPORT/if5_mobipass_tools.h
with
91 additions
and
0 deletions
openair1/PHY/LTE_TRANSPORT/if5_mobipass_tools.c
0 → 100644
+
65
−
0
View file @
5ae509b2
#include
<stdint.h>
#include
"PHY/defs.h"
#include
"PHY/LTE_TRANSPORT/if5_mobipass_tools.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
)
{
uint8_t
seqno
=
init_seq
;
void
*
txp
[
2
];
void
*
tx_buffer
=
NULL
;
__m128i
*
data_block
=
NULL
,
*
main_data_block
=
NULL
;
__m128i
*
txp128
;
__m128i
t0
,
t1
;
uint16_t
packet_id
=
0
,
i
;
uint16_t
db_fulllength
=
640
;
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
);
data_block
=
(
__m128i
*
)(
tx_buffer
+
MAC_HEADER_SIZE_BYTES
+
sizeof_IF5_mobipass_header_t
+
4
);
main_data_block
=
data_block
;
header
->
flags
=
0
;
header
->
fifo_status
=
0
;
header
->
ack
=
0
;
header
->
seqno
=
seqno
;
header
->
rsvd
=
0
;
txp
[
0
]
=
(
void
*
)
&
eNB
->
common_vars
.
txdata
[
0
][
0
][
proc
->
subframe_tx
*
eNB
->
frame_parms
.
samples_per_tti
];
txp128
=
(
__m128i
*
)
txp
[
0
];
for
(
packet_id
=
0
;
packet_id
<
(
7680
*
2
)
/
640
;
packet_id
++
)
{
header
->
time_stamp
=
proc
->
timestamp_tx
+
packet_id
*
640
;
data_block
=
main_data_block
;
for
(
i
=
0
;
i
<
db_fulllength
>>
3
;
i
+=
2
)
{
t0
=
_mm_srli_epi16
(
*
txp128
++
,
4
);
t1
=
_mm_srli_epi16
(
*
txp128
++
,
4
);
*
data_block
++
=
_mm_packs_epi16
(
t0
,
t1
);
}
// Write the packet to the fronthaul
if
((
eNB
->
ifdevice
.
trx_write_func
(
&
eNB
->
ifdevice
,
packet_id
,
&
tx_buffer
,
db_fulllength
,
1
,
IF5_MOBIPASS
))
<
0
)
{
perror
(
"ETHERNET write for IF5_MOBIPASS
\n
"
);
}
header
->
seqno
+=
1
;
}
seqno
=
header
->
seqno
;
free
(
tx_buffer
);
return
(
seqno
);
}
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/if5_mobipass_tools.h
0 → 100644
+
26
−
0
View file @
5ae509b2
#include
<stdint.h>
#include
"PHY/defs.h"
#define IF5_MOBIPASS 0x0050
struct
IF5_mobipass_header
{
/// Type
uint16_t
flags
;
/// Sub-Type
uint16_t
fifo_status
;
/// Reserved
uint8_t
seqno
;
uint8_t
ack
;
uint32_t
rsvd
;
/// Frame Status
uint32_t
time_stamp
;
}
__attribute__
((
__packed__
));
typedef
struct
IF5_mobipass_header
IF5_mobipass_header_t
;
#define sizeof_IF5_mobipass_header_t 14
uint8_t
send_IF5
(
PHY_VARS_eNB
*
,
eNB_rxtx_proc_t
*
,
uint8_t
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment