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
b8a37a34
Commit
b8a37a34
authored
Sep 17, 2016
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pucch format 2/2a/2b UE TX
parent
2d73663b
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
302 additions
and
144 deletions
+302
-144
openair1/PHY/CODING/lte_rate_matching.c
openair1/PHY/CODING/lte_rate_matching.c
+2
-1
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
+1
-0
openair1/PHY/LTE_TRANSPORT/pmch.c
openair1/PHY/LTE_TRANSPORT/pmch.c
+2
-2
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+10
-11
openair1/PHY/LTE_TRANSPORT/pucch.c
openair1/PHY/LTE_TRANSPORT/pucch.c
+254
-64
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+20
-22
openair1/SIMULATION/LTE_PHY/pucchsim.c
openair1/SIMULATION/LTE_PHY/pucchsim.c
+13
-44
No files found.
openair1/PHY/CODING/lte_rate_matching.c
View file @
b8a37a34
...
...
@@ -518,7 +518,8 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
// if (rvidx==3)
// for (cnt=0;cnt<Ncb;cnt++)
// counter_buffer[rvidx][cnt]=0;
AssertFatal
(
Ncb
>=
(
3
*
RTC
<<
5
),
"Exiting, RM condition (Ncb %d, Nir/C %d, Nsoft %d, Kw %d
\n
"
,
Ncb
,
Nir
/
C
,
Nsoft
,
3
*
(
RTC
<<
5
));
if
(
Ncb
>
(
3
*
(
RTC
<<
5
)))
AssertFatal
(
1
==
0
,
"Exiting, RM condition (Ncb %d, RTC %d, Nir/C %d, Nsoft %d, Kw %d)
\n
"
,
Ncb
,
RTC
,
Nir
/
C
,
Nsoft
,
3
*
(
RTC
<<
5
));
Gp
=
G
/
Nl
/
Qm
;
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
View file @
b8a37a34
...
...
@@ -1679,6 +1679,7 @@ inline int check_skip_dc(int rb,LTE_DL_FRAME_PARMS *frame_parms) {
return
(
0
);
}
int
dlsch_modulation
(
int32_t
**
txdataF
,
int16_t
amp
,
uint32_t
subframe_offset
,
...
...
openair1/PHY/LTE_TRANSPORT/pmch.c
View file @
b8a37a34
...
...
@@ -319,8 +319,8 @@ void generate_mch(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t *a)
AMP
);
if
(
dlsch_encoding
(
a
,
&
eNB
->
frame_parms
,
if
(
dlsch_encoding
(
eNB
,
a
,
1
,
eNB
->
dlsch_MCH
,
proc
->
frame_tx
,
...
...
openair1/PHY/LTE_TRANSPORT/proto.h
View file @
b8a37a34
...
...
@@ -1709,17 +1709,16 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
void
init_ncs_cell
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
ncs_cell
[
20
][
7
]);
void
generate_pucch
(
int32_t
**
txdataF
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
ncs_cell
[
20
][
7
],
PUCCH_FMT_t
fmt
,
PUCCH_CONFIG_DEDICATED
*
pucch_config_dedicated
,
uint16_t
n1_pucch
,
uint16_t
n2_pucch
,
uint8_t
shortened_format
,
uint8_t
*
payload
,
int16_t
amp
,
uint8_t
subframe
);
void
generate_pucch1x
(
int32_t
**
txdataF
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
ncs_cell
[
20
][
7
],
PUCCH_FMT_t
fmt
,
PUCCH_CONFIG_DEDICATED
*
pucch_config_dedicated
,
uint16_t
n1_pucch
,
uint8_t
shortened_format
,
uint8_t
*
payload
,
int16_t
amp
,
uint8_t
subframe
);
void
generate_pucch_emul
(
PHY_VARS_UE
*
phy_vars_ue
,
UE_rxtx_proc_t
*
proc
,
...
...
openair1/PHY/LTE_TRANSPORT/pucch.c
View file @
b8a37a34
This diff is collapsed.
Click to expand it.
openair1/SCHED/phy_procedures_lte_ue.c
View file @
b8a37a34
...
...
@@ -1189,17 +1189,16 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
if
(
abstraction_flag
==
0
)
{
generate_pucch
(
ue
->
common_vars
.
txdataF
,
&
ue
->
frame_parms
,
ue
->
ncs_cell
,
format
,
&
ue
->
pucch_config_dedicated
[
eNB_id
],
n1_pucch
,
0
,
// n2_pucch
1
,
// shortened format
pucch_ack_payload
,
tx_amp
,
subframe_tx
);
generate_pucch1x
(
ue
->
common_vars
.
txdataF
,
&
ue
->
frame_parms
,
ue
->
ncs_cell
,
format
,
&
ue
->
pucch_config_dedicated
[
eNB_id
],
n1_pucch
,
1
,
// shortened format
pucch_ack_payload
,
tx_amp
,
subframe_tx
);
}
else
{
#ifdef PHY_ABSTRACTION
...
...
@@ -1240,17 +1239,16 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
if
(
abstraction_flag
==
0
)
{
generate_pucch
(
ue
->
common_vars
.
txdataF
,
&
ue
->
frame_parms
,
ue
->
ncs_cell
,
pucch_format1
,
&
ue
->
pucch_config_dedicated
[
eNB_id
],
ue
->
scheduling_request_config
[
eNB_id
].
sr_PUCCH_ResourceIndex
,
0
,
// n2_pucch
1
,
// shortened format
pucch_ack_payload
,
// this is ignored anyway, we just need a pointer
tx_amp
,
subframe_tx
);
generate_pucch1x
(
ue
->
common_vars
.
txdataF
,
&
ue
->
frame_parms
,
ue
->
ncs_cell
,
pucch_format1
,
&
ue
->
pucch_config_dedicated
[
eNB_id
],
ue
->
scheduling_request_config
[
eNB_id
].
sr_PUCCH_ResourceIndex
,
1
,
// shortened format
pucch_ack_payload
,
// this is ignored anyway, we just need a pointer
tx_amp
,
subframe_tx
);
}
else
{
LOG_D
(
PHY
,
"Calling generate_pucch_emul ...
\n
"
);
generate_pucch_emul
(
ue
,
...
...
openair1/SIMULATION/LTE_PHY/pucchsim.c
View file @
b8a37a34
...
...
@@ -66,7 +66,7 @@ int main(int argc, char **argv)
uint8_t
snr1set
=
0
;
//mod_sym_t **txdataF;
int
**
txdata
;
double
**
s_re
,
**
s_im
,
**
r_re
,
**
r_im
;
double
s_re
[
2
][
30720
],
s_im
[
2
][
30720
],
r_re
[
2
][
30720
],
r_im
[
2
][
30720
]
;
double
ricean_factor
=
0
.
0000005
,
iqim
=
0
.
0
;
int
trial
,
n_trials
,
ntrials
=
1
,
n_errors
;
...
...
@@ -325,10 +325,6 @@ int main(int argc, char **argv)
txdata
=
eNB
->
common_vars
.
txdata
[
eNB_id
];
s_re
=
malloc
(
2
*
sizeof
(
double
*
));
s_im
=
malloc
(
2
*
sizeof
(
double
*
));
r_re
=
malloc
(
2
*
sizeof
(
double
*
));
r_im
=
malloc
(
2
*
sizeof
(
double
*
));
nsymb
=
(
frame_parms
->
Ncp
==
0
)
?
14
:
12
;
printf
(
"FFT Size %d, Extended Prefix %d, Samples per subframe %d, Symbols per subframe %d
\n
"
,
NUMBER_OF_OFDM_CARRIERS
,
...
...
@@ -352,19 +348,6 @@ int main(int argc, char **argv)
exit
(
-
1
);
}
for
(
i
=
0
;
i
<
2
;
i
++
)
{
s_re
[
i
]
=
malloc
(
FRAME_LENGTH_COMPLEX_SAMPLES
*
sizeof
(
double
));
bzero
(
s_re
[
i
],
FRAME_LENGTH_COMPLEX_SAMPLES
*
sizeof
(
double
));
s_im
[
i
]
=
malloc
(
FRAME_LENGTH_COMPLEX_SAMPLES
*
sizeof
(
double
));
bzero
(
s_im
[
i
],
FRAME_LENGTH_COMPLEX_SAMPLES
*
sizeof
(
double
));
r_re
[
i
]
=
malloc
(
FRAME_LENGTH_COMPLEX_SAMPLES
*
sizeof
(
double
));
bzero
(
r_re
[
i
],
FRAME_LENGTH_COMPLEX_SAMPLES
*
sizeof
(
double
));
r_im
[
i
]
=
malloc
(
FRAME_LENGTH_COMPLEX_SAMPLES
*
sizeof
(
double
));
bzero
(
r_im
[
i
],
FRAME_LENGTH_COMPLEX_SAMPLES
*
sizeof
(
double
));
}
init_ncs_cell
(
&
eNB
->
frame_parms
,
eNB
->
ncs_cell
);
init_ncs_cell
(
&
UE
->
frame_parms
,
UE
->
ncs_cell
);
...
...
@@ -378,17 +361,16 @@ int main(int argc, char **argv)
pucch_payload
=
0
;
generate_pucch
(
UE
->
common_vars
.
txdataF
,
frame_parms
,
UE
->
ncs_cell
,
pucch_format
,
&
pucch_config_dedicated
,
n1_pucch
,
n2_pucch
,
0
,
//shortened_format,
&
pucch_payload
,
AMP
,
//amp,
subframe
);
//subframe
generate_pucch1x
(
UE
->
common_vars
.
txdataF
,
frame_parms
,
UE
->
ncs_cell
,
pucch_format
,
&
pucch_config_dedicated
,
n1_pucch
,
0
,
//shortened_format,
&
pucch_payload
,
AMP
,
//amp,
subframe
);
//subframe
write_output
(
"txsigF0.m"
,
"txsF0"
,
&
UE
->
common_vars
.
txdataF
[
0
][
2
*
subframe
*
nsymb
*
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX
],
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX
*
nsymb
,
1
,
1
);
tx_lev
=
0
;
...
...
@@ -453,7 +435,7 @@ int main(int argc, char **argv)
multipath_channel
(
UE2eNB
,
s_re
,
s_im
,
r_re
,
r_im
,
2
*
nsymb
*
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES
,
0
);
eNB
->
frame_parms
.
samples_per_tti
,
0
);
sigma2_dB
=
N0
;
//10*log10((double)tx_lev) - SNR;
tx_gain
=
sqrt
(
pow
(
10
.
0
,.
1
*
(
N0
+
SNR
))
/
(
double
)
tx_lev
);
...
...
@@ -509,8 +491,7 @@ int main(int argc, char **argv)
if
(
sig
==
1
)
{
((
short
*
)
&
eNB
->
common_vars
.
rxdata
[
0
][
aa
][
subframe
*
frame_parms
->
samples_per_tti
])[
2
*
i
]
=
(
short
)
(((
tx_gain
*
r_re
[
aa
][
i
])
+
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
)));
((
short
*
)
&
eNB
->
common_vars
.
rxdata
[
0
][
aa
][
subframe
*
frame_parms
->
samples_per_tti
])[
2
*
i
+
1
]
=
(
short
)
(((
tx_gain
*
r_im
[
aa
][
i
])
+
(
iqim
*
r_re
[
aa
][
i
]
*
tx_gain
)
+
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
)));
((
short
*
)
&
eNB
->
common_vars
.
rxdata
[
0
][
aa
][
subframe
*
frame_parms
->
samples_per_tti
])[
2
*
i
+
1
]
=
(
short
)
(((
tx_gain
*
r_im
[
aa
][
i
])
+
(
iqim
*
r_re
[
aa
][
i
]
*
tx_gain
)
+
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
)));
}
else
{
((
short
*
)
&
eNB
->
common_vars
.
rxdata
[
0
][
aa
][
subframe
*
frame_parms
->
samples_per_tti
])[
2
*
i
]
=
(
short
)
((
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
)));
((
short
*
)
&
eNB
->
common_vars
.
rxdata
[
0
][
aa
][
subframe
*
frame_parms
->
samples_per_tti
])[
2
*
i
+
1
]
=
(
short
)
((
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
)));
...
...
@@ -603,18 +584,6 @@ int main(int argc, char **argv)
}
for
(
i
=
0
;
i
<
2
;
i
++
)
{
free
(
s_re
[
i
]);
free
(
s_im
[
i
]);
free
(
r_re
[
i
]);
free
(
r_im
[
i
]);
}
free
(
s_re
);
free
(
s_im
);
free
(
r_re
);
free
(
r_im
);
lte_sync_time_free
();
return
(
n_errors
);
...
...
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