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
spbro
OpenXG-RAN
Commits
c4448a2f
Commit
c4448a2f
authored
Nov 16, 2020
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix warnings and indentation
parent
9f841634
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
384 additions
and
391 deletions
+384
-391
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+46
-47
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+276
-278
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+35
-41
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+6
-6
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+21
-19
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
c4448a2f
...
@@ -250,7 +250,6 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
...
@@ -250,7 +250,6 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
//to be moved to init phase potentially, for now tx_layers 1-8 are mapped on antenna ports 1000-1007
//to be moved to init phase potentially, for now tx_layers 1-8 are mapped on antenna ports 1000-1007
/// DMRS QPSK modulation
/// DMRS QPSK modulation
for
(
int
l
=
rel15
->
StartSymbolIndex
;
l
<
rel15
->
StartSymbolIndex
+
rel15
->
NrOfSymbols
;
l
++
)
{
for
(
int
l
=
rel15
->
StartSymbolIndex
;
l
<
rel15
->
StartSymbolIndex
+
rel15
->
NrOfSymbols
;
l
++
)
{
if
(
rel15
->
dlDmrsSymbPos
&
(
1
<<
l
))
if
(
rel15
->
dlDmrsSymbPos
&
(
1
<<
l
))
nr_modulation
(
pdsch_dmrs
[
l
][
0
],
n_dmrs
,
DMRS_MOD_ORDER
,
mod_dmrs
[
l
]);
// currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
nr_modulation
(
pdsch_dmrs
[
l
][
0
],
n_dmrs
,
DMRS_MOD_ORDER
,
mod_dmrs
[
l
]);
// currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
...
@@ -287,8 +286,8 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
...
@@ -287,8 +286,8 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
delta
=
get_delta
(
ap
,
dmrs_Type
);
delta
=
get_delta
(
ap
,
dmrs_Type
);
l_prime
=
0
;
// single symbol ap 0
l_prime
=
0
;
// single symbol ap 0
l0
=
get_l0
(
rel15
->
dlDmrsSymbPos
);
l0
=
get_l0
(
rel15
->
dlDmrsSymbPos
);
uint8_t
dmrs_symbol
=
l0
+
l_prime
;
#ifdef DEBUG_DLSCH_MAPPING
#ifdef DEBUG_DLSCH_MAPPING
uint8_t
dmrs_symbol
=
l0
+
l_prime
;
printf
(
"DMRS Type %d params for ap %d: Wt %d %d
\t
Wf %d %d
\t
delta %d
\t
l_prime %d
\t
l0 %d
\t
DMRS symbol %d
\n
"
,
printf
(
"DMRS Type %d params for ap %d: Wt %d %d
\t
Wf %d %d
\t
delta %d
\t
l_prime %d
\t
l0 %d
\t
DMRS symbol %d
\n
"
,
1
+
dmrs_Type
,
ap
,
Wt
[
0
],
Wt
[
1
],
Wf
[
0
],
Wf
[
1
],
delta
,
l_prime
,
l0
,
dmrs_symbol
);
1
+
dmrs_Type
,
ap
,
Wt
[
0
],
Wt
[
1
],
Wf
[
0
],
Wf
[
1
],
delta
,
l_prime
,
l0
,
dmrs_symbol
);
#endif
#endif
...
@@ -311,7 +310,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
...
@@ -311,7 +310,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
if
(
l
==
(
l0
+
1
))
//take into account the double DMRS symbols
if
(
l
==
(
l0
+
1
))
//take into account the double DMRS symbols
l_prime
=
1
;
l_prime
=
1
;
else
if
(
l
>
(
l0
+
1
))
{
//new DMRS pair
else
if
(
l
>
(
l0
+
1
))
{
//new DMRS pair
l0
=
l
;
l0
=
l
;
l_prime
=
0
;
l_prime
=
0
;
}
}
...
@@ -327,9 +326,9 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
...
@@ -327,9 +326,9 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
k_prime
++
;
k_prime
++
;
k_prime
&=
1
;
k_prime
&=
1
;
n
+=
(
k_prime
)
?
0
:
1
;
n
+=
(
k_prime
)
?
0
:
1
;
}
else
{
}
else
{
if
(
(
!
(
rel15
->
dlDmrsSymbPos
&
(
1
<<
l
)))
||
allowed_xlsch_re_in_dmrs_symbol
(
k
,
start_sc
,
frame_parms
->
ofdm_symbol_size
,
rel15
->
numDmrsCdmGrpsNoData
,
dmrs_Type
))
{
if
(
(
!
(
rel15
->
dlDmrsSymbPos
&
(
1
<<
l
)))
||
allowed_xlsch_re_in_dmrs_symbol
(
k
,
start_sc
,
frame_parms
->
ofdm_symbol_size
,
rel15
->
numDmrsCdmGrpsNoData
,
dmrs_Type
))
{
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
(
2
*
txdataF_offset
)]
=
(
amp
*
tx_layers
[
ap
][
m
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
(
2
*
txdataF_offset
)]
=
(
amp
*
tx_layers
[
ap
][
m
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
1
+
(
2
*
txdataF_offset
)]
=
(
amp
*
tx_layers
[
ap
][(
m
<<
1
)
+
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
ap
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
1
+
(
2
*
txdataF_offset
)]
=
(
amp
*
tx_layers
[
ap
][(
m
<<
1
)
+
1
])
>>
15
;
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
c4448a2f
...
@@ -721,7 +721,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -721,7 +721,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
default:
default:
msg
(
"pdsch_channel_estimation: nushift=%d -> ERROR
\n
"
,
nushift
);
msg
(
"pdsch_channel_estimation: nushift=%d -> ERROR
\n
"
,
nushift
);
return
(
-
1
)
;
return
-
1
;
break
;
break
;
}
}
}
else
{
//pdsch_dmrs_type2
}
else
{
//pdsch_dmrs_type2
...
@@ -741,7 +741,6 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -741,7 +741,6 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
fdcr
=
filt8_dcr1
;
fdcr
=
filt8_dcr1
;
fdclh
=
filt8_dcl1_h
;
fdclh
=
filt8_dcl1_h
;
fdcrh
=
filt8_dcr1_h
;
fdcrh
=
filt8_dcr1_h
;
break
;
break
;
case
2
:
//port2,3
case
2
:
//port2,3
...
@@ -757,12 +756,11 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -757,12 +756,11 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
fdcr
=
NULL
;
fdcr
=
NULL
;
fdclh
=
NULL
;
fdclh
=
NULL
;
fdcrh
=
NULL
;
fdcrh
=
NULL
;
break
;
break
;
default:
default:
msg
(
"pdsch_channel_estimation: nushift=%d -> ERROR
\n
"
,
nushift
);
msg
(
"pdsch_channel_estimation: nushift=%d -> ERROR
\n
"
,
nushift
);
return
(
-
1
)
;
return
-
1
;
break
;
break
;
}
}
}
}
...
@@ -1039,7 +1037,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -1039,7 +1037,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
ch_l
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
ch_l
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_PDSCH
#ifdef DEBUG_PDSCH
printf
(
"pilot %d
: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
,
rxF
[
0
],
rxF
[
1
],
ch_l
[
0
],
ch_l
[
1
],
pil
[
0
],
pil
[
1
]);
printf
(
"pilot %u
: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
,
rxF
[
0
],
rxF
[
1
],
ch_l
[
0
],
ch_l
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
#endif
pil
+=
2
;
pil
+=
2
;
...
@@ -1052,7 +1050,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -1052,7 +1050,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
ch
[
1
]
=
(
ch_l
[
1
]
+
ch_r
[
1
])
>>
1
;
ch
[
1
]
=
(
ch_l
[
1
]
+
ch_r
[
1
])
>>
1
;
#ifdef DEBUG_PDSCH
#ifdef DEBUG_PDSCH
printf
(
"pilot %d
: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
0
],
rxF
[
1
],
ch_r
[
0
],
ch_r
[
1
],
pil
[
0
],
pil
[
1
]);
printf
(
"pilot %u
: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
0
],
rxF
[
1
],
ch_r
[
0
],
ch_r
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
#endif
multadd_real_vector_complex_scalar
(
fmr
,
multadd_real_vector_complex_scalar
(
fmr
,
...
@@ -1084,7 +1082,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -1084,7 +1082,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
ch_r
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
ch_r
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_PDSCH
#ifdef DEBUG_PDSCH
printf
(
"pilot %d
: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
0
],
rxF
[
1
],
ch_r
[
0
],
ch_r
[
1
],
pil
[
0
],
pil
[
1
]);
printf
(
"pilot %u
: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
0
],
rxF
[
1
],
ch_r
[
0
],
ch_r
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
#endif
ch
[
0
]
=
(
ch_l
[
0
]
+
ch_r
[
0
])
>>
1
;
ch
[
0
]
=
(
ch_l
[
0
]
+
ch_r
[
0
])
>>
1
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
c4448a2f
...
@@ -2412,9 +2412,7 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
...
@@ -2412,9 +2412,7 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
}
else
{
//the symbol contains DMRS
}
else
{
//the symbol contains DMRS
j
=
0
;
j
=
0
;
if
(
config_type
==
pdsch_dmrs_type1
){
if
(
config_type
==
pdsch_dmrs_type1
){
for
(
i
=
(
1
-
frame_parms
->
nushift
);
for
(
i
=
(
1
-
frame_parms
->
nushift
);
i
<
12
;
i
+=
2
)
{
i
<
12
;
i
+=
2
)
{
rxF_ext
[
j
]
=
rxF
[
i
];
rxF_ext
[
j
]
=
rxF
[
i
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
i
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
i
];
j
++
;
j
++
;
...
@@ -2422,16 +2420,12 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
...
@@ -2422,16 +2420,12 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
dl_ch0_ext
+=
6
;
dl_ch0_ext
+=
6
;
rxF_ext
+=
6
;
rxF_ext
+=
6
;
}
else
{
}
else
{
for
(
i
=
(
2
+
frame_parms
->
nushift
);
for
(
i
=
(
2
+
frame_parms
->
nushift
);
i
<
6
;
i
++
)
{
i
<
6
;
i
++
)
{
rxF_ext
[
j
]
=
rxF
[
i
];
rxF_ext
[
j
]
=
rxF
[
i
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
i
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
i
];
j
++
;
j
++
;
}
}
for
(
i
=
(
8
+
frame_parms
->
nushift
);
for
(
i
=
(
8
+
frame_parms
->
nushift
);
i
<
12
;
i
++
)
{
i
<
12
;
i
++
)
{
rxF_ext
[
j
]
=
rxF
[
i
];
rxF_ext
[
j
]
=
rxF
[
i
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
i
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
i
];
j
++
;
j
++
;
...
@@ -2445,7 +2439,7 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
...
@@ -2445,7 +2439,7 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
rxF
+=
12
;
rxF
+=
12
;
k
+=
12
;
k
+=
12
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
{
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
{
k
=
k
-
(
frame_parms
->
ofdm_symbol_size
);
k
=
k
-
(
frame_parms
->
ofdm_symbol_size
);
rxF
=
&
rxdataF
[
aarx
][
k
+
(
symbol
*
(
frame_parms
->
ofdm_symbol_size
))];
rxF
=
&
rxdataF
[
aarx
][
k
+
(
symbol
*
(
frame_parms
->
ofdm_symbol_size
))];
}
}
}
}
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
c4448a2f
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
c4448a2f
...
@@ -715,8 +715,6 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id,
...
@@ -715,8 +715,6 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id,
int
nr_ue_pdsch_procedures
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
int
eNB_id
,
PDSCH_t
pdsch
,
NR_UE_DLSCH_t
*
dlsch0
,
NR_UE_DLSCH_t
*
dlsch1
)
{
int
nr_ue_pdsch_procedures
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
int
eNB_id
,
PDSCH_t
pdsch
,
NR_UE_DLSCH_t
*
dlsch0
,
NR_UE_DLSCH_t
*
dlsch1
)
{
int
nr_tti_rx
=
proc
->
nr_tti_rx
;
int
nr_tti_rx
=
proc
->
nr_tti_rx
;
int
nr_frame_rx
=
proc
->
frame_rx
;
//LOG_M
char
filename
[
100
];
//LOG_M
int
m
;
int
m
;
int
i_mod
,
eNB_id_i
,
dual_stream_UE
;
int
i_mod
,
eNB_id_i
,
dual_stream_UE
;
int
first_symbol_flag
=
0
;
int
first_symbol_flag
=
0
;
...
@@ -748,13 +746,17 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_
...
@@ -748,13 +746,17 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_
m
,
m
,
ue
->
frame_parms
.
first_carrier_offset
+
(
BWPStart
+
pdsch_start_rb
)
*
12
,
ue
->
frame_parms
.
first_carrier_offset
+
(
BWPStart
+
pdsch_start_rb
)
*
12
,
pdsch_nb_rb
);
pdsch_nb_rb
);
///LOG_M: the channel estimation
LOG_D
(
PHY
,
"PDSCH Channel estimation gNB id %d, PDSCH antenna port %d, slot %d, symbol %d
\n
"
,
0
,
aatx
,
nr_tti_rx
,
m
);
LOG_D
(
PHY
,
"PDSCH Channel estimation gNB id %d, PDSCH antenna port %d, slot %d, symbol %d
\n
"
,
0
,
aatx
,
nr_tti_rx
,
m
);
#if 0
///LOG_M: the channel estimation
int nr_frame_rx = proc->frame_rx;
char filename[100];
for (uint8_t aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
for (uint8_t aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
sprintf
(
filename
,
"PDSCH_CHANNEL_frame%d_slot%d_sym%d_port%d_rx%d.m"
,
nr_frame_rx
,
nr_tti_rx
,
m
,
aatx
,
aarx
);
//LOG_M
sprintf(filename,"PDSCH_CHANNEL_frame%d_slot%d_sym%d_port%d_rx%d.m", nr_frame_rx, nr_tti_rx, m, aatx,aarx);
int **dl_ch_estimates = ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][0]->dl_ch_estimates;
int **dl_ch_estimates = ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][0]->dl_ch_estimates;
//
LOG_M(filename,"channel_F",&dl_ch_estimates[aatx*ue->frame_parms.nb_antennas_rx+aarx][ue->frame_parms.ofdm_symbol_size*m],ue->frame_parms.ofdm_symbol_size, 1, 1);
LOG_M(filename,"channel_F",&dl_ch_estimates[aatx*ue->frame_parms.nb_antennas_rx+aarx][ue->frame_parms.ofdm_symbol_size*m],ue->frame_parms.ofdm_symbol_size, 1, 1);
}
}
#endif
}
}
break
;
break
;
}
}
...
...
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