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
bb34f078
Commit
bb34f078
authored
Jun 10, 2015
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@7550
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
bb41434f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
125 additions
and
69 deletions
+125
-69
openair1/PHY/LTE_TRANSPORT/dci_tools.c
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+2
-2
openair1/PHY/LTE_TRANSPORT/prach.c
openair1/PHY/LTE_TRANSPORT/prach.c
+1
-1
openair1/PHY/defs.h
openair1/PHY/defs.h
+1
-1
openair1/SCHED/defs.h
openair1/SCHED/defs.h
+1
-1
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+120
-64
No files found.
openair1/PHY/LTE_TRANSPORT/dci_tools.c
View file @
bb34f078
...
@@ -3708,10 +3708,10 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
...
@@ -3708,10 +3708,10 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
}
}
// change the mcs limit from 7 to 8, supported by MAC
// change the mcs limit from 7 to 8, supported by MAC
if
(
mcs
>
10
)
{
/*
if (mcs > 10) {
LOG_E(PHY,"Format 1A: subframe %d unlikely mcs for format 1A (%d), TPC %d rv %d\n",subframe,mcs,TPC,rv);
LOG_E(PHY,"Format 1A: subframe %d unlikely mcs for format 1A (%d), TPC %d rv %d\n",subframe,mcs,TPC,rv);
return(-1);
return(-1);
}
}*/
if
((
rnti
==
si_rnti
)
||
(
rnti
==
p_rnti
)
||
(
rnti
==
ra_rnti
))
{
//
if
((
rnti
==
si_rnti
)
||
(
rnti
==
p_rnti
)
||
(
rnti
==
ra_rnti
))
{
//
if
(
dlsch0_harq
->
round
==
4
)
{
if
(
dlsch0_harq
->
round
==
4
)
{
...
...
openair1/PHY/LTE_TRANSPORT/prach.c
View file @
bb34f078
...
@@ -592,7 +592,7 @@ int32_t generate_prach( PHY_VARS_UE *phy_vars_ue, uint8_t eNB_id, uint8_t subfra
...
@@ -592,7 +592,7 @@ int32_t generate_prach( PHY_VARS_UE *phy_vars_ue, uint8_t eNB_id, uint8_t subfra
#ifdef BIT8_TX
#ifdef BIT8_TX
prach_start
=
((
subframe
*
phy_vars_ue
->
lte_frame_parms
.
samples_per_tti
)
<<
1
)
-
phy_vars_ue
->
N_TA_offset
;
prach_start
=
((
subframe
*
phy_vars_ue
->
lte_frame_parms
.
samples_per_tti
)
<<
1
)
-
phy_vars_ue
->
N_TA_offset
;
#else
#else
#if
def EXMIMO
#if
defined(EXMIMO) || defined(OAI_USRP)
prach_start
=
(
phy_vars_ue
->
rx_offset
+
subframe
*
phy_vars_ue
->
lte_frame_parms
.
samples_per_tti
-
openair_daq_vars
.
timing_advance
-
phy_vars_ue
->
N_TA_offset
);
prach_start
=
(
phy_vars_ue
->
rx_offset
+
subframe
*
phy_vars_ue
->
lte_frame_parms
.
samples_per_tti
-
openair_daq_vars
.
timing_advance
-
phy_vars_ue
->
N_TA_offset
);
if
(
prach_start
<
0
)
if
(
prach_start
<
0
)
...
...
openair1/PHY/defs.h
View file @
bb34f078
...
@@ -127,7 +127,7 @@ static inline void* malloc16_clear( size_t size )
...
@@ -127,7 +127,7 @@ static inline void* malloc16_clear( size_t size )
#define NB_BANDS_MAX 8
#define NB_BANDS_MAX 8
typedef
enum
{
normal_txrx
=
0
,
rx_calib_ue
=
1
,
rx_calib_ue_med
=
2
,
rx_calib_ue_byp
=
3
,
debug_prach
=
4
,
no_L2_connect
=
5
}
runmode_t
;
typedef
enum
{
normal_txrx
=
0
,
rx_calib_ue
=
1
,
rx_calib_ue_med
=
2
,
rx_calib_ue_byp
=
3
,
debug_prach
=
4
,
no_L2_connect
=
5
,
calib_prach_tx
=
6
}
runmode_t
;
enum
transmission_access_mode
{
enum
transmission_access_mode
{
NO_ACCESS
=
0
,
NO_ACCESS
=
0
,
...
...
openair1/SCHED/defs.h
View file @
bb34f078
...
@@ -431,7 +431,7 @@ int32_t remove_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB,uint8_t abstraction_
...
@@ -431,7 +431,7 @@ int32_t remove_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB,uint8_t abstraction_
void
process_timing_advance
(
module_id_t
Mod_id
,
uint8_t
CC_id
,
int16_t
timing_advance
);
void
process_timing_advance
(
module_id_t
Mod_id
,
uint8_t
CC_id
,
int16_t
timing_advance
);
void
process_timing_advance_rar
(
PHY_VARS_UE
*
phy_vars_ue
,
uint16_t
timing_advance
);
void
process_timing_advance_rar
(
PHY_VARS_UE
*
phy_vars_ue
,
uint16_t
timing_advance
);
unsigned
int
get_tx_amp
(
int
gain_dBm
,
int
gain_max_dBm
);
unsigned
int
get_tx_amp
(
int
power_dBm
,
int
power_max_dBm
,
int
N_RB_UL
,
int
nb_rb
);
void
phy_reset_ue
(
module_id_t
Mod_id
,
uint8_t
CC_id
,
uint8_t
eNB_index
);
void
phy_reset_ue
(
module_id_t
Mod_id
,
uint8_t
CC_id
,
uint8_t
eNB_index
);
...
...
openair1/SCHED/phy_procedures_lte_ue.c
View file @
bb34f078
...
@@ -194,20 +194,67 @@ void dump_dlsch_SI(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe)
...
@@ -194,20 +194,67 @@ void dump_dlsch_SI(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe)
}
}
#if defined(EXMIMO) || defined(OAI_USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
unsigned
int
prach_
gain_table
[
31
]
=
{
100
,
112
,
126
,
141
,
158
,
178
,
200
,
224
,
251
,
282
,
316
,
359
,
398
,
447
,
501
,
562
,
631
,
708
,
794
,
891
,
1000
,
1122
,
1258
,
1412
,
1585
,
1778
,
1995
,
2239
,
2512
,
2818
,
3162
};
//unsigned int
gain_table[31] = {100,112,126,141,158,178,200,224,251,282,316,359,398,447,501,562,631,708,794,891,1000,1122,1258,1412,1585,1778,1995,2239,2512,2818,3162};
/*
unsigned
int
get_tx_amp
(
int
power_dBm
,
int
power_max_dBm
)
unsigned int get_tx_amp
_prach(int power_dBm, int power_max_dBm, int N_RB_UL
)
{
{
int gain_dB = power_dBm - power_max_dBm;
int gain_dB = power_dBm - power_max_dBm;
int amp_x_100;
switch (N_RB_UL) {
case 6:
amp_x_100 = AMP; // PRACH is 6 PRBS so no scale
break;
case 15:
amp_x_100 = 158*AMP; // 158 = 100*sqrt(15/6)
break;
case 25:
amp_x_100 = 204*AMP; // 204 = 100*sqrt(25/6)
break;
case 50:
amp_x_100 = 286*AMP; // 286 = 100*sqrt(50/6)
break;
case 75:
amp_x_100 = 354*AMP; // 354 = 100*sqrt(75/6)
break;
case 100:
amp_x_100 = 408*AMP; // 408 = 100*sqrt(100/6)
break;
default:
LOG_E(PHY,"Unknown PRB size %d\n",N_RB_UL);
mac_xface->macphy_exit("");
break;
}
if (gain_dB < -30) {
if (gain_dB < -30) {
return
(
AMP
/
3
2
);
return(
amp_x_100/316
2);
} else if (gain_dB>0)
} else if (gain_dB>0)
return
(
AMP
);
return(
amp_x_100
);
else
else
return
(
100
*
AMP
/
prach_gain_table
[
-
gain_dB
]);
return(amp_x_100/gain_table[-gain_dB]); // 245 corresponds to the factor sqrt(25/6)
}
*/
unsigned
int
get_tx_amp
(
int
power_dBm
,
int
power_max_dBm
,
int
N_RB_UL
,
int
nb_rb
)
{
int
gain_dB
=
power_dBm
-
power_max_dBm
;
double
gain_lin
;
if
(
gain_dB
<
-
30
)
return
(
AMP
/
32
);
gain_lin
=
pow
(
10
,.
1
*
gain_dB
);
if
((
nb_rb
>
0
)
&&
(
nb_rb
<=
N_RB_UL
))
{
return
((
int
)(
AMP
*
sqrt
(
gain_lin
*
N_RB_UL
/
(
double
)
nb_rb
)));
}
else
{
LOG_E
(
PHY
,
"Illegal nb_rb/N_RB_UL combination (%d/%d)
\n
"
,
nb_rb
,
N_RB_UL
);
mac_xface
->
macphy_exit
(
""
);
}
return
(
0
);
}
}
#endif
#endif
void
dump_dlsch_ra
(
PHY_VARS_UE
*
phy_vars_ue
,
uint8_t
eNB_id
,
uint8_t
subframe
)
void
dump_dlsch_ra
(
PHY_VARS_UE
*
phy_vars_ue
,
uint8_t
eNB_id
,
uint8_t
subframe
)
...
@@ -628,6 +675,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
...
@@ -628,6 +675,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
#ifndef OPENAIR2
#ifndef OPENAIR2
int
i
;
int
i
;
#endif
#endif
int
tx_amp
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX
,
VCD_FUNCTION_IN
);
...
@@ -927,38 +975,33 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
...
@@ -927,38 +975,33 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
#else
#else
phy_vars_ue
->
tx_power_dBm
=
UE_TX_POWER
;
phy_vars_ue
->
tx_power_dBm
=
UE_TX_POWER
;
#endif
#endif
phy_vars_ue
->
tx_total_RE
=
phy_vars_ue
->
ulsch_ue
[
eNB_id
]
->
harq_processes
[
harq_pid
]
->
nb_rb
*
12
;
phy_vars_ue
->
tx_total_RE
=
nb_rb
*
12
;
LOG_D
(
PHY
,
"[UE %d][PUSCH %d] Frame %d subframe %d, generating PUSCH, Po_PUSCH: %d dBm, amp %d
\n
"
,
Mod_id
,
harq_pid
,
frame_tx
,
subframe_tx
,
phy_vars_ue
->
tx_power_dBm
,
#if defined(EXMIMO) || defined(OAI_USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
get_tx_amp
(
phy_vars_ue
->
tx_power_dBm
,
phy_vars_ue
->
tx_power_max_dBm
)
tx_amp
=
get_tx_amp
(
phy_vars_ue
->
tx_power_dBm
,
phy_vars_ue
->
tx_power_max_dBm
,
phy_vars_ue
->
lte_frame_parms
.
N_RB_UL
,
nb_rb
);
#else
#else
AMP
tx_amp
=
AMP
;
#endif
#endif
);
LOG_I
(
PHY
,
"[UE %d][PUSCH %d] Frame %d subframe %d, generating PUSCH, Po_PUSCH: %d dBm, amp %d
\n
"
,
Mod_id
,
harq_pid
,
frame_tx
,
subframe_tx
,
phy_vars_ue
->
tx_power_dBm
,
tx_amp
);
start_meas
(
&
phy_vars_ue
->
ulsch_modulation_stats
);
start_meas
(
&
phy_vars_ue
->
ulsch_modulation_stats
);
ulsch_modulation
(
phy_vars_ue
->
lte_ue_common_vars
.
txdataF
,
ulsch_modulation
(
phy_vars_ue
->
lte_ue_common_vars
.
txdataF
,
#if defined(EXMIMO) || defined(OAI_USRP)
tx_amp
,
get_tx_amp
(
phy_vars_ue
->
tx_power_dBm
,
phy_vars_ue
->
tx_power_max_dBm
),
#else
AMP
,
#endif
frame_tx
,
frame_tx
,
subframe_tx
,
subframe_tx
,
&
phy_vars_ue
->
lte_frame_parms
,
&
phy_vars_ue
->
lte_frame_parms
,
phy_vars_ue
->
ulsch_ue
[
eNB_id
]);
phy_vars_ue
->
ulsch_ue
[
eNB_id
]);
#if defined(EXMIMO) || defined(OAI_USRP)
for
(
aa
=
0
;
aa
<
1
/*frame_parms->nb_antennas_tx*/
;
aa
++
)
generate_drs_pusch
(
phy_vars_ue
,
eNB_id
,
get_tx_amp
(
phy_vars_ue
->
tx_power_dBm
,
phy_vars_ue
->
tx_power_max_dBm
),
subframe_tx
,
first_rb
,
nb_rb
,
aa
);
#else
for
(
aa
=
0
;
aa
<
1
/*frame_parms->nb_antennas_tx*/
;
aa
++
)
for
(
aa
=
0
;
aa
<
1
/*frame_parms->nb_antennas_tx*/
;
aa
++
)
generate_drs_pusch
(
phy_vars_ue
,
eNB_id
,
AMP
,
subframe_tx
,
first_rb
,
nb_rb
,
aa
);
generate_drs_pusch
(
phy_vars_ue
,
eNB_id
,
#endif
tx_amp
,
subframe_tx
,
first_rb
,
nb_rb
,
aa
);
stop_meas
(
&
phy_vars_ue
->
ulsch_modulation_stats
);
stop_meas
(
&
phy_vars_ue
->
ulsch_modulation_stats
);
}
}
...
@@ -1030,38 +1073,37 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
...
@@ -1030,38 +1073,37 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
#endif
#endif
phy_vars_ue
->
tx_total_RE
=
12
;
phy_vars_ue
->
tx_total_RE
=
12
;
#if defined(EXMIMO) || defined(OAI_USRP)
tx_amp
=
get_tx_amp
(
Po_PUCCH
,
phy_vars_ue
->
tx_power_max_dBm
,
phy_vars_ue
->
lte_frame_parms
.
N_RB_UL
,
1
);
#else
tx_amp
=
AMP
;
#endif
if
(
SR_payload
>
0
)
{
if
(
SR_payload
>
0
)
{
LOG_D
(
PHY
,
"[UE %d][SR %x] Frame %d subframe %d Generating PUCCH 1a/1b payload %d,%d (with SR for PUSCH), n1_pucch %d, Po_PUCCH, amp %d
\n
"
,
LOG_D
(
PHY
,
"[UE %d][SR %x] Frame %d subframe %d Generating PUCCH 1a/1b payload %d,%d (with SR for PUSCH), n1_pucch %d, Po_PUCCH, amp %d
\n
"
,
Mod_id
,
Mod_id
,
phy_vars_ue
->
dlsch_ue
[
eNB_id
][
0
]
->
rnti
,
phy_vars_ue
->
dlsch_ue
[
eNB_id
][
0
]
->
rnti
,
frame_tx
,
subframe_tx
,
frame_tx
,
subframe_tx
,
pucch_ack_payload
[
0
],
pucch_ack_payload
[
1
],
pucch_ack_payload
[
0
],
pucch_ack_payload
[
1
],
phy_vars_ue
->
scheduling_request_config
[
eNB_id
].
sr_PUCCH_ResourceIndex
,
phy_vars_ue
->
scheduling_request_config
[
eNB_id
].
sr_PUCCH_ResourceIndex
,
Po_PUCCH
,
Po_PUCCH
,
#if defined(EXMIMO) || defined(OAI_USRP)
tx_amp
);
get_tx_amp
(
Po_PUCCH
,
phy_vars_ue
->
tx_power_max_dBm
)
#else
AMP
#endif
);
}
else
{
}
else
{
LOG_D
(
PHY
,
"[UE %d][PDSCH %x] Frame %d subframe %d Generating PUCCH 1a/1b, n1_pucch %d, b[0]=%d,b[1]=%d (SR_Payload %d), Po_PUCCH %d, amp %d
\n
"
,
LOG_D
(
PHY
,
"[UE %d][PDSCH %x] Frame %d subframe %d Generating PUCCH 1a/1b, n1_pucch %d, b[0]=%d,b[1]=%d (SR_Payload %d), Po_PUCCH %d, amp %d
\n
"
,
Mod_id
,
Mod_id
,
phy_vars_ue
->
dlsch_ue
[
eNB_id
][
0
]
->
rnti
,
phy_vars_ue
->
dlsch_ue
[
eNB_id
][
0
]
->
rnti
,
frame_tx
,
subframe_tx
,
frame_tx
,
subframe_tx
,
n1_pucch
,
pucch_ack_payload
[
0
],
pucch_ack_payload
[
1
],
SR_payload
,
n1_pucch
,
pucch_ack_payload
[
0
],
pucch_ack_payload
[
1
],
SR_payload
,
Po_PUCCH
,
Po_PUCCH
,
#if defined(EXMIMO) || defined(OAI_USRP)
tx_amp
);
get_tx_amp
(
Po_PUCCH
,
phy_vars_ue
->
tx_power_max_dBm
)
}
#else
AMP
#endif
);
}
if
(
abstraction_flag
==
0
)
{
if
(
abstraction_flag
==
0
)
{
generate_pucch
(
phy_vars_ue
->
lte_ue_common_vars
.
txdataF
,
generate_pucch
(
phy_vars_ue
->
lte_ue_common_vars
.
txdataF
,
&
phy_vars_ue
->
lte_frame_parms
,
&
phy_vars_ue
->
lte_frame_parms
,
phy_vars_ue
->
ncs_cell
,
phy_vars_ue
->
ncs_cell
,
format
,
format
,
...
@@ -1070,12 +1112,8 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
...
@@ -1070,12 +1112,8 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
0
,
// n2_pucch
0
,
// n2_pucch
1
,
// shortened format
1
,
// shortened format
pucch_ack_payload
,
pucch_ack_payload
,
#if defined(EXMIMO) || defined(OAI_USRP)
tx_amp
,
get_tx_amp
(
Po_PUCCH
,
phy_vars_ue
->
tx_power_max_dBm
),
subframe_tx
);
#else
AMP
,
#endif
subframe_tx
);
}
else
{
}
else
{
#ifdef PHY_ABSTRACTION
#ifdef PHY_ABSTRACTION
...
@@ -1098,6 +1136,14 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
...
@@ -1098,6 +1136,14 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
#endif
#endif
phy_vars_ue
->
tx_total_RE
=
12
;
phy_vars_ue
->
tx_total_RE
=
12
;
#if defined(EXMIMO) || defined(OAI_USRP)
tx_amp
=
get_tx_amp
(
Po_PUCCH
,
phy_vars_ue
->
tx_power_max_dBm
,
phy_vars_ue
->
lte_frame_parms
.
N_RB_UL
,
1
);
#else
tx_amp
=
AMP
;
#endif
LOG_D
(
PHY
,
"[UE %d][SR %x] Frame %d subframe %d Generating PUCCH 1 (SR for PUSCH), n1_pucch %d, Po_PUCCH %d
\n
"
,
LOG_D
(
PHY
,
"[UE %d][SR %x] Frame %d subframe %d Generating PUCCH 1 (SR for PUSCH), n1_pucch %d, Po_PUCCH %d
\n
"
,
Mod_id
,
Mod_id
,
phy_vars_ue
->
dlsch_ue
[
eNB_id
][
0
]
->
rnti
,
phy_vars_ue
->
dlsch_ue
[
eNB_id
][
0
]
->
rnti
,
...
@@ -1116,11 +1162,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
...
@@ -1116,11 +1162,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
0
,
// n2_pucch
0
,
// n2_pucch
1
,
// shortened format
1
,
// shortened format
pucch_ack_payload
,
// this is ignored anyway, we just need a pointer
pucch_ack_payload
,
// this is ignored anyway, we just need a pointer
#if defined(EXMIMO) || defined(OAI_USRP)
tx_amp
,
get_tx_amp
(
Po_PUCCH
,
phy_vars_ue
->
tx_power_max_dBm
),
#else
AMP
,
#endif
subframe_tx
);
subframe_tx
);
}
else
{
}
else
{
LOG_D
(
PHY
,
"Calling generate_pucch_emul ...
\n
"
);
LOG_D
(
PHY
,
"Calling generate_pucch_emul ...
\n
"
);
...
@@ -1323,7 +1365,6 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
...
@@ -1323,7 +1365,6 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
subframe_tx
);
subframe_tx
);
// LOG_I(PHY,"Got prach_resources for eNB %d address %d, RRCCommon %d\n",eNB_id,phy_vars_ue->prach_resources[eNB_id],UE_mac_inst[Mod_id].radioResourceConfigCommon);
// LOG_I(PHY,"Got prach_resources for eNB %d address %d, RRCCommon %d\n",eNB_id,phy_vars_ue->prach_resources[eNB_id],UE_mac_inst[Mod_id].radioResourceConfigCommon);
}
}
#endif
#endif
if
(
phy_vars_ue
->
prach_resources
[
eNB_id
]
!=
NULL
)
{
if
(
phy_vars_ue
->
prach_resources
[
eNB_id
]
!=
NULL
)
{
...
@@ -1338,7 +1379,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
...
@@ -1338,7 +1379,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
#endif
#endif
if
(
abstraction_flag
==
0
)
{
if
(
abstraction_flag
==
0
)
{
LOG_
D
(
PHY
,
"[UE %d][RAPROC] Frame %d, Subframe %d : Generating PRACH, preamble %d, TARGET_RECEIVED_POWER %d dBm, PRACH TDD Resource index %d, RA-RNTI %d
\n
"
,
LOG_
I
(
PHY
,
"[UE %d][RAPROC] Frame %d, Subframe %d : Generating PRACH, preamble %d, TARGET_RECEIVED_POWER %d dBm, PRACH TDD Resource index %d, RA-RNTI %d
\n
"
,
Mod_id
,
Mod_id
,
frame_tx
,
frame_tx
,
subframe_tx
,
subframe_tx
,
...
@@ -1348,7 +1389,12 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
...
@@ -1348,7 +1389,12 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
phy_vars_ue
->
prach_resources
[
eNB_id
]
->
ra_RNTI
);
phy_vars_ue
->
prach_resources
[
eNB_id
]
->
ra_RNTI
);
#ifdef OPENAIR2
#ifdef OPENAIR2
phy_vars_ue
->
tx_power_dBm
=
phy_vars_ue
->
prach_resources
[
eNB_id
]
->
ra_PREAMBLE_RECEIVED_TARGET_POWER
+
get_PL
(
Mod_id
,
CC_id
,
eNB_id
);
if
(
mode
!=
calib_prach_tx
)
phy_vars_ue
->
tx_power_dBm
=
phy_vars_ue
->
prach_resources
[
eNB_id
]
->
ra_PREAMBLE_RECEIVED_TARGET_POWER
+
get_PL
(
Mod_id
,
CC_id
,
eNB_id
);
else
{
phy_vars_ue
->
tx_power_dBm
=
phy_vars_ue
->
tx_power_max_dBm
;
phy_vars_ue
->
prach_resources
[
eNB_id
]
->
ra_PreambleIndex
=
19
;
}
#else
#else
phy_vars_ue
->
tx_power_dBm
=
UE_TX_POWER
;
phy_vars_ue
->
tx_power_dBm
=
UE_TX_POWER
;
#endif
#endif
...
@@ -1356,12 +1402,17 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
...
@@ -1356,12 +1402,17 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
phy_vars_ue
->
tx_total_RE
=
96
;
phy_vars_ue
->
tx_total_RE
=
96
;
#if defined(EXMIMO) || defined(OAI_USRP)
#if defined(EXMIMO) || defined(OAI_USRP)
phy_vars_ue
->
lte_ue_prach_vars
[
eNB_id
]
->
amp
=
get_tx_amp
(
phy_vars_ue
->
tx_power_dBm
,
phy_vars_ue
->
tx_power_max_dBm
);
phy_vars_ue
->
lte_ue_prach_vars
[
eNB_id
]
->
amp
=
get_tx_amp
(
phy_vars_ue
->
tx_power_dBm
,
phy_vars_ue
->
tx_power_max_dBm
,
phy_vars_ue
->
lte_frame_parms
.
N_RB_UL
,
6
);
#else
#else
phy_vars_ue
->
lte_ue_prach_vars
[
eNB_id
]
->
amp
=
AMP
;
phy_vars_ue
->
lte_ue_prach_vars
[
eNB_id
]
->
amp
=
AMP
;
#endif
#endif
LOG_D
(
PHY
,
"[UE %d][RAPROC] Frame %d, Subframe %d : PRACH TX power %d dBm, amp %d
\n
"
,
Mod_id
,
phy_vars_ue
->
frame_rx
,
phy_vars_ue
->
slot_tx
>>
1
,
phy_vars_ue
->
tx_power_dBm
,
if
((
mode
==
calib_prach_tx
)
&&
(((
phy_vars_ue
->
frame_tx
&
0xfffe
)
%
100
)
==
0
))
phy_vars_ue
->
lte_ue_prach_vars
[
eNB_id
]
->
amp
);
LOG_I
(
PHY
,
"[UE %d][RAPROC] Frame %d, Subframe %d : PRACH TX power %d dBm, amp %d
\n
"
,
Mod_id
,
phy_vars_ue
->
frame_rx
,
phy_vars_ue
->
slot_tx
>>
1
,
phy_vars_ue
->
tx_power_dBm
,
phy_vars_ue
->
lte_ue_prach_vars
[
eNB_id
]
->
amp
);
// start_meas(&phy_vars_ue->tx_prach);
// start_meas(&phy_vars_ue->tx_prach);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH
,
VCD_FUNCTION_IN
);
...
@@ -1391,8 +1442,12 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
...
@@ -1391,8 +1442,12 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
phy_vars_ue
->
prach_resources
[
eNB_id
]
->
ra_PREAMBLE_RECEIVED_TARGET_POWER
+
get_PL
(
Mod_id
,
CC_id
,
eNB_id
),
phy_vars_ue
->
prach_resources
[
eNB_id
]
->
ra_PREAMBLE_RECEIVED_TARGET_POWER
+
get_PL
(
Mod_id
,
CC_id
,
eNB_id
),
get_PL
(
Mod_id
,
CC_id
,
eNB_id
));
get_PL
(
Mod_id
,
CC_id
,
eNB_id
));
}
}
}
}
// if we're calibrating the PRACH kill the pointer to its resources so that the RA protocol doesn't continue
if
(
mode
==
calib_prach_tx
)
phy_vars_ue
->
prach_resources
[
eNB_id
]
=
NULL
;
LOG_D
(
PHY
,
"[UE %d] frame %d subframe %d : generate_prach %d, prach_cnt %d
\n
"
,
LOG_D
(
PHY
,
"[UE %d] frame %d subframe %d : generate_prach %d, prach_cnt %d
\n
"
,
Mod_id
,
frame_tx
,
subframe_tx
,
phy_vars_ue
->
generate_prach
,
phy_vars_ue
->
prach_cnt
);
Mod_id
,
frame_tx
,
subframe_tx
,
phy_vars_ue
->
generate_prach
,
phy_vars_ue
->
prach_cnt
);
...
@@ -1450,7 +1505,7 @@ void lte_ue_measurement_procedures(uint16_t l, PHY_VARS_UE *phy_vars_ue,uint8_t
...
@@ -1450,7 +1505,7 @@ void lte_ue_measurement_procedures(uint16_t l, PHY_VARS_UE *phy_vars_ue,uint8_t
// exmimo_config_t *p_exmimo_config = openair0_exmimo_pci[0].exmimo_config_ptr;
// exmimo_config_t *p_exmimo_config = openair0_exmimo_pci[0].exmimo_config_ptr;
// int aa;
// int aa;
#endif
#endif
int
Mod_id
=
phy_vars_ue
->
Mod_id
;
int
slot_rx
=
phy_vars_ue
->
slot_rx
;
int
slot_rx
=
phy_vars_ue
->
slot_rx
;
int
subframe_rx
=
slot_rx
>>
1
;
int
subframe_rx
=
slot_rx
>>
1
;
...
@@ -2180,6 +2235,7 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
...
@@ -2180,6 +2235,7 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
else
if
((
phy_vars_ue
->
prach_resources
[
eNB_id
])
&&
else
if
((
phy_vars_ue
->
prach_resources
[
eNB_id
])
&&
(
dci_alloc_rx
[
i
].
rnti
==
phy_vars_ue
->
prach_resources
[
eNB_id
]
->
ra_RNTI
)
&&
(
dci_alloc_rx
[
i
].
rnti
==
phy_vars_ue
->
prach_resources
[
eNB_id
]
->
ra_RNTI
)
&&
(
dci_alloc_rx
[
i
].
format
==
format1A
))
{
(
dci_alloc_rx
[
i
].
format
==
format1A
))
{
#ifdef DEBUG_PHY_PROC
#ifdef DEBUG_PHY_PROC
LOG_D
(
PHY
,
"[UE %d][RAPROC] subframe %d: Found RA rnti %x, format 1A, dci_cnt %d
\n
"
,
phy_vars_ue
->
Mod_id
,
subframe_rx
,
dci_alloc_rx
[
i
].
rnti
,
i
);
LOG_D
(
PHY
,
"[UE %d][RAPROC] subframe %d: Found RA rnti %x, format 1A, dci_cnt %d
\n
"
,
phy_vars_ue
->
Mod_id
,
subframe_rx
,
dci_alloc_rx
[
i
].
rnti
,
i
);
...
...
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