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
6c27a40f
Commit
6c27a40f
authored
Mar 02, 2022
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Creation of nr_csi_rs_info_t
parent
c272bb2f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
40 deletions
+42
-40
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+22
-20
openair1/PHY/NR_REFSIG/nr_gold.c
openair1/PHY/NR_REFSIG/nr_gold.c
+1
-8
openair1/PHY/NR_REFSIG/nr_refsig.h
openair1/PHY/NR_REFSIG/nr_refsig.h
+1
-1
openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
+7
-6
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+1
-1
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+3
-3
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+6
-0
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 @
6c27a40f
...
...
@@ -177,23 +177,22 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
LOG_D
(
PHY
,
"Initializing PUSCH DMRS Gold sequence with (%x,%x)
\n
"
,
Nid_pusch
[
0
],
Nid_pusch
[
1
]);
nr_gold_pusch
(
gNB
,
&
Nid_pusch
[
0
]);
//CSI RS init
gNB
->
nr_gold_csi_rs
=
(
uint32_t
***
)
malloc16
(
fp
->
slots_per_frame
*
sizeof
(
uint32_t
**
));
uint32_t
***
csi_rs
=
gNB
->
nr_gold_csi_rs
;
AssertFatal
(
csi_rs
!=
NULL
,
"NR init: csi reference signal malloc failed
\n
"
);
for
(
int
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
csi_rs
[
slot
]
=
(
uint32_t
**
)
malloc16
(
fp
->
symbols_per_slot
*
sizeof
(
uint32_t
*
));
AssertFatal
(
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
++
)
{
csi_rs
[
slot
][
symb
]
=
(
uint32_t
*
)
malloc16
(
NR_MAX_CSI_RS_INIT_LENGTH_DWORD
*
sizeof
(
uint32_t
)
);
AssertFatal
(
csi_rs
[
slot
][
symb
]
!=
NULL
,
"NR init: csi reference signal for slot %d symbol %d - malloc failed
\n
"
,
slot
,
symb
);
//
CSI RS init
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
(
NR_MAX_CSI_RS_INIT_LENGTH_DWORD
*
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
);
}
}
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
,
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
));
gNB
->
nr_srs_info
[
id
]
->
srs_generated_signal
=
(
int32_t
*
)
malloc16_clear
(
fp
->
ofdm_symbol_size
*
MAX_NUM_NR_SRS_SYMBOLS
*
sizeof
(
int32_t
));
...
...
@@ -335,13 +334,16 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
}
free_and_zero
(
pusch_dmrs
);
uint32_t
***
csi_rs
=
gNB
->
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
]);
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
]);
}
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/NR_REFSIG/nr_gold.c
View file @
6c27a40f
...
...
@@ -132,24 +132,17 @@ void nr_gold_pusch(PHY_VARS_gNB* gNB, uint32_t *Nid) {
}
void
nr_init_csi_rs
(
PHY_VARS_gNB
*
gNB
,
uint32_t
Nid
)
{
NR_DL_FRAME_PARMS
*
fp
=
&
gNB
->
frame_parms
;
uint32_t
***
csi_rs
=
gNB
->
nr_gold_csi_rs
;
void
nr_init_csi_rs
(
NR_DL_FRAME_PARMS
*
fp
,
uint32_t
***
csi_rs
,
uint32_t
Nid
)
{
uint32_t
x1
,
x2
;
uint8_t
reset
;
for
(
uint8_t
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
for
(
uint8_t
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
{
reset
=
1
;
x2
=
((
1
<<
10
)
*
(
fp
->
symbols_per_slot
*
slot
+
symb
+
1
)
*
((
Nid
<<
1
)
+
1
)
+
(
Nid
));
for
(
uint32_t
n
=
0
;
n
<
NR_MAX_CSI_RS_INIT_LENGTH_DWORD
;
n
++
)
{
csi_rs
[
slot
][
symb
][
n
]
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
}
}
}
openair1/PHY/NR_REFSIG/nr_refsig.h
View file @
6c27a40f
...
...
@@ -38,7 +38,7 @@ void nr_init_pbch_dmrs(PHY_VARS_gNB* gNB);
*/
void
nr_init_pdcch_dmrs
(
PHY_VARS_gNB
*
gNB
,
uint32_t
Nid
);
void
nr_init_pdsch_dmrs
(
PHY_VARS_gNB
*
gNB
,
uint32_t
Nid
);
void
nr_init_csi_rs
(
PHY_VARS_gNB
*
gNB
,
uint32_t
Nid
);
void
nr_init_csi_rs
(
NR_DL_FRAME_PARMS
*
fp
,
uint32_t
***
csi_rs
,
uint32_t
Nid
);
void
nr_gold_pusch
(
PHY_VARS_gNB
*
gNB
,
uint32_t
*
Nid
);
...
...
openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
View file @
6c27a40f
...
...
@@ -30,7 +30,7 @@
void
nr_generate_csi_rs
(
NR_DL_FRAME_PARMS
frame_parms
,
int32_t
**
dataF
,
int16_t
amp
,
uint32_t
**
gold_csi_rs
,
nr_csi_rs_info_t
*
nr_csi_rs_info
,
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
csi_params
,
uint16_t
cell_id
,
int
slot
){
...
...
@@ -55,6 +55,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
#endif
int
dataF_offset
=
slot
*
frame_parms
.
samples_per_slot_wCP
;
uint32_t
**
nr_gold_csi_rs
=
nr_csi_rs_info
->
nr_gold_csi_rs
[
slot
];
int16_t
mod_csi
[
frame_parms
.
symbols_per_slot
][
NR_MAX_CSI_RS_LENGTH
>>
1
]
__attribute__
((
aligned
(
16
)));;
uint16_t
b
=
csi_params
.
freq_domain
;
uint16_t
n
,
csi_bw
,
csi_start
,
p
,
k
,
l
,
mprime
,
na
,
kpn
,
csi_length
;
...
...
@@ -78,7 +79,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
reset
=
1
;
x2
=
((
1
<<
10
)
*
(
frame_parms
.
symbols_per_slot
*
slot
+
symb
+
1
)
*
((
Nid
<<
1
)
+
1
)
+
(
Nid
));
for
(
uint32_t
n
=
0
;
n
<
NR_MAX_CSI_RS_INIT_LENGTH_DWORD
;
n
++
)
{
gold_csi_rs
[
symb
][
n
]
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
nr_
gold_csi_rs
[
symb
][
n
]
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
}
...
...
@@ -573,14 +574,14 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
for
(
lp
=
0
;
lp
<=
lprime
;
lp
++
){
symb
=
csi_params
.
symb_l0
;
nr_modulation
(
gold_csi_rs
[
symb
+
lp
],
csi_length
,
DMRS_MOD_ORDER
,
mod_csi
[
symb
+
lp
]);
nr_modulation
(
nr_
gold_csi_rs
[
symb
+
lp
],
csi_length
,
DMRS_MOD_ORDER
,
mod_csi
[
symb
+
lp
]);
if
((
csi_params
.
row
==
5
)
||
(
csi_params
.
row
==
7
)
||
(
csi_params
.
row
==
11
)
||
(
csi_params
.
row
==
13
)
||
(
csi_params
.
row
==
16
))
nr_modulation
(
gold_csi_rs
[
symb
+
1
],
csi_length
,
DMRS_MOD_ORDER
,
mod_csi
[
symb
+
1
]);
nr_modulation
(
nr_
gold_csi_rs
[
symb
+
1
],
csi_length
,
DMRS_MOD_ORDER
,
mod_csi
[
symb
+
1
]);
if
((
csi_params
.
row
==
14
)
||
(
csi_params
.
row
==
13
)
||
(
csi_params
.
row
==
16
)
||
(
csi_params
.
row
==
17
))
{
symb
=
csi_params
.
symb_l1
;
nr_modulation
(
gold_csi_rs
[
symb
+
lp
],
csi_length
,
DMRS_MOD_ORDER
,
mod_csi
[
symb
+
lp
]);
nr_modulation
(
nr_
gold_csi_rs
[
symb
+
lp
],
csi_length
,
DMRS_MOD_ORDER
,
mod_csi
[
symb
+
lp
]);
if
((
csi_params
.
row
==
13
)
||
(
csi_params
.
row
==
16
))
nr_modulation
(
gold_csi_rs
[
symb
+
1
],
csi_length
,
DMRS_MOD_ORDER
,
mod_csi
[
symb
+
1
]);
nr_modulation
(
nr_
gold_csi_rs
[
symb
+
1
],
csi_length
,
DMRS_MOD_ORDER
,
mod_csi
[
symb
+
1
]);
}
}
}
...
...
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
6c27a40f
...
...
@@ -338,7 +338,7 @@ uint8_t get_nr_prach_duration(uint8_t prach_format);
void
nr_generate_csi_rs
(
NR_DL_FRAME_PARMS
frame_parms
,
int32_t
**
dataF
,
int16_t
amp
,
uint32_t
**
gold_csi_rs
,
nr_csi_rs_info_t
*
nr_csi_rs_info
,
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
csi_params
,
uint16_t
cell_id
,
int
slot
);
...
...
openair1/PHY/defs_gNB.h
View file @
6c27a40f
...
...
@@ -784,6 +784,9 @@ typedef struct PHY_VARS_gNB_s {
/// SRS variables
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
];
uint8_t
pbch_configured
;
char
gNB_generate_rar
;
...
...
@@ -808,9 +811,6 @@ typedef struct PHY_VARS_gNB_s {
// Mask of occupied RBs, per symbol and PRB
uint32_t
rb_mask_ul
[
14
][
9
];
/// CSI RS sequence
uint32_t
***
nr_gold_csi_rs
;
/// Indicator set to 0 after first SR
uint8_t
first_sr
[
NUMBER_OF_NR_SR_MAX
];
...
...
openair1/PHY/defs_nr_common.h
View file @
6c27a40f
...
...
@@ -264,6 +264,12 @@ typedef struct {
uint32_t
*
noise_power
;
}
nr_srs_info_t
;
typedef
struct
{
uint32_t
***
nr_gold_csi_rs
;
uint16_t
sc_list_length
;
uint16_t
sc_list
[
6
*
NR_MAX_NB_RB
];
}
nr_csi_rs_info_t
;
typedef
struct
NR_DL_FRAME_PARMS
NR_DL_FRAME_PARMS
;
typedef
uint32_t
(
*
get_samples_per_slot_t
)(
int
slot
,
NR_DL_FRAME_PARMS
*
fp
);
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
6c27a40f
...
...
@@ -180,7 +180,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_
gold_csi_rs
[
slot
],
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
[
i
],
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