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
210829e9
Commit
210829e9
authored
Oct 11, 2021
by
hardy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/phy-asan-fixes' into integration_2021_wk41
parents
640e3ce8
b0b71016
Changes
27
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
610 additions
and
358 deletions
+610
-358
ci-scripts/datalog_rt_stats.yaml
ci-scripts/datalog_rt_stats.yaml
+4
-2
executables/nr-gnb.c
executables/nr-gnb.c
+60
-25
executables/nr-ru.c
executables/nr-ru.c
+10
-9
nfapi/oai_integration/nfapi_pnf.c
nfapi/oai_integration/nfapi_pnf.c
+62
-23
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+17
-24
openair1/PHY/INIT/phy_init.h
openair1/PHY/INIT/phy_init.h
+1
-0
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+2
-2
openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
+0
-104
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+4
-4
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
+2
-4
openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c
+3
-35
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+2
-2
openair1/PHY/defs_RU.h
openair1/PHY/defs_RU.h
+1
-0
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+22
-5
openair1/SCHED/nfapi_lte_dummy.c
openair1/SCHED/nfapi_lte_dummy.c
+6
-5
openair1/SCHED/nfapi_nr_dummy.c
openair1/SCHED/nfapi_nr_dummy.c
+4
-5
openair1/SCHED_NR/fapi_nr_l1.c
openair1/SCHED_NR/fapi_nr_l1.c
+30
-57
openair1/SCHED_NR/fapi_nr_l1.h
openair1/SCHED_NR/fapi_nr_l1.h
+3
-3
openair1/SCHED_NR/phy_frame_config_nr.c
openair1/SCHED_NR/phy_frame_config_nr.c
+16
-0
openair1/SCHED_NR/phy_frame_config_nr.h
openair1/SCHED_NR/phy_frame_config_nr.h
+2
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+20
-32
openair1/SCHED_NR/sched_nr.h
openair1/SCHED_NR/sched_nr.h
+1
-1
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+4
-2
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+26
-10
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+5
-4
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+7
-0
targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_nsa_n310.conf
...s/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_nsa_n310.conf
+296
-0
No files found.
ci-scripts/datalog_rt_stats.yaml
View file @
210829e9
...
...
@@ -12,7 +12,8 @@ Ref :
feptx_prec
:
8.0
feptx_ofdm
:
50.0
feptx_total
:
75.0
L1 Tx processing
:
300.0
L1 Tx processing thread 0
:
300.0
L1 Tx processing thread 1
:
300.0
DLSCH encoding
:
230.0
L1 Rx processing
:
175.0
PUSCH inner-receiver
:
100.0
...
...
@@ -24,7 +25,8 @@ Threshold :
feptx_prec
:
1.25
feptx_ofdm
:
1.25
feptx_total
:
1.25
L1 Tx processing
:
1.25
L1 Tx processing thread 0
:
1.25
L1 Tx processing thread 1
:
1.25
DLSCH encoding
:
1.25
L1 Rx processing
:
1.25
PUSCH inner-receiver
:
1.25
...
...
executables/nr-gnb.c
View file @
210829e9
...
...
@@ -49,6 +49,7 @@
#include "SCHED_NR/fapi_nr_l1.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
...
...
@@ -114,19 +115,36 @@ time_stats_t softmodem_stats_rx_sf; // total rx time
void
tx_func
(
void
*
param
)
{
processingData_L1
_t
*
info
=
(
processingData_L1
_t
*
)
param
;
processingData_L1
tx_t
*
info
=
(
processingData_L1tx
_t
*
)
param
;
PHY_VARS_gNB
*
gNB
=
info
->
gNB
;
int
frame_tx
=
info
->
frame_tx
;
int
slot_tx
=
info
->
slot_tx
;
phy_procedures_gNB_TX
(
gNB
,
frame_tx
,
slot_tx
,
1
);
// start FH TX processing
notifiedFIFO_elt_t
*
res
;
int
frame_tx
=
info
->
frame
;
int
slot_tx
=
info
->
slot
;
phy_procedures_gNB_TX
(
info
,
frame_tx
,
slot_tx
,
1
);
info
->
slot
=
-
1
;
if
((
frame_tx
&
127
)
==
0
)
dump_pdsch_stats
(
gNB
);
// If the later of the 2 L1 tx thread finishes first,
// we wait for the earlier one to finish and start the RU thread
// to avoid realtime issues with USRP
// Start RU TX processing.
notifiedFIFO_elt_t
*
res
;
res
=
pullTpool
(
gNB
->
resp_RU_tx
,
gNB
->
threadPool
);
processingData_RU_t
*
syncMsg
=
(
processingData_RU_t
*
)
NotifiedFifoData
(
res
);
LOG_D
(
PHY
,
"waiting for previous tx to finish, next slot %d,%d
\n
"
,
syncMsg
->
next_slot
,
slot_tx
);
while
(
syncMsg
->
next_slot
!=
slot_tx
)
{
pushNotifiedFIFO
(
gNB
->
resp_RU_tx
,
res
);
res
=
pullTpool
(
gNB
->
resp_RU_tx
,
gNB
->
threadPool
);
syncMsg
=
(
processingData_RU_t
*
)
NotifiedFifoData
(
res
);
}
LOG_D
(
PHY
,
"previous tx finished, next slot %d,%d
\n
"
,
syncMsg
->
next_slot
,
slot_tx
);
syncMsg
->
frame_tx
=
frame_tx
;
syncMsg
->
slot_tx
=
slot_tx
;
syncMsg
->
next_slot
=
get_next_downlink_slot
(
gNB
,
&
gNB
->
gNB_config
,
frame_tx
,
slot_tx
);
syncMsg
->
timestamp_tx
=
info
->
timestamp_tx
;
syncMsg
->
ru
=
gNB
->
RU_list
[
0
];
res
->
key
=
slot_tx
;
...
...
@@ -201,13 +219,6 @@ void rx_func(void *param) {
}
up_removed
++
;
}
for
(
j
=
0
;
j
<
NUMBER_OF_NR_DLSCH_MAX
;
j
++
)
if
(
gNB
->
dlsch
[
j
][
0
]
->
rnti
==
rnti_to_remove
[
i
])
{
gNB
->
dlsch
[
j
][
0
]
->
rnti
=
0
;
gNB
->
dlsch
[
j
][
0
]
->
harq_mask
=
0
;
//clean_gNB_dlsch(gNB->dlsch[j][0]);
down_removed
++
;
}
for
(
j
=
0
;
j
<
NUMBER_OF_NR_PUCCH_MAX
;
j
++
)
if
(
gNB
->
pucch
[
j
]
->
active
>
0
&&
gNB
->
pucch
[
j
]
->
pucch_pdu
.
rnti
==
rnti_to_remove
[
i
])
{
...
...
@@ -255,7 +266,6 @@ void rx_func(void *param) {
LOG_D
(
PHY
,
"%s() Exit proc[rx:%d%d tx:%d%d]
\n
"
,
__FUNCTION__
,
frame_rx
,
slot_rx
,
frame_tx
,
slot_tx
);
// Call the scheduler
start_meas
(
&
gNB
->
ul_indication_stats
);
pthread_mutex_lock
(
&
gNB
->
UL_INFO_mutex
);
gNB
->
UL_INFO
.
frame
=
frame_rx
;
...
...
@@ -266,16 +276,17 @@ void rx_func(void *param) {
pthread_mutex_unlock
(
&
gNB
->
UL_INFO_mutex
);
stop_meas
(
&
gNB
->
ul_indication_stats
);
notifiedFIFO_elt_t
*
res
;
if
(
tx_slot_type
==
NR_DOWNLINK_SLOT
||
tx_slot_type
==
NR_MIXED_SLOT
)
{
notifiedFIFO_elt_t
*
res
;
res
=
pullTpool
(
gNB
->
resp_L1_tx
,
gNB
->
threadPool
);
processingData_L1_t
*
syncMsg
=
(
processingData_L1_t
*
)
NotifiedFifoData
(
res
);
processingData_L1tx_t
*
syncMsg
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
res
);
while
(
syncMsg
->
slot
!=
slot_tx
)
{
pushNotifiedFIFO
(
gNB
->
resp_L1_tx
,
res
);
res
=
pullTpool
(
gNB
->
resp_L1_tx
,
gNB
->
threadPool
);
syncMsg
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
res
);
}
syncMsg
->
gNB
=
gNB
;
syncMsg
->
frame_rx
=
frame_rx
;
syncMsg
->
slot_rx
=
slot_rx
;
syncMsg
->
frame_tx
=
frame_tx
;
syncMsg
->
slot_tx
=
slot_tx
;
AssertFatal
(
syncMsg
->
slot
==
slot_tx
,
"Thread message slot and logical slot number do not match
\n
"
);
syncMsg
->
timestamp_tx
=
info
->
timestamp_tx
;
res
->
key
=
slot_tx
;
pushTpool
(
gNB
->
threadPool
,
res
);
...
...
@@ -325,7 +336,6 @@ static void *process_stats_thread(void *param) {
PHY_VARS_gNB
*
gNB
=
(
PHY_VARS_gNB
*
)
param
;
reset_meas
(
&
gNB
->
phy_proc_tx
);
reset_meas
(
&
gNB
->
dlsch_encoding_stats
);
reset_meas
(
&
gNB
->
phy_proc_rx
);
reset_meas
(
&
gNB
->
ul_indication_stats
);
...
...
@@ -337,7 +347,8 @@ static void *process_stats_thread(void *param) {
while
(
!
oai_exit
)
{
sleep
(
1
);
print_meas
(
&
gNB
->
phy_proc_tx
,
"L1 Tx processing"
,
NULL
,
NULL
);
print_meas
(
gNB
->
phy_proc_tx_0
,
"L1 Tx processing thread 0"
,
NULL
,
NULL
);
print_meas
(
gNB
->
phy_proc_tx_1
,
"L1 Tx processing thread 1"
,
NULL
,
NULL
);
print_meas
(
&
gNB
->
dlsch_encoding_stats
,
"DLSCH encoding"
,
NULL
,
NULL
);
print_meas
(
&
gNB
->
phy_proc_rx
,
"L1 Rx processing"
,
NULL
,
NULL
);
print_meas
(
&
gNB
->
ul_indication_stats
,
"UL Indication"
,
NULL
,
NULL
);
...
...
@@ -390,14 +401,38 @@ void init_gNB_Tpool(int inst) {
// L1 RX result FIFO
gNB
->
resp_L1
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initNotifiedFIFO
(
gNB
->
resp_L1
);
notifiedFIFO_elt_t
*
msg
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_L1_t
),
0
,
gNB
->
resp_L1
,
rx_func
);
pushNotifiedFIFO
(
gNB
->
resp_L1
,
msg
);
// to unblock the process in the beginning
// L1 TX result FIFO
gNB
->
resp_L1_tx
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initNotifiedFIFO
(
gNB
->
resp_L1_tx
);
// we create 2 threads for L1 tx processing
notifiedFIFO_elt_t
*
msgL1Tx
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_L1tx_t
),
0
,
gNB
->
resp_L1_tx
,
tx_func
);
processingData_L1tx_t
*
msgDataTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
msgL1Tx
);
init_DLSCH_struct
(
gNB
,
msgDataTx
);
msgDataTx
->
slot
=
-
1
;
memset
(
msgDataTx
->
ssb
,
0
,
64
*
sizeof
(
NR_gNB_SSB_t
));
reset_meas
(
&
msgDataTx
->
phy_proc_tx
);
gNB
->
phy_proc_tx_0
=
&
msgDataTx
->
phy_proc_tx
;
pushNotifiedFIFO
(
gNB
->
resp_L1_tx
,
msgL1Tx
);
// to unblock the process in the beginning
msgL1Tx
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_L1tx_t
),
0
,
gNB
->
resp_L1_tx
,
tx_func
);
msgDataTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
msgL1Tx
);
init_DLSCH_struct
(
gNB
,
msgDataTx
);
msgDataTx
->
slot
=
-
1
;
memset
(
msgDataTx
->
ssb
,
0
,
64
*
sizeof
(
NR_gNB_SSB_t
));
reset_meas
(
&
msgDataTx
->
phy_proc_tx
);
gNB
->
phy_proc_tx_1
=
&
msgDataTx
->
phy_proc_tx
;
pushNotifiedFIFO
(
gNB
->
resp_L1_tx
,
msgL1Tx
);
// to unblock the process in the beginning
// RU TX result FIFO
gNB
->
resp_RU_tx
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initNotifiedFIFO
(
gNB
->
resp_RU_tx
);
notifiedFIFO_elt_t
*
msgRUTx
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_RU_t
),
0
,
gNB
->
resp_RU_tx
,
ru_tx_func
);
processingData_RU_t
*
msgData
=
(
processingData_RU_t
*
)
msgRUTx
->
msgData
;
msgData
->
next_slot
=
sf_ahead
*
gNB
->
frame_parms
.
slots_per_subframe
;
// first Tx slot
pushNotifiedFIFO
(
gNB
->
resp_RU_tx
,
msgRUTx
);
// to unblock the process in the beginning
// Stats measurement thread
if
(
opp_enabled
==
1
)
threadCreate
(
&
proc
->
process_stats_thread
,
process_stats_thread
,(
void
*
)
gNB
,
"time_meas"
,
-
1
,
OAI_PRIORITY_RT_LOW
);
...
...
executables/nr-ru.c
View file @
210829e9
...
...
@@ -1269,14 +1269,9 @@ void *ru_thread( void *param ) {
pthread_cond_signal
(
&
RC
.
ru_cond
);
pthread_mutex_unlock
(
&
RC
.
ru_mutex
);
wait_sync
(
"ru_thread"
);
notifiedFIFO_elt_t
*
msg
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_L1_t
),
0
,
gNB
->
resp_L1
,
rx_func
);
notifiedFIFO_elt_t
*
msgL1Tx
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_L1_t
),
0
,
gNB
->
resp_L1_tx
,
tx_func
);
notifiedFIFO_elt_t
*
msgRUTx
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_L1_t
),
0
,
gNB
->
resp_RU_tx
,
ru_tx_func
);
processingData_L1_t
*
syncMsg
;
notifiedFIFO_elt_t
*
res
;
pushNotifiedFIFO
(
gNB
->
resp_L1
,
msg
);
// to unblock the process in the beginning
pushNotifiedFIFO
(
gNB
->
resp_L1_tx
,
msgL1Tx
);
// to unblock the process in the beginning
pushNotifiedFIFO
(
gNB
->
resp_RU_tx
,
msgRUTx
);
// to unblock the process in the beginning
if
(
!
emulate_rf
)
{
// Start RF device if any
...
...
@@ -1405,9 +1400,15 @@ void *ru_thread( void *param ) {
else
LOG_I
(
PHY
,
"RU %d rf device stopped
\n
"
,
ru
->
idx
);
}
delNotifiedFIFO_elt
(
msg
);
delNotifiedFIFO_elt
(
msgL1Tx
);
delNotifiedFIFO_elt
(
msgRUTx
);
res
=
pullNotifiedFIFO
(
gNB
->
resp_L1
);
delNotifiedFIFO_elt
(
res
);
res
=
pullNotifiedFIFO
(
gNB
->
resp_L1_tx
);
delNotifiedFIFO_elt
(
res
);
res
=
pullNotifiedFIFO
(
gNB
->
resp_L1_tx
);
delNotifiedFIFO_elt
(
res
);
res
=
pullNotifiedFIFO
(
gNB
->
resp_RU_tx
);
delNotifiedFIFO_elt
(
res
);
ru_thread_status
=
0
;
return
&
ru_thread_status
;
}
...
...
nfapi/oai_integration/nfapi_pnf.c
View file @
210829e9
...
...
@@ -1104,25 +1104,70 @@ void pnf_phy_deallocate_p7_vendor_ext(nfapi_p7_message_header_t *header) {
free
(
header
);
}
notifiedFIFO_elt_t
*
l1tx_message_extract
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
)
{
notifiedFIFO_elt_t
*
res
;
notifiedFIFO_elt_t
*
freeRes
=
NULL
;
// check first message
res
=
pullTpool
(
gNB
->
resp_L1_tx
,
gNB
->
threadPool
);
processingData_L1tx_t
*
msgTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
res
);
if
(
msgTx
->
slot
==
slot
)
{
return
res
;
}
if
(
msgTx
->
slot
==
-
1
)
{
freeRes
=
res
;
}
// check second message
pushNotifiedFIFO
(
gNB
->
resp_L1_tx
,
res
);
res
=
pullTpool
(
gNB
->
resp_L1_tx
,
gNB
->
threadPool
);
msgTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
res
);
if
(
msgTx
->
slot
==
slot
)
{
return
res
;
}
if
(
msgTx
->
slot
==
-
1
)
{
freeRes
=
res
;
}
if
(
freeRes
)
{
msgTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
res
);
msgTx
->
num_pdsch_slot
=
0
;
msgTx
->
pdcch_pdu
.
pdcch_pdu_rel15
.
numDlDci
=
0
;
msgTx
->
ul_pdcch_pdu
.
pdcch_pdu
.
pdcch_pdu_rel15
.
numDlDci
=
0
;
msgTx
->
slot
=
slot
;
msgTx
->
frame
=
frame
;
return
freeRes
;
}
pushNotifiedFIFO
(
gNB
->
resp_L1_tx
,
res
);
AssertFatal
(
1
==
0
,
"It means both L1 Tx messages are still waiting to be processed. This happens when L1 Tx processing is too slow. Message slot %d, scheduled slot %d
\n
"
,
msgTx
->
slot
,
slot
);
}
int
pnf_phy_ul_dci_req
(
gNB_L1_rxtx_proc_t
*
proc
,
nfapi_pnf_p7_config_t
*
pnf_p7
,
nfapi_nr_ul_dci_request_t
*
req
)
{
// LOG_D(PHY,"[PNF] HI_DCI0_REQUEST SFN/SF:%05d dci:%d hi:%d\n", NFAPI_SFNSF2DEC(req->sfn_sf), req->hi_dci0_request_body.number_of_dci, req->hi_dci0_request_body.number_of_hi);
struct
PHY_VARS_gNB_s
*
gNB
=
RC
.
gNB
[
0
];
// extract the next available thread message (priority to message with current slot, then free message)
notifiedFIFO_elt_t
*
res
;
res
=
l1tx_message_extract
(
gNB
,
req
->
SFN
,
req
->
Slot
);
processingData_L1tx_t
*
msgTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
res
);
if
(
proc
==
NULL
)
proc
=
&
gNB
->
proc
.
L1_proc
;
for
(
int
i
=
0
;
i
<
req
->
numPdus
;
i
++
)
{
if
(
req
->
ul_dci_pdu_list
[
i
].
PDUType
==
0
)
{
nfapi_nr_ul_dci_request_pdus_t
*
ul_dci_req_pdu
=
&
req
->
ul_dci_pdu_list
[
i
];
handle_nfapi_nr_ul_dci_pdu
(
gNB
,
req
->
SFN
,
req
->
Slot
,
ul_dci_req_pdu
);
if
(
req
->
numPdus
>
0
)
{
if
(
req
->
ul_dci_pdu_list
[
req
->
numPdus
-
1
].
PDUType
==
0
)
{
// copy only the last PDU (PHY can have only one UL PDCCH pdu)
msgTx
->
ul_pdcch_pdu
=
req
->
ul_dci_pdu_list
[
req
->
numPdus
-
1
];
// copy the last pdu
}
else
{
LOG_E
(
PHY
,
"[PNF] UL_DCI_REQ sfn_slot:%d PDU[%d] - unknown pdu type:%d
\n
"
,
NFAPI_SFNSLOT2DEC
(
req
->
SFN
,
req
->
Slot
),
i
,
req
->
ul_dci_pdu_list
[
i
].
PDUType
);
LOG_E
(
PHY
,
"[PNF] UL_DCI_REQ sfn_slot:%d PDU[%d] - unknown pdu type:%d
\n
"
,
NFAPI_SFNSLOT2DEC
(
req
->
SFN
,
req
->
Slot
),
req
->
numPdus
-
1
,
req
->
ul_dci_pdu_list
[
req
->
numPdus
-
1
].
PDUType
);
}
}
pushNotifiedFIFO
(
gNB
->
resp_L1_tx
,
res
);
return
0
;
}
...
...
@@ -1193,14 +1238,17 @@ int pnf_phy_dl_tti_req(gNB_L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7,
for
(
int
i
=
0
;
i
<
req
->
dl_tti_request_body
.
nPDUs
;
i
++
)
{
// NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() sfn/sf:%d PDU[%d] size:%d pdcch_vars->num_dci:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), i, dl_config_pdu_list[i].pdu_size,pdcch_vars->num_dci);
notifiedFIFO_elt_t
*
res
;
res
=
l1tx_message_extract
(
gNB
,
sfn
,
slot
);
processingData_L1tx_t
*
msgTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
res
);
if
(
dl_tti_pdu_list
[
i
].
PDUType
==
NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE
)
{
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_pdu
=&
dl_tti_pdu_list
[
i
];
handle_nfapi_nr_pdcch_pdu
(
gNB
,
sfn
,
slot
,
&
dl_tti_pdu
->
pdcch_pdu
);
// we trust the scheduler sends only one PDCCH PDU per slot
msgTx
->
pdcch_pdu
=
dl_tti_pdu_list
[
i
].
pdcch_pdu
;
// fills the last received PDCCH PDU
}
else
if
(
dl_tti_pdu_list
[
i
].
PDUType
==
NFAPI_NR_DL_TTI_SSB_PDU_TYPE
)
{
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() PDU:%d BCH: pdu_index:%u pdu_length:%d sdu_length:%d BCH_SDU:%x,%x,%x\n", __FUNCTION__, i, pdu_index, bch_pdu->bch_pdu_rel8.length, tx_request_pdu[sfn][sf][pdu_index]->segments[0].segment_length, sdu[0], sdu[1], sdu[2]);
handle_nr_nfapi_ssb_pdu
(
gNB
,
sfn
,
slot
,
&
dl_tti_pdu_list
[
i
]);
handle_nr_nfapi_ssb_pdu
(
msgTx
,
sfn
,
slot
,
&
dl_tti_pdu_list
[
i
]);
gNB
->
pbch_configured
=
1
;
}
else
if
(
dl_tti_pdu_list
[
i
].
PDUType
==
NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE
)
{
...
...
@@ -1209,21 +1257,11 @@ int pnf_phy_dl_tti_req(gNB_L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7,
nfapi_nr_pdu_t
*
tx_data
=
tx_data_request
[
sfn
][
slot
][
rel15_pdu
->
pduIndex
];
if
(
tx_data
!=
NULL
)
{
int
UE_id
=
find_nr_dlsch
(
rel15_pdu
->
rnti
,
gNB
,
SEARCH_EXIST_OR_FREE
);
AssertFatal
(
UE_id
!=-
1
,
"no free or exiting dlsch_context
\n
"
);
AssertFatal
(
UE_id
<
NUMBER_OF_UE_MAX
,
"returned UE_id %d >= %d(NUMBER_OF_UE_MAX)
\n
"
,
UE_id
,
NUMBER_OF_UE_MAX
);
NR_gNB_DLSCH_t
*
dlsch0
=
gNB
->
dlsch
[
UE_id
][
0
];
int
harq_pid
=
dlsch0
->
harq_ids
[
sfn
%
2
][
slot
];
if
(
harq_pid
>=
dlsch0
->
Mdlharq
)
{
LOG_E
(
PHY
,
"pnf_phy_dl_config_req illegal harq_pid %d
\n
"
,
harq_pid
);
return
(
-
1
);
}
uint8_t
*
dlsch_sdu
=
nr_tx_pdus
[
UE_id
][
harq_pid
];
memcpy
(
dlsch_sdu
,
tx_data
->
TLVs
[
0
].
value
.
direct
,
tx_data
->
PDU_length
);
uint8_t
*
dlsch_sdu
=
(
uint8_t
*
)
tx_data
->
TLVs
[
0
].
value
.
direct
;
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() DLSCH:pdu_index:%d handle_nfapi_dlsch_pdu(eNB, proc_rxtx, dlsch_pdu, transport_blocks:%d sdu:%p) eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols:%d\n", __FUNCTION__, rel8_pdu->pdu_index, rel8_pdu->transport_blocks, dlsch_sdu, eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols);
handle_nr_nfapi_pdsch_pdu
(
gNB
,
sfn
,
slot
,
pdsch_pdu
,
dlsch_sdu
);
AssertFatal
(
msgTx
->
num_pdsch_slot
<
gNB
->
number_of_nr_dlsch_max
,
"Number of PDSCH PDUs %d exceeded the limit %d
\n
"
,
msgTx
->
num_pdsch_slot
,
gNB
->
number_of_nr_dlsch_max
);
handle_nr_nfapi_pdsch_pdu
(
msgTx
,
pdsch_pdu
,
dlsch_sdu
);
}
else
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s() DLSCH NULL TX PDU SFN/SF:%d PDU_INDEX:%d
\n
"
,
__FUNCTION__
,
NFAPI_SFNSLOT2DEC
(
sfn
,
slot
),
rel15_pdu
->
pduIndex
);
...
...
@@ -1231,11 +1269,12 @@ int pnf_phy_dl_tti_req(gNB_L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7,
}
else
if
(
dl_tti_pdu_list
[
i
].
PDUType
==
NFAPI_NR_DL_TTI_CSI_RS_PDU_TYPE
)
{
nfapi_nr_dl_tti_csi_rs_pdu
*
csi_rs_pdu
=
&
dl_tti_pdu_list
[
i
].
csi_rs_pdu
;
handle_nfapi_nr_csirs_pdu
(
gNB
,
sfn
,
slot
,
csi_rs_pdu
);
handle_nfapi_nr_csirs_pdu
(
msgTx
,
sfn
,
slot
,
csi_rs_pdu
);
}
else
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s() UNKNOWN:%d
\n
"
,
__FUNCTION__
,
dl_tti_pdu_list
[
i
].
PDUType
);
}
pushNotifiedFIFO
(
gNB
->
resp_L1_tx
,
res
);
}
if
(
req
->
vendor_extension
)
...
...
openair1/PHY/INIT/nr_init.c
View file @
210829e9
...
...
@@ -518,45 +518,38 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config) {
LOG_I
(
PHY
,
"gNB %d configured
\n
"
,
Mod_id
);
}
void
init_DLSCH_struct
(
PHY_VARS_gNB
*
gNB
,
processingData_L1tx_t
*
msg
)
{
NR_DL_FRAME_PARMS
*
fp
=
&
gNB
->
frame_parms
;
nfapi_nr_config_request_scf_t
*
cfg
=
&
gNB
->
gNB_config
;
uint16_t
grid_size
=
cfg
->
carrier_config
.
dl_grid_size
[
fp
->
numerology_index
].
value
;
msg
->
num_pdsch_slot
=
0
;
for
(
int
i
=
0
;
i
<
gNB
->
number_of_nr_dlsch_max
;
i
++
)
{
LOG_I
(
PHY
,
"Allocating Transport Channel Buffers for DLSCH %d/%d
\n
"
,
i
,
gNB
->
number_of_nr_dlsch_max
);
for
(
int
j
=
0
;
j
<
2
;
j
++
)
{
msg
->
dlsch
[
i
][
j
]
=
new_gNB_dlsch
(
fp
,
1
,
16
,
NSOFT
,
0
,
grid_size
);
AssertFatal
(
msg
->
dlsch
[
i
][
j
]
!=
NULL
,
"Can't initialize dlsch %d
\n
"
,
i
);
}
}
}
void
init_nr_transport
(
PHY_VARS_gNB
*
gNB
)
{
int
i
;
int
j
;
NR_DL_FRAME_PARMS
*
fp
=
&
gNB
->
frame_parms
;
nfapi_nr_config_request_scf_t
*
cfg
=
&
gNB
->
gNB_config
;
LOG_I
(
PHY
,
"Initialise nr transport
\n
"
);
uint16_t
grid_size
=
cfg
->
carrier_config
.
dl_grid_size
[
fp
->
numerology_index
].
value
;
memset
(
gNB
->
num_pdsch_rnti
,
0
,
sizeof
(
uint16_t
)
*
80
);
for
(
i
=
0
;
i
<
NUMBER_OF_NR_PDCCH_MAX
;
i
++
)
{
LOG_I
(
PHY
,
"Initializing PDCCH list for PDCCH %d/%d
\n
"
,
i
,
NUMBER_OF_NR_PDCCH_MAX
);
gNB
->
pdcch_pdu
[
i
].
frame
=-
1
;
LOG_I
(
PHY
,
"Initializing UL PDCCH list for UL PDCCH %d/%d
\n
"
,
i
,
NUMBER_OF_NR_PDCCH_MAX
);
gNB
->
ul_pdcch_pdu
[
i
].
frame
=-
1
;
}
for
(
i
=
0
;
i
<
NUMBER_OF_NR_PUCCH_MAX
;
i
++
)
{
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_PUCCH_MAX
;
i
++
)
{
LOG_I
(
PHY
,
"Allocating Transport Channel Buffers for PUCCH %d/%d
\n
"
,
i
,
NUMBER_OF_NR_PUCCH_MAX
);
gNB
->
pucch
[
i
]
=
new_gNB_pucch
();
AssertFatal
(
gNB
->
pucch
[
i
]
!=
NULL
,
"Can't initialize pucch %d
\n
"
,
i
);
}
for
(
i
=
0
;
i
<
gNB
->
number_of_nr_dlsch_max
;
i
++
)
{
LOG_I
(
PHY
,
"Allocating Transport Channel Buffers for DLSCH %d/%d
\n
"
,
i
,
gNB
->
number_of_nr_dlsch_max
);
for
(
j
=
0
;
j
<
2
;
j
++
)
{
gNB
->
dlsch
[
i
][
j
]
=
new_gNB_dlsch
(
fp
,
1
,
16
,
NSOFT
,
0
,
grid_size
);
AssertFatal
(
gNB
->
dlsch
[
i
][
j
]
!=
NULL
,
"Can't initialize dlsch %d
\n
"
,
i
);
}
}
for
(
i
=
0
;
i
<
gNB
->
number_of_nr_ulsch_max
;
i
++
)
{
for
(
int
i
=
0
;
i
<
gNB
->
number_of_nr_ulsch_max
;
i
++
)
{
LOG_I
(
PHY
,
"Allocating Transport Channel Buffer for ULSCH %d/%d
\n
"
,
i
,
gNB
->
number_of_nr_ulsch_max
);
for
(
j
=
0
;
j
<
2
;
j
++
)
{
for
(
int
j
=
0
;
j
<
2
;
j
++
)
{
// ULSCH for data
gNB
->
ulsch
[
i
][
j
]
=
new_gNB_ulsch
(
MAX_LDPC_ITERATIONS
,
fp
->
N_RB_UL
,
0
);
...
...
openair1/PHY/INIT/phy_init.h
View file @
210829e9
...
...
@@ -409,6 +409,7 @@ void init_nr_transport(PHY_VARS_gNB *gNB);
void
init_dfts
(
void
);
void
fill_subframe_mask
(
PHY_VARS_eNB
*
eNB
);
void
init_DLSCH_struct
(
PHY_VARS_gNB
*
gNB
,
processingData_L1tx_t
*
msg
);
/** @} */
#endif
...
...
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
210829e9
...
...
@@ -132,8 +132,8 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
dci_pdu
->
AggregationLevel
,
0
,
NULL
);
polar_encoder_fast
((
uint64_t
*
)
dci_pdu
->
Payload
,
(
void
*
)
encoder_output
,
n_RNTI
,
1
,
currentPtr
);
#if
def
DEBUG_CHANNEL_CODING
printf
(
"polar rnti %x,length %d, L %d
\n
"
,
n_RNTI
,
dci_pdu
->
PayloadSizeBits
,
pdcch_pdu_rel15
->
dci_pdu
.
AggregationLevel
[
d
]
);
#if DEBUG_CHANNEL_CODING
printf
(
"polar rnti %x,length %d, L %d
\n
"
,
n_RNTI
,
dci_pdu
->
PayloadSizeBits
,
dci_pdu
->
AggregationLevel
);
printf
(
"DCI PDU: [0]->0x%lx
\t
[1]->0x%lx
\n
"
,
((
uint64_t
*
)
dci_pdu
->
Payload
)[
0
],
((
uint64_t
*
)
dci_pdu
->
Payload
)[
1
]);
printf
(
"Encoded Payload (length:%d dwords):
\n
"
,
encoded_length
>>
5
);
...
...
openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
View file @
210829e9
...
...
@@ -202,107 +202,3 @@ void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m, nfapi_nr_dl_tti_pdcch_pdu_r
ret |= ((field>>i)&1)<<(size-i-1);
return ret;
}*/
int16_t
find_nr_pdcch
(
int
frame
,
int
slot
,
PHY_VARS_gNB
*
gNB
,
find_type_t
type
)
{
uint16_t
i
;
int16_t
first_free_index
=-
1
;
AssertFatal
(
gNB
!=
NULL
,
"gNB is null
\n
"
);
for
(
i
=
0
;
i
<
NUMBER_OF_NR_PDCCH_MAX
;
i
++
)
{
LOG_D
(
PHY
,
"searching for frame.slot %d.%d : pdcch_index %d frame.slot %d.%d, first_free_index %d
\n
"
,
frame
,
slot
,
i
,
gNB
->
pdcch_pdu
[
i
].
frame
,
gNB
->
pdcch_pdu
[
i
].
slot
,
first_free_index
);
if
((
gNB
->
pdcch_pdu
[
i
].
frame
==
frame
)
&&
(
gNB
->
pdcch_pdu
[
i
].
slot
==
slot
))
return
i
;
else
if
(
gNB
->
pdcch_pdu
[
i
].
frame
==-
1
&&
first_free_index
==-
1
)
first_free_index
=
i
;
}
if
(
type
==
SEARCH_EXIST
)
return
-
1
;
return
first_free_index
;
}
void
nr_fill_dci
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_dl_tti_pdcch_pdu
*
pdcch_pdu
)
{
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu_rel15
=
&
pdcch_pdu
->
pdcch_pdu_rel15
;
NR_gNB_DLSCH_t
*
dlsch
;
int
pdcch_id
=
find_nr_pdcch
(
frame
,
slot
,
gNB
,
SEARCH_EXIST_OR_FREE
);
AssertFatal
(
pdcch_id
>=
0
&&
pdcch_id
<
NUMBER_OF_NR_PDCCH_MAX
,
"Cannot find space for PDCCH, exiting
\n
"
);
memcpy
((
void
*
)
&
gNB
->
pdcch_pdu
[
pdcch_id
].
pdcch_pdu
,(
void
*
)
pdcch_pdu
,
sizeof
(
*
pdcch_pdu
));
gNB
->
pdcch_pdu
[
pdcch_id
].
frame
=
frame
;
gNB
->
pdcch_pdu
[
pdcch_id
].
slot
=
slot
;
for
(
int
i
=
0
;
i
<
pdcch_pdu_rel15
->
numDlDci
;
i
++
)
{
//uint64_t *dci_pdu = (uint64_t*)pdcch_pdu_rel15->dci_pdu[i].Payload;
int
dlsch_id
=
find_nr_dlsch
(
pdcch_pdu_rel15
->
dci_pdu
[
i
].
RNTI
,
gNB
,
SEARCH_EXIST_OR_FREE
);
if
(
(
dlsch_id
<
0
)
||
(
dlsch_id
>=
gNB
->
number_of_nr_dlsch_max
)
){
LOG_E
(
PHY
,
"illegal dlsch_id found!!! rnti %04x dlsch_id %d
\n
"
,(
unsigned
int
)
pdcch_pdu_rel15
->
dci_pdu
[
i
].
RNTI
,
dlsch_id
);
return
;
}
dlsch
=
gNB
->
dlsch
[
dlsch_id
][
0
];
int
harq_pid
=
0
;
dlsch
->
slot_tx
[
slot
]
=
1
;
dlsch
->
harq_ids
[
frame
%
2
][
slot
]
=
0
;
AssertFatal
(
harq_pid
<
8
&&
harq_pid
>=
0
,
"illegal harq_pid %d
\n
"
,
harq_pid
);
dlsch
->
harq_mask
|=
(
1
<<
harq_pid
);
dlsch
->
rnti
=
pdcch_pdu_rel15
->
dci_pdu
[
i
].
RNTI
;
// nr_fill_cce_list(gNB,0);
}
}
int16_t
find_nr_ul_dci
(
int
frame
,
int
slot
,
PHY_VARS_gNB
*
gNB
,
find_type_t
type
)
{
uint16_t
i
;
int16_t
first_free_index
=-
1
;
AssertFatal
(
gNB
!=
NULL
,
"gNB is null
\n
"
);
for
(
i
=
0
;
i
<
NUMBER_OF_NR_PDCCH_MAX
;
i
++
)
{
LOG_D
(
PHY
,
"searching for frame.slot %d.%d : ul_pdcch_index %d frame.slot %d.%d, first_free_index %d
\n
"
,
frame
,
slot
,
i
,
gNB
->
ul_pdcch_pdu
[
i
].
frame
,
gNB
->
ul_pdcch_pdu
[
i
].
slot
,
first_free_index
);
if
((
gNB
->
ul_pdcch_pdu
[
i
].
frame
==
frame
)
&&
(
gNB
->
ul_pdcch_pdu
[
i
].
slot
==
slot
))
return
i
;
else
if
(
gNB
->
ul_pdcch_pdu
[
i
].
frame
==-
1
&&
first_free_index
==-
1
)
first_free_index
=
i
;
}
if
(
type
==
SEARCH_EXIST
)
return
-
1
;
return
first_free_index
;
}
void
nr_fill_ul_dci
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_ul_dci_request_pdus_t
*
pdcch_pdu
)
{
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu_rel15
=
&
pdcch_pdu
->
pdcch_pdu
.
pdcch_pdu_rel15
;
int
pdcch_id
=
find_nr_ul_dci
(
frame
,
slot
,
gNB
,
SEARCH_EXIST_OR_FREE
);
AssertFatal
(
pdcch_id
>=
0
&&
pdcch_id
<
NUMBER_OF_NR_PDCCH_MAX
,
"Cannot find space for UL PDCCH, exiting
\n
"
);
memcpy
((
void
*
)
&
gNB
->
ul_pdcch_pdu
[
pdcch_id
].
pdcch_pdu
,(
void
*
)
pdcch_pdu
,
sizeof
(
*
pdcch_pdu
));
gNB
->
ul_pdcch_pdu
[
pdcch_id
].
frame
=
frame
;
gNB
->
ul_pdcch_pdu
[
pdcch_id
].
slot
=
slot
;
for
(
int
i
=
0
;
i
<
pdcch_pdu_rel15
->
numDlDci
;
i
++
)
{
//uint64_t *dci_pdu = (uint64_t*)pdcch_pdu_rel15->dci_pdu[i].Payload;
// if there's no DL DCI then generate CCE list
// nr_fill_cce_list(gNB,0);
/*
LOG_D(PHY, "DCI PDU: [0]->0x%lx \t [1]->0x%lx \n",dci_pdu[0], dci_pdu[1]);
LOG_D(PHY, "DCI type %d payload (size %d) generated on candidate %d\n", dci_alloc->pdcch_params.dci_format, dci_alloc->size, cand_idx);
*/
}
}
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
210829e9
...
...
@@ -111,10 +111,11 @@ void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
}
uint8_t
nr_generate_pdsch
(
PHY_VARS_gNB
*
gNB
,
uint8_t
nr_generate_pdsch
(
processingData_L1tx_t
*
msgTx
,
int
frame
,
int
slot
)
{
PHY_VARS_gNB
*
gNB
=
msgTx
->
gNB
;
NR_gNB_DLSCH_t
*
dlsch
;
uint32_t
***
pdsch_dmrs
=
gNB
->
nr_gold_pdsch_dmrs
[
slot
];
int32_t
**
txdataF
=
gNB
->
common_vars
.
txdataF
;
...
...
@@ -132,9 +133,8 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
time_stats_t
*
dlsch_interleaving_stats
=&
gNB
->
dlsch_interleaving_stats
;
time_stats_t
*
dlsch_segmentation_stats
=&
gNB
->
dlsch_segmentation_stats
;
for
(
int
dlsch_id
=
0
;
dlsch_id
<
gNB
->
number_of_nr_dlsch_max
;
dlsch_id
++
)
{
dlsch
=
gNB
->
dlsch
[
dlsch_id
][
0
];
if
(
dlsch
->
slot_tx
[
slot
]
==
0
)
continue
;
for
(
int
dlsch_id
=
0
;
dlsch_id
<
msgTx
->
num_pdsch_slot
;
dlsch_id
++
)
{
dlsch
=
msgTx
->
dlsch
[
dlsch_id
][
0
];
NR_DL_gNB_HARQ_t
*
harq
=
&
dlsch
->
harq_process
;
nfapi_nr_dl_tti_pdsch_pdu_rel15_t
*
rel15
=
&
harq
->
pdsch_pdu
.
pdsch_pdu_rel15
;
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
View file @
210829e9
...
...
@@ -63,13 +63,11 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
uint32_t
n_RNTI
,
uint32_t
*
out
);
void
nr_fill_dlsch
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
void
nr_fill_dlsch
(
processingData_L1tx_t
*
msgTx
,
nfapi_nr_dl_tti_pdsch_pdu
*
pdsch_pdu
,
unsigned
char
*
sdu
);
uint8_t
nr_generate_pdsch
(
PHY_VARS_gNB
*
gNB
,
uint8_t
nr_generate_pdsch
(
processingData_L1tx_t
*
msgTx
,
int
frame
,
int
slot
);
void
free_gNB_dlsch
(
NR_gNB_DLSCH_t
**
dlschptr
,
uint16_t
N_RB
);
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c
View file @
210829e9
...
...
@@ -254,48 +254,16 @@ void nr_emulate_dlsch_payload(uint8_t* pdu, uint16_t size) {
*
(
pdu
+
i
)
=
(
uint8_t
)
rand
();
}
int16_t
find_nr_dlsch
(
uint16_t
rnti
,
PHY_VARS_gNB
*
gNB
,
find_type_t
type
)
{
uint16_t
i
;
int16_t
first_free_index
=-
1
;
AssertFatal
(
gNB
!=
NULL
,
"gNB is null
\n
"
);
for
(
i
=
0
;
i
<
gNB
->
number_of_nr_dlsch_max
;
i
++
)
{
AssertFatal
(
gNB
->
dlsch
[
i
]
!=
NULL
,
"gNB->dlsch[%d] is null
\n
"
,
i
);
AssertFatal
(
gNB
->
dlsch
[
i
][
0
]
!=
NULL
,
"gNB->dlsch[%d][0] is null
\n
"
,
i
);
LOG_D
(
PHY
,
"searching for rnti %x : dlsch_index %d=> harq_mask %x, rnti %x, first_free_index %d
\n
"
,
rnti
,
i
,
gNB
->
dlsch
[
i
][
0
]
->
harq_mask
,
gNB
->
dlsch
[
i
][
0
]
->
rnti
,
first_free_index
);
if
((
gNB
->
dlsch
[
i
][
0
]
->
harq_mask
>
0
)
&&
(
gNB
->
dlsch
[
i
][
0
]
->
rnti
==
rnti
))
return
i
;
else
if
((
gNB
->
dlsch
[
i
][
0
]
->
harq_mask
==
0
)
&&
(
first_free_index
==-
1
))
first_free_index
=
i
;
}
if
(
type
==
SEARCH_EXIST
)
return
-
1
;
if
(
first_free_index
!=
-
1
)
gNB
->
dlsch
[
first_free_index
][
0
]
->
rnti
=
0
;
return
first_free_index
;
}
void
nr_fill_dlsch
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
void
nr_fill_dlsch
(
processingData_L1tx_t
*
msgTx
,
nfapi_nr_dl_tti_pdsch_pdu
*
pdsch_pdu
,
uint8_t
*
sdu
)
{
nfapi_nr_dl_tti_pdsch_pdu_rel15_t
*
rel15
=
&
pdsch_pdu
->
pdsch_pdu_rel15
;
int
dlsch_id
=
find_nr_dlsch
(
rel15
->
rnti
,
gNB
,
SEARCH_EXIST
);
AssertFatal
(
(
dlsch_id
>=
0
)
&&
(
dlsch_id
<
gNB
->
number_of_nr_dlsch_max
),
"illegal or no dlsch_id found!!! rnti %04x dlsch_id %d
\n
"
,
rel15
->
rnti
,
dlsch_id
);
NR_gNB_DLSCH_t
*
dlsch
=
gNB
->
dlsch
[
dlsch_id
][
0
];
NR_gNB_DLSCH_t
*
dlsch
=
msgTx
->
dlsch
[
msgTx
->
num_pdsch_slot
][
0
];
NR_DL_gNB_HARQ_t
*
harq
=
&
dlsch
->
harq_process
;
/// DLSCH struct
memcpy
((
void
*
)
&
harq
->
pdsch_pdu
,
(
void
*
)
pdsch_pdu
,
sizeof
(
nfapi_nr_dl_tti_pdsch_pdu
));
gNB
->
num_pdsch_rnti
[
slot
]
++
;
msgTx
->
num_pdsch_slot
++
;
AssertFatal
(
sdu
!=
NULL
,
"sdu is null
\n
"
);
harq
->
pdu
=
sdu
;
}
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
210829e9
...
...
@@ -308,8 +308,8 @@ void nr_processULSegment(void* arg) {
int
max_ldpc_iterations
=
p_decoderParms
->
numMaxIter
;
int8_t
llrProcBuf
[
OAI_UL_LDPC_MAX_NUM_LLR
]
__attribute__
((
aligned
(
32
)));
int16_t
z
[
68
*
384
]
;
int8_t
l
[
68
*
384
]
;
int16_t
z
[
68
*
384
+
16
]
__attribute__
((
aligned
(
16
)))
;
int8_t
l
[
68
*
384
+
16
]
__attribute__
((
aligned
(
16
)))
;
__m128i
*
pv
=
(
__m128i
*
)
&
z
;
__m128i
*
pl
=
(
__m128i
*
)
&
l
;
...
...
openair1/PHY/defs_RU.h
View file @
210829e9
...
...
@@ -762,6 +762,7 @@ typedef struct RRU_config_s {
typedef
struct
processingData_RU
{
int
frame_tx
;
int
slot_tx
;
int
next_slot
;
openair0_timestamp
timestamp_tx
;
RU_t
*
ru
;
}
processingData_RU_t
;
...
...
openair1/PHY/defs_gNB.h
View file @
210829e9
...
...
@@ -122,8 +122,6 @@ typedef struct {
typedef
struct
{
uint8_t
active
;
int
frame
;
int
slot
;
nfapi_nr_dl_tti_csi_rs_pdu
csirs_pdu
;
}
NR_gNB_CSIRS_t
;
...
...
@@ -759,7 +757,6 @@ typedef struct PHY_VARS_gNB_s {
// nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu;
// nfapi_nr_ul_dci_request_pdus_t *ul_dci_pdu;
uint16_t
num_pdsch_rnti
[
80
];
NR_gNB_SSB_t
ssb
[
64
];
NR_gNB_PBCH
pbch
;
nr_cce_t
cce_list
[
MAX_DCI_CORESET
][
NR_MAX_PDCCH_AGG_LEVEL
];
NR_gNB_COMMON
common_vars
;
...
...
@@ -767,7 +764,6 @@ typedef struct PHY_VARS_gNB_s {
NR_gNB_PUSCH
*
pusch_vars
[
NUMBER_OF_NR_ULSCH_MAX
];
NR_gNB_PUCCH_t
*
pucch
[
NUMBER_OF_NR_PUCCH_MAX
];
NR_gNB_PDCCH_t
pdcch_pdu
[
NUMBER_OF_NR_PDCCH_MAX
];
NR_gNB_CSIRS_t
csirs_pdu
[
NUMBER_OF_NR_CSIRS_MAX
];
NR_gNB_UL_PDCCH_t
ul_pdcch_pdu
[
NUMBER_OF_NR_PDCCH_MAX
];
NR_gNB_DLSCH_t
*
dlsch
[
NUMBER_OF_NR_DLSCH_MAX
][
2
];
// Nusers times two spatial streams
NR_gNB_ULSCH_t
*
ulsch
[
NUMBER_OF_NR_ULSCH_MAX
][
2
];
// [Nusers times][2 codewords]
...
...
@@ -854,7 +850,8 @@ typedef struct PHY_VARS_gNB_s {
/*
time_stats_t phy_proc;
*/
time_stats_t
phy_proc_tx
;
time_stats_t
*
phy_proc_tx_0
;
time_stats_t
*
phy_proc_tx_1
;
time_stats_t
phy_proc_rx
;
time_stats_t
rx_prach
;
/*
...
...
@@ -946,4 +943,24 @@ typedef struct processingData_L1 {
PHY_VARS_gNB
*
gNB
;
}
processingData_L1_t
;
typedef
enum
{
FILLED
,
FILLING
,
NOT_FILLED
}
msgStatus_t
;
typedef
struct
processingData_L1tx
{
int
frame
;
int
slot
;
openair0_timestamp
timestamp_tx
;
PHY_VARS_gNB
*
gNB
;
nfapi_nr_dl_tti_pdcch_pdu
pdcch_pdu
;
nfapi_nr_ul_dci_request_pdus_t
ul_pdcch_pdu
;
NR_gNB_CSIRS_t
csirs_pdu
[
NUMBER_OF_NR_CSIRS_MAX
];
NR_gNB_DLSCH_t
*
dlsch
[
NUMBER_OF_NR_DLSCH_MAX
][
2
];
NR_gNB_SSB_t
ssb
[
64
];
uint16_t
num_pdsch_slot
;
time_stats_t
phy_proc_tx
;
}
processingData_L1tx_t
;
#endif
openair1/SCHED/nfapi_lte_dummy.c
View file @
210829e9
...
...
@@ -13,11 +13,11 @@ void handle_nr_nfapi_ssb_pdu(PHY_VARS_gNB *gNB,int frame,int slot,
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_pdu
){}
int16_t
find_nr_dlsch
(
uint16_t
rnti
,
PHY_VARS_gNB
*
gNB
,
find_type_t
type
){
return
0
;}
void
handle_nr_nfapi_pdsch_pdu
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_dl_tti_pdsch_pdu
*
pdsch_pdu
,
void
handle_nr_nfapi_pdsch_pdu
(
processingData_L1tx_t
*
msgTx
,
nfapi_nr_dl_tti_pdsch_pdu
*
pdsch_pdu
,
uint8_t
*
sdu
){
}
void
handle_nfapi_nr_csirs_pdu
(
PHY_VARS_gNB
*
gNB
,
}
void
handle_nfapi_nr_csirs_pdu
(
processingData_L1tx_t
*
msgTx
,
int
frame
,
int
slot
,
nfapi_nr_dl_tti_csi_rs_pdu
*
csirs_pdu
){
}
...
...
@@ -51,4 +51,5 @@ void nr_phy_config_request(NR_PHY_Config_t *gNB){}
void
install_nr_schedule_handlers
(
NR_IF_Module_t
*
if_inst
){}
void
nr_dump_frame_parms
(
NR_DL_FRAME_PARMS
*
fp
){}
\ No newline at end of file
void
nr_dump_frame_parms
(
NR_DL_FRAME_PARMS
*
fp
){}
openair1/SCHED/nfapi_nr_dummy.c
View file @
210829e9
...
...
@@ -13,11 +13,11 @@ void handle_nr_nfapi_ssb_pdu(PHY_VARS_gNB *gNB,int frame,int slot,
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_pdu
){}
int16_t
find_nr_dlsch
(
uint16_t
rnti
,
PHY_VARS_gNB
*
gNB
,
find_type_t
type
){
return
0
;}
void
handle_nr_nfapi_pdsch_pdu
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_dl_tti_pdsch_pdu
*
pdsch_pdu
,
void
handle_nr_nfapi_pdsch_pdu
(
processingData_L1tx_t
*
msgTx
,
nfapi_nr_dl_tti_pdsch_pdu
*
pdsch_pdu
,
uint8_t
*
sdu
){
}
void
handle_nfapi_nr_csirs_pdu
(
PHY_VARS_gNB
*
gNB
,
}
void
handle_nfapi_nr_csirs_pdu
(
processingData_L1tx_t
*
msgTx
,
int
frame
,
int
slot
,
nfapi_nr_dl_tti_csi_rs_pdu
*
csirs_pdu
){
}
...
...
@@ -53,4 +53,3 @@ void install_nr_schedule_handlers(NR_IF_Module_t *if_inst){}
//void nr_dump_frame_parms(NR_DL_FRAME_PARMS *fp){}
\ No newline at end of file
openair1/SCHED_NR/fapi_nr_l1.c
View file @
210829e9
...
...
@@ -43,7 +43,7 @@ extern int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req);
extern
uint8_t
nfapi_mode
;
void
handle_nr_nfapi_ssb_pdu
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
void
handle_nr_nfapi_ssb_pdu
(
processingData_L1tx_t
*
msgTx
,
int
frame
,
int
slot
,
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_pdu
)
{
...
...
@@ -53,11 +53,11 @@ void handle_nr_nfapi_ssb_pdu(PHY_VARS_gNB *gNB,int frame,int slot,
uint8_t
i_ssb
=
dl_tti_pdu
->
ssb_pdu
.
ssb_pdu_rel15
.
SsbBlockIndex
;
LOG_D
(
PHY
,
"%d.%d : ssb index %d pbch_pdu: %x
\n
"
,
frame
,
slot
,
i_ssb
,
dl_tti_pdu
->
ssb_pdu
.
ssb_pdu_rel15
.
bchPayload
);
if
(
gNB
->
ssb
[
i_ssb
].
active
)
if
(
msgTx
->
ssb
[
i_ssb
].
active
)
AssertFatal
(
1
==
0
,
"SSB PDU with index %d already active
\n
"
,
i_ssb
);
else
{
gNB
->
ssb
[
i_ssb
].
active
=
true
;
memcpy
((
void
*
)
&
gNB
->
ssb
[
i_ssb
].
ssb_pdu
,
&
dl_tti_pdu
->
ssb_pdu
,
sizeof
(
dl_tti_pdu
->
ssb_pdu
));
msgTx
->
ssb
[
i_ssb
].
active
=
true
;
memcpy
((
void
*
)
&
msgTx
->
ssb
[
i_ssb
].
ssb_pdu
,
&
dl_tti_pdu
->
ssb_pdu
,
sizeof
(
dl_tti_pdu
->
ssb_pdu
));
}
}
...
...
@@ -100,46 +100,16 @@ void handle_nr_nfapi_ssb_pdu(PHY_VARS_gNB *gNB,int frame,int slot,
}*/
void
handle_nfapi_nr_pdcch_pdu
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_dl_tti_pdcch_pdu
*
pdcch_pdu
)
{
LOG_D
(
PHY
,
"Frame %d, Slot %d: DCI processing - proc:slot_tx:%d pdcch_pdu_rel15->numDlDci:%d
\n
"
,
frame
,
slot
,
slot
,
pdcch_pdu
->
pdcch_pdu_rel15
.
numDlDci
);
// copy dci configuration into gNB structure
// gNB->pdcch_pdu = pdcch_pdu;
nr_fill_dci
(
gNB
,
frame
,
slot
,
pdcch_pdu
);
}
void
handle_nfapi_nr_ul_dci_pdu
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_ul_dci_request_pdus_t
*
ul_dci_request_pdu
)
{
LOG_D
(
PHY
,
"Frame %d, Slot %d: UL DCI processing - proc:slot_tx:%d pdcch_pdu_rel15->numDlDci:%d
\n
"
,
frame
,
slot
,
slot
,
ul_dci_request_pdu
->
pdcch_pdu
.
pdcch_pdu_rel15
.
numDlDci
);
// copy dci configuration into gNB structure
// gNB->ul_dci_pdu = ul_dci_request_pdu;
nr_fill_ul_dci
(
gNB
,
frame
,
slot
,
ul_dci_request_pdu
);
}
void
handle_nfapi_nr_csirs_pdu
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
void
handle_nfapi_nr_csirs_pdu
(
processingData_L1tx_t
*
msgTx
,
int
frame
,
int
slot
,
nfapi_nr_dl_tti_csi_rs_pdu
*
csirs_pdu
)
{
int
found
=
0
;
for
(
int
id
=
0
;
id
<
NUMBER_OF_NR_CSIRS_MAX
;
id
++
)
{
NR_gNB_CSIRS_t
*
csirs
=
&
gNB
->
csirs_pdu
[
id
];
NR_gNB_CSIRS_t
*
csirs
=
&
msgTx
->
csirs_pdu
[
id
];
if
(
csirs
->
active
==
0
)
{
LOG_D
(
PHY
,
"Frame %d Slot %d CSI_RS with ID %d is now active
\n
"
,
frame
,
slot
,
id
);
csirs
->
frame
=
frame
;
csirs
->
slot
=
slot
;
csirs
->
active
=
1
;
memcpy
((
void
*
)
&
csirs
->
csirs_pdu
,
(
void
*
)
csirs_pdu
,
sizeof
(
nfapi_nr_dl_tti_csi_rs_pdu
));
found
=
1
;
...
...
@@ -151,13 +121,13 @@ void handle_nfapi_nr_csirs_pdu(PHY_VARS_gNB *gNB,
}
void
handle_nr_nfapi_pdsch_pdu
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
void
handle_nr_nfapi_pdsch_pdu
(
processingData_L1tx_t
*
msgTx
,
nfapi_nr_dl_tti_pdsch_pdu
*
pdsch_pdu
,
uint8_t
*
sdu
)
{
nr_fill_dlsch
(
gNB
,
frame
,
slot
,
pdsch_pdu
,
sdu
);
nr_fill_dlsch
(
msgTx
,
pdsch_pdu
,
sdu
);
}
...
...
@@ -178,12 +148,16 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
gNB
=
RC
.
gNB
[
Mod_id
];
notifiedFIFO_elt_t
*
res
;
res
=
pullTpool
(
gNB
->
resp_L1_tx
,
gNB
->
threadPool
);
processingData_L1tx_t
*
msgTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
res
);
uint8_t
number_dl_pdu
=
(
DL_req
==
NULL
)
?
0
:
DL_req
->
dl_tti_request_body
.
nPDUs
;
uint8_t
number_ul_dci_pdu
=
(
UL_dci_req
==
NULL
)
?
0
:
UL_dci_req
->
numPdus
;
uint8_t
number_ul_tti_pdu
=
(
UL_tti_req
==
NULL
)
?
0
:
UL_tti_req
->
n_pdus
;
uint8_t
number_tx_data_pdu
=
(
TX_req
==
NULL
)
?
0
:
TX_req
->
Number_of_PDUs
;
if
(
NFAPI_MODE
==
NFAPI_MONOLITHIC
){
if
(
NFAPI_MODE
==
NFAPI_MONOLITHIC
)
{
if
(
DL_req
!=
NULL
&&
TX_req
!=
NULL
)
LOG_D
(
PHY
,
"NFAPI: Sched_INFO:SFN/SLOT:%04d/%d DL_req:SFN/SLO:%04d/%d:dl_pdu:%d tx_req:SFN/SLOT:%04d/%d:pdus:%d;ul_dci %d ul_tti %d
\n
"
,
frame
,
slot
,
...
...
@@ -192,33 +166,31 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
number_ul_dci_pdu
,
number_ul_tti_pdu
);
int
pdcch_received
=
0
;
gNB
->
num_pdsch_rnti
[
slot
]
=
0
;
for
(
int
i
=
0
;
i
<
gNB
->
number_of_nr_dlsch_max
;
i
++
)
{
gNB
->
dlsch
[
i
][
0
]
->
rnti
=
0
;
gNB
->
dlsch
[
i
][
0
]
->
harq_mask
=
0
;
}
msgTx
->
num_pdsch_slot
=
0
;
msgTx
->
pdcch_pdu
.
pdcch_pdu_rel15
.
numDlDci
=
0
;
msgTx
->
ul_pdcch_pdu
.
pdcch_pdu
.
pdcch_pdu_rel15
.
numDlDci
=
0
;
msgTx
->
slot
=
slot
;
msgTx
->
frame
=
frame
;
for
(
int
i
=
0
;
i
<
number_dl_pdu
;
i
++
)
{
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_pdu
=
&
DL_req
->
dl_tti_request_body
.
dl_tti_pdu_list
[
i
];
LOG_D
(
PHY
,
"NFAPI: dl_pdu %d : type %d
\n
"
,
i
,
dl_tti_pdu
->
PDUType
);
switch
(
dl_tti_pdu
->
PDUType
)
{
case
NFAPI_NR_DL_TTI_SSB_PDU_TYPE
:
handle_nr_nfapi_ssb_pdu
(
gNB
,
frame
,
slot
,
handle_nr_nfapi_ssb_pdu
(
msgTx
,
frame
,
slot
,
dl_tti_pdu
);
break
;
case
NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE
:
AssertFatal
(
pdcch_received
==
0
,
"pdcch_received is not 0, we can only handle one PDCCH PDU per slot
\n
"
);
handle_nfapi_nr_pdcch_pdu
(
gNB
,
frame
,
slot
,
&
dl_tti_pdu
->
pdcch_pdu
);
msgTx
->
pdcch_pdu
=
dl_tti_pdu
->
pdcch_pdu
;
pdcch_received
=
1
;
break
;
case
NFAPI_NR_DL_TTI_CSI_RS_PDU_TYPE
:
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_DL_TTI_CSI_RS_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
DL_req
->
SFN
,
DL_req
->
Slot
);
handle_nfapi_nr_csirs_pdu
(
gNB
,
frame
,
slot
,
handle_nfapi_nr_csirs_pdu
(
msgTx
,
frame
,
slot
,
&
dl_tti_pdu
->
csi_rs_pdu
);
break
;
...
...
@@ -229,16 +201,17 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
AssertFatal
(
TX_req
->
pdu_list
[
pduIndex
].
num_TLV
==
1
,
"TX_req->pdu_list[%d].num_TLV %d != 1
\n
"
,
pduIndex
,
TX_req
->
pdu_list
[
pduIndex
].
num_TLV
);
uint8_t
*
sdu
=
(
uint8_t
*
)
TX_req
->
pdu_list
[
pduIndex
].
TLVs
[
0
].
value
.
direct
;
handle_nr_nfapi_pdsch_pdu
(
gNB
,
frame
,
slot
,
&
dl_tti_pdu
->
pdsch_pdu
,
sdu
);
break
;
AssertFatal
(
msgTx
->
num_pdsch_slot
<
gNB
->
number_of_nr_dlsch_max
,
"Number of PDSCH PDUs %d exceeded the limit %d
\n
"
,
msgTx
->
num_pdsch_slot
,
gNB
->
number_of_nr_dlsch_max
);
handle_nr_nfapi_pdsch_pdu
(
msgTx
,
&
dl_tti_pdu
->
pdsch_pdu
,
sdu
);
}
}
if
(
number_ul_dci_pdu
>
0
)
msgTx
->
ul_pdcch_pdu
=
UL_dci_req
->
ul_dci_pdu_list
[
number_ul_dci_pdu
-
1
];
// copy the last pdu
pushNotifiedFIFO
(
gNB
->
resp_L1_tx
,
res
);
for
(
int
i
=
0
;
i
<
number_ul_dci_pdu
;
i
++
)
{
handle_nfapi_nr_ul_dci_pdu
(
gNB
,
frame
,
slot
,
&
UL_dci_req
->
ul_dci_pdu_list
[
i
]);
}
for
(
int
i
=
0
;
i
<
number_ul_tti_pdu
;
i
++
)
{
switch
(
UL_tti_req
->
pdus_list
[
i
].
pdu_type
)
{
case
NFAPI_NR_UL_CONFIG_PUSCH_PDU_TYPE
:
...
...
openair1/SCHED_NR/fapi_nr_l1.h
View file @
210829e9
...
...
@@ -37,13 +37,13 @@
#include "nfapi_nr_interface_scf.h"
// added
void
handle_nr_nfapi_ssb_pdu
(
PHY_VARS_gNB
*
gNB
,
void
handle_nr_nfapi_ssb_pdu
(
processingData_L1tx_t
*
msgTx
,
int
frame
,
int
slot
,
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_pdu
);
void
nr_schedule_response
(
NR_Sched_Rsp_t
*
Sched_INFO
);
void
handle_nfapi_nr_csirs_pdu
(
PHY_VARS_gNB
*
gNB
,
void
handle_nfapi_nr_csirs_pdu
(
processingData_L1tx_t
*
msgTx
,
int
frame
,
int
slot
,
nfapi_nr_dl_tti_csi_rs_pdu
*
csirs_pdu
);
...
...
@@ -51,7 +51,7 @@ void handle_nfapi_nr_pdcch_pdu(PHY_VARS_gNB *gNB,
int
frame
,
int
subframe
,
nfapi_nr_dl_tti_pdcch_pdu
*
dcl_dl_pdu
);
void
handle_nr_nfapi_pdsch_pdu
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
void
handle_nr_nfapi_pdsch_pdu
(
processingData_L1tx_t
*
msgTx
,
nfapi_nr_dl_tti_pdsch_pdu
*
pdsch_pdu
,
uint8_t
*
sdu
);
...
...
openair1/SCHED_NR/phy_frame_config_nr.c
View file @
210829e9
...
...
@@ -30,6 +30,7 @@
************************************************************************/
#include "PHY/defs_nr_common.h"
#include "PHY/defs_gNB.h"
#include "PHY/defs_nr_UE.h"
#include "SCHED_NR/phy_frame_config_nr.h"
...
...
@@ -308,6 +309,21 @@ int set_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms) {
*
*********************************************************************/
int
get_next_downlink_slot
(
PHY_VARS_gNB
*
gNB
,
nfapi_nr_config_request_scf_t
*
cfg
,
int
nr_frame
,
int
nr_slot
)
{
int
slot
=
nr_slot
;
int
frame
=
nr_frame
;
int
slots_per_frame
=
gNB
->
frame_parms
.
slots_per_frame
;
while
(
true
)
{
slot
++
;
if
(
slot
/
slots_per_frame
)
frame
++
;
slot
%=
slots_per_frame
;
int
slot_type
=
nr_slot_select
(
cfg
,
frame
,
slot
);
if
(
slot_type
==
NR_DOWNLINK_SLOT
||
slot_type
==
NR_MIXED_SLOT
)
return
slot
;
AssertFatal
(
frame
<
(
nr_frame
+
2
),
"Something went worng. This shouldn't happen
\n
"
);
}
}
int
nr_slot_select
(
nfapi_nr_config_request_scf_t
*
cfg
,
int
nr_frame
,
int
nr_slot
)
{
/* for FFD all slot can be considered as an uplink */
int
mu
=
cfg
->
ssb_config
.
scs_common
.
value
,
check_slot
=
0
;
...
...
openair1/SCHED_NR/phy_frame_config_nr.h
View file @
210829e9
...
...
@@ -92,5 +92,7 @@ void free_tdd_configuration_nr(NR_DL_FRAME_PARMS *frame_parms);
void
free_tdd_configuration_dedicated_nr
(
NR_DL_FRAME_PARMS
*
frame_parms
);
int
get_next_downlink_slot
(
PHY_VARS_gNB
*
gNB
,
nfapi_nr_config_request_scf_t
*
cfg
,
int
nr_frame
,
int
nr_slot
);
#endif
/* PHY_FRAME_CONFIG_NR_H */
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
210829e9
...
...
@@ -124,10 +124,12 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_
}
void
phy_procedures_gNB_TX
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
void
phy_procedures_gNB_TX
(
processingData_L1tx_t
*
msgTx
,
int
frame
,
int
slot
,
int
do_meas
)
{
int
aa
;
PHY_VARS_gNB
*
gNB
=
msgTx
->
gNB
;
NR_DL_FRAME_PARMS
*
fp
=&
gNB
->
frame_parms
;
nfapi_nr_config_request_scf_t
*
cfg
=
&
gNB
->
gNB_config
;
int
offset
=
gNB
->
CC_id
;
...
...
@@ -138,7 +140,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX
+
offset
,
1
);
if
(
do_meas
==
1
)
start_meas
(
&
gNB
->
phy_proc_tx
);
if
(
do_meas
==
1
)
start_meas
(
&
msgTx
->
phy_proc_tx
);
// clear the transmit data array and beam index for the current slot
for
(
aa
=
0
;
aa
<
cfg
->
carrier_config
.
num_tx_ant
.
value
;
aa
++
)
{
...
...
@@ -147,58 +149,44 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_COMMON_TX
,
1
);
for
(
int
i
=
0
;
i
<
fp
->
Lmax
;
i
++
)
{
if
(
gNB
->
ssb
[
i
].
active
)
{
nr_common_signal_procedures
(
gNB
,
frame
,
slot
,
gNB
->
ssb
[
i
].
ssb_pdu
);
gNB
->
ssb
[
i
].
active
=
false
;
if
(
msgTx
->
ssb
[
i
].
active
)
{
nr_common_signal_procedures
(
gNB
,
frame
,
slot
,
msgTx
->
ssb
[
i
].
ssb_pdu
);
msgTx
->
ssb
[
i
].
active
=
false
;
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_COMMON_TX
,
0
);
int
pdcch_pdu_id
=
find_nr_pdcch
(
frame
,
slot
,
gNB
,
SEARCH_EXIST
);
int
ul_pdcch_pdu_id
=
find_nr_ul_dci
(
frame
,
slot
,
gNB
,
SEARCH_EXIST
);
LOG_D
(
PHY
,
"[gNB %d] Frame %d slot %d, pdcch_pdu_id %d, ul_pdcch_pdu_id %d
\n
"
,
gNB
->
Mod_id
,
frame
,
slot
,
pdcch_pdu_id
,
ul_pdcch_pdu_id
);
int
num_dl_dci
=
msgTx
->
pdcch_pdu
.
pdcch_pdu_rel15
.
numDlDci
;
int
num_ul_dci
=
msgTx
->
ul_pdcch_pdu
.
pdcch_pdu
.
pdcch_pdu_rel15
.
numDlDci
;
if
(
pdcch_pdu_id
>=
0
||
ul_pdcch_pdu_id
>=
0
)
{
if
(
num_dl_dci
>
0
||
num_ul_dci
>
0
)
{
LOG_D
(
PHY
,
"[gNB %d] Frame %d slot %d Calling nr_generate_dci_top (number of UL/DL DCI %d/%d)
\n
"
,
gNB
->
Mod_id
,
frame
,
slot
,
gNB
->
ul_pdcch_pdu
[
ul_pdcch_pdu_id
].
pdcch_pdu
.
pdcch_pdu
.
pdcch_pdu_rel15
.
numDlDci
,
gNB
->
pdcch_pdu
[
pdcch_pdu_id
].
pdcch_pdu
.
pdcch_pdu_rel15
.
numDlDci
);
gNB
->
Mod_id
,
frame
,
slot
,
num_ul_dci
,
num_dl_dci
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_PDCCH_TX
,
1
);
nr_generate_dci_top
(
gNB
,
pdcch_pdu_id
>=
0
?
&
gNB
->
pdcch_pdu
[
pdcch_pdu_id
].
pdcch_pdu
:
NULL
,
ul_pdcch_pdu_id
>=
0
?
&
gNB
->
ul_pdcch_pdu
[
ul_pdcch_pdu_id
].
pdcch_pdu
.
pdcch_pdu
:
NULL
,
num_dl_dci
>
0
?
&
msgTx
->
pdcch_pdu
:
NULL
,
num_ul_dci
>
0
?
&
msgTx
->
ul_
pdcch_pdu
.
pdcch_pdu
:
NULL
,
gNB
->
nr_gold_pdcch_dmrs
[
slot
],
&
gNB
->
common_vars
.
txdataF
[
0
][
txdataF_offset
],
AMP
,
fp
);
// free up entry in pdcch tables
if
(
pdcch_pdu_id
>=
0
)
gNB
->
pdcch_pdu
[
pdcch_pdu_id
].
frame
=
-
1
;
if
(
ul_pdcch_pdu_id
>=
0
)
gNB
->
ul_pdcch_pdu
[
ul_pdcch_pdu_id
].
frame
=
-
1
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_PDCCH_TX
,
0
);
if
(
pdcch_pdu_id
>=
0
)
gNB
->
pdcch_pdu
[
pdcch_pdu_id
].
frame
=
-
1
;
if
(
ul_pdcch_pdu_id
>=
0
)
gNB
->
ul_pdcch_pdu
[
ul_pdcch_pdu_id
].
frame
=
-
1
;
}
for
(
int
i
=
0
;
i
<
gNB
->
num_pdsch_rnti
[
slot
];
i
++
)
{
if
(
msgTx
->
num_pdsch_slot
>
0
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH
,
1
);
LOG_D
(
PHY
,
"PDSCH generation started (%d) in frame %d.%d
\n
"
,
gNB
->
num_pdsch_rnti
[
slot
]
,
frame
,
slot
);
nr_generate_pdsch
(
gNB
,
frame
,
slot
);
LOG_D
(
PHY
,
"PDSCH generation started (%d) in frame %d.%d
\n
"
,
msgTx
->
num_pdsch_slot
,
frame
,
slot
);
nr_generate_pdsch
(
msgTx
,
frame
,
slot
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH
,
0
);
}
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_CSIRS_MAX
;
i
++
){
NR_gNB_CSIRS_t
*
csirs
=
&
gNB
->
csirs_pdu
[
i
];
if
((
csirs
->
active
==
1
)
&&
(
csirs
->
frame
==
frame
)
&&
(
csirs
->
slot
==
slot
)
)
{
NR_gNB_CSIRS_t
*
csirs
=
&
msgTx
->
csirs_pdu
[
i
];
if
((
csirs
->
active
==
1
))
{
LOG_D
(
PHY
,
"CSI-RS generation started in frame %d.%d
\n
"
,
frame
,
slot
);
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
csi_params
=
csirs
->
csirs_pdu
.
csi_rs_pdu_rel15
;
nr_generate_csi_rs
(
gNB
,
AMP
,
csi_params
,
gNB
->
gNB_config
.
cell_config
.
phy_cell_id
.
value
,
slot
);
...
...
@@ -206,7 +194,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
}
}
if
(
do_meas
==
1
)
stop_meas
(
&
gNB
->
phy_proc_tx
);
if
(
do_meas
==
1
)
stop_meas
(
&
msgTx
->
phy_proc_tx
);
if
((
frame
&
127
)
==
0
)
dump_pdsch_stats
(
gNB
);
...
...
openair1/SCHED_NR/sched_nr.h
View file @
210829e9
...
...
@@ -36,7 +36,7 @@
void
fill_ul_rb_mask
(
PHY_VARS_gNB
*
gNB
,
int
frame_rx
,
int
slot_rx
);
void
nr_set_ssb_first_subcarrier
(
nfapi_nr_config_request_scf_t
*
cfg
,
NR_DL_FRAME_PARMS
*
fp
);
void
phy_procedures_gNB_TX
(
PHY_VARS_gNB
*
gNB
,
int
frame_tx
,
int
slot_tx
,
int
do_meas
);
void
phy_procedures_gNB_TX
(
processingData_L1tx_t
*
msgTx
,
int
frame_tx
,
int
slot_tx
,
int
do_meas
);
void
phy_procedures_gNB_common_RX
(
PHY_VARS_gNB
*
gNB
,
int
frame_rx
,
int
slot_rx
);
int
phy_procedures_gNB_uespec_RX
(
PHY_VARS_gNB
*
gNB
,
int
frame_rx
,
int
slot_rx
);
void
L1_nr_prach_procedures
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
);
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
210829e9
...
...
@@ -426,7 +426,9 @@ int main(int argc, char **argv)
UE
->
dlsch_SI
[
0
]
=
new_nr_ue_dlsch
(
1
,
1
,
Nsoft
,
5
,
N_RB_DL
,
0
);
UE
->
dlsch_ra
[
0
]
=
new_nr_ue_dlsch
(
1
,
1
,
Nsoft
,
5
,
N_RB_DL
,
0
);
unsigned
char
harq_pid
=
0
;
//dlsch->harq_ids[subframe];
NR_gNB_DLSCH_t
*
dlsch
=
gNB
->
dlsch
[
0
][
0
];
processingData_L1tx_t
msgDataTx
;
init_DLSCH_struct
(
gNB
,
&
msgDataTx
);
NR_gNB_DLSCH_t
*
dlsch
=
msgDataTx
.
dlsch
[
0
][
0
];
nfapi_nr_dl_tti_pdsch_pdu_rel15_t
*
rel15
=
&
dlsch
->
harq_process
.
pdsch_pdu
.
pdsch_pdu_rel15
;
//time_stats_t *rm_stats, *te_stats, *i_stats;
uint8_t
is_crnti
=
0
,
llr8_flag
=
0
;
...
...
@@ -634,7 +636,7 @@ int main(int argc, char **argv)
for
(
i
=
0
;
i
<
2
;
i
++
)
{
printf
(
"gNB %d
\n
"
,
i
);
free_gNB_dlsch
(
&
(
gNB
->
dlsch
[
0
][
i
]),
N_RB_DL
);
free_gNB_dlsch
(
&
(
msgDataTx
.
dlsch
[
0
][
i
]),
N_RB_DL
);
printf
(
"UE %d
\n
"
,
i
);
free_nr_ue_dlsch
(
&
(
UE
->
dlsch
[
0
][
0
][
i
]),
N_RB_DL
);
}
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
210829e9
...
...
@@ -929,8 +929,6 @@ int main(int argc, char **argv)
// generate signal
AssertFatal
(
input_fd
==
NULL
,
"Not ready for input signal file
\n
"
);
gNB
->
pbch_configured
=
1
;
gNB
->
ssb
[
0
].
ssb_pdu
.
ssb_pdu_rel15
.
bchPayload
=
0x001234
;
gNB
->
ssb
[
0
].
ssb_pdu
.
ssb_pdu_rel15
.
SsbBlockIndex
=
0
;
//Configure UE
rrc
.
carrier
.
MIB
=
(
uint8_t
*
)
malloc
(
4
);
...
...
@@ -960,11 +958,25 @@ int main(int argc, char **argv)
//NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels;
snrRun
=
0
;
gNB
->
threadPool
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
char
tp_param
[]
=
"n"
;
initTpool
(
tp_param
,
gNB
->
threadPool
,
true
);
gNB
->
resp_L1_tx
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initNotifiedFIFO
(
gNB
->
resp_L1_tx
);
// we create 2 threads for L1 tx processing
notifiedFIFO_elt_t
*
msgL1Tx
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_L1tx_t
),
0
,
gNB
->
resp_L1_tx
,
processSlotTX
);
processingData_L1tx_t
*
msgDataTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
msgL1Tx
);
init_DLSCH_struct
(
gNB
,
msgDataTx
);
msgDataTx
->
slot
=
slot
;
msgDataTx
->
frame
=
frame
;
memset
(
msgDataTx
->
ssb
,
0
,
64
*
sizeof
(
NR_gNB_SSB_t
));
reset_meas
(
&
msgDataTx
->
phy_proc_tx
);
gNB
->
phy_proc_tx_0
=
&
msgDataTx
->
phy_proc_tx
;
pushTpool
(
gNB
->
threadPool
,
msgL1Tx
);
for
(
SNR
=
snr0
;
SNR
<
snr1
;
SNR
+=
.
2
)
{
varArray_t
*
table_tx
=
initVarArray
(
1000
,
sizeof
(
double
));
reset_meas
(
&
gNB
->
phy_proc_tx
);
// total gNB tx
reset_meas
(
&
gNB
->
dlsch_scrambling_stats
);
reset_meas
(
&
gNB
->
dlsch_interleaving_stats
);
reset_meas
(
&
gNB
->
dlsch_rate_matching_stats
);
...
...
@@ -1005,7 +1017,7 @@ int main(int argc, char **argv)
int
harq_pid
=
slot
;
NR_DL_UE_HARQ_t
*
UE_harq_process
=
dlsch0
->
harq_processes
[
harq_pid
];
NR_gNB_DLSCH_t
*
gNB_dlsch
=
gNB
->
dlsch
[
0
][
0
];
NR_gNB_DLSCH_t
*
gNB_dlsch
=
msgDataTx
->
dlsch
[
0
][
0
];
nfapi_nr_dl_tti_pdsch_pdu_rel15_t
*
rel15
=
&
gNB_dlsch
->
harq_process
.
pdsch_pdu
.
pdsch_pdu_rel15
;
UE_harq_process
->
ack
=
0
;
...
...
@@ -1056,10 +1068,14 @@ int main(int argc, char **argv)
ptrsRePerSymb
=
((
rel15
->
rbSize
+
rel15
->
PTRSFreqDensity
-
1
)
/
rel15
->
PTRSFreqDensity
);
printf
(
"[DLSIM] PTRS Symbols in a slot: %2u, RE per Symbol: %3u, RE in a slot %4d
\n
"
,
ptrsSymbPerSlot
,
ptrsRePerSymb
,
ptrsSymbPerSlot
*
ptrsRePerSymb
);
}
msgDataTx
->
ssb
[
0
].
ssb_pdu
.
ssb_pdu_rel15
.
bchPayload
=
0x001234
;
msgDataTx
->
ssb
[
0
].
ssb_pdu
.
ssb_pdu_rel15
.
SsbBlockIndex
=
0
;
msgDataTx
->
gNB
=
gNB
;
if
(
run_initial_sync
)
nr_common_signal_procedures
(
gNB
,
frame
,
slot
,
gNB
->
ssb
[
0
].
ssb_pdu
);
nr_common_signal_procedures
(
gNB
,
frame
,
slot
,
msgDataTx
->
ssb
[
0
].
ssb_pdu
);
else
phy_procedures_gNB_TX
(
gNB
,
frame
,
slot
,
1
);
phy_procedures_gNB_TX
(
msgDataTx
,
frame
,
slot
,
1
);
int
txdataF_offset
=
(
slot
%
2
)
*
frame_parms
->
samples_per_slot_wCP
;
...
...
@@ -1268,10 +1284,10 @@ int main(int argc, char **argv)
if
(
print_perf
==
1
)
{
printf
(
"
\n
gNB TX function statistics (per %d us slot, NPRB %d, mcs %d, TBS %d, Kr %d (Zc %d))
\n
"
,
1000
>>*
scc
->
ssbSubcarrierSpacing
,
g_rbSize
,
g_mcsIndex
,
gNB
->
dlsch
[
0
][
0
]
->
harq_process
.
pdsch_pdu
.
pdsch_pdu_rel15
.
TBSize
[
0
]
<<
3
,
gNB
->
dlsch
[
0
][
0
]
->
harq_process
.
K
,
gNB
->
dlsch
[
0
][
0
]
->
harq_process
.
K
/
((
gNB
->
dlsch
[
0
][
0
]
->
harq_process
.
pdsch_pdu
.
pdsch_pdu_rel15
.
TBSize
[
0
]
<<
3
)
>
3824
?
22
:
10
));
printDistribution
(
&
gNB
->
phy_proc_tx
,
table_tx
,
"PHY proc tx"
);
msgDataTx
->
dlsch
[
0
][
0
]
->
harq_process
.
pdsch_pdu
.
pdsch_pdu_rel15
.
TBSize
[
0
]
<<
3
,
msgDataTx
->
dlsch
[
0
][
0
]
->
harq_process
.
K
,
msgDataTx
->
dlsch
[
0
][
0
]
->
harq_process
.
K
/
((
msgDataTx
->
dlsch
[
0
][
0
]
->
harq_process
.
pdsch_pdu
.
pdsch_pdu_rel15
.
TBSize
[
0
]
<<
3
)
>
3824
?
22
:
10
));
printDistribution
(
gNB
->
phy_proc_tx_0
,
table_tx
,
"PHY proc tx"
);
printStatIndent2
(
&
gNB
->
dlsch_encoding_stats
,
"DLSCH encoding time"
);
printStatIndent3
(
&
gNB
->
dlsch_segmentation_stats
,
"DLSCH segmentation time"
);
printStatIndent3
(
&
gNB
->
tinput
,
"DLSCH LDPC input processing time"
);
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
210829e9
...
...
@@ -565,14 +565,15 @@ int main(int argc, char **argv)
nr_gold_pbch
(
UE
);
processingData_L1tx_t
msgDataTx
;
// generate signal
if
(
input_fd
==
NULL
)
{
for
(
i
=
0
;
i
<
frame_parms
->
Lmax
;
i
++
)
{
if
((
SSB_positions
>>
i
)
&
0x01
)
{
gNB
->
ssb
[
i
].
ssb_pdu
.
ssb_pdu_rel15
.
bchPayload
=
0x55dd33
;
gNB
->
ssb
[
i
].
ssb_pdu
.
ssb_pdu_rel15
.
SsbBlockIndex
=
i
;
msgDataTx
.
ssb
[
i
].
ssb_pdu
.
ssb_pdu_rel15
.
bchPayload
=
0x55dd33
;
msgDataTx
.
ssb
[
i
].
ssb_pdu
.
ssb_pdu_rel15
.
SsbBlockIndex
=
i
;
start_symbol
=
nr_get_ssb_start_symbol
(
frame_parms
,
i
);
int
slot
=
start_symbol
/
14
;
...
...
@@ -580,7 +581,7 @@ int main(int argc, char **argv)
for
(
aa
=
0
;
aa
<
gNB
->
frame_parms
.
nb_antennas_tx
;
aa
++
)
memset
(
gNB
->
common_vars
.
txdataF
[
aa
],
0
,
frame_parms
->
samples_per_slot_wCP
*
sizeof
(
int32_t
));
nr_common_signal_procedures
(
gNB
,
frame
,
slot
,
gNB
->
ssb
[
i
].
ssb_pdu
);
nr_common_signal_procedures
(
gNB
,
frame
,
slot
,
msgDataTx
.
ssb
[
i
].
ssb_pdu
);
for
(
aa
=
0
;
aa
<
gNB
->
frame_parms
.
nb_antennas_tx
;
aa
++
)
{
if
(
cyclic_prefix_type
==
1
)
{
...
...
@@ -750,7 +751,7 @@ int main(int argc, char **argv)
payload_ret
=
(
UE
->
pbch_vars
[
0
]
->
xtra_byte
==
gNB_xtra_byte
);
for
(
i
=
0
;
i
<
3
;
i
++
){
payload_ret
+=
(
UE
->
pbch_vars
[
0
]
->
decoded_output
[
i
]
==
((
gNB
->
ssb
[
ssb_index
].
ssb_pdu
.
ssb_pdu_rel15
.
bchPayload
>>
(
8
*
i
))
&
0xff
));
payload_ret
+=
(
UE
->
pbch_vars
[
0
]
->
decoded_output
[
i
]
==
((
msgDataTx
.
ssb
[
ssb_index
].
ssb_pdu
.
ssb_pdu_rel15
.
bchPayload
>>
(
8
*
i
))
&
0xff
));
}
//printf("xtra byte gNB: 0x%02x UE: 0x%02x\n",gNB_xtra_byte, UE->pbch_vars[0]->xtra_byte);
//printf("ret %d\n", payload_ret);
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
210829e9
...
...
@@ -672,6 +672,13 @@ int main(int argc, char **argv)
char
tp_param
[]
=
"n"
;
initTpool
(
tp_param
,
gNB
->
threadPool
,
true
);
initNotifiedFIFO
(
gNB
->
respDecode
);
gNB
->
resp_L1_tx
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initNotifiedFIFO
(
gNB
->
resp_L1_tx
);
notifiedFIFO_elt_t
*
msgL1Tx
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_L1tx_t
),
0
,
gNB
->
resp_L1_tx
,
NULL
);
processingData_L1tx_t
*
msgDataTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
msgL1Tx
);
msgDataTx
->
slot
=
-
1
;
gNB
->
phy_proc_tx_0
=
&
msgDataTx
->
phy_proc_tx
;
pushNotifiedFIFO
(
gNB
->
resp_L1_tx
,
msgL1Tx
);
// to unblock the process in the beginning
//gNB_config = &gNB->gNB_config;
//memset((void *)&gNB->UL_INFO,0,sizeof(gNB->UL_INFO));
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_nsa_n310.conf
0 → 100644
View file @
210829e9
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