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
lizhongxiao
OpenXG-RAN
Commits
c2d948a0
Commit
c2d948a0
authored
Nov 22, 2021
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementation of the remaining procedures until call the new PHY function nr_get_srs_signal at gNB
parent
9551cf4a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
131 additions
and
0 deletions
+131
-0
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+6
-0
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+8
-0
openair1/PHY/NR_TRANSPORT/srs_rx.c
openair1/PHY/NR_TRANSPORT/srs_rx.c
+91
-0
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+11
-0
openair1/SCHED_NR/fapi_nr_l1.c
openair1/SCHED_NR/fapi_nr_l1.c
+1
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+13
-0
No files found.
cmake_targets/CMakeLists.txt
View file @
c2d948a0
...
...
@@ -1804,6 +1804,7 @@ set(PHY_SRC_UE
${
PHY_SMALLBLOCKSRC
}
${
PHY_NR_CODINGIF
}
${
OPENAIR1_DIR
}
/PHY/NR_TRANSPORT/pucch_rx.c
${
OPENAIR1_DIR
}
/PHY/NR_TRANSPORT/srs_rx.c
${
OPENAIR1_DIR
}
/PHY/NR_TRANSPORT/nr_uci_tools_common.c
)
set
(
PHY_NR_UE_SRC
...
...
openair1/PHY/INIT/nr_init.c
View file @
c2d948a0
...
...
@@ -546,6 +546,12 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
AssertFatal
(
gNB
->
pucch
[
i
]
!=
NULL
,
"Can't initialize pucch %d
\n
"
,
i
);
}
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_SRS_MAX
;
i
++
)
{
LOG_I
(
PHY
,
"Allocating Transport Channel Buffers for SRS %d/%d
\n
"
,
i
,
NUMBER_OF_NR_SRS_MAX
);
gNB
->
srs
[
i
]
=
new_gNB_srs
();
AssertFatal
(
gNB
->
srs
[
i
]
!=
NULL
,
"Can't initialize srs %d
\n
"
,
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
);
...
...
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
c2d948a0
...
...
@@ -310,6 +310,14 @@ int nr_find_pucch(uint16_t rnti,
int
slot
,
PHY_VARS_gNB
*
gNB
);
NR_gNB_SRS_t
*
new_gNB_srs
(
void
);
void
nr_fill_srs
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_srs_pdu_t
*
srs_pdu
);
void
nr_get_srs_signal
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_srs_pdu_t
*
srs_pdu
);
void
init_prach_list
(
PHY_VARS_gNB
*
gNB
);
void
init_prach_ru_list
(
RU_t
*
ru
);
...
...
openair1/PHY/NR_TRANSPORT/srs_rx.c
0 → 100644
View file @
c2d948a0
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file PHY/NR_TRANSPORT/srs_rx.c
* \brief Top-level routines for getting the SRS physical channel
* \date 2021
* \version 1.0
*/
#include<stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include "PHY/impl_defs_nr.h"
#include "PHY/defs_nr_common.h"
#include "PHY/defs_gNB.h"
#include <openair1/PHY/CODING/nrSmallBlock/nr_small_block_defs.h>
#include "common/utils/LOG/log.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "T.h"
NR_gNB_SRS_t
*
new_gNB_srs
(
void
){
NR_gNB_SRS_t
*
srs
;
srs
=
(
NR_gNB_SRS_t
*
)
malloc16
(
sizeof
(
NR_gNB_SRS_t
));
srs
->
active
=
0
;
return
(
srs
);
}
int
nr_find_srs
(
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_SRS_MAX
;
i
++
)
{
AssertFatal
(
gNB
->
srs
[
i
]
!=
NULL
,
"gNB->srs[%d] is null
\n
"
,
i
);
if
((
gNB
->
srs
[
i
]
->
active
>
0
)
&&
(
gNB
->
srs
[
i
]
->
srs_pdu
.
rnti
==
rnti
)
&&
(
gNB
->
srs
[
i
]
->
frame
==
frame
)
&&
(
gNB
->
srs
[
i
]
->
slot
==
slot
))
return
(
i
);
else
if
((
gNB
->
srs
[
i
]
->
active
==
0
)
&&
(
index
==-
1
))
index
=
i
;
}
if
(
index
==-
1
)
LOG_E
(
MAC
,
"SRS list is full
\n
"
);
return
(
index
);
}
void
nr_fill_srs
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_srs_pdu_t
*
srs_pdu
)
{
int
id
=
nr_find_srs
(
srs_pdu
->
rnti
,
frame
,
slot
,
gNB
);
AssertFatal
(
(
id
>=
0
)
&&
(
id
<
NUMBER_OF_NR_SRS_MAX
),
"invalid id found for srs !!! rnti %04x id %d
\n
"
,
srs_pdu
->
rnti
,
id
);
NR_gNB_SRS_t
*
srs
=
gNB
->
srs
[
id
];
srs
->
frame
=
frame
;
srs
->
slot
=
slot
;
srs
->
active
=
1
;
memcpy
((
void
*
)
&
srs
->
srs_pdu
,
(
void
*
)
srs_pdu
,
sizeof
(
nfapi_nr_srs_pdu_t
));
}
void
nr_get_srs_signal
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_srs_pdu_t
*
srs_pdu
)
{
LOG_W
(
NR_PHY
,
"(%d.%d) nr_get_srs_signal is not implemented yet!
\n
"
,
frame
,
slot
);
}
\ No newline at end of file
openair1/PHY/defs_gNB.h
View file @
c2d948a0
...
...
@@ -411,6 +411,16 @@ typedef struct {
nfapi_nr_pucch_pdu_t
pucch_pdu
;
}
NR_gNB_PUCCH_t
;
typedef
struct
{
uint8_t
active
;
/// Frame where current SRS pdu was received
uint32_t
frame
;
/// Slot where current SRS pdu was received
uint32_t
slot
;
/// ULSCH PDU
nfapi_nr_srs_pdu_t
srs_pdu
;
}
NR_gNB_SRS_t
;
typedef
struct
{
/// \brief Pointers (dynamic) to the received data in the time domain.
/// - first index: rx antenna [0..nb_antennas_rx[
...
...
@@ -770,6 +780,7 @@ typedef struct PHY_VARS_gNB_s {
NR_gNB_PRACH
prach_vars
;
NR_gNB_PUSCH
*
pusch_vars
[
NUMBER_OF_NR_ULSCH_MAX
];
NR_gNB_PUCCH_t
*
pucch
[
NUMBER_OF_NR_PUCCH_MAX
];
NR_gNB_SRS_t
*
srs
[
NUMBER_OF_NR_SRS_MAX
];
NR_gNB_PDCCH_t
pdcch_pdu
[
NUMBER_OF_NR_PDCCH_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
...
...
openair1/SCHED_NR/fapi_nr_l1.c
View file @
c2d948a0
...
...
@@ -231,6 +231,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
break
;
case
NFAPI_NR_UL_CONFIG_SRS_PDU_TYPE
:
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_CONFIG_SRS_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
nr_fill_srs
(
gNB
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
,
&
UL_tti_req
->
pdus_list
[
i
].
srs_pdu
);
break
;
}
}
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
c2d948a0
...
...
@@ -797,6 +797,19 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
}
}
}
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_SRS_MAX
;
i
++
)
{
NR_gNB_SRS_t
*
srs
=
gNB
->
srs
[
i
];
if
(
srs
)
{
if
((
srs
->
active
==
1
)
&&
(
srs
->
frame
==
frame_rx
)
&&
(
srs
->
slot
==
slot_rx
))
{
LOG_D
(
NR_PHY
,
"(%d.%d) gNB is waiting for SRS, id = %i
\n
"
,
frame_rx
,
slot_rx
,
i
);
nfapi_nr_srs_pdu_t
*
srs_pdu
=
&
srs
->
srs_pdu
;
nr_get_srs_signal
(
gNB
,
frame_rx
,
slot_rx
,
srs_pdu
);
srs
->
active
=
0
;
}
}
}
stop_meas
(
&
gNB
->
phy_proc_rx
);
// figure out a better way to choose slot_rx, 19 is ok for a particular TDD configuration with 30kHz SCS
if
((
frame_rx
&
127
)
==
0
&&
slot_rx
==
19
)
{
...
...
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