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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
80c261c9
Commit
80c261c9
authored
Mar 19, 2021
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed lte-dlsim segflt
parent
58d10d59
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
13 deletions
+14
-13
executables/nr-ue.c
executables/nr-ue.c
+9
-9
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+2
-2
openair1/PHY/defs_common.h
openair1/PHY/defs_common.h
+1
-2
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+2
-0
No files found.
executables/nr-ue.c
View file @
80c261c9
...
@@ -557,7 +557,7 @@ void *UE_thread(void *arg) {
...
@@ -557,7 +557,7 @@ void *UE_thread(void *arg) {
const
int
nb_slot_frame
=
UE
->
frame_parms
.
slots_per_frame
;
const
int
nb_slot_frame
=
UE
->
frame_parms
.
slots_per_frame
;
int
absolute_slot
=
0
,
decoded_frame_rx
=
INT_MAX
,
trashed_frames
=
0
;
int
absolute_slot
=
0
,
decoded_frame_rx
=
INT_MAX
,
trashed_frames
=
0
;
for
(
int
i
=
0
;
i
<
RX_NB_TH
+
1
;
i
++
)
{
//
RX_NB_TH working + 1 we are making to be pushed
for
(
int
i
=
0
;
i
<
NR_RX_NB_TH
+
1
;
i
++
)
{
// NR_
RX_NB_TH working + 1 we are making to be pushed
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
,
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
RX_JOB_ID
,
&
nf
,
processSlotRX
));
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
,
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
RX_JOB_ID
,
&
nf
,
processSlotRX
));
pushNotifiedFIFO
(
&
txFifo
,
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
TX_JOB_ID
,
&
txFifo
,
processSlotTX
));
pushNotifiedFIFO
(
&
txFifo
,
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
TX_JOB_ID
,
&
txFifo
,
processSlotTX
));
}
}
...
@@ -630,9 +630,9 @@ void *UE_thread(void *arg) {
...
@@ -630,9 +630,9 @@ void *UE_thread(void *arg) {
// whatever means thread_idx
// whatever means thread_idx
// Fix me: will be wrong when slot 1 is slow, as slot 2 finishes
// Fix me: will be wrong when slot 1 is slow, as slot 2 finishes
// Slot 3 will overlap if RX_NB_TH is 2
// Slot 3 will overlap if
NR_
RX_NB_TH is 2
// this is general failure in UE !!!
// this is general failure in UE !!!
thread_idx
=
absolute_slot
%
RX_NB_TH
;
thread_idx
=
absolute_slot
%
NR_
RX_NB_TH
;
int
slot_nr
=
absolute_slot
%
nb_slot_frame
;
int
slot_nr
=
absolute_slot
%
nb_slot_frame
;
notifiedFIFO_elt_t
*
msgToPush
;
notifiedFIFO_elt_t
*
msgToPush
;
AssertFatal
((
msgToPush
=
pullTpool
(
&
freeBlocks
,
&
(
get_nrUE_params
()
->
Tpool
)))
!=
NULL
,
"chained list failure"
);
AssertFatal
((
msgToPush
=
pullTpool
(
&
freeBlocks
,
&
(
get_nrUE_params
()
->
Tpool
)))
!=
NULL
,
"chained list failure"
);
...
@@ -664,18 +664,18 @@ void *UE_thread(void *arg) {
...
@@ -664,18 +664,18 @@ void *UE_thread(void *arg) {
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
txp
[
i
]
=
(
void
*
)
&
UE
->
common_vars
.
txdata
[
i
][
UE
->
frame_parms
.
get_samples_slot_timestamp
(
txp
[
i
]
=
(
void
*
)
&
UE
->
common_vars
.
txdata
[
i
][
UE
->
frame_parms
.
get_samples_slot_timestamp
(
((
slot_nr
+
DURATION_RX_TO_TX
-
RX_NB_TH
)
%
nb_slot_frame
),
&
UE
->
frame_parms
,
0
)];
((
slot_nr
+
DURATION_RX_TO_TX
-
NR_
RX_NB_TH
)
%
nb_slot_frame
),
&
UE
->
frame_parms
,
0
)];
int
readBlockSize
,
writeBlockSize
;
int
readBlockSize
,
writeBlockSize
;
if
(
slot_nr
<
(
nb_slot_frame
-
1
))
{
if
(
slot_nr
<
(
nb_slot_frame
-
1
))
{
readBlockSize
=
get_readBlockSize
(
slot_nr
,
&
UE
->
frame_parms
);
readBlockSize
=
get_readBlockSize
(
slot_nr
,
&
UE
->
frame_parms
);
writeBlockSize
=
UE
->
frame_parms
.
get_samples_per_slot
((
slot_nr
+
DURATION_RX_TO_TX
-
RX_NB_TH
)
%
nb_slot_frame
,
&
UE
->
frame_parms
);
writeBlockSize
=
UE
->
frame_parms
.
get_samples_per_slot
((
slot_nr
+
DURATION_RX_TO_TX
-
NR_
RX_NB_TH
)
%
nb_slot_frame
,
&
UE
->
frame_parms
);
}
else
{
}
else
{
UE
->
rx_offset_diff
=
computeSamplesShift
(
UE
);
UE
->
rx_offset_diff
=
computeSamplesShift
(
UE
);
readBlockSize
=
get_readBlockSize
(
slot_nr
,
&
UE
->
frame_parms
)
-
readBlockSize
=
get_readBlockSize
(
slot_nr
,
&
UE
->
frame_parms
)
-
UE
->
rx_offset_diff
;
UE
->
rx_offset_diff
;
writeBlockSize
=
UE
->
frame_parms
.
get_samples_per_slot
((
slot_nr
+
DURATION_RX_TO_TX
-
RX_NB_TH
)
%
nb_slot_frame
,
&
UE
->
frame_parms
)
-
UE
->
rx_offset_diff
;
writeBlockSize
=
UE
->
frame_parms
.
get_samples_per_slot
((
slot_nr
+
DURATION_RX_TO_TX
-
NR_
RX_NB_TH
)
%
nb_slot_frame
,
&
UE
->
frame_parms
)
-
UE
->
rx_offset_diff
;
}
}
AssertFatal
(
readBlockSize
==
AssertFatal
(
readBlockSize
==
...
@@ -707,7 +707,7 @@ void *UE_thread(void *arg) {
...
@@ -707,7 +707,7 @@ void *UE_thread(void *arg) {
notifiedFIFO_elt_t
*
res
;
notifiedFIFO_elt_t
*
res
;
while
(
nbSlotProcessing
>=
RX_NB_TH
)
{
while
(
nbSlotProcessing
>=
NR_
RX_NB_TH
)
{
res
=
pullTpool
(
&
nf
,
&
(
get_nrUE_params
()
->
Tpool
));
res
=
pullTpool
(
&
nf
,
&
(
get_nrUE_params
()
->
Tpool
));
nbSlotProcessing
--
;
nbSlotProcessing
--
;
nr_rxtx_thread_data_t
*
tmp
=
(
nr_rxtx_thread_data_t
*
)
res
->
msgData
;
nr_rxtx_thread_data_t
*
tmp
=
(
nr_rxtx_thread_data_t
*
)
res
->
msgData
;
...
@@ -725,7 +725,7 @@ void *UE_thread(void *arg) {
...
@@ -725,7 +725,7 @@ void *UE_thread(void *arg) {
decoded_frame_rx
,
curMsg
->
proc
.
frame_rx
);
decoded_frame_rx
,
curMsg
->
proc
.
frame_rx
);
// use previous timing_advance value to compute writeTimestamp
// use previous timing_advance value to compute writeTimestamp
writeTimestamp
=
timestamp
+
UE
->
frame_parms
.
get_samples_slot_timestamp
(
slot_nr
,
&
UE
->
frame_parms
,
DURATION_RX_TO_TX
-
RX_NB_TH
)
-
writeTimestamp
=
timestamp
+
UE
->
frame_parms
.
get_samples_slot_timestamp
(
slot_nr
,
&
UE
->
frame_parms
,
DURATION_RX_TO_TX
-
NR_
RX_NB_TH
)
-
firstSymSamp
-
openair0_cfg
[
0
].
tx_sample_advance
-
UE
->
N_TA_offset
-
timing_advance
;
firstSymSamp
-
openair0_cfg
[
0
].
tx_sample_advance
-
UE
->
N_TA_offset
-
timing_advance
;
// but use current UE->timing_advance value to compute writeBlockSize
// but use current UE->timing_advance value to compute writeBlockSize
...
@@ -735,7 +735,7 @@ void *UE_thread(void *arg) {
...
@@ -735,7 +735,7 @@ void *UE_thread(void *arg) {
}
}
int
flags
=
0
;
int
flags
=
0
;
int
slot_tx_usrp
=
slot_nr
+
DURATION_RX_TO_TX
-
RX_NB_TH
;
int
slot_tx_usrp
=
slot_nr
+
DURATION_RX_TO_TX
-
NR_
RX_NB_TH
;
if
(
openair0_cfg
[
0
].
duplex_mode
==
duplex_mode_TDD
)
{
if
(
openair0_cfg
[
0
].
duplex_mode
==
duplex_mode_TDD
)
{
...
...
executables/nr-uesoftmodem.c
View file @
80c261c9
...
@@ -220,8 +220,8 @@ void init_tpools(uint8_t nun_dlsch_threads) {
...
@@ -220,8 +220,8 @@ void init_tpools(uint8_t nun_dlsch_threads) {
memcpy
(
params
,
"N"
,
1
);
memcpy
(
params
,
"N"
,
1
);
}
}
else
{
else
{
params
=
calloc
(
1
,(
RX_NB_TH
*
NB_TH_SLOT
*
3
)
+
1
);
params
=
calloc
(
1
,(
NR_RX_NB_TH
*
NR_
NB_TH_SLOT
*
3
)
+
1
);
for
(
int
i
=
0
;
i
<
RX_NB_TH
*
NB_TH_SLOT
;
i
++
)
{
for
(
int
i
=
0
;
i
<
NR_RX_NB_TH
*
NR_
NB_TH_SLOT
;
i
++
)
{
memcpy
(
params
+
(
i
*
3
),
"-1,"
,
3
);
memcpy
(
params
+
(
i
*
3
),
"-1,"
,
3
);
}
}
}
}
...
...
openair1/PHY/defs_common.h
View file @
80c261c9
...
@@ -74,8 +74,7 @@
...
@@ -74,8 +74,7 @@
#include "nfapi_interface.h"
#include "nfapi_interface.h"
#define RX_NB_TH_MAX 2
#define RX_NB_TH_MAX 2
#define RX_NB_TH 1
#define RX_NB_TH 2
#define NB_TH_SLOT 2
#define RX_NB_TH_DL 14
#define RX_NB_TH_DL 14
#define LTE_SLOTS_PER_SUBFRAME 2
#define LTE_SLOTS_PER_SUBFRAME 2
...
...
openair1/PHY/defs_nr_common.h
View file @
80c261c9
...
@@ -109,6 +109,8 @@
...
@@ -109,6 +109,8 @@
#define MAX_NUM_NR_CHANNEL_BITS (14*273*12*8) // 14 symbols, 273 RB
#define MAX_NUM_NR_CHANNEL_BITS (14*273*12*8) // 14 symbols, 273 RB
#define MAX_NUM_NR_RE (14*273*12)
#define MAX_NUM_NR_RE (14*273*12)
#define NR_RX_NB_TH 1
#define NR_NB_TH_SLOT 2
extern
const
uint8_t
nr_rv_round_map
[
4
];
extern
const
uint8_t
nr_rv_round_map
[
4
];
extern
const
uint8_t
nr_rv_round_map_ue
[
4
];
extern
const
uint8_t
nr_rv_round_map_ue
[
4
];
...
...
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