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
canghaiwuhen
OpenXG-RAN
Commits
b0f329b2
Commit
b0f329b2
authored
Dec 02, 2016
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing a bug in lte-enb.c
removing redundand do_OFDM_mod_l from dlsim.c
parent
a78ef7c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
53 deletions
+19
-53
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+15
-41
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+4
-12
No files found.
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
b0f329b2
...
@@ -91,35 +91,6 @@ uint64_t DLSCH_alloc_pdu_1[2];
...
@@ -91,35 +91,6 @@ uint64_t DLSCH_alloc_pdu_1[2];
#define CCCH_RB_ALLOC computeRIV(eNB->frame_parms.N_RB_UL,0,2)
#define CCCH_RB_ALLOC computeRIV(eNB->frame_parms.N_RB_UL,0,2)
//#define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13
//#define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13
//#define DLSCH_RB_ALLOC 0x0001
//#define DLSCH_RB_ALLOC 0x0001
void
do_OFDM_mod_l
(
int32_t
**
txdataF
,
int32_t
**
txdata
,
uint16_t
next_slot
,
LTE_DL_FRAME_PARMS
*
frame_parms
)
{
int
aa
,
slot_offset
,
slot_offset_F
;
slot_offset_F
=
(
next_slot
)
*
(
frame_parms
->
ofdm_symbol_size
)
*
((
frame_parms
->
Ncp
==
1
)
?
6
:
7
);
slot_offset
=
(
next_slot
)
*
(
frame_parms
->
samples_per_tti
>>
1
);
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
// printf("Thread %d starting ... aa %d (%llu)\n",omp_get_thread_num(),aa,rdtsc());
if
(
frame_parms
->
Ncp
==
1
)
PHY_ofdm_mod
(
&
txdataF
[
aa
][
slot_offset_F
],
// input
&
txdata
[
aa
][
slot_offset
],
// output
frame_parms
->
ofdm_symbol_size
,
6
,
// number of symbols
frame_parms
->
nb_prefix_samples
,
// number of prefix samples
CYCLIC_PREFIX
);
else
{
normal_prefix_mod
(
&
txdataF
[
aa
][
slot_offset_F
],
&
txdata
[
aa
][
slot_offset
],
7
,
frame_parms
);
}
}
}
void
DL_channel
(
PHY_VARS_eNB
*
eNB
,
PHY_VARS_UE
*
UE
,
int
subframe
,
int
awgn_flag
,
double
SNR
,
int
tx_lev
,
int
hold_channel
,
int
abstx
,
int
num_rounds
,
int
trials
,
int
round
,
channel_desc_t
*
eNB2UE
[
4
],
void
DL_channel
(
PHY_VARS_eNB
*
eNB
,
PHY_VARS_UE
*
UE
,
int
subframe
,
int
awgn_flag
,
double
SNR
,
int
tx_lev
,
int
hold_channel
,
int
abstx
,
int
num_rounds
,
int
trials
,
int
round
,
channel_desc_t
*
eNB2UE
[
4
],
double
*
s_re
[
2
],
double
*
s_im
[
2
],
double
*
r_re
[
2
],
double
*
r_im
[
2
],
FILE
*
csv_fd
)
{
double
*
s_re
[
2
],
double
*
s_im
[
2
],
double
*
r_re
[
2
],
double
*
r_im
[
2
],
FILE
*
csv_fd
)
{
...
@@ -2354,15 +2325,17 @@ int main(int argc, char **argv)
...
@@ -2354,15 +2325,17 @@ int main(int argc, char **argv)
start_meas
(
&
eNB
->
ofdm_mod_stats
);
start_meas
(
&
eNB
->
ofdm_mod_stats
);
do_OFDM_mod_l
(
eNB
->
common_vars
.
txdataF
[
eNB_id
],
do_OFDM_mod
(
eNB
->
common_vars
.
txdataF
[
eNB_id
],
eNB
->
common_vars
.
txdata
[
eNB_id
],
eNB
->
common_vars
.
txdata
[
eNB_id
],
(
subframe
*
2
),
proc_eNB
->
frame_tx
,
&
eNB
->
frame_parms
);
(
subframe
*
2
),
&
eNB
->
frame_parms
);
do_OFDM_mod_l
(
eNB
->
common_vars
.
txdataF
[
eNB_id
],
do_OFDM_mod
(
eNB
->
common_vars
.
txdataF
[
eNB_id
],
eNB
->
common_vars
.
txdata
[
eNB_id
],
eNB
->
common_vars
.
txdata
[
eNB_id
],
(
subframe
*
2
)
+
1
,
proc_eNB
->
frame_tx
,
&
eNB
->
frame_parms
);
(
subframe
*
2
)
+
1
,
&
eNB
->
frame_parms
);
stop_meas
(
&
eNB
->
ofdm_mod_stats
);
stop_meas
(
&
eNB
->
ofdm_mod_stats
);
...
@@ -2372,10 +2345,11 @@ int main(int argc, char **argv)
...
@@ -2372,10 +2345,11 @@ int main(int argc, char **argv)
phy_procedures_eNB_TX
(
eNB
,
proc_eNB
,
no_relay
,
NULL
,
0
);
phy_procedures_eNB_TX
(
eNB
,
proc_eNB
,
no_relay
,
NULL
,
0
);
do_OFDM_mod_l
(
eNB
->
common_vars
.
txdataF
[
eNB_id
],
do_OFDM_mod
(
eNB
->
common_vars
.
txdataF
[
eNB_id
],
eNB
->
common_vars
.
txdata
[
eNB_id
],
eNB
->
common_vars
.
txdata
[
eNB_id
],
(
subframe
*
2
)
+
2
,
proc_eNB
->
frame_tx
,
&
eNB
->
frame_parms
);
(
subframe
*
2
)
+
2
,
&
eNB
->
frame_parms
);
proc_eNB
->
frame_tx
++
;
proc_eNB
->
frame_tx
++
;
...
...
targets/RT/USER/lte-enb.c
View file @
b0f329b2
...
@@ -327,15 +327,9 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) {
...
@@ -327,15 +327,9 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) {
len
=
phy_vars_eNB
->
frame_parms
.
samples_per_tti
>>
1
;
len
=
phy_vars_eNB
->
frame_parms
.
samples_per_tti
>>
1
;
else
else
len
=
phy_vars_eNB
->
frame_parms
.
samples_per_tti
;
len
=
phy_vars_eNB
->
frame_parms
.
samples_per_tti
;
/*
for (i=0;i<len;i+=4) {
dummy_tx_b[i] = 0x100;
dummy_tx_b[i+1] = 0x01000000;
dummy_tx_b[i+2] = 0xff00;
dummy_tx_b[i+3] = 0xff000000;
}*/
if
(
slot_offset
+
time_offset
[
aa
]
<
0
)
{
tx_offset
=
(
int
)
slot_offset
+
time_offset
[
aa
];
if
(
tx_offset
<
0
)
{
txdata
=
(
int16_t
*
)
&
phy_vars_eNB
->
common_vars
.
txdata
[
0
][
aa
][(
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
phy_vars_eNB
->
frame_parms
.
samples_per_tti
)
+
tx_offset
];
txdata
=
(
int16_t
*
)
&
phy_vars_eNB
->
common_vars
.
txdata
[
0
][
aa
][(
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
phy_vars_eNB
->
frame_parms
.
samples_per_tti
)
+
tx_offset
];
len2
=
-
(
slot_offset
+
time_offset
[
aa
]);
len2
=
-
(
slot_offset
+
time_offset
[
aa
]);
len2
=
(
len2
>
len
)
?
len
:
len2
;
len2
=
(
len2
>
len
)
?
len
:
len2
;
...
@@ -349,8 +343,7 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) {
...
@@ -349,8 +343,7 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) {
}
}
}
}
}
}
else
if
((
slot_offset
+
time_offset
[
aa
]
+
len
)
>
(
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
phy_vars_eNB
->
frame_parms
.
samples_per_tti
))
{
else
if
((
tx_offset
+
len
)
>
(
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
phy_vars_eNB
->
frame_parms
.
samples_per_tti
))
{
tx_offset
=
(
int
)
slot_offset
+
time_offset
[
aa
];
txdata
=
(
int16_t
*
)
&
phy_vars_eNB
->
common_vars
.
txdata
[
0
][
aa
][
tx_offset
];
txdata
=
(
int16_t
*
)
&
phy_vars_eNB
->
common_vars
.
txdata
[
0
][
aa
][
tx_offset
];
len2
=
-
tx_offset
+
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
phy_vars_eNB
->
frame_parms
.
samples_per_tti
;
len2
=
-
tx_offset
+
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
phy_vars_eNB
->
frame_parms
.
samples_per_tti
;
for
(
i
=
0
;
i
<
(
len2
<<
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
len2
<<
1
);
i
++
)
{
...
@@ -362,7 +355,6 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) {
...
@@ -362,7 +355,6 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) {
}
}
}
}
else
{
else
{
tx_offset
=
(
int
)
slot_offset
+
time_offset
[
aa
];
txdata
=
(
int16_t
*
)
&
phy_vars_eNB
->
common_vars
.
txdata
[
0
][
aa
][
tx_offset
];
txdata
=
(
int16_t
*
)
&
phy_vars_eNB
->
common_vars
.
txdata
[
0
][
aa
][
tx_offset
];
for
(
i
=
0
;
i
<
(
len
<<
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
len
<<
1
);
i
++
)
{
...
@@ -1320,7 +1312,7 @@ void init_eNB_proc(int inst) {
...
@@ -1320,7 +1312,7 @@ void init_eNB_proc(int inst) {
PHY_VARS_eNB
*
eNB
;
PHY_VARS_eNB
*
eNB
;
eNB_proc_t
*
proc
;
eNB_proc_t
*
proc
;
eNB_rxtx_proc_t
*
proc_rxtx
;
eNB_rxtx_proc_t
*
proc_rxtx
;
pthread_attr_t
*
attr0
=
NULL
,
*
attr1
=
NULL
,
*
attr_FH
=
NULL
,
*
attr_prach
=
NULL
,
*
attr_asynch
=
NULL
,
*
attr_single
=
NULL
,
*
attr_fep
=
NULL
,
*
attr_td
=
NULL
,
*
attr_te
;
pthread_attr_t
*
attr0
=
NULL
,
*
attr1
=
NULL
,
*
attr_FH
=
NULL
,
*
attr_prach
=
NULL
,
*
attr_asynch
=
NULL
,
*
attr_single
=
NULL
,
*
attr_fep
=
NULL
,
*
attr_td
=
NULL
,
*
attr_te
=
NULL
;
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
eNB
=
PHY_vars_eNB_g
[
inst
][
CC_id
];
eNB
=
PHY_vars_eNB_g
[
inst
][
CC_id
];
...
...
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