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
f2f79a16
Commit
f2f79a16
authored
May 03, 2017
by
gabrielC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove subframe_DL function npot anymore needed
parent
96629102
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
320 additions
and
356 deletions
+320
-356
openair1/PHY/LTE_TRANSPORT/dci_tools.c
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+2
-2
openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
+3
-3
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
+1
-1
openair1/PHY/TOOLS/lte_phy_scope.c
openair1/PHY/TOOLS/lte_phy_scope.c
+8
-8
openair1/PHY/TOOLS/lte_phy_scope_tm4.c
openair1/PHY/TOOLS/lte_phy_scope_tm4.c
+14
-14
openair1/SCHED/defs.h
openair1/SCHED/defs.h
+0
-5
openair1/SCHED/phy_procedures_lte_common.c
openair1/SCHED/phy_procedures_lte_common.c
+0
-31
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+48
-48
openair1/SCHED/pucch_pc.c
openair1/SCHED/pucch_pc.c
+5
-5
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+19
-19
openair1/SIMULATION/LTE_PHY/dlsim_tm4.c
openair1/SIMULATION/LTE_PHY/dlsim_tm4.c
+162
-162
openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
+54
-54
openair1/SIMULATION/LTE_PHY/ulsim.c
openair1/SIMULATION/LTE_PHY/ulsim.c
+4
-4
No files found.
openair1/PHY/LTE_TRANSPORT/dci_tools.c
View file @
f2f79a16
...
...
@@ -7209,7 +7209,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
uint8_t
transmission_mode
=
ue
->
transmission_mode
[
eNB_id
];
ANFBmode_t
AckNackFBMode
;
LTE_UE_ULSCH_t
*
ulsch
=
ue
->
ulsch
[
eNB_id
];
LTE_UE_DLSCH_t
**
dlsch
=
ue
->
dlsch
[
subframe
_DL
(
&
ue
->
frame_parms
,
subframe
)
&
0x1
][
0
];
LTE_UE_DLSCH_t
**
dlsch
=
ue
->
dlsch
[
subframe
&
0x1
][
0
];
PHY_MEASUREMENTS
*
meas
=
&
ue
->
measurements
;
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
// uint32_t current_dlsch_cqi = ue->current_dlsch_cqi[eNB_id];
...
...
@@ -8016,7 +8016,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
//int dl_subframe = (subframe<4) ? (subframe+6) : (subframe-4);
int
dl_subframe
=
subframe
;
if
(
ue
->
dlsch
[
subframe_DL
(
&
ue
->
frame_parms
,
dl_subframe
)
&
0x1
][
eNB_id
][
0
]
->
harq_ack
[
dl_subframe
].
send_harq_status
>
0
)
{
// we have downlink transmission
if
(
ue
->
dlsch
[
dl_subframe
&
0x1
][
eNB_id
][
0
]
->
harq_ack
[
dl_subframe
].
send_harq_status
>
0
)
{
// we have downlink transmission
ulsch
->
harq_processes
[
harq_pid
]
->
O_ACK
=
1
;
}
else
{
ulsch
->
harq_processes
[
harq_pid
]
->
O_ACK
=
0
;
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
View file @
f2f79a16
...
...
@@ -929,7 +929,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break
;
case
PDSCH
:
// TB0
dlsch_ue
=
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
];
dlsch_ue
=
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
];
harq_pid
=
dlsch_ue
->
current_harq_pid
;
ue_id
=
(
uint32_t
)
find_ue
((
int16_t
)
phy_vars_ue
->
pdcch_vars
[
subframe
&
0x1
][(
uint32_t
)
eNB_id
]
->
crnti
,
PHY_vars_eNB_g
[
eNB_id2
][
CC_id
]);
DevAssert
(
ue_id
!=
(
uint32_t
)
-
1
);
...
...
@@ -975,7 +975,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break
;
case
PDSCH1
:
{
// TB1
dlsch_ue
=
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
1
];
dlsch_ue
=
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
1
];
harq_pid
=
dlsch_ue
->
current_harq_pid
;
int8_t
UE_id
=
find_ue
(
phy_vars_ue
->
pdcch_vars
[
subframe
&
0x1
][
eNB_id
]
->
crnti
,
PHY_vars_eNB_g
[
eNB_id2
][
CC_id
]
);
DevAssert
(
UE_id
!=
-
1
);
...
...
@@ -1029,7 +1029,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break
;
default:
dlsch_ue
=
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
];
dlsch_ue
=
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
];
LOG_E
(
PHY
,
"dlsch_decoding_emul: FATAL, unknown DLSCH_id %d
\n
"
,
dlsch_id
);
dlsch_ue
->
last_iteration_cnt
=
1
+
dlsch_ue
->
max_turbo_iterations
;
return
(
1
+
dlsch_ue
->
max_turbo_iterations
);
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
View file @
f2f79a16
...
...
@@ -146,7 +146,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
case
PDSCH
:
pdsch_vars
=
ue
->
pdsch_vars
[
subframe
&
0x1
];
dlsch
=
ue
->
dlsch
[
subframe
_DL
(
&
ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
];
dlsch
=
ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
];
LOG_D
(
PHY
,
"AbsSubframe %d.%d / Sym %d harq_pid %d, harq status %d.%d
\n
"
,
frame
,
subframe
,
symbol
,
harq_pid
,
dlsch
[
0
]
->
harq_processes
[
harq_pid
]
->
status
,
...
...
openair1/PHY/TOOLS/lte_phy_scope.c
View file @
f2f79a16
...
...
@@ -514,16 +514,16 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
int
beamforming_mode
=
phy_vars_ue
->
transmission_mode
[
eNB_id
]
>
6
?
phy_vars_ue
->
transmission_mode
[
eNB_id
]
:
0
;
if
(
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
!=
NULL
)
{
harq_pid
=
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
->
current_harq_pid
;
if
(
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
!=
NULL
)
{
harq_pid
=
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
->
current_harq_pid
;
if
(
harq_pid
>=
8
)
return
;
mcs
=
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
mcs
;
mcs
=
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
mcs
;
// Button 0
if
(
!
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
dl_power_off
)
{
if
(
!
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
dl_power_off
)
{
// we are in TM5
fl_show_object
(
form
->
button_0
);
}
...
...
@@ -534,12 +534,12 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
}
// coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
if
(
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
!=
NULL
)
{
if
(
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
!=
NULL
)
{
coded_bits_per_codeword
=
get_G
(
frame_parms
,
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
nb_rb
,
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
rb_alloc_even
,
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
nb_rb
,
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
rb_alloc_even
,
get_Qm
(
mcs
),
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
Nl
,
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
Nl
,
num_pdcch_symbols
,
frame
,
subframe
,
...
...
openair1/PHY/TOOLS/lte_phy_scope_tm4.c
View file @
f2f79a16
...
...
@@ -448,11 +448,11 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
int
mcs1
=
0
;
unsigned
char
harq_pid
=
0
;
int
beamforming_mode
=
phy_vars_ue
->
transmission_mode
[
eNB_id
]
>
6
?
phy_vars_ue
->
transmission_mode
[
eNB_id
]
:
0
;
if
(
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
!=
NULL
)
{
harq_pid
=
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
->
current_harq_pid
;
if
(
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
!=
NULL
)
{
harq_pid
=
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
->
current_harq_pid
;
if
(
harq_pid
>=
8
)
return
;
mcs0
=
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
mcs
;
mcs0
=
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
mcs
;
// Button 0
/*
if(!phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->dl_power_off) {
...
...
@@ -461,23 +461,23 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
}
*/
}
if
(
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
1
]
!=
NULL
)
{
harq_pid
=
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
1
]
->
current_harq_pid
;
if
(
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
1
]
!=
NULL
)
{
harq_pid
=
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
1
]
->
current_harq_pid
;
if
(
harq_pid
>=
8
)
return
;
mcs1
=
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
mcs
;
mcs1
=
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
mcs
;
}
if
(
phy_vars_ue
->
pdcch_vars
[
subframe
&
0x1
][
eNB_id
]
!=
NULL
)
{
num_pdcch_symbols
=
phy_vars_ue
->
pdcch_vars
[
subframe
&
0x1
][
eNB_id
]
->
num_pdcch_symbols
;
}
// coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
if
(
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
!=
NULL
)
{
if
(
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
!=
NULL
)
{
mod0
=
get_Qm
(
mcs0
);
coded_bits_per_codeword0
=
get_G
(
frame_parms
,
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
nb_rb
,
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
rb_alloc_even
,
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
nb_rb
,
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
rb_alloc_even
,
get_Qm
(
mcs0
),
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
Nl
,
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
Nl
,
num_pdcch_symbols
,
frame
,
subframe
,
...
...
@@ -486,13 +486,13 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
coded_bits_per_codeword0
=
0
;
//frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
mod0
=
0
;
}
if
(
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
1
]
!=
NULL
)
{
if
(
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
1
]
!=
NULL
)
{
mod1
=
get_Qm
(
mcs1
);
coded_bits_per_codeword1
=
get_G
(
frame_parms
,
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
nb_rb
,
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
rb_alloc_even
,
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
nb_rb
,
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
rb_alloc_even
,
get_Qm
(
mcs1
),
phy_vars_ue
->
dlsch
[
subframe
_DL
(
&
phy_vars_ue
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
Nl
,
phy_vars_ue
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
Nl
,
num_pdcch_symbols
,
frame
,
subframe
,
...
...
openair1/SCHED/defs.h
View file @
f2f79a16
...
...
@@ -212,11 +212,6 @@ void prach_procedures(PHY_VARS_eNB *eNB);
lte_subframe_t
subframe_select
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
subframe
);
/*!
* \brief Function that return the DL SFN, used for TDD where the DL is not always 4 SFN before UL
*/
uint8_t
subframe_DL
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
current_sfn
);
/*! \brief Function to compute which type of DCIs to detect in the given subframe
@param frame_parms Pointer to DL frame parameter descriptor
...
...
openair1/SCHED/phy_procedures_lte_common.c
View file @
f2f79a16
...
...
@@ -619,37 +619,6 @@ lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms,unsigned char sub
}
}
uint8_t
subframe_DL
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
current_sfn
)
{
// if FDD return dummy value
if
(
frame_parms
->
frame_type
==
FDD
)
return
(
current_sfn
);
switch
(
frame_parms
->
tdd_config
)
{
case
1
:
switch
(
current_sfn
)
{
case
3
:
case
8
:
return
(
current_sfn
-
3
);
break
;
default:
return
(
current_sfn
);
break
;
}
case
3
:
return
(
current_sfn
);
break
;
default:
AssertFatal
(
0
,
"TDD config %d not coded"
,
frame_parms
->
tdd_config
);
}
}
dci_detect_mode_t
dci_detect_mode_select
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
subframe
)
{
dci_detect_mode_t
ret
=
0
;
...
...
openair1/SCHED/phy_procedures_lte_ue.c
View file @
f2f79a16
This diff is collapsed.
Click to expand it.
openair1/SCHED/pucch_pc.c
View file @
f2f79a16
...
...
@@ -52,7 +52,7 @@ int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,u
Po_PUCCH
=
get_PL
(
ue
->
Mod_id
,
ue
->
CC_id
,
eNB_id
)
+
ue
->
frame_parms
.
ul_power_control_config_common
.
p0_NominalPUCCH
+
ue
->
dlsch
[
subframe_DL
(
&
ue
->
frame_parms
,
proc
->
subframe_rx
)
&
0x1
][
eNB_id
][
0
]
->
g_pucch
;
ue
->
dlsch
[
proc
->
subframe_rx
&
0x1
][
eNB_id
][
0
]
->
g_pucch
;
switch
(
pucch_fmt
)
{
case
pucch_format1
:
...
...
@@ -91,19 +91,19 @@ int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,u
if
(
pucch_fmt
!=
pucch_format1
)
{
LOG_D
(
PHY
,
"[UE %d][PDSCH %x] AbsSubframe %d.%d: Po_PUCCH %d dBm : Po_NOMINAL_PUCCH %d dBm, PL %d dB, g_pucch %d dB
\n
"
,
ue
->
Mod_id
,
ue
->
dlsch
[
subframe_DL
(
&
ue
->
frame_parms
,
proc
->
subframe_rx
)
&
0x1
][
eNB_id
][
0
]
->
rnti
,
proc
->
frame_tx
%
1024
,
subframe
,
ue
->
dlsch
[
proc
->
subframe_rx
&
0x1
][
eNB_id
][
0
]
->
rnti
,
proc
->
frame_tx
%
1024
,
subframe
,
Po_PUCCH
,
ue
->
frame_parms
.
ul_power_control_config_common
.
p0_NominalPUCCH
,
get_PL
(
ue
->
Mod_id
,
ue
->
CC_id
,
eNB_id
),
ue
->
dlsch
[
subframe_DL
(
&
ue
->
frame_parms
,
proc
->
subframe_rx
)
&
0x1
][
eNB_id
][
0
]
->
g_pucch
);
ue
->
dlsch
[
proc
->
subframe_rx
&
0x1
][
eNB_id
][
0
]
->
g_pucch
);
}
else
{
LOG_D
(
PHY
,
"[UE %d][SR %x] AbsSubframe %d.%d: Po_PUCCH %d dBm : Po_NOMINAL_PUCCH %d dBm, PL %d dB g_pucch %d dB
\n
"
,
ue
->
Mod_id
,
ue
->
dlsch
[
subframe_DL
(
&
ue
->
frame_parms
,
proc
->
subframe_rx
)
&
0x1
][
eNB_id
][
0
]
->
rnti
,
proc
->
frame_tx
%
1024
,
subframe
,
ue
->
dlsch
[
proc
->
subframe_rx
&
0x1
][
eNB_id
][
0
]
->
rnti
,
proc
->
frame_tx
%
1024
,
subframe
,
Po_PUCCH
,
ue
->
frame_parms
.
ul_power_control_config_common
.
p0_NominalPUCCH
,
get_PL
(
ue
->
Mod_id
,
ue
->
CC_id
,
eNB_id
),
ue
->
dlsch
[
subframe_DL
(
&
ue
->
frame_parms
,
proc
->
subframe_rx
)
&
0x1
][
eNB_id
][
0
]
->
g_pucch
);
ue
->
dlsch
[
proc
->
subframe_rx
&
0x1
][
eNB_id
][
0
]
->
g_pucch
);
}
return
(
Po_PUCCH
);
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
f2f79a16
...
...
@@ -2105,14 +2105,14 @@ int main(int argc, char **argv)
}
for
(
i
=
0
;
i
<
2
;
i
++
)
{
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
i
]
=
new_ue_dlsch
(
Kmimo
,
8
,
Nsoft
,
MAX_TURBO_ITERATIONS
,
N_RB_DL
,
0
);
UE
->
dlsch
[
subframe
&
0x1
][
0
][
i
]
=
new_ue_dlsch
(
Kmimo
,
8
,
Nsoft
,
MAX_TURBO_ITERATIONS
,
N_RB_DL
,
0
);
if
(
!
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
i
])
{
if
(
!
UE
->
dlsch
[
subframe
&
0x1
][
0
][
i
])
{
printf
(
"Can't get ue dlsch structures
\n
"
);
exit
(
-
1
);
}
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
i
]
->
rnti
=
n_rnti
;
UE
->
dlsch
[
subframe
&
0x1
][
0
][
i
]
->
rnti
=
n_rnti
;
}
UE
->
dlsch_SI
[
0
]
=
new_ue_dlsch
(
1
,
1
,
Nsoft
,
MAX_TURBO_ITERATIONS
,
N_RB_DL
,
0
);
...
...
@@ -2500,7 +2500,7 @@ int main(int argc, char **argv)
if
(
n_frames
==
1
)
printf
(
"Running phy_procedures_UE_RX
\n
"
);
phy_procedures_UE_RX
(
UE
,
proc
,
0
,
0
,
normal_txrx
,
no_relay
,
NULL
);
if
(
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
0
]
->
active
==
0
)
{
if
(
UE
->
dlsch
[
subframe
&
0x1
][
0
][
0
]
->
active
==
0
)
{
//printf("DCI not received\n");
dci_errors
[
round
]
++
;
UE
->
dlsch_errors
[
0
]
=
1
;
...
...
@@ -2558,7 +2558,7 @@ int main(int argc, char **argv)
//pdsch_vars
dump_dlsch2
(
UE
,
eNB_id
,
subframe
,
&
coded_bits_per_codeword
,
round
,
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
0
]
->
current_harq_pid
);
dump_dlsch2
(
UE
,
eNB_id
,
subframe
,
&
coded_bits_per_codeword
,
round
,
UE
->
dlsch
[
subframe
&
0x1
][
0
][
0
]
->
current_harq_pid
);
write_output
(
"dlsch_e.m"
,
"e"
,
eNB
->
dlsch
[
0
][
0
]
->
harq_processes
[
0
]
->
e
,
coded_bits_per_codeword
,
1
,
4
);
...
...
@@ -2576,13 +2576,13 @@ int main(int argc, char **argv)
if
(
UE
->
dlsch_errors
[
0
]
==
0
)
{
avg_iter
+=
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
->
last_iteration_cnt
;
avg_iter
+=
UE
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
->
last_iteration_cnt
;
iter_trials
++
;
if
(
n_frames
==
1
)
printf
(
"No DLSCH errors found (round %d),uncoded ber %f
\n
"
,
round
,
uncoded_ber
);
UE
->
total_TBS
[
eNB_id
]
=
UE
->
total_TBS
[
eNB_id
]
+
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
UE
->
dlsch
[
subframe_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
->
current_harq_pid
]
->
TBS
;
UE
->
total_TBS
[
eNB_id
]
=
UE
->
total_TBS
[
eNB_id
]
+
UE
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
UE
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
->
current_harq_pid
]
->
TBS
;
TB0_active
=
0
;
...
...
@@ -2590,25 +2590,25 @@ int main(int argc, char **argv)
else
{
errs
[
round
]
++
;
avg_iter
+=
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
eNB_id
][
0
]
->
last_iteration_cnt
-
1
;
avg_iter
+=
UE
->
dlsch
[
subframe
&
0x1
][
eNB_id
][
0
]
->
last_iteration_cnt
-
1
;
iter_trials
++
;
if
(
n_frames
==
1
)
{
//if ((n_frames==1) || (SNR>=30)) {
printf
(
"DLSCH errors found (round %d), uncoded ber %f
\n
"
,
round
,
uncoded_ber
);
for
(
s
=
0
;
s
<
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
C
;
s
++
)
{
if
(
s
<
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
Cminus
)
Kr
=
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
Kminus
;
for
(
s
=
0
;
s
<
UE
->
dlsch
[
subframe
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
C
;
s
++
)
{
if
(
s
<
UE
->
dlsch
[
subframe
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
Cminus
)
Kr
=
UE
->
dlsch
[
subframe
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
Kminus
;
else
Kr
=
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
Kplus
;
Kr
=
UE
->
dlsch
[
subframe
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
Kplus
;
Kr_bytes
=
Kr
>>
3
;
printf
(
"Decoded_output (Segment %d):
\n
"
,
s
);
for
(
i
=
0
;
i
<
Kr_bytes
;
i
++
)
printf
(
"%d : %x (%x)
\n
"
,
i
,
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
c
[
s
][
i
],
UE
->
dlsch
[
subframe_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
c
[
s
][
i
]
^
eNB
->
dlsch
[
0
][
0
]
->
harq_processes
[
0
]
->
c
[
s
][
i
]);
printf
(
"%d : %x (%x)
\n
"
,
i
,
UE
->
dlsch
[
subframe
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
c
[
s
][
i
],
UE
->
dlsch
[
subframe
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
c
[
s
][
i
]
^
eNB
->
dlsch
[
0
][
0
]
->
harq_processes
[
0
]
->
c
[
s
][
i
]);
}
sprintf
(
fname
,
"rxsig0_r%d.m"
,
round
);
...
...
@@ -2659,13 +2659,13 @@ int main(int argc, char **argv)
}
//pdsch_vars
dump_dlsch2
(
UE
,
eNB_id
,
subframe
,
&
coded_bits_per_codeword
,
round
,
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
0
]
->
current_harq_pid
);
dump_dlsch2
(
UE
,
eNB_id
,
subframe
,
&
coded_bits_per_codeword
,
round
,
UE
->
dlsch
[
subframe
&
0x1
][
0
][
0
]
->
current_harq_pid
);
//write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4);
//write_output("dlsch_ber_bit.m","ber_bit",uncoded_ber_bit,coded_bits_per_codeword,1,0);
//write_output("dlsch_w.m","w",eNB->dlsch[0][0]->harq_processes[0]->w[0],3*(tbs+64),1,4);
//write_output("dlsch_w.m","w",UE->dlsch[subframe
_DL(&UE->frame_parms,subframe)
&0x1][0][0]->harq_processes[0]->w[0],3*(tbs+64),1,0);
//write_output("dlsch_w.m","w",UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->w[0],3*(tbs+64),1,0);
//pdcch_vars
write_output
(
"pdcchF0_ext.m"
,
"pdcchF_ext"
,
UE
->
pdcch_vars
[
0
][
eNB_id
]
->
rxdataF_ext
[
0
],
2
*
3
*
UE
->
frame_parms
.
ofdm_symbol_size
,
1
,
1
);
write_output
(
"pdcch00_ch0_ext.m"
,
"pdcch00_ch0_ext"
,
UE
->
pdcch_vars
[
0
][
eNB_id
]
->
dl_ch_estimates_ext
[
0
],
300
*
3
,
1
,
1
);
...
...
@@ -2679,7 +2679,7 @@ int main(int argc, char **argv)
// printf("round %d errors %d/%d\n",round,errs[round],trials);
round
++
;
// UE->dlsch[subframe
_DL(&UE->frame_parms,subframe)
&0x1][0][0]->harq_processes[0]->round++;
// UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->round++;
}
if
(
xforms
==
1
)
{
...
...
@@ -2869,7 +2869,7 @@ int main(int argc, char **argv)
//rate*effective_rate,
100
*
effective_rate
,
//rate,
//rate*get_Qm(UE->dlsch[subframe
_DL(&UE->frame_parms,subframe)&0x1][0][0]->harq_processes[UE->dlsch[subframe_DL(&UE->frame_parms,subframe)
&0x1][0][0]->current_harq_pid]->mcs),
//rate*get_Qm(UE->dlsch[subframe
&0x1][0][0]->harq_processes[UE->dlsch[subframe
&0x1][0][0]->current_harq_pid]->mcs),
(
1
.
0
*
(
round_trials
[
0
]
-
errs
[
0
])
+
2
.
0
*
(
round_trials
[
1
]
-
errs
[
1
])
+
3
.
0
*
(
round_trials
[
2
]
-
errs
[
2
])
+
4
.
0
*
(
round_trials
[
3
]
-
errs
[
3
]))
/
((
double
)
round_trials
[
0
])
/
(
double
)
eNB
->
dlsch
[
0
][
0
]
->
harq_processes
[
0
]
->
TBS
,
(
1
.
0
*
(
round_trials
[
0
]
-
errs
[
0
])
+
2
.
0
*
(
round_trials
[
1
]
-
errs
[
1
])
+
3
.
0
*
(
round_trials
[
2
]
-
errs
[
2
])
+
4
.
0
*
(
round_trials
[
3
]
-
errs
[
3
]))
/
((
double
)
round_trials
[
0
]));
...
...
@@ -2946,7 +2946,7 @@ int main(int argc, char **argv)
printf
(
"|__ DLSCH Rate Unmatching :%f us (%d trials)
\n
"
,
(
double
)
UE
->
dlsch_rate_unmatching_stats
.
diff
/
UE
->
dlsch_rate_unmatching_stats
.
trials
/
cpu_freq_GHz
/
1000
.
0
,
UE
->
dlsch_rate_unmatching_stats
.
trials
);
printf
(
"|__ DLSCH Turbo Decoding(%d bits) :%f us (%d trials)
\n
"
,
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
Cminus
?
UE
->
dlsch
[
subframe_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
Kminus
:
UE
->
dlsch
[
subframe_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
Kplus
,
UE
->
dlsch
[
subframe
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
Cminus
?
UE
->
dlsch
[
subframe
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
Kminus
:
UE
->
dlsch
[
subframe
&
0x1
][
0
][
0
]
->
harq_processes
[
0
]
->
Kplus
,
(
double
)
UE
->
dlsch_turbo_decoding_stats
.
diff
/
UE
->
dlsch_turbo_decoding_stats
.
trials
/
cpu_freq_GHz
/
1000
.
0
,
UE
->
dlsch_turbo_decoding_stats
.
trials
);
printf
(
" |__ init %f us (cycles/iter %f, %d trials)
\n
"
,
(
double
)
UE
->
dlsch_tc_init_stats
.
diff
/
UE
->
dlsch_tc_init_stats
.
trials
/
cpu_freq_GHz
/
1000
.
0
,
...
...
@@ -3235,7 +3235,7 @@ int main(int argc, char **argv)
printf
(
"eNB %d
\n
"
,
i
);
free_eNB_dlsch
(
eNB
->
dlsch
[
0
][
i
]);
printf
(
"UE %d
\n
"
,
i
);
free_ue_dlsch
(
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
0x1
][
0
][
i
]);
free_ue_dlsch
(
UE
->
dlsch
[
subframe
&
0x1
][
0
][
i
]);
}
...
...
openair1/SIMULATION/LTE_PHY/dlsim_tm4.c
View file @
f2f79a16
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
View file @
f2f79a16
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/LTE_PHY/ulsim.c
View file @
f2f79a16
...
...
@@ -709,20 +709,20 @@ int main(int argc, char **argv)
// Create transport channel structures for 2 transport blocks (MIMO)
for
(
i
=
0
;
i
<
2
;
i
++
)
{
eNB
->
dlsch
[
0
][
i
]
=
new_eNB_dlsch
(
1
,
8
,
1827072
,
N_RB_DL
,
0
,
&
eNB
->
frame_parms
);
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
1
][
0
][
i
]
=
new_ue_dlsch
(
1
,
8
,
1827072
,
MAX_TURBO_ITERATIONS
,
N_RB_DL
,
0
);
UE
->
dlsch
[
subframe
&
1
][
0
][
i
]
=
new_ue_dlsch
(
1
,
8
,
1827072
,
MAX_TURBO_ITERATIONS
,
N_RB_DL
,
0
);
if
(
!
eNB
->
dlsch
[
0
][
i
])
{
printf
(
"Can't get eNB dlsch structures
\n
"
);
exit
(
-
1
);
}
if
(
!
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
1
][
0
][
i
])
{
if
(
!
UE
->
dlsch
[
subframe
&
1
][
0
][
i
])
{
printf
(
"Can't get ue dlsch structures
\n
"
);
exit
(
-
1
);
}
eNB
->
dlsch
[
0
][
i
]
->
rnti
=
14
;
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
1
][
0
][
i
]
->
rnti
=
14
;
UE
->
dlsch
[
subframe
&
1
][
0
][
i
]
->
rnti
=
14
;
}
...
...
@@ -763,7 +763,7 @@ int main(int argc, char **argv)
init_ul_hopping
(
&
eNB
->
frame_parms
);
UE
->
dlsch
[
subframe
_DL
(
&
UE
->
frame_parms
,
subframe
)
&
1
][
0
][
0
]
->
harq_ack
[
ul_subframe2pdcch_alloc_subframe
(
&
eNB
->
frame_parms
,
subframe
)].
send_harq_status
=
1
;
UE
->
dlsch
[
subframe
&
1
][
0
][
0
]
->
harq_ack
[
ul_subframe2pdcch_alloc_subframe
(
&
eNB
->
frame_parms
,
subframe
)].
send_harq_status
=
1
;
UE
->
ulsch_Msg3_active
[
eNB_id
]
=
0
;
UE
->
ul_power_control_dedicated
[
eNB_id
].
accumulationEnabled
=
1
;
...
...
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