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
spbro
OpenXG-RAN
Commits
b7ea4e0f
Commit
b7ea4e0f
authored
4 years ago
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
benetel 5g: support for two antennas
parent
a9f57407
Branches unavailable
2024.w43
2024.w42
2024.w41
2024.w40
2024.w39
2024.w38
2024.w36
2024.w35
2024.w34
2024.w33
2024.w32
2024.w31
2024.w30
2024.w29
2024.w28
2024.w27
2024.w26
2024.w25
2024.w24
2024.w23
2024.w22
2024.w21
2024.w18
2024.w17
2024.w16
2024.w15
2024.w14
2024.w13
2024.w12
2024.w11
2024.w10
2024.w09
2024.w08
2024.w06
2024.w05
2024.w04
2024.w03
2024.w02
2024.w01
2023.w51
2023.w50
2023.w49
2023.w48
2023.w47
2023.w45
2023.w43
2023.w42
2023.w41
2023.w40
2023.w39
2023.w38
2023.w37
2023.w36
2023.w34
2023.w33
2023.w32
2023.w31
2023.w30
2023.w29
2023.w28
2023.w27
2023.w26
2023.w25
2023.w24
2023.w23
2023.w22
2023.w21
2023.w20
2023.w19
2023.w18
2023.w18b
2023.w16
2023.w15
2023.w14
2023.w13
2023.w12
2023.w11
2023.w11b
2023.w10
2023.w10b
2023.w09
2023.w08
2023.w08b
2023.w07
2023.w06
2023.w05
2023.w03
2023.w02
2022.42
2022.41
2022.w51
2022.w50
2022.w49
2022.w48
2022.w47
2022.w46
2022.w45
2022.w43
2022.w42
2022.w42b
2022.w41
2022.w40
2022.w39
2022.w38
2022.w37
2022.w37b
2022.w36
2022.w35
2022.w33
2022.w32
2022.w31
2022.w31b
2022.w30
2022.w29
2022.w26
2022.w25
2022.w24
2022.w24b
2022.w23
2022.w22
2022.w21
2022.w20
2022.w19
2022.w18
2022.w17
2022.w15
2022.w15b
2022.w14a
2022.w13
2022.w13b
2022.w13a
2022.w12
2022.w10
2022.w09
2022.w09b
2022.w08
2022.w08b
2022.w07
2022.w07b
2022.w06
2022.w06a
2022.w05
2022.w05b
2022.w03_hotfix
2022.w03_b
2022.w02
2022.w01
2021.wk46
2021.wk14_a
2021.wk13_d
2021.wk13_c
2021.w51_c
2021.w51_a
2021.w50_a
2021.w49_b
2021.w49_a
2021.w48
2021.w47
2021.w46
2021.w46-powder
2021.w45
2021.w45_b
2021.w44
2021.w43
2021.w42
2021.w37
2021.w36
2021.w35
2021.w34
2021.w33
2021.w32
2021.w31
2021.w30
2021.w29
2021.w28
2021.w27
2021.w26
2021.w25
2021.w24
2021.w23
2021.w22
2021.w20
2021.w19
2021.w18_b
2021.w18_a
2021.w17_b
2021.w16
2021.w15
2021.w14
2021.w13_a
2021.w12
2021.w11
2021.w10
2021.w09
v2.1.0
v2.0.0
setparam
flexran-eol
benetel_gnb_rel_2.0
benetel_gnb_rel_1.0
benetel_enb_rel_2.0
benetel_enb_rel_1.0
ARC_1.3
No related merge requests found
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
131 additions
and
136 deletions
+131
-136
targets/ARCH/ETHERNET/benetel/5g/benetel.c
targets/ARCH/ETHERNET/benetel/5g/benetel.c
+43
-34
targets/ARCH/ETHERNET/benetel/5g/dpdk_driver.c
targets/ARCH/ETHERNET/benetel/5g/dpdk_driver.c
+28
-48
targets/ARCH/ETHERNET/benetel/5g/low.c
targets/ARCH/ETHERNET/benetel/5g/low.c
+39
-41
targets/ARCH/ETHERNET/benetel/5g/low.h
targets/ARCH/ETHERNET/benetel/5g/low.h
+4
-3
targets/ARCH/ETHERNET/benetel/5g/low_dpdk.c
targets/ARCH/ETHERNET/benetel/5g/low_dpdk.c
+2
-1
targets/ARCH/ETHERNET/benetel/5g/shared_buffers.c
targets/ARCH/ETHERNET/benetel/5g/shared_buffers.c
+10
-5
targets/ARCH/ETHERNET/benetel/5g/shared_buffers.h
targets/ARCH/ETHERNET/benetel/5g/shared_buffers.h
+5
-4
No files found.
targets/ARCH/ETHERNET/benetel/5g/benetel.c
View file @
b7ea4e0f
...
...
@@ -162,8 +162,9 @@ int trx_benetel_ctlrecv(openair0_device *device, void *msg, ssize_t msg_len)
cap
->
FH_fmt
=
OAI_IF4p5_only
;
cap
->
num_bands
=
1
;
cap
->
band_list
[
0
]
=
78
;
cap
->
nb_rx
[
0
]
=
1
;
cap
->
nb_tx
[
0
]
=
1
;
/* TODO: hardcoded to 1 for the moment, get the real value somehow... */
cap
->
nb_rx
[
0
]
=
1
;
//device->openair0_cfg->rx_num_channels;
cap
->
nb_tx
[
0
]
=
1
;
//device->openair0_cfg->tx_num_channels;
cap
->
max_pdschReferenceSignalPower
[
0
]
=
-
27
;
cap
->
max_rxgain
[
0
]
=
90
;
...
...
@@ -201,12 +202,13 @@ void benetel_fh_if4p5_south_in(RU_t *ru,
NR_DL_FRAME_PARMS
*
fp
;
int
symbol
;
int32_t
*
rxdata
;
int
antenna
=
0
;
int
antenna
;
lock_ul_buffer
(
&
s
->
buffers
,
*
slot
);
#if 1
next:
while
(
!
(
s
->
buffers
.
ul_busy
[
*
slot
]
==
0x3fff
||
while
(
!
((
s
->
buffers
.
ul_busy
[
0
][
*
slot
]
==
0x3fff
&&
s
->
buffers
.
ul_busy
[
1
][
*
slot
]
==
0x3fff
)
||
s
->
buffers
.
prach_busy
[
*
slot
]
==
1
))
wait_ul_buffer
(
&
s
->
buffers
,
*
slot
);
if
(
s
->
buffers
.
prach_busy
[
*
slot
]
==
1
)
{
...
...
@@ -226,28 +228,31 @@ next:
#endif
fp
=
ru
->
nr_frame_parms
;
for
(
symbol
=
0
;
symbol
<
14
;
symbol
++
)
{
int
i
;
int16_t
*
p
=
(
int16_t
*
)(
&
s
->
buffers
.
ul
[
*
slot
][
symbol
*
1272
*
4
]);
for
(
i
=
0
;
i
<
1272
*
2
;
i
++
)
{
p
[
i
]
=
(
int16_t
)(
ntohs
(
p
[
i
]))
/
16
;
}
rxdata
=
&
ru
->
common
.
rxdataF
[
antenna
][
symbol
*
fp
->
ofdm_symbol_size
];
for
(
antenna
=
0
;
antenna
<
ru
->
nb_rx
;
antenna
++
)
{
for
(
symbol
=
0
;
symbol
<
14
;
symbol
++
)
{
int
i
;
int16_t
*
p
=
(
int16_t
*
)(
&
s
->
buffers
.
ul
[
antenna
][
*
slot
][
symbol
*
1272
*
4
]);
for
(
i
=
0
;
i
<
1272
*
2
;
i
++
)
{
p
[
i
]
=
(
int16_t
)(
ntohs
(
p
[
i
]))
/
16
;
}
rxdata
=
&
ru
->
common
.
rxdataF
[
antenna
][
symbol
*
fp
->
ofdm_symbol_size
];
#if 0
if (*slot == 0 && symbol == 0)
printf("rxdata in benetel_fh_if4p5_south_in %p\n", &ru->common.rxdataF[antenna][0]);
#endif
#if 1
memcpy
(
rxdata
+
2048
-
1272
/
2
,
&
s
->
buffers
.
ul
[
*
slot
][
symbol
*
1272
*
4
],
(
1272
/
2
)
*
4
);
memcpy
(
rxdata
,
&
s
->
buffers
.
ul
[
*
slot
][
symbol
*
1272
*
4
]
+
(
1272
/
2
)
*
4
,
(
1272
/
2
)
*
4
);
memcpy
(
rxdata
+
2048
-
1272
/
2
,
&
s
->
buffers
.
ul
[
antenna
]
[
*
slot
][
symbol
*
1272
*
4
],
(
1272
/
2
)
*
4
);
memcpy
(
rxdata
,
&
s
->
buffers
.
ul
[
antenna
]
[
*
slot
][
symbol
*
1272
*
4
]
+
(
1272
/
2
)
*
4
,
(
1272
/
2
)
*
4
);
#endif
}
}
s
->
buffers
.
ul_busy
[
*
slot
]
=
0
;
s
->
buffers
.
ul_busy
[
0
][
*
slot
]
=
0
;
s
->
buffers
.
ul_busy
[
1
][
*
slot
]
=
0
;
signal_ul_buffer
(
&
s
->
buffers
,
*
slot
);
unlock_ul_buffer
(
&
s
->
buffers
,
*
slot
);
...
...
@@ -285,43 +290,47 @@ void benetel_fh_if4p5_south_out(RU_t *ru,
NR_DL_FRAME_PARMS
*
fp
;
int
symbol
;
int32_t
*
txdata
;
int
aa
=
0
;
int
aa
;
//printf("BENETEL: %s (f.sf %d.%d ts %ld)\n", __FUNCTION__, frame, slot, timestamp);
lock_dl_buffer
(
&
s
->
buffers
,
slot
);
if
(
s
->
buffers
.
dl_busy
[
slot
])
{
if
(
s
->
buffers
.
dl_busy
[
0
][
slot
]
||
s
->
buffers
.
dl_busy
[
1
][
slot
])
{
printf
(
"%s: fatal: DL buffer busy for subframe %d
\n
"
,
__FUNCTION__
,
slot
);
unlock_dl_buffer
(
&
s
->
buffers
,
slot
);
return
;
}
fp
=
ru
->
nr_frame_parms
;
if
(
ru
->
num_gNB
!=
1
||
ru
->
nb_tx
!=
1
||
fp
->
ofdm_symbol_size
!=
2048
||
if
(
ru
->
num_gNB
!=
1
||
fp
->
ofdm_symbol_size
!=
2048
||
fp
->
Ncp
!=
NORMAL
||
fp
->
symbols_per_slot
!=
14
)
{
printf
(
"%s:%d:%s: unsupported configuration
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
for
(
symbol
=
0
;
symbol
<
14
;
symbol
++
)
{
txdata
=
&
ru
->
common
.
txdataF_BF
[
aa
][
symbol
*
fp
->
ofdm_symbol_size
];
for
(
aa
=
0
;
aa
<
ru
->
nb_tx
;
aa
++
)
{
for
(
symbol
=
0
;
symbol
<
14
;
symbol
++
)
{
txdata
=
&
ru
->
common
.
txdataF_BF
[
aa
][
symbol
*
fp
->
ofdm_symbol_size
];
#if 1
memcpy
(
&
s
->
buffers
.
dl
[
slot
][
symbol
*
1272
*
4
],
txdata
+
2048
-
(
1272
/
2
),
(
1272
/
2
)
*
4
);
memcpy
(
&
s
->
buffers
.
dl
[
slot
][
symbol
*
1272
*
4
]
+
(
1272
/
2
)
*
4
,
txdata
,
(
1272
/
2
)
*
4
);
memcpy
(
&
s
->
buffers
.
dl
[
aa
]
[
slot
][
symbol
*
1272
*
4
],
txdata
+
2048
-
(
1272
/
2
),
(
1272
/
2
)
*
4
);
memcpy
(
&
s
->
buffers
.
dl
[
aa
]
[
slot
][
symbol
*
1272
*
4
]
+
(
1272
/
2
)
*
4
,
txdata
,
(
1272
/
2
)
*
4
);
#endif
int
i
;
uint16_t
*
p
=
(
uint16_t
*
)(
&
s
->
buffers
.
dl
[
slot
][
symbol
*
1272
*
4
]);
for
(
i
=
0
;
i
<
1272
*
2
;
i
++
)
{
p
[
i
]
=
htons
(
p
[
i
]
<<
4
);
int
i
;
uint16_t
*
p
=
(
uint16_t
*
)(
&
s
->
buffers
.
dl
[
aa
][
slot
][
symbol
*
1272
*
4
]);
for
(
i
=
0
;
i
<
1272
*
2
;
i
++
)
{
p
[
i
]
=
htons
(
p
[
i
]);
}
}
}
s
->
buffers
.
dl_busy
[
slot
]
=
0x3fff
;
s
->
buffers
.
dl_busy
[
0
][
slot
]
=
0x3fff
;
s
->
buffers
.
dl_busy
[
1
][
slot
]
=
0x3fff
;
unlock_dl_buffer
(
&
s
->
buffers
,
slot
);
}
...
...
This diff is collapsed.
Click to expand it.
targets/ARCH/ETHERNET/benetel/5g/dpdk_driver.c
View file @
b7ea4e0f
...
...
@@ -243,21 +243,22 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
}
if
(
PAYLOAD_1
==
0x13
&&
PAYLOAD_2
==
0xe4
&&
ANT_NUM
==
0x00
)
{
if
(
PAYLOAD_1
==
0x13
&&
PAYLOAD_2
==
0xe4
)
{
int
subframe
=
SUBFRAME
>>
4
;
int
slot
=
((
SUBFRAME
&
0x0f
)
<<
2
)
|
((
SYMBOL
>>
6
)
&
0x03
);
p
.
frame
=
FRAME
;
p
.
slot
=
subframe
*
2
+
slot
;
p
.
symbol
=
SYMBOL
&
0x3f
;
p
.
antenna
=
0
;
p
.
antenna
=
ANT_NUM
;
memcpy
(
p
.
iq
,
IQ_ptr
,
5088
);
store_ul
(
bs
,
&
p
);
// if (p.symbol==0) printf("store ul f.sl.sy %d.%d.%d\n", p.frame, p.slot, p.symbol);
}
// U-PLANE UL
ANT_0
PROCESSING
if
(
PAYLOAD_1
==
0x13
&&
PAYLOAD_2
==
0xe4
&&
ANT_NUM
==
0x00
&&
dl_start
==
1
)
// U-PLANE UL PROCESSING
if
(
PAYLOAD_1
==
0x13
&&
PAYLOAD_2
==
0xe4
&&
dl_start
==
1
)
{
int
a
=
ANT_NUM
&
0x01
;
int
frame
=
FRAME
;
int
subframe
=
SUBFRAME
>>
4
;
int
slot
=
((
SUBFRAME
&
0x0f
)
<<
2
)
|
((
SYMBOL
>>
6
)
&
0x03
);
...
...
@@ -282,66 +283,45 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
}
}
ANT_NUM
=
0x00
;
// Mask the symbol bits from UL packet received and apply the shift.
SYMBOL
=
((
SYMBOL
&
0
b00111111
)
+
10
)
%
14
;
ANT_NUM
=
0x00
;
ANT_NUM
=
a
;
SUBFRAME
=
sf
;
if
(
a
==
1
)
slot_id_ctrl
++
;
// Slot id control for DL
if
(
slot_id_ctrl
>
13
){
SYMBOL
=
SYMBOL
|
0
b01000000
;
if
(
slot_id_ctrl
>
13
)
{
SYMBOL
=
SYMBOL
|
0
b01000000
;
if
(
a
==
1
)
{
if
(
slot_id_ctrl
>
27
)
{
slot_id_ctrl
=
0
;
sf
=
sf
+
0x10
;
if
(
sf
>
0x90
){
sf
=
0
;
}
}
}
}
/*
antenna 0 -
send actual DL data (if available) */
/* send actual DL data (if available) */
oai_slot
=
tx_subframe
*
2
+
tx_slot
;
lock_dl_buffer
(
bs
->
buffers
,
oai_slot
);
if
(
!
(
bs
->
buffers
->
dl_busy
[
oai_slot
]
&
(
1
<<
tx_symbol
)))
{
printf
(
"%s: warning, DL underflow (sl.symbol %d.%d)
\n
"
,
__FUNCTION__
,
oai_slot
,
tx_symbol
);
if
(
!
(
bs
->
buffers
->
dl_busy
[
a
][
oai_slot
]
&
(
1
<<
tx_symbol
)))
{
printf
(
"%s: warning, DL underflow (
antenna %d
sl.symbol %d.%d)
\n
"
,
__FUNCTION__
,
a
,
oai_slot
,
tx_symbol
);
memset
(
IQ_ptr
,
0
,
1272
*
4
);
}
else
{
memcpy
(
IQ_ptr
,
bs
->
buffers
->
dl
[
oai_slot
]
+
tx_symbol
*
1272
*
4
,
memcpy
(
IQ_ptr
,
bs
->
buffers
->
dl
[
a
][
oai_slot
]
+
tx_symbol
*
1272
*
4
,
1272
*
4
);
}
//printf("DL buffer f sf slot symbol %d %d %d %d (sf %d)\n", tx_frame, tx_subframe, tx_slot, tx_symbol, (int)sf);
bs
->
buffers
->
dl_busy
[
oai_slot
]
&=
~
(
1
<<
tx_symbol
);
bs
->
buffers
->
dl_busy
[
a
][
oai_slot
]
&=
~
(
1
<<
tx_symbol
);
unlock_dl_buffer
(
bs
->
buffers
,
oai_slot
);
// fill DL Data for ant 0 with 0 value
// memset(IQ_ptr, 0, 5088);
}
// U-PLANE UL ANT_1 PROCESSING
if
(
PAYLOAD_1
==
0x13
&&
PAYLOAD_2
==
0xe4
&&
ANT_NUM
==
0x01
&&
dl_start
==
1
)
{
// Mask the symbol bits from UL packet received and apply the shift.
SYMBOL
=
((
SYMBOL
&
0
b00111111
)
+
10
)
%
14
;
ANT_NUM
=
0x01
;
SUBFRAME
=
sf
;
slot_id_ctrl
++
;
// Slot id control for DL
if
(
slot_id_ctrl
>
13
){
SYMBOL
=
SYMBOL
|
0
b01000000
;
if
(
slot_id_ctrl
>
27
){
slot_id_ctrl
=
0
;
sf
=
sf
+
0x10
;
if
(
sf
>
0x90
){
sf
=
0
;
}
}
}
// fill DL Data for ant 1 with 0 value
memset
(
IQ_ptr
,
0
,
5088
);
}
// U-PLANE PRACH PROCESSING
...
...
This diff is collapsed.
Click to expand it.
targets/ARCH/ETHERNET/benetel/5g/low.c
View file @
b7ea4e0f
...
...
@@ -35,63 +35,61 @@ printf("store_ul %d.%ld (%ld)\n", (int)(t.tv_sec % 60), t.tv_nsec, t.tv_nsec - o
old = t;
#endif
/* only antenna 0 for the moment */
if
(
ul
->
antenna
!=
0
)
return
;
int
a
=
ul
->
antenna
;
if
(
ul
->
slot
!=
bs
->
next_slot
||
ul
->
symbol
!=
bs
->
next_symbol
)
{
printf
(
"%s: error, expected frame.sl.symbol %d.%d.%d, got %d.%d.%d
\n
"
,
if
(
ul
->
slot
!=
bs
->
next_slot
[
a
]
||
ul
->
symbol
!=
bs
->
next_symbol
[
a
]
)
{
printf
(
"%s: error,
antenna %d
expected frame.sl.symbol %d.%d.%d, got %d.%d.%d
\n
"
,
__FUNCTION__
,
bs
->
expected_benetel_frame
,
bs
->
next_slot
,
bs
->
next_symbol
,
a
,
bs
->
expected_benetel_frame
[
a
],
bs
->
next_slot
[
a
],
bs
->
next_symbol
[
a
]
,
ul
->
frame
,
ul
->
slot
,
ul
->
symbol
);
}
/* fill missing data with 0s */
while
(
ul
->
slot
!=
bs
->
next_slot
||
ul
->
symbol
!=
bs
->
next_symbol
)
{
lock_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
);
if
(
bs
->
buffers
->
ul_busy
[
bs
->
next_slot
]
&
(
1
<<
bs
->
next_symbol
))
{
printf
(
"%s: warning, UL overflow (sl.symbol %d.%d)
\n
"
,
__FUNCTION__
,
bs
->
next_slot
,
bs
->
next_symbol
);
while
(
ul
->
slot
!=
bs
->
next_slot
[
a
]
||
ul
->
symbol
!=
bs
->
next_symbol
[
a
]
)
{
lock_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
[
a
]
);
if
(
bs
->
buffers
->
ul_busy
[
a
][
bs
->
next_slot
[
a
]]
&
(
1
<<
bs
->
next_symbol
[
a
]
))
{
printf
(
"%s: warning,
antenna %d
UL overflow (sl.symbol %d.%d)
\n
"
,
__FUNCTION__
,
a
,
bs
->
next_slot
[
a
],
bs
->
next_symbol
[
a
]
);
}
memset
(
bs
->
buffers
->
ul
[
bs
->
next_slot
]
+
bs
->
next_symbol
*
1272
*
4
,
memset
(
bs
->
buffers
->
ul
[
a
][
bs
->
next_slot
[
a
]]
+
bs
->
next_symbol
[
a
]
*
1272
*
4
,
0
,
1272
*
4
);
bs
->
buffers
->
ul_busy
[
bs
->
next_slot
]
|=
(
1
<<
bs
->
next_symbol
);
signal_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
);
unlock_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
);
bs
->
next_symbol
++
;
if
(
bs
->
next_symbol
==
14
)
{
bs
->
next_symbol
=
0
;
bs
->
next_slot
=
(
bs
->
next_slot
+
1
)
%
20
;
if
(
bs
->
next_slot
==
0
)
{
bs
->
expected_benetel_frame
++
;
bs
->
expected_benetel_frame
&=
255
;
bs
->
buffers
->
ul_busy
[
a
][
bs
->
next_slot
[
a
]]
|=
(
1
<<
bs
->
next_symbol
[
a
]
);
signal_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
[
a
]
);
unlock_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
[
a
]
);
bs
->
next_symbol
[
a
]
++
;
if
(
bs
->
next_symbol
[
a
]
==
14
)
{
bs
->
next_symbol
[
a
]
=
0
;
bs
->
next_slot
[
a
]
=
(
bs
->
next_slot
[
a
]
+
1
)
%
20
;
if
(
bs
->
next_slot
[
a
]
==
0
)
{
bs
->
expected_benetel_frame
[
a
]
++
;
bs
->
expected_benetel_frame
[
a
]
&=
255
;
}
}
}
lock_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
);
if
(
bs
->
buffers
->
ul_busy
[
bs
->
next_slot
]
&
(
1
<<
bs
->
next_symbol
))
{
printf
(
"%s: warning, UL overflow (sl.symbol %d.%d)
\n
"
,
__FUNCTION__
,
bs
->
next_slot
,
bs
->
next_symbol
);
lock_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
[
a
]
);
if
(
bs
->
buffers
->
ul_busy
[
a
][
bs
->
next_slot
[
a
]]
&
(
1
<<
bs
->
next_symbol
[
a
]
))
{
printf
(
"%s: warning,
antenna %d
UL overflow (sl.symbol %d.%d)
\n
"
,
__FUNCTION__
,
a
,
bs
->
next_slot
[
a
],
bs
->
next_symbol
[
a
]
);
}
memcpy
(
bs
->
buffers
->
ul
[
bs
->
next_slot
]
+
bs
->
next_symbol
*
1272
*
4
,
memcpy
(
bs
->
buffers
->
ul
[
a
][
bs
->
next_slot
[
a
]]
+
bs
->
next_symbol
[
a
]
*
1272
*
4
,
ul
->
iq
,
1272
*
4
);
bs
->
buffers
->
ul_busy
[
bs
->
next_slot
]
|=
(
1
<<
bs
->
next_symbol
);
signal_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
);
unlock_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
);
bs
->
next_symbol
++
;
if
(
bs
->
next_symbol
==
14
)
{
bs
->
next_symbol
=
0
;
bs
->
next_slot
=
(
bs
->
next_slot
+
1
)
%
20
;
if
(
bs
->
next_slot
==
0
)
{
bs
->
expected_benetel_frame
++
;
bs
->
expected_benetel_frame
&=
255
;
bs
->
buffers
->
ul_busy
[
a
][
bs
->
next_slot
[
a
]]
|=
(
1
<<
bs
->
next_symbol
[
a
]
);
signal_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
[
a
]
);
unlock_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
[
a
]
);
bs
->
next_symbol
[
a
]
++
;
if
(
bs
->
next_symbol
[
a
]
==
14
)
{
bs
->
next_symbol
[
a
]
=
0
;
bs
->
next_slot
[
a
]
=
(
bs
->
next_slot
[
a
]
+
1
)
%
20
;
if
(
bs
->
next_slot
[
a
]
==
0
)
{
bs
->
expected_benetel_frame
[
a
]
++
;
bs
->
expected_benetel_frame
[
a
]
&=
255
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
targets/ARCH/ETHERNET/benetel/5g/low.h
View file @
b7ea4e0f
...
...
@@ -26,9 +26,10 @@
typedef
struct
{
shared_buffers
*
buffers
;
int
next_slot
;
int
next_symbol
;
int
expected_benetel_frame
;
/* [2] is for two antennas */
int
next_slot
[
2
];
int
next_symbol
[
2
];
int
expected_benetel_frame
[
2
];
char
*
dpdk_main_command_line
;
}
benetel_t
;
...
...
This diff is collapsed.
Click to expand it.
targets/ARCH/ETHERNET/benetel/5g/low_dpdk.c
View file @
b7ea4e0f
...
...
@@ -68,7 +68,8 @@ void *benetel_start_dpdk(char *ifname, shared_buffers *buffers, char *dpdk_main_
bs
->
buffers
=
buffers
;
bs
->
expected_benetel_frame
=
255
;
bs
->
expected_benetel_frame
[
0
]
=
255
;
bs
->
expected_benetel_frame
[
1
]
=
255
;
bs
->
dpdk_main_command_line
=
dpdk_main_command_line
;
...
...
This diff is collapsed.
Click to expand it.
targets/ARCH/ETHERNET/benetel/5g/shared_buffers.c
View file @
b7ea4e0f
...
...
@@ -45,11 +45,16 @@ void init_buffers(shared_buffers *s)
* needs to have slots 1, 2 and 3, 4 and 5 ready. Let's pretend
* they are ready.
*/
s
->
dl_busy
[
1
]
=
0x3fff
;
s
->
dl_busy
[
2
]
=
0x3fff
;
s
->
dl_busy
[
3
]
=
0x3fff
;
s
->
dl_busy
[
4
]
=
0x3fff
;
s
->
dl_busy
[
5
]
=
0x3fff
;
s
->
dl_busy
[
0
][
1
]
=
0x3fff
;
s
->
dl_busy
[
0
][
2
]
=
0x3fff
;
s
->
dl_busy
[
0
][
3
]
=
0x3fff
;
s
->
dl_busy
[
0
][
4
]
=
0x3fff
;
s
->
dl_busy
[
0
][
5
]
=
0x3fff
;
s
->
dl_busy
[
1
][
1
]
=
0x3fff
;
s
->
dl_busy
[
1
][
2
]
=
0x3fff
;
s
->
dl_busy
[
1
][
3
]
=
0x3fff
;
s
->
dl_busy
[
1
][
4
]
=
0x3fff
;
s
->
dl_busy
[
1
][
5
]
=
0x3fff
;
}
void
lock_dl_buffer
(
shared_buffers
*
s
,
int
slot
)
...
...
This diff is collapsed.
Click to expand it.
targets/ARCH/ETHERNET/benetel/5g/shared_buffers.h
View file @
b7ea4e0f
...
...
@@ -26,10 +26,11 @@
#include <stdint.h>
typedef
struct
{
unsigned
char
dl
[
20
][
14
*
1272
*
4
];
unsigned
char
ul
[
20
][
14
*
1272
*
4
];
uint16_t
dl_busy
[
20
];
uint16_t
ul_busy
[
20
];
/* [2] is for two antennas */
unsigned
char
dl
[
2
][
20
][
14
*
1272
*
4
];
unsigned
char
ul
[
2
][
20
][
14
*
1272
*
4
];
uint16_t
dl_busy
[
2
][
20
];
uint16_t
ul_busy
[
2
][
20
];
pthread_mutex_t
m_ul
[
20
];
pthread_cond_t
c_ul
[
20
];
...
...
This diff is collapsed.
Click to expand it.
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