Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shweta Shrivastava
openairinterface5G
Commits
64c28bf9
Commit
64c28bf9
authored
Jul 16, 2021
by
Roberto Louro Magueta
Browse files
Normalization of energy over ifft and receive antennas
parent
abef7f0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
openair1/PHY/NR_TRANSPORT/nr_prach.c
View file @
64c28bf9
...
...
@@ -872,24 +872,36 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
// Now do IFFT of size 1024 (N_ZC=839) or 256 (N_ZC=139)
if
(
N_ZC
==
839
)
{
log2_ifft_size
=
10
;
idft
(
IDFT_1024
,
prachF
,
prach_ifft_tmp
,
1
);
// compute energy and accumulate over receive antennas
for
(
i
=
0
;
i
<
2048
;
i
++
)
prach_ifft
[
i
]
+=
(
(
int32_t
)
prach_ifft_tmp
[
i
<<
1
]
*
(
int32_t
)
prach_ifft_tmp
[
i
<<
1
]
+
(
int32_t
)
prach_ifft_tmp
[
1
+
(
i
<<
1
)]
*
(
int32_t
)
prach_ifft_tmp
[
1
+
(
i
<<
1
)]
)
/
nb_rx
;
for
(
i
=
0
;
i
<
1024
;
i
++
)
prach_ifft
[
i
]
+=
(
int32_t
)
prach_ifft_tmp
[
i
<<
1
]
*
(
int32_t
)
prach_ifft_tmp
[
i
<<
1
]
+
(
int32_t
)
prach_ifft_tmp
[
1
+
(
i
<<
1
)]
*
(
int32_t
)
prach_ifft_tmp
[
1
+
(
i
<<
1
)];
}
else
{
idft
(
IDFT_256
,
prachF
,
prach_ifft_tmp
,
1
);
log2_ifft_size
=
8
;
// compute energy and accumulate over receive antennas and repetitions for BR
for
(
i
=
0
;
i
<
256
;
i
++
)
prach_ifft
[
i
]
+=
((
int32_t
)
prach_ifft_tmp
[
i
<<
1
]
*
(
int32_t
)
prach_ifft_tmp
[(
i
<<
1
)]
+
(
int32_t
)
prach_ifft_tmp
[
1
+
(
i
<<
1
)]
*
(
int32_t
)
prach_ifft_tmp
[
1
+
(
i
<<
1
)])
/
nb_rx
;
}
// compute energy and accumulate over receive antennas and repetitions for BR
for
(
i
=
0
;
i
<
256
;
i
++
)
prach_ifft
[
i
]
+=
(
int32_t
)
prach_ifft_tmp
[
i
<<
1
]
*
(
int32_t
)
prach_ifft_tmp
[(
i
<<
1
)]
+
(
int32_t
)
prach_ifft_tmp
[
1
+
(
i
<<
1
)]
*
(
int32_t
)
prach_ifft_tmp
[
1
+
(
i
<<
1
)];
}
if
(
LOG_DUMPFLAG
(
PRACH
))
{
if
(
aa
==
0
)
LOG_M
(
"prach_rxF_comp0.m"
,
"prach_rxF_comp0"
,
prachF
,
1024
,
1
,
1
);
if
(
aa
==
1
)
LOG_M
(
"prach_rxF_comp1.m"
,
"prach_rxF_comp1"
,
prachF
,
1024
,
1
,
1
);
}
if
(
LOG_DUMPFLAG
(
PRACH
))
{
if
(
aa
==
0
)
LOG_M
(
"prach_rxF_comp0.m"
,
"prach_rxF_comp0"
,
prachF
,
1024
,
1
,
1
);
if
(
aa
==
1
)
LOG_M
(
"prach_rxF_comp1.m"
,
"prach_rxF_comp1"
,
prachF
,
1024
,
1
,
1
);
}
}
// antennas_rx
// Normalization of energy over ifft and receive antennas
if
(
N_ZC
==
839
)
{
log2_ifft_size
=
10
;
for
(
i
=
0
;
i
<
1024
;
i
++
)
prach_ifft
[
i
]
=
(
prach_ifft
[
i
]
>>
log2_ifft_size
)
/
nb_rx
;
}
else
{
log2_ifft_size
=
8
;
for
(
i
=
0
;
i
<
256
;
i
++
)
prach_ifft
[
i
]
=
(
prach_ifft
[
i
]
>>
log2_ifft_size
)
/
nb_rx
;
}
}
// new dft
// check energy in nth time shift, for
...
...
openair2/GNB_APP/L1_nr_paramdef.h
View file @
64c28bf9
...
...
@@ -66,7 +66,7 @@
{CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_PUSCH_PROC_THREADS, NULL, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_PUCCH0_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:100, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:
20
0, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:
15
0, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_PUSCH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:50, TYPE_UINT, 0} \
}
#define L1_CC_IDX 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