Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
6a7c146d
Commit
6a7c146d
authored
Apr 22, 2020
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fapi functions for pucch
parent
11445469
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
114 additions
and
7 deletions
+114
-7
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
+1
-1
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+7
-0
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+12
-0
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+48
-0
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+13
-3
openair1/SCHED_NR/fapi_nr_l1.c
openair1/SCHED_NR/fapi_nr_l1.c
+1
-3
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+31
-0
openair2/COMMON/platform_constants.h
openair2/COMMON/platform_constants.h
+1
-0
No files found.
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
View file @
6a7c146d
...
@@ -1560,7 +1560,7 @@ typedef struct
...
@@ -1560,7 +1560,7 @@ typedef struct
uint16_t
sfn
;
uint16_t
sfn
;
uint16_t
slot
;
uint16_t
slot
;
uint16_t
num_ucis
;
uint16_t
num_ucis
;
nfapi_nr_uci_t
uci_list
[
NFAPI_MAX_NUM_UCI_INDICATION
]
;
nfapi_nr_uci_t
*
uci_list
;
}
nfapi_nr_uci_indication_t
;
}
nfapi_nr_uci_indication_t
;
...
...
openair1/PHY/INIT/nr_init.c
View file @
6a7c146d
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "PHY/NR_TRANSPORT/nr_transport.h"
#include "PHY/NR_TRANSPORT/nr_transport.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto_common.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto_common.h"
/*#include "RadioResourceConfigCommonSIB.h"
/*#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "RadioResourceConfigDedicated.h"
...
@@ -502,6 +503,12 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
...
@@ -502,6 +503,12 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
LOG_I
(
PHY
,
"Initialise nr transport
\n
"
);
LOG_I
(
PHY
,
"Initialise nr transport
\n
"
);
uint16_t
grid_size
=
cfg
->
carrier_config
.
dl_grid_size
[
fp
->
numerology_index
].
value
;
uint16_t
grid_size
=
cfg
->
carrier_config
.
dl_grid_size
[
fp
->
numerology_index
].
value
;
for
(
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
<
NUMBER_OF_NR_DLSCH_MAX
;
i
++
)
{
for
(
i
=
0
;
i
<
NUMBER_OF_NR_DLSCH_MAX
;
i
++
)
{
LOG_I
(
PHY
,
"Allocating Transport Channel Buffers for DLSCH %d/%d
\n
"
,
i
,
NUMBER_OF_NR_DLSCH_MAX
);
LOG_I
(
PHY
,
"Allocating Transport Channel Buffers for DLSCH %d/%d
\n
"
,
i
,
NUMBER_OF_NR_DLSCH_MAX
);
...
...
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
6a7c146d
...
@@ -205,6 +205,18 @@ uint32_t nr_get_code_rate_ul(uint8_t Imcs, uint8_t table_idx);
...
@@ -205,6 +205,18 @@ uint32_t nr_get_code_rate_ul(uint8_t Imcs, uint8_t table_idx);
uint32_t
nr_get_code_rate_dl
(
uint8_t
Imcs
,
uint8_t
table_idx
);
uint32_t
nr_get_code_rate_dl
(
uint8_t
Imcs
,
uint8_t
table_idx
);
NR_gNB_PUCCH_t
*
new_gNB_pucch
(
void
);
void
nr_fill_pucch
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
);
int
nr_find_pucch
(
uint16_t
rnti
,
int
frame
,
int
slot
,
PHY_VARS_gNB
*
gNB
);
void
nr_fill_prach
(
PHY_VARS_gNB
*
gNB
,
void
nr_fill_prach
(
PHY_VARS_gNB
*
gNB
,
int
SFN
,
int
SFN
,
int
Slot
,
int
Slot
,
...
...
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
6a7c146d
...
@@ -19,6 +19,54 @@
...
@@ -19,6 +19,54 @@
//#define DEBUG_NR_PUCCH_RX 1
//#define DEBUG_NR_PUCCH_RX 1
NR_gNB_PUCCH_t
*
new_gNB_pucch
(
void
){
NR_gNB_PUCCH_t
*
pucch
;
pucch
=
(
NR_gNB_PUCCH_t
*
)
malloc16
(
sizeof
(
NR_gNB_PUCCH_t
));
pucch
->
active
=
0
;
return
(
pucch
);
}
int
nr_find_pucch
(
uint16_t
rnti
,
int
frame
,
int
slot
,
PHY_VARS_gNB
*
gNB
)
{
AssertFatal
(
gNB
!=
NULL
,
"gNB is null
\n
"
);
int
index
=
-
1
;
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_ULSCH_MAX
;
i
++
)
{
AssertFatal
(
gNB
->
pucch
[
i
]
!=
NULL
,
"gNB->pucch[%d] is null
\n
"
,
i
);
if
((
gNB
->
pucch
[
i
]
->
active
>
0
)
&&
(
gNB
->
pucch
[
i
]
->
pucch_pdu
.
rnti
==
rnti
)
&&
(
gNB
->
pucch
[
i
]
->
frame
==
frame
)
&&
(
gNB
->
pucch
[
i
]
->
slot
==
slot
))
return
(
i
);
else
if
((
gNB
->
pucch
[
i
]
->
active
==
0
)
&&
(
index
==-
1
))
index
=
i
;
}
if
(
index
==-
1
)
LOG_E
(
MAC
,
"PUCCH list is full
\n
"
);
return
(
index
);
}
void
nr_fill_pucch
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
int
id
=
nr_find_pucch
(
pucch_pdu
->
rnti
,
frame
,
slot
,
gNB
);
AssertFatal
(
(
id
>=
0
)
&&
(
id
<
NUMBER_OF_NR_PUCCH_MAX
),
"invalid id found for pucch !!! rnti %04x id %d
\n
"
,
pucch_pdu
->
rnti
,
id
);
NR_gNB_PUCCH_t
*
pucch
=
gNB
->
pucch
[
id
];
pucch
->
frame
=
frame
;
pucch
->
slot
=
slot
;
pucch
->
active
=
1
;
memcpy
((
void
*
)
&
pucch
->
pucch_pdu
,
(
void
*
)
pucch_pdu
,
sizeof
(
nfapi_nr_pucch_pdu_t
));
}
int
get_pucch0_cs_lut_index
(
PHY_VARS_gNB
*
gNB
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
int
get_pucch0_cs_lut_index
(
PHY_VARS_gNB
*
gNB
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
int
i
=
0
;
int
i
=
0
;
...
...
openair1/PHY/defs_gNB.h
View file @
6a7c146d
...
@@ -340,6 +340,15 @@ typedef struct {
...
@@ -340,6 +340,15 @@ typedef struct {
uint16_t
cba_rnti
[
NUM_MAX_CBA_GROUP
];
uint16_t
cba_rnti
[
NUM_MAX_CBA_GROUP
];
}
NR_gNB_ULSCH_t
;
}
NR_gNB_ULSCH_t
;
typedef
struct
{
uint8_t
active
;
/// Frame where current PUCCH pdu was sent
uint32_t
frame
;
/// Slot where current PUCCH pdu was sent
uint32_t
slot
;
/// ULSCH PDU
nfapi_nr_pucch_pdu_t
pucch_pdu
;
}
NR_gNB_PUCCH_t
;
typedef
struct
{
typedef
struct
{
/// \brief Pointers (dynamic) to the received data in the time domain.
/// \brief Pointers (dynamic) to the received data in the time domain.
...
@@ -619,9 +628,9 @@ typedef struct {
...
@@ -619,9 +628,9 @@ typedef struct {
#define MAX_NUM_NR_RX_RACH_PDUS 4
#define MAX_NUM_NR_RX_RACH_PDUS 4
#define MAX_NUM_NR_RX_PRACH_PREAMBLES 4
#define MAX_NUM_NR_RX_PRACH_PREAMBLES 4
#define MAX_UL_PDUS_PER_SLOT
100
#define MAX_UL_PDUS_PER_SLOT
8
#define MAX_NUM_NR_SRS_PDUS
100
#define MAX_NUM_NR_SRS_PDUS
8
#define MAX_NUM_NR_UCI_PDUS
100
#define MAX_NUM_NR_UCI_PDUS
8
/// Top-level PHY Data Structure for gNB
/// Top-level PHY Data Structure for gNB
typedef
struct
PHY_VARS_gNB_s
{
typedef
struct
PHY_VARS_gNB_s
{
...
@@ -675,6 +684,7 @@ typedef struct PHY_VARS_gNB_s {
...
@@ -675,6 +684,7 @@ typedef struct PHY_VARS_gNB_s {
NR_gNB_COMMON
common_vars
;
NR_gNB_COMMON
common_vars
;
NR_gNB_PRACH
prach_vars
;
NR_gNB_PRACH
prach_vars
;
NR_gNB_PUSCH
*
pusch_vars
[
NUMBER_OF_NR_ULSCH_MAX
];
NR_gNB_PUSCH
*
pusch_vars
[
NUMBER_OF_NR_ULSCH_MAX
];
NR_gNB_PUCCH_t
*
pucch
[
NUMBER_OF_NR_PUCCH_MAX
];
NR_gNB_DLSCH_t
*
dlsch
[
NUMBER_OF_NR_DLSCH_MAX
][
2
];
// Nusers times two spatial streams
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]
NR_gNB_ULSCH_t
*
ulsch
[
NUMBER_OF_NR_ULSCH_MAX
][
2
];
// [Nusers times][2 codewords]
NR_gNB_DLSCH_t
*
dlsch_SI
,
*
dlsch_ra
,
*
dlsch_p
;
NR_gNB_DLSCH_t
*
dlsch_SI
,
*
dlsch_ra
,
*
dlsch_p
;
...
...
openair1/SCHED_NR/fapi_nr_l1.c
View file @
6a7c146d
...
@@ -114,8 +114,6 @@ void handle_nfapi_nr_ul_dci_pdu(PHY_VARS_gNB *gNB,
...
@@ -114,8 +114,6 @@ void handle_nfapi_nr_ul_dci_pdu(PHY_VARS_gNB *gNB,
nr_fill_ul_dci
(
gNB
,
frame
,
slot
);
nr_fill_ul_dci
(
gNB
,
frame
,
slot
);
}
}
void
handle_nr_nfapi_pdsch_pdu
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
void
handle_nr_nfapi_pdsch_pdu
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
...
@@ -211,7 +209,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
...
@@ -211,7 +209,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
break
;
break
;
case
NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE
:
case
NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE
:
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PUCCH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PUCCH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
// handle_nfapi_nr_pucch_pdu(gNB,frame,slot,
UL_tti_req->pdus_list[i].pucch_pdu);
nr_fill_pucch
(
gNB
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
,
&
UL_tti_req
->
pdus_list
[
i
].
pucch_pdu
);
break
;
break
;
case
NFAPI_NR_UL_CONFIG_PRACH_PDU_TYPE
:
case
NFAPI_NR_UL_CONFIG_PRACH_PDU_TYPE
:
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PRACH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PRACH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
6a7c146d
...
@@ -384,6 +384,37 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
...
@@ -384,6 +384,37 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
LOG_D
(
PHY
,
"phy_procedures_gNB_uespec_RX frame %d, slot %d
\n
"
,
frame_rx
,
slot_rx
);
LOG_D
(
PHY
,
"phy_procedures_gNB_uespec_RX frame %d, slot %d
\n
"
,
frame_rx
,
slot_rx
);
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_PUCCH_MAX
;
i
++
){
NR_gNB_PUCCH_t
*
pucch
=
gNB
->
pucch
[
i
];
if
(
pucch
)
{
nfapi_nr_pucch_pdu_t
*
pucch_pdu
=
&
pucch
[
i
].
pucch_pdu
;
uint16_t
num_ucis
;
switch
(
pucch_pdu
->
format_type
)
{
case
0
:
/*
num_ucis = gNB->UL_INFO.uci_ind.num_ucis;
gNB->UL_INFO.uci_ind.uci_list = &gNB->uci_pdu_list[0];
gNB->UL_INFO.uci_ind.sfn = frame_rx;
gNB->UL_INFO.uci_ind.slot = slot_rx;
gNB->uci_pdu_list[num_ucis].pdu_type = NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE;
gNB->uci_pdu_list[num_ucis].pdu_size = sizeof(nfapi_nr_uci_pucch_pdu_format_0_1_t);
nfapi_nr_uci_pucch_pdu_format_0_1_t *uci_pdu_format0 = &gNB->uci_pdu_list[num_ucis].pucch_pdu_format_0_1;
nr_decode_pucch0(gNB,
slot_rx,
uci_pdu_format0,
pucch_pdu);
gNB->UL_INFO.uci_ind.num_ucis += 1;*/
pucch
->
active
=
0
;
break
;
default:
AssertFatal
(
1
==
0
,
"Only PUCCH format 0 is currently supported
\n
"
);
}
}
}
for
(
int
ULSCH_id
=
0
;
ULSCH_id
<
NUMBER_OF_NR_ULSCH_MAX
;
ULSCH_id
++
)
{
for
(
int
ULSCH_id
=
0
;
ULSCH_id
<
NUMBER_OF_NR_ULSCH_MAX
;
ULSCH_id
++
)
{
NR_gNB_ULSCH_t
*
ulsch
=
gNB
->
ulsch
[
ULSCH_id
][
0
];
NR_gNB_ULSCH_t
*
ulsch
=
gNB
->
ulsch
[
ULSCH_id
][
0
];
int
harq_pid
;
int
harq_pid
;
...
...
openair2/COMMON/platform_constants.h
View file @
6a7c146d
...
@@ -99,6 +99,7 @@
...
@@ -99,6 +99,7 @@
#define NUMBER_OF_NR_DLSCH_MAX 2//16
#define NUMBER_OF_NR_DLSCH_MAX 2//16
#define NUMBER_OF_NR_ULSCH_MAX 2//16
#define NUMBER_OF_NR_ULSCH_MAX 2//16
#define NUMBER_OF_NR_PUCCH_MAX 2
#define NUMBER_OF_NR_SR_MAX 16
#define NUMBER_OF_NR_SR_MAX 16
...
...
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