Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-RAN
Commits
910912a4
Commit
910912a4
authored
Dec 10, 2021
by
ahadi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding prs structure
parent
464509e3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
32 deletions
+22
-32
openair1/PHY/NR_TRANSPORT/nr_prs.c
openair1/PHY/NR_TRANSPORT/nr_prs.c
+9
-14
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+13
-18
No files found.
openair1/PHY/NR_TRANSPORT/nr_prs.c
View file @
910912a4
...
@@ -28,36 +28,31 @@ int nr_generate_prs(uint32_t **nr_gold_prs,
...
@@ -28,36 +28,31 @@ int nr_generate_prs(uint32_t **nr_gold_prs,
int
k_prime
=
0
;
int
k_prime
=
0
;
int
k
=
0
;
int
k
=
0
;
int16_t
mod_prs
[
NR_MAX_PRS_LENGTH
<<
1
];
int16_t
mod_prs
[
NR_MAX_PRS_LENGTH
<<
1
];
uint8_t
idx
=
0
;
uint8_t
idx
=
prs_data
->
NPRSID
;
uint8_t
combSize
=
6
;
uint8_t
REOffset
=
0
;
uint8_t
symbolStart
=
5
;
uint8_t
NumPRSSymbols
=
6
;
uint16_t
NumPRBs
=
106
;
// QPSK modulation
// QPSK modulation
// PRS resource mapping with combsize=k which means PRS symbols exist in every k-th subcarrier in frequency domain
// PRS resource mapping with combsize=k which means PRS symbols exist in every k-th subcarrier in frequency domain
// According to ts138.211 sec.7.4.1.7.2
// According to ts138.211 sec.7.4.1.7.2
for
(
int
l
=
symbolStart
;
l
<
symbolStart
+
NumPRSSymbols
;
l
++
)
{
for
(
int
l
=
prs_data
->
SymbolStart
;
l
<
prs_data
->
SymbolStart
+
prs_data
->
NumPRSSymbols
;
l
++
)
{
int
symInd
=
l
-
5
;
int
symInd
=
l
-
5
;
if
(
combSize
==
2
)
{
if
(
prs_data
->
CombSize
==
2
)
{
k_prime
=
k_prime_table
[
0
][
symInd
];
k_prime
=
k_prime_table
[
0
][
symInd
];
}
}
else
if
(
combSize
==
4
){
else
if
(
prs_data
->
CombSize
==
4
){
k_prime
=
k_prime_table
[
1
][
symInd
];
k_prime
=
k_prime_table
[
1
][
symInd
];
}
}
else
if
(
combSize
==
6
){
else
if
(
prs_data
->
CombSize
==
6
){
k_prime
=
k_prime_table
[
2
][
symInd
];
k_prime
=
k_prime_table
[
2
][
symInd
];
}
}
else
if
(
combSize
==
12
){
else
if
(
prs_data
->
CombSize
==
12
){
k_prime
=
k_prime_table
[
3
][
symInd
];
k_prime
=
k_prime_table
[
3
][
symInd
];
}
}
k
=
(
REOffset
+
k_prime
)
%
c
ombSize
+
frame_parms
->
ssb_start_subcarrier
;
k
=
(
prs_data
->
REOffset
+
k_prime
)
%
prs_data
->
C
ombSize
+
frame_parms
->
ssb_start_subcarrier
;
for
(
int
m
=
0
;
m
<
12
/
combSize
*
NumPRBs
;
m
++
)
{
for
(
int
m
=
0
;
m
<
12
/
prs_data
->
CombSize
*
prs_data
->
NumRB
;
m
++
)
{
#ifdef DEBUG_PRS_MAP
#ifdef DEBUG_PRS_MAP
printf
(
"m %d at k %d of l %d
\n
"
,
m
,
k
,
l
);
printf
(
"m %d at k %d of l %d
\n
"
,
m
,
k
,
l
);
...
@@ -81,7 +76,7 @@ int nr_generate_prs(uint32_t **nr_gold_prs,
...
@@ -81,7 +76,7 @@ int nr_generate_prs(uint32_t **nr_gold_prs,
((
int16_t
*
)
txdataF
)[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]);
((
int16_t
*
)
txdataF
)[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]);
#endif
#endif
k
=
k
+
c
ombSize
;
k
=
k
+
prs_data
->
C
ombSize
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
k
-=
frame_parms
->
ofdm_symbol_size
;
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
910912a4
...
@@ -148,22 +148,6 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
...
@@ -148,22 +148,6 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
// defining inputs and initials for nr_generate_prs()
// defining inputs and initials for nr_generate_prs()
int
**
txdataF
=
gNB
->
common_vars
.
txdataF
;
int
**
txdataF
=
gNB
->
common_vars
.
txdataF
;
uint8_t
ssb_index
,
n_hf
;
ssb_index
=
ssb_pdu
.
ssb_pdu_rel15
.
SsbBlockIndex
;
LOG_D
(
PHY
,
"common_signal_procedures: frame %d, slot %d ssb index %d
\n
"
,
frame
,
slot
,
ssb_index
);
uint16_t
ssb_start_symbol
;
int
ssb_start_symbol_abs
=
nr_get_ssb_start_symbol
(
fp
,
ssb_index
);
// computing the starting symbol for current ssb
ssb_start_symbol
=
ssb_start_symbol_abs
%
fp
->
symbols_per_slot
;
// start symbol wrt slot
uint16_t
slots_per_hf
=
(
fp
->
slots_per_frame
)
>>
1
;
if
(
slot
<
slots_per_hf
)
n_hf
=
0
;
else
n_hf
=
1
;
if
((
cfg
->
cell_config
.
frame_duplex_type
.
value
==
TDD
)
&&
if
((
cfg
->
cell_config
.
frame_duplex_type
.
value
==
TDD
)
&&
...
@@ -242,8 +226,19 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
...
@@ -242,8 +226,19 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
//TODO: nr_generate_prs
//TODO: nr_generate_prs
// check if we have prs to transmit in this frame and slot
// check if we have prs to transmit in this frame and slot
prs_data_t
prs_data
;
prs_data_t
prs_data
;
prs_data
.
PRSResourceSetPeriod
[
0
]
=
0
;
prs_data
.
PRSResourceSetPeriod
[
0
]
=
40
;
// PRS resource slot period
prs_data
.
PRSResourceSetPeriod
[
1
]
=
0
;
prs_data
.
PRSResourceSetPeriod
[
1
]
=
0
;
// resource slot offset
prs_data
.
SymbolStart
=
5
;
prs_data
.
NumPRSSymbols
=
6
;
prs_data
.
NumRB
=
106
;
prs_data
.
RBOffset
=
0
;
prs_data
.
CombSize
=
6
;
prs_data
.
REOffset
=
0
;
prs_data
.
PRSResourceOffset
=
0
;
prs_data
.
PRSResourceRepetition
=
1
;
prs_data
.
PRSResourceTimeGap
=
1
;
prs_data
.
NPRSID
=
0
;
// tbc
// tbc
nr_generate_prs
(
gNB
->
nr_gold_prs
[
slot
],
&
txdataF
[
0
][
txdataF_offset
],
AMP
,
&
prs_data
,
cfg
,
fp
);
nr_generate_prs
(
gNB
->
nr_gold_prs
[
slot
],
&
txdataF
[
0
][
txdataF_offset
],
AMP
,
&
prs_data
,
cfg
,
fp
);
...
...
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