Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oai
openairinterface5G
Commits
3d0c941d
Commit
3d0c941d
authored
3 years ago
by
Mohsen Ahadi
Browse files
Options
Downloads
Patches
Plain Diff
adding nr_init_prs() to nr_gold.c
parent
de8d4f43
No related branches found
No related tags found
3 merge requests
!1757
Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c
,
!1740
integration_2022_wk40
,
!1644
Add Positioning Reference Signal (PRS) to gNB and nrUE
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openair1/PHY/NR_REFSIG/nr_gold.c
+40
-1
40 additions, 1 deletion
openair1/PHY/NR_REFSIG/nr_gold.c
with
40 additions
and
1 deletion
openair1/PHY/NR_REFSIG/nr_gold.c
+
40
−
1
View file @
3d0c941d
...
...
@@ -154,4 +154,43 @@ void nr_init_csi_rs(PHY_VARS_gNB* gNB, uint32_t Nid)
}
void
nr_init_prs
(
PHY_VARS_gNB
*
gNB
,
uint32_t
Nid
,
...)
void
nr_init_prs
(
PHY_VARS_gNB
*
gNB
,
uint32_t
symNum
)
{
unsigned
int
x1
,
x2
;
uint16_t
Nid
,
i_ssb
,
i_ssb2
;
//unsigned char Lmax, l, n_hf, N_hf;
nfapi_nr_config_request_scf_t
*
cfg
=
&
gNB
->
gNB_config
;
NR_DL_FRAME_PARMS
*
fp
=
&
gNB
->
frame_parms
;
uint8_t
reset
;
uint8_t
slotNum
,
symNum
;
Nid
=
cfg
->
cell_config
.
phy_cell_id
.
value
;
//Lmax = fp->Lmax;
//N_hf = (Lmax == 4)? 2:1;
for
(
slotNum
=
0
;
slotNum
<
fp
->
slots_per_frame
-
1
;
slotNum
++
)
{
for
(
symNum
=
0
;
symNum
<
fp
->
symbols_per_slot
-
1
;
symNum
++
)
{
i_ssb
=
sumNum
&
(
symbols_per_slot
-
1
);
i_ssb2
=
i_ssb
+
(
slot
<<
2
);
reset
=
1
;
// initial x2 for prs as 38.211
uint32_t
c_init1
,
c_init2
,
c_init3
;
uint32_t
pow22
=
1
<<
22
;
uint32_t
pow10
=
1
<<
10
;
c_init1
=
pow22
*
ceil
(
Nid
/
1024
);
c_init2
=
pow10
*
(
slotnum
+
symNum
+
1
)
*
(
2
*
(
Nid
%
1024
)
+
1
);
c_init3
=
Nid
%
1024
;
x2
=
c_init1
+
c_init2
+
c_init3
;
for
(
uint8_t
n
=
0
;
n
<
NR_MAX_PRS_INIT_LENGTH_DWORD
;
n
++
)
{
gNB
->
nr_gold_prs
[
slotNum
][
symNum
][
n
]
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment