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
c2c26bd2
Commit
c2c26bd2
authored
Dec 01, 2016
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into feature-21-TM7
Conflicts: targets/RT/USER/lte-enb.c
parents
cf178320
e1c4e78b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
35 deletions
+64
-35
common/utils/T/tracer/enb.c
common/utils/T/tracer/enb.c
+8
-2
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+21
-18
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+23
-3
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+12
-12
No files found.
common/utils/T/tracer/enb.c
View file @
c2c26bd2
...
@@ -190,8 +190,12 @@ static void click(void *private, gui *g,
...
@@ -190,8 +190,12 @@ static void click(void *private, gui *g,
if
(
w
==
e
->
prev_ue_button
)
{
ue
--
;
if
(
ue
<
0
)
ue
=
0
;
}
if
(
w
==
e
->
prev_ue_button
)
{
ue
--
;
if
(
ue
<
0
)
ue
=
0
;
}
if
(
w
==
e
->
next_ue_button
)
ue
++
;
if
(
w
==
e
->
next_ue_button
)
ue
++
;
if
(
ue
!=
ed
->
ue
)
set_current_ue
(
g
,
ed
,
ue
);
if
(
pthread_mutex_lock
(
&
ed
->
lock
))
abort
();
ed
->
ue
=
ue
;
if
(
ue
!=
ed
->
ue
)
{
set_current_ue
(
g
,
ed
,
ue
);
ed
->
ue
=
ue
;
}
if
(
pthread_mutex_unlock
(
&
ed
->
lock
))
abort
();
}
}
static
void
enb_main_gui
(
enb_gui
*
e
,
gui
*
g
,
event_handler
*
h
,
void
*
database
,
static
void
enb_main_gui
(
enb_gui
*
e
,
gui
*
g
,
event_handler
*
h
,
void
*
database
,
...
@@ -745,7 +749,9 @@ restart:
...
@@ -745,7 +749,9 @@ restart:
event
e
;
event
e
;
e
=
get_event
(
enb_data
.
socket
,
v
,
database
);
e
=
get_event
(
enb_data
.
socket
,
v
,
database
);
if
(
e
.
type
==
-
1
)
goto
restart
;
if
(
e
.
type
==
-
1
)
goto
restart
;
if
(
pthread_mutex_lock
(
&
enb_data
.
lock
))
abort
();
handle_event
(
h
,
e
);
handle_event
(
h
,
e
);
if
(
pthread_mutex_unlock
(
&
enb_data
.
lock
))
abort
();
}
}
return
0
;
return
0
;
...
...
targets/RT/USER/lte-enb.c
View file @
c2c26bd2
...
@@ -136,8 +136,8 @@ time_stats_t softmodem_stats_mt; // main thread
...
@@ -136,8 +136,8 @@ time_stats_t softmodem_stats_mt; // main thread
time_stats_t
softmodem_stats_hw
;
// hw acquisition
time_stats_t
softmodem_stats_hw
;
// hw acquisition
time_stats_t
softmodem_stats_rxtx_sf
;
// total tx time
time_stats_t
softmodem_stats_rxtx_sf
;
// total tx time
time_stats_t
softmodem_stats_rx_sf
;
// total rx time
time_stats_t
softmodem_stats_rx_sf
;
// total rx time
int32_t
**
rxdata
;
//
int32_t **rxdata;
int32_t
**
txdata
;
//
int32_t **txdata;
uint8_t
seqno
;
//sequence number
uint8_t
seqno
;
//sequence number
...
@@ -320,12 +320,13 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB)
...
@@ -320,12 +320,13 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB)
6,
6,
phy_vars_eNB->frame_parms.nb_prefix_samples,
phy_vars_eNB->frame_parms.nb_prefix_samples,
CYCLIC_PREFIX);
CYCLIC_PREFIX);
PHY_ofdm_mod(&phy_vars_eNB->common_vars.txdataF[0][aa][slot_offset_F+slot_sizeF],
if (subframe_select(&phy_vars_eNB->frame_parms,subframe) == SF_DL)
dummy_tx_b+(phy_vars_eNB->frame_parms.samples_per_tti>>1),
PHY_ofdm_mod(&phy_vars_eNB->common_vars.txdataF[0][aa][slot_offset_F+slot_sizeF],
phy_vars_eNB->frame_parms.ofdm_symbol_size,
dummy_tx_b+(phy_vars_eNB->frame_parms.samples_per_tti>>1),
6,
phy_vars_eNB->frame_parms.ofdm_symbol_size,
phy_vars_eNB->frame_parms.nb_prefix_samples,
6,
CYCLIC_PREFIX);
phy_vars_eNB->frame_parms.nb_prefix_samples,
CYCLIC_PREFIX);
} else {
} else {
normal_prefix_mod(&phy_vars_eNB->common_vars.txdataF[0][aa][slot_offset_F],
normal_prefix_mod(&phy_vars_eNB->common_vars.txdataF[0][aa][slot_offset_F],
dummy_tx_b,
dummy_tx_b,
...
@@ -386,9 +387,9 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB)
...
@@ -386,9 +387,9 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB)
// turn on tx switch N_TA_offset before
// turn on tx switch N_TA_offset before
//LOG_D(HW,"subframe %d, time to switch to tx (N_TA_offset %d, slot_offset %d) \n",subframe,phy_vars_eNB->N_TA_offset,slot_offset);
//LOG_D(HW,"subframe %d, time to switch to tx (N_TA_offset %d, slot_offset %d) \n",subframe,phy_vars_eNB->N_TA_offset,slot_offset);
for
(
i
=
0
;
i
<
phy_vars_eNB
->
N_TA_offset
;
i
++
)
{
for
(
i
=
0
;
i
<
phy_vars_eNB
->
N_TA_offset
;
i
++
)
{
tx_offset
=
(
int
)
slot_offset
+
time_offset
[
aa
]
+
i
-
phy_vars_eNB
->
N_TA_offset
/
2
;
tx_offset
=
(
int
)
slot_offset
+
time_offset
[
aa
]
+
i
-
phy_vars_eNB
->
N_TA_offset
;
if
(
tx_offset
<
0
)
if
(
tx_offset
<
0
)
tx_offset
+=
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
phy_vars_eNB
->
frame_parms
.
samples_per_tti
;
tx_offset
+=
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
phy_vars_eNB
->
frame_parms
.
samples_per_tti
;
if
(
tx_offset
>=
(
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
phy_vars_eNB
->
frame_parms
.
samples_per_tti
))
if
(
tx_offset
>=
(
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
phy_vars_eNB
->
frame_parms
.
samples_per_tti
))
tx_offset
-=
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
phy_vars_eNB
->
frame_parms
.
samples_per_tti
;
tx_offset
-=
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
phy_vars_eNB
->
frame_parms
.
samples_per_tti
;
...
@@ -549,7 +550,8 @@ int wait_CCs(eNB_rxtx_proc_t *proc) {
...
@@ -549,7 +550,8 @@ int wait_CCs(eNB_rxtx_proc_t *proc) {
static
inline
int
rxtx
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
char
*
thread_name
)
{
static
inline
int
rxtx
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
char
*
thread_name
)
{
start_meas
(
&
softmodem_stats_rxtx_sf
);
start_meas
(
&
softmodem_stats_rxtx_sf
);
// ****************************************
// ****************************************
// Common RX procedures subframe n
// Common RX procedures subframe n
phy_procedures_eNB_common_RX
(
eNB
);
phy_procedures_eNB_common_RX
(
eNB
);
...
@@ -1487,7 +1489,7 @@ int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_c
...
@@ -1487,7 +1489,7 @@ int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_c
int
i
,
j
;
int
i
,
j
;
int
CC_id
,
card
,
ant
;
int
CC_id
,
card
,
ant
;
uint16_t
N_TA_offset
=
0
;
//
uint16_t N_TA_offset = 0;
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
...
@@ -1500,6 +1502,7 @@ int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_c
...
@@ -1500,6 +1502,7 @@ int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_c
return
(
-
1
);
return
(
-
1
);
}
}
/*
if (frame_parms->frame_type == TDD) {
if (frame_parms->frame_type == TDD) {
if (frame_parms->N_RB_DL == 100)
if (frame_parms->N_RB_DL == 100)
N_TA_offset = 624;
N_TA_offset = 624;
...
@@ -1508,7 +1511,7 @@ int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_c
...
@@ -1508,7 +1511,7 @@ int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_c
else if (frame_parms->N_RB_DL == 25)
else if (frame_parms->N_RB_DL == 25)
N_TA_offset = 624/4;
N_TA_offset = 624/4;
}
}
*/
if
(
openair0_cfg
[
CC_id
].
mmapped_dma
==
1
)
{
if
(
openair0_cfg
[
CC_id
].
mmapped_dma
==
1
)
{
...
@@ -1522,7 +1525,6 @@ int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_c
...
@@ -1522,7 +1525,6 @@ int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_c
phy_vars_eNB
[
CC_id
]
->
common_vars
.
rxdata
[
0
][
i
]
=
openair0_cfg
[
phy_vars_eNB
[
CC_id
]
->
rf_map
.
card
+
card
].
rxbase
[
phy_vars_eNB
[
CC_id
]
->
rf_map
.
chain
+
ant
];
phy_vars_eNB
[
CC_id
]
->
common_vars
.
rxdata
[
0
][
i
]
=
openair0_cfg
[
phy_vars_eNB
[
CC_id
]
->
rf_map
.
card
+
card
].
rxbase
[
phy_vars_eNB
[
CC_id
]
->
rf_map
.
chain
+
ant
];
printf
(
"rxdata[%d] @ %p
\n
"
,
i
,
phy_vars_eNB
[
CC_id
]
->
common_vars
.
rxdata
[
0
][
i
]);
printf
(
"rxdata[%d] @ %p
\n
"
,
i
,
phy_vars_eNB
[
CC_id
]
->
common_vars
.
rxdata
[
0
][
i
]);
for
(
j
=
0
;
j
<
16
;
j
++
)
{
for
(
j
=
0
;
j
<
16
;
j
++
)
{
printf
(
"rxbuffer %d: %x
\n
"
,
j
,
phy_vars_eNB
[
CC_id
]
->
common_vars
.
rxdata
[
0
][
i
][
j
]);
printf
(
"rxbuffer %d: %x
\n
"
,
j
,
phy_vars_eNB
[
CC_id
]
->
common_vars
.
rxdata
[
0
][
i
][
j
]);
phy_vars_eNB
[
CC_id
]
->
common_vars
.
rxdata
[
0
][
i
][
j
]
=
16
-
j
;
phy_vars_eNB
[
CC_id
]
->
common_vars
.
rxdata
[
0
][
i
][
j
]
=
16
-
j
;
...
@@ -1545,15 +1547,15 @@ int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_c
...
@@ -1545,15 +1547,15 @@ int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_c
}
}
}
}
else
{
// not memory-mapped DMA
else
{
// not memory-mapped DMA
//nothing to do, everything already allocated in lte_init
/*
rxdata = (int32_t**)malloc16(frame_parms->nb_antennas_rx*sizeof(int32_t*));
rxdata = (int32_t**)malloc16(frame_parms->nb_antennas_rx*sizeof(int32_t*));
txdata = (int32_t**)malloc16(frame_parms->nb_antennas_tx*sizeof(int32_t*));
txdata = (int32_t**)malloc16(frame_parms->nb_antennas_tx*sizeof(int32_t*));
for (i=0; i<frame_parms->nb_antennas_rx; i++) {
for (i=0; i<frame_parms->nb_antennas_rx; i++) {
free(phy_vars_eNB[CC_id]->common_vars.rxdata[0][i]);
free(phy_vars_eNB[CC_id]->common_vars.rxdata[0][i]);
rxdata[i] = (int32_t*)(32 + malloc16(32+frame_parms->samples_per_tti*10*sizeof(int32_t))); // FIXME broken memory allocation
rxdata[i] = (int32_t*)(32 + malloc16(32+frame_parms->samples_per_tti*10*sizeof(int32_t))); // FIXME broken memory allocation
phy_vars_eNB
[
CC_id
]
->
common_vars
.
rxdata
[
0
][
i
]
=
rxdata
[
i
]
-
N_TA_offset
;
// N_TA offset for TDD FIXME! N_TA_offset > 16 => access of unallocated memory
phy_vars_eNB[CC_id]->common_vars.rxdata[0][i] = rxdata[i]
; //
-N_TA_offset; // N_TA offset for TDD FIXME! N_TA_offset > 16 => access of unallocated memory
memset(rxdata[i], 0, frame_parms->samples_per_tti*10*sizeof(int32_t));
memset(rxdata[i], 0, frame_parms->samples_per_tti*10*sizeof(int32_t));
printf("rxdata[%d] @ %p (%p) (N_TA_OFFSET %d)\n", i, phy_vars_eNB[CC_id]->common_vars.rxdata[0][i],rxdata[i],N_TA_offset);
printf("rxdata[%d] @ %p (%p) (N_TA_OFFSET %d)\n", i, phy_vars_eNB[CC_id]->common_vars.rxdata[0][i],rxdata[i],N_TA_offset);
}
}
...
@@ -1565,6 +1567,7 @@ int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_c
...
@@ -1565,6 +1567,7 @@ int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_c
memset(txdata[i],0, frame_parms->samples_per_tti*10*sizeof(int32_t));
memset(txdata[i],0, frame_parms->samples_per_tti*10*sizeof(int32_t));
printf("txdata[%d] @ %p\n", i, phy_vars_eNB[CC_id]->common_vars.txdata[0][i]);
printf("txdata[%d] @ %p\n", i, phy_vars_eNB[CC_id]->common_vars.txdata[0][i]);
}
}
*/
}
}
}
}
...
...
targets/RT/USER/lte-softmodem.c
View file @
c2c26bd2
...
@@ -1588,7 +1588,18 @@ int main( int argc, char **argv )
...
@@ -1588,7 +1588,18 @@ int main( int argc, char **argv )
UE
[
CC_id
]
->
rx_total_gain_dB
=
(
int
)
rx_gain
[
CC_id
][
0
]
+
rx_gain_off
;
UE
[
CC_id
]
->
rx_total_gain_dB
=
(
int
)
rx_gain
[
CC_id
][
0
]
+
rx_gain_off
;
UE
[
CC_id
]
->
tx_power_max_dBm
=
tx_max_power
[
CC_id
];
UE
[
CC_id
]
->
tx_power_max_dBm
=
tx_max_power
[
CC_id
];
UE
[
CC_id
]
->
N_TA_offset
=
0
;
if
(
frame_parms
[
CC_id
]
->
frame_type
==
FDD
)
{
UE
[
CC_id
]
->
N_TA_offset
=
0
;
}
else
{
if
(
frame_parms
[
CC_id
]
->
N_RB_DL
==
100
)
UE
[
CC_id
]
->
N_TA_offset
=
624
;
else
if
(
frame_parms
[
CC_id
]
->
N_RB_DL
==
50
)
UE
[
CC_id
]
->
N_TA_offset
=
624
/
2
;
else
if
(
frame_parms
[
CC_id
]
->
N_RB_DL
==
25
)
UE
[
CC_id
]
->
N_TA_offset
=
624
/
4
;
}
}
}
...
@@ -1639,8 +1650,17 @@ int main( int argc, char **argv )
...
@@ -1639,8 +1650,17 @@ int main( int argc, char **argv )
PHY_vars_eNB_g
[
0
][
CC_id
]
->
rx_total_gain_dB
=
(
int
)
rx_gain
[
CC_id
][
0
];
PHY_vars_eNB_g
[
0
][
CC_id
]
->
rx_total_gain_dB
=
(
int
)
rx_gain
[
CC_id
][
0
];
PHY_vars_eNB_g
[
0
][
CC_id
]
->
N_TA_offset
=
0
;
if
(
frame_parms
[
CC_id
]
->
frame_type
==
FDD
)
{
PHY_vars_eNB_g
[
0
][
CC_id
]
->
N_TA_offset
=
0
;
}
else
{
if
(
frame_parms
[
CC_id
]
->
N_RB_DL
==
100
)
PHY_vars_eNB_g
[
0
][
CC_id
]
->
N_TA_offset
=
624
;
else
if
(
frame_parms
[
CC_id
]
->
N_RB_DL
==
50
)
PHY_vars_eNB_g
[
0
][
CC_id
]
->
N_TA_offset
=
624
/
2
;
else
if
(
frame_parms
[
CC_id
]
->
N_RB_DL
==
25
)
PHY_vars_eNB_g
[
0
][
CC_id
]
->
N_TA_offset
=
624
/
4
;
}
}
}
...
...
targets/RT/USER/lte-ue.c
View file @
c2c26bd2
...
@@ -98,8 +98,8 @@ extern uint32_t downlink_frequency[MAX_NUM_CCs][4];
...
@@ -98,8 +98,8 @@ extern uint32_t downlink_frequency[MAX_NUM_CCs][4];
extern
int32_t
uplink_frequency_offset
[
MAX_NUM_CCs
][
4
];
extern
int32_t
uplink_frequency_offset
[
MAX_NUM_CCs
][
4
];
extern
int
oai_exit
;
extern
int
oai_exit
;
extern
int32_t
**
rxdata
;
int32_t
**
rxdata
;
extern
int32_t
**
txdata
;
int32_t
**
txdata
;
//extern unsigned int tx_forward_nsamps;
//extern unsigned int tx_forward_nsamps;
//extern int tx_delay;
//extern int tx_delay;
...
@@ -1628,14 +1628,14 @@ int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg)
...
@@ -1628,14 +1628,14 @@ int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg)
}
}
/*
/*
if (frame_parms->frame_type == TDD) {
if (frame_parms->frame_type == TDD) {
if (frame_parms->N_RB_DL == 100)
if (frame_parms->N_RB_DL == 100)
N_TA_offset = 624;
N_TA_offset = 624;
else if (frame_parms->N_RB_DL == 50)
else if (frame_parms->N_RB_DL == 50)
N_TA_offset = 624/2;
N_TA_offset = 624/2;
else if (frame_parms->N_RB_DL == 25)
else if (frame_parms->N_RB_DL == 25)
N_TA_offset = 624/4;
N_TA_offset = 624/4;
}
}
*/
*/
// replace RX signal buffers with mmaped HW versions
// replace RX signal buffers with mmaped HW versions
...
@@ -1645,9 +1645,9 @@ int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg)
...
@@ -1645,9 +1645,9 @@ int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg)
for
(
i
=
0
;
i
<
frame_parms
->
nb_antennas_rx
;
i
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
nb_antennas_rx
;
i
++
)
{
printf
(
"Mapping UE CC_id %d, rx_ant %d, freq %u on card %d, chain %d
\n
"
,
CC_id
,
i
,
downlink_frequency
[
CC_id
][
i
],
rf_map
->
card
,
rf_map
->
chain
+
i
);
printf
(
"Mapping UE CC_id %d, rx_ant %d, freq %u on card %d, chain %d
\n
"
,
CC_id
,
i
,
downlink_frequency
[
CC_id
][
i
],
rf_map
->
card
,
rf_map
->
chain
+
i
);
free
(
phy_vars_ue
[
CC_id
]
->
common_vars
.
rxdata
[
i
]
);
free
(
phy_vars_ue
[
CC_id
]
->
common_vars
.
rxdata
[
i
]
);
rxdata
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
307200
*
sizeof
(
int32_t
)
);
rxdata
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
307200
*
sizeof
(
int32_t
)
);
phy_vars_ue
[
CC_id
]
->
common_vars
.
rxdata
[
i
]
=
rxdata
[
i
];
// what about the "-N_TA_offset" ? // N_TA offset for TDD
phy_vars_ue
[
CC_id
]
->
common_vars
.
rxdata
[
i
]
=
rxdata
[
i
];
// what about the "-N_TA_offset" ? // N_TA offset for TDD
printf
(
"rxdata[%d] : %p
\n
"
,
i
,
rxdata
[
i
]);
printf
(
"rxdata[%d] : %p
\n
"
,
i
,
rxdata
[
i
]);
}
}
for
(
i
=
0
;
i
<
frame_parms
->
nb_antennas_tx
;
i
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
nb_antennas_tx
;
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