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
zzha zzha
OpenXG-RAN
Commits
139a33d6
Commit
139a33d6
authored
Mar 28, 2022
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove multiple nr_gold_csi_rs initializations
parent
e322bdb2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
23 deletions
+18
-23
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+16
-21
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+1
-1
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+1
-1
No files found.
openair1/PHY/INIT/nr_init.c
View file @
139a33d6
...
...
@@ -188,20 +188,18 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
// CSI RS init
// ceil((NB_RB*8(max allocation per RB)*2(QPSK))/32)
int
csi_dmrs_init_length
=
((
fp
->
N_RB_DL
<<
4
)
>>
5
)
+
1
;
for
(
int
id
=
0
;
id
<
NUMBER_OF_NR_CSIRS_MAX
;
id
++
)
{
gNB
->
nr_csi_rs_info
[
id
]
=
(
nr_csi_rs_info_t
*
)
malloc16_clear
(
sizeof
(
nr_csi_rs_info_t
));
gNB
->
nr_csi_rs_info
[
id
]
->
nr_gold_csi_rs
=
(
uint32_t
***
)
malloc16
(
fp
->
slots_per_frame
*
sizeof
(
uint32_t
**
));
AssertFatal
(
gNB
->
nr_csi_rs_info
[
id
]
->
nr_gold_csi_rs
!=
NULL
,
"NR init: csi reference signal malloc failed
\n
"
);
for
(
int
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
gNB
->
nr_csi_rs_info
[
id
]
->
nr_gold_csi_rs
[
slot
]
=
(
uint32_t
**
)
malloc16
(
fp
->
symbols_per_slot
*
sizeof
(
uint32_t
*
));
AssertFatal
(
gNB
->
nr_csi_rs_info
[
id
]
->
nr_gold_csi_rs
[
slot
]
!=
NULL
,
"NR init: csi reference signal for slot %d - malloc failed
\n
"
,
slot
);
for
(
int
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
{
gNB
->
nr_csi_rs_info
[
id
]
->
nr_gold_csi_rs
[
slot
][
symb
]
=
(
uint32_t
*
)
malloc16
(
csi_dmrs_init_length
*
sizeof
(
uint32_t
));
AssertFatal
(
gNB
->
nr_csi_rs_info
[
id
]
->
nr_gold_csi_rs
[
slot
][
symb
]
!=
NULL
,
"NR init: csi reference signal for slot %d symbol %d - malloc failed
\n
"
,
slot
,
symb
);
}
gNB
->
nr_csi_rs_info
=
(
nr_csi_rs_info_t
*
)
malloc16_clear
(
sizeof
(
nr_csi_rs_info_t
));
gNB
->
nr_csi_rs_info
->
nr_gold_csi_rs
=
(
uint32_t
***
)
malloc16
(
fp
->
slots_per_frame
*
sizeof
(
uint32_t
**
));
AssertFatal
(
gNB
->
nr_csi_rs_info
->
nr_gold_csi_rs
!=
NULL
,
"NR init: csi reference signal malloc failed
\n
"
);
for
(
int
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
gNB
->
nr_csi_rs_info
->
nr_gold_csi_rs
[
slot
]
=
(
uint32_t
**
)
malloc16
(
fp
->
symbols_per_slot
*
sizeof
(
uint32_t
*
));
AssertFatal
(
gNB
->
nr_csi_rs_info
->
nr_gold_csi_rs
[
slot
]
!=
NULL
,
"NR init: csi reference signal for slot %d - malloc failed
\n
"
,
slot
);
for
(
int
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
{
gNB
->
nr_csi_rs_info
->
nr_gold_csi_rs
[
slot
][
symb
]
=
(
uint32_t
*
)
malloc16
(
csi_dmrs_init_length
*
sizeof
(
uint32_t
));
AssertFatal
(
gNB
->
nr_csi_rs_info
->
nr_gold_csi_rs
[
slot
][
symb
]
!=
NULL
,
"NR init: csi reference signal for slot %d symbol %d - malloc failed
\n
"
,
slot
,
symb
);
}
nr_init_csi_rs
(
&
gNB
->
frame_parms
,
gNB
->
nr_csi_rs_info
[
id
]
->
nr_gold_csi_rs
,
cfg
->
cell_config
.
phy_cell_id
.
value
);
}
nr_init_csi_rs
(
&
gNB
->
frame_parms
,
gNB
->
nr_csi_rs_info
->
nr_gold_csi_rs
,
cfg
->
cell_config
.
phy_cell_id
.
value
);
for
(
int
id
=
0
;
id
<
NUMBER_OF_NR_SRS_MAX
;
id
++
)
{
gNB
->
nr_srs_info
[
id
]
=
(
nr_srs_info_t
*
)
malloc16_clear
(
sizeof
(
nr_srs_info_t
));
...
...
@@ -346,16 +344,13 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
}
free_and_zero
(
pusch_dmrs
);
for
(
int
id
=
0
;
id
<
NUMBER_OF_NR_SRS_MAX
;
id
++
)
{
uint32_t
***
csi_rs
=
gNB
->
nr_csi_rs_info
[
id
]
->
nr_gold_csi_rs
;
for
(
int
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
for
(
int
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
free_and_zero
(
csi_rs
[
slot
][
symb
]);
free_and_zero
(
csi_rs
[
slot
]);
}
free_and_zero
(
csi_rs
);
free_and_zero
(
gNB
->
nr_csi_rs_info
[
id
]);
uint32_t
***
csi_rs
=
gNB
->
nr_csi_rs_info
->
nr_gold_csi_rs
;
for
(
int
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
for
(
int
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
free_and_zero
(
csi_rs
[
slot
][
symb
]);
free_and_zero
(
csi_rs
[
slot
]);
}
free_and_zero
(
csi_rs
);
for
(
int
id
=
0
;
id
<
NUMBER_OF_NR_SRS_MAX
;
id
++
)
{
for
(
int
i
=
0
;
i
<
Prx
;
i
++
){
...
...
openair1/PHY/defs_gNB.h
View file @
139a33d6
...
...
@@ -783,7 +783,7 @@ typedef struct PHY_VARS_gNB_s {
nr_srs_info_t
*
nr_srs_info
[
NUMBER_OF_NR_SRS_MAX
];
/// CSI-RS variables
nr_csi_rs_info_t
*
nr_csi_rs_info
[
NUMBER_OF_NR_CSIRS_MAX
]
;
nr_csi_rs_info_t
*
nr_csi_rs_info
;
uint8_t
pbch_configured
;
char
gNB_generate_rar
;
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
139a33d6
...
...
@@ -178,7 +178,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
if
(
csirs
->
active
==
1
)
{
LOG_D
(
PHY
,
"CSI-RS generation started in frame %d.%d
\n
"
,
frame
,
slot
);
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
*
csi_params
=
&
csirs
->
csirs_pdu
.
csi_rs_pdu_rel15
;
nr_generate_csi_rs
(
gNB
->
frame_parms
,
gNB
->
common_vars
.
txdataF
,
AMP
,
gNB
->
nr_csi_rs_info
[
i
]
,
csi_params
,
gNB
->
gNB_config
.
cell_config
.
phy_cell_id
.
value
,
slot
);
nr_generate_csi_rs
(
gNB
->
frame_parms
,
gNB
->
common_vars
.
txdataF
,
AMP
,
gNB
->
nr_csi_rs_info
,
csi_params
,
gNB
->
gNB_config
.
cell_config
.
phy_cell_id
.
value
,
slot
);
csirs
->
active
=
0
;
}
}
...
...
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