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
wangjie
OpenXG-RAN
Commits
41438a19
Commit
41438a19
authored
Nov 18, 2020
by
Mahesh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PDSCH decoded at UE
parent
e6bf90e2
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
46 additions
and
68 deletions
+46
-68
nfapi/oai_integration/nfapi_pnf.c
nfapi/oai_integration/nfapi_pnf.c
+10
-7
nfapi/open-nFAPI/pnf/src/pnf_p7.c
nfapi/open-nFAPI/pnf/src/pnf_p7.c
+12
-3
openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
+3
-3
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+4
-3
openair1/SCHED/nfapi_nr_dummy_defs.c
openair1/SCHED/nfapi_nr_dummy_defs.c
+0
-36
openair1/SCHED_NR/fapi_nr_l1.c
openair1/SCHED_NR/fapi_nr_l1.c
+5
-5
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+3
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+1
-1
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+8
-8
No files found.
nfapi/oai_integration/nfapi_pnf.c
View file @
41438a19
...
...
@@ -97,7 +97,7 @@ extern void handle_nr_nfapi_ssb_pdu(PHY_VARS_gNB *gNB,int frame,int slot,
nfapi_tx_request_pdu_t
*
tx_request_pdu
[
1023
][
10
][
10
];
// [frame][subframe][max_num_pdus]
uint8_t
nr_tx_pdus
[
32
][
16
][
4096
];
nfapi_nr_pdu_t
*
tx_data_request
[
1023
][
20
][
10
];
//[frame][slot][max_num_pdus]
uint8_t
tx_pdus
[
32
][
8
][
4096
];
...
...
@@ -1252,7 +1252,7 @@ int pnf_phy_ul_dci_req(gNB_L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7,
for
(
int
i
=
0
;
i
<
req
->
numPdus
;
i
++
)
{
//LOG_D(PHY,"[PNF] HI_DCI0_REQ sfn_sf:%d PDU[%d]\n", NFAPI_SFNSF2DEC(req->sfn_sf), i);
if
(
req
->
ul_dci_pdu_list
[
i
].
PDUType
==
NFAPI_NR_UL_DCI_FORMAT_0_0
||
req
->
ul_dci_pdu_list
[
i
].
PDUType
==
NFAPI_NR_UL_DCI_FORMAT_0_1
)
{
if
(
req
->
ul_dci_pdu_list
[
i
].
PDUType
==
0
)
{
//LOG_D(PHY,"[PNF] HI_DCI0_REQ sfn_sf:%d PDU[%d] - NFAPI_HI_DCI0_DCI_PDU_TYPE\n", NFAPI_SFNSF2DEC(req->sfn_sf), i);
//nfapi_hi_dci0_request_pdu_t *hi_dci0_req_pdu = &req->hi_dci0_request_body.hi_dci0_pdu_list[i];
nfapi_nr_ul_dci_request_pdus_t
*
ul_dci_req_pdu
=
&
req
->
ul_dci_pdu_list
[
i
];
...
...
@@ -1329,7 +1329,7 @@ int pnf_phy_dl_tti_req(gNB_L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7,
int
sfn
=
req
->
SFN
;
int
slot
=
req
->
Slot
;
printf
(
"In pnf_phy_dl_tti_req sfn %d slot %d
\n
"
,
sfn
,
slot
);
struct
PHY_VARS_gNB_s
*
gNB
=
RC
.
gNB
[
0
];
if
(
proc
==
NULL
)
proc
=
&
gNB
->
proc
.
L1_proc
;
...
...
@@ -1357,7 +1357,10 @@ printf("In pnf_phy_dl_tti_req sfn %d slot %d\n",sfn,slot);
// 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);
if
(
dl_tti_pdu_list
[
i
].
PDUType
==
NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE
)
{
handle_nfapi_nr_pdcch_pdu
(
gNB
,
sfn
,
slot
,
&
dl_tti_pdu_list
[
i
].
pdcch_pdu
);
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_pdu
=&
dl_tti_pdu_list
[
i
];
memcpy
(
dl_tti_pdu
,
&
dl_tti_pdu_list
[
i
],
sizeof
(
nfapi_nr_dl_tti_request_pdu_t
));
//sfn=sfn+2;
handle_nfapi_nr_pdcch_pdu
(
gNB
,
sfn
,
slot
,
&
dl_tti_pdu
->
pdcch_pdu
);
//dl_tti_pdu_list[i].pdcch_pdu.pdcch_pdu_rel15.numDlDci++; // ?
// NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() pdcch_vars->num_dci:%d\n", __FUNCTION__, pdcch_vars->num_dci);
}
else
if
(
dl_tti_pdu_list
[
i
].
PDUType
==
NFAPI_NR_DL_TTI_SSB_PDU_TYPE
)
{
...
...
@@ -1390,9 +1393,9 @@ printf("In pnf_phy_dl_tti_req sfn %d slot %d\n",sfn,slot);
LOG_E
(
PHY
,
"pnf_phy_dl_config_req illegal harq_pid %d
\n
"
,
harq_pid
);
return
(
-
1
);
}
uint8_t
*
dlsch_sdu
=
(
uint8_t
*
)
tx_data
->
TLVs
[
0
].
value
.
direct
;
//uint8_t *dlsch_sdu = tx_data
[UE_id][harq_pid];
// memcpy(dlsch_sdu, tx_data->pdu_list[0], tx_data->pdu_list[0].
PDU_length);//TODO: Check if required
//
uint8_t *dlsch_sdu = (uint8_t *)tx_data->TLVs[0].value.direct;
uint8_t
*
dlsch_sdu
=
nr_tx_pdus
[
UE_id
][
harq_pid
];
memcpy
(
dlsch_sdu
,
tx_data
->
TLVs
[
0
].
value
.
direct
,
tx_data
->
PDU_length
);
//TODO: Check if required
//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
);
}
else
{
...
...
nfapi/open-nFAPI/pnf/src/pnf_p7.c
View file @
41438a19
...
...
@@ -927,6 +927,7 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl
// todo : consider a more efficent lock mechasium
//uint16_t NUM_SLOTS = 20;//10* 2^mu
if
(
pthread_mutex_lock
(
&
(
pnf_p7
->
mutex
))
!=
0
)
{
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"failed to lock mutex
\n
"
);
...
...
@@ -1039,8 +1040,14 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl
if
(
tx_slot_buffer
->
dl_tti_req
!=
0
)
// ADDED & TO BYPASS ERROR
{
if
(
pnf_p7
->
_public
.
dl_tti_req_fn
)
(
pnf_p7
->
_public
.
dl_tti_req_fn
)(
NULL
,
&
(
pnf_p7
->
_public
),
tx_slot_buffer
->
dl_tti_req
);
{
struct
timespec
curr
;
clock_gettime
(
CLOCK_MONOTONIC
,
&
curr
);
printf
(
"
\n
pnf slot ind time %d.%d
\n
"
,
curr
.
tv_sec
,
curr
.
tv_nsec
);
printf
(
"
\n
In pnf_phy_dl_tti_req VNF: sfn %d slot %d, PNF: sfn %d slot %d slot buffer sfn %d %d
\n
"
,
tx_slot_buffer
->
dl_tti_req
->
SFN
,
tx_slot_buffer
->
dl_tti_req
->
Slot
,
pnf_p7
->
sfn
,
pnf_p7
->
slot
);
(
pnf_p7
->
_public
.
dl_tti_req_fn
)(
NULL
,
&
(
pnf_p7
->
_public
),
tx_slot_buffer
->
dl_tti_req
);
}
//deallocate_nfapi_dl_config_request(subframe_buffer->dl_config_req, pnf_p7);
}
...
...
@@ -1090,7 +1097,7 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl
}
}
#endif
//
TODO: add deallocate fns for the new structs
//TODO: add deallocate fns for the new structs
if
(
tx_slot_buffer
->
dl_tti_req
!=
0
)
{
deallocate_nfapi_dl_tti_request
(
tx_slot_buffer
->
dl_tti_req
,
pnf_p7
);
...
...
@@ -1670,7 +1677,9 @@ uint8_t is_p7_request_in_window(uint16_t sfnsf, const char* name, pnf_p7_t* phy)
void
pnf_handle_dl_tti_request
(
void
*
pRecvMsg
,
int
recvMsgLen
,
pnf_p7_t
*
pnf_p7
)
{
//NFAPI_TRACE(NFAPI_TRACE_INFO, "DL_CONFIG.req Received\n");
struct
timespec
curr
;
clock_gettime
(
CLOCK_MONOTONIC
,
&
curr
);
printf
(
"
\n
pnf_handle_dl_tti_request %d.%d
\n
"
,
curr
.
tv_sec
,
curr
.
tv_nsec
);
nfapi_nr_dl_tti_request_t
*
req
=
allocate_nfapi_dl_tti_request
(
pnf_p7
);
if
(
req
==
NULL
)
...
...
openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
View file @
41438a19
...
...
@@ -203,8 +203,8 @@ void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m, nfapi_nr_dl_tti_pdcch_pdu_r
return ret;
}*/
int16_t
find_nr_pdcch
(
int
frame
,
int
slot
,
PHY_VARS_gNB
*
gNB
,
find_type_t
type
)
{
//
if(slot==2)
//LOG_I(PHY,"\nFRAME %d SLOT %d gNB pdcch pdu frame %d,slot %d",frame,slot,gNB->pdcch_pdu[0].frame,gNB->pdcch_pdu[0].slot);
//
if(slot==2)
//
LOG_I(PHY,"\nFRAME %d SLOT %d gNB pdcch pdu frame %d,slot %d",frame,slot,gNB->pdcch_pdu[0].frame,gNB->pdcch_pdu[0].slot);
uint16_t
i
;
int16_t
first_free_index
=-
1
;
...
...
@@ -235,7 +235,7 @@ void nr_fill_dci(PHY_VARS_gNB *gNB,
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
+
2
;
gNB
->
pdcch_pdu
[
pdcch_id
].
frame
=
frame
+
2
;
//Hardcoded as PNF has offset of 2 frames
gNB
->
pdcch_pdu
[
pdcch_id
].
slot
=
slot
;
for
(
int
i
=
0
;
i
<
pdcch_pdu_rel15
->
numDlDci
;
i
++
)
{
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
41438a19
...
...
@@ -129,10 +129,11 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
time_stats_t
*
dlsch_rate_matching_stats
=&
gNB
->
dlsch_rate_matching_stats
;
time_stats_t
*
dlsch_interleaving_stats
=&
gNB
->
dlsch_interleaving_stats
;
time_stats_t
*
dlsch_segmentation_stats
=&
gNB
->
dlsch_segmentation_stats
;
NR_DL_FRAME_PARMS
*
fp
=
&
gNB
->
frame_parms
;
for
(
int
dlsch_id
=
0
;
dlsch_id
<
NUMBER_OF_NR_DLSCH_MAX
;
dlsch_id
++
)
{
dlsch
=
gNB
->
dlsch
[
dlsch_id
][
0
];
if
(
dlsch
->
slot_tx
[
slot
]
==
0
)
continue
;
if
(
dlsch
->
slot_tx
[
slot
]
==
0
)
continue
;
int
harq_pid
=
dlsch
->
harq_ids
[
frame
%
2
][
slot
];
NR_DL_gNB_HARQ_t
*
harq
=
dlsch
->
harq_processes
[
harq_pid
];
...
...
@@ -341,7 +342,7 @@ void dump_pdsch_stats(PHY_VARS_gNB *gNB) {
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_SCH_STATS_MAX
;
i
++
)
if
(
gNB
->
dlsch_stats
[
i
].
rnti
>
0
)
LOG_
I
(
PHY
,
"DLSCH RNTI %x: round_trials %d(%1.1e):%d(%1.1e):%d(%1.1e):%d, current_Qm %d, current_RI %d, total_bytes TX %d
\n
"
,
LOG_
D
(
PHY
,
"DLSCH RNTI %x: round_trials %d(%1.1e):%d(%1.1e):%d(%1.1e):%d, current_Qm %d, current_RI %d, total_bytes TX %d
\n
"
,
gNB
->
dlsch_stats
[
i
].
rnti
,
gNB
->
dlsch_stats
[
i
].
round_trials
[
0
],
(
double
)
gNB
->
dlsch_stats
[
i
].
round_trials
[
1
]
/
gNB
->
dlsch_stats
[
i
].
round_trials
[
0
],
...
...
openair1/SCHED/nfapi_nr_dummy_defs.c
deleted
100644 → 0
View file @
e6bf90e2
//Dummy NR defs to avoid linking errors
#include "PHY/defs_gNB.h"
#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h"
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
#include "openair1/PHY/LTE_TRANSPORT/transport_common.h"
void
handle_nfapi_nr_pdcch_pdu
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_dl_tti_pdcch_pdu
*
pdcch_pdu
){}
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
){}
void
handle_nr_nfapi_pdsch_pdu
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_dl_tti_pdsch_pdu
*
pdsch_pdu
,
uint8_t
*
sdu
){
}
int
l1_north_init_gNB
(
void
){}
uint8_t
slot_ahead
=
0
;
uint8_t
nfapi_mode
=
0
;
NR_IF_Module_t
*
NR_IF_Module_init
(
int
Mod_id
)
{}
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
){}
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
openair1/SCHED_NR/fapi_nr_l1.c
View file @
41438a19
...
...
@@ -255,8 +255,8 @@ if(nfapi_mode != 2)
}
if
(
nfapi_mode
!=
0
&&
Sched_INFO
->
UL_dci_req
->
numPdus
!=
0
)
{
oai_nfapi_ul_dci_req
(
Sched_INFO
->
UL_dci_req
);
// if (nfapi_mode != 0 && Sched_INFO->UL_dci_req->numPdus!=0)
// {
// oai_nfapi_ul_dci_req(Sched_INFO->UL_dci_req);
// }//Only DL
}
}
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
41438a19
...
...
@@ -196,9 +196,10 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
for
(
int
i
=
0
;
i
<
gNB
->
num_pdsch_rnti
[
slot
];
i
++
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH
,
1
);
LOG_I
(
PHY
,
"PDSCH generation started (%d) in frame %d.%d
\n
"
,
gNB
->
num_pdsch_rnti
[
slot
],
frame
,
slot
);
//
LOG_I(PHY, "PDSCH generation started (%d) in frame %d.%d\n", gNB->num_pdsch_rnti[slot],frame,slot);
nr_generate_pdsch
(
gNB
,
frame
,
slot
);
if
((
frame
&
127
)
==
0
)
dump_pdsch_stats
(
gNB
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH
,
0
);
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
41438a19
...
...
@@ -535,7 +535,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
if
(
UE_list
->
fiveG_connected
[
UE_id
]
&&
(
is_xlsch_in_slot
(
*
dlsch_in_slot_bitmap
,
slot
%
num_slots_per_tdd
)))
{
ue_sched_ctl
->
current_harq_pid
=
slot
%
num_slots_per_tdd
;
nr_update_pucch_scheduling
(
module_idP
,
UE_id
,
frame
,
slot
,
num_slots_per_tdd
,
&
pucch_sched
);
//nr_update_pucch_scheduling(module_idP, UE_id, frame, slot, num_slots_per_tdd,&pucch_sched);//Testing
nr_schedule_uss_dlsch_phytest
(
module_idP
,
frame
,
slot
,
&
UE_list
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
pucch_sched
],
NULL
);
// resetting ta flag
gNB
->
ta_len
=
0
;
...
...
targets/RT/USER/lte-softmodem.c
View file @
41438a19
...
...
@@ -599,10 +599,10 @@ int main ( int argc, char **argv )
// flexran_agent_start(i);
// }
/* initializes PDCP and sets correct RLC Request/PDCP Indication callbacks
* for monolithic/F1 modes */
//
/* initializes PDCP and sets correct RLC Request/PDCP Indication callbacks
//
* for monolithic/F1 modes */
//}
//
}
if
(
RC
.
nb_inst
>
0
&&
NODE_IS_CU
(
node_type
))
{
protocol_ctxt_t
ctxt
;
...
...
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