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
ebeab461
Commit
ebeab461
authored
Nov 20, 2015
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added duplex_mode to openair0_lib
added support for TDD for EXMIMO
parent
23bb81d2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
6 deletions
+53
-6
targets/ARCH/COMMON/common_lib.h
targets/ARCH/COMMON/common_lib.h
+7
-0
targets/ARCH/EXMIMO/DEFS/pcie_interface.h
targets/ARCH/EXMIMO/DEFS/pcie_interface.h
+7
-0
targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
+11
-2
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+28
-4
No files found.
targets/ARCH/COMMON/common_lib.h
View file @
ebeab461
...
...
@@ -60,6 +60,11 @@ typedef enum {
max_gain
=
0
,
med_gain
,
byp_gain
}
rx_gain_t
;
typedef
enum
{
duplex_mode_TDD
=
1
,
duplex_mode_FDD
=
0
}
duplex_mode_t
;
/** @addtogroup _PHY_RF_INTERFACE_
* @{
*/
...
...
@@ -76,6 +81,8 @@ typedef struct {
int
Mod_id
;
// device log level
int
log_level
;
//! duplexing mode
duplex_mode_t
duplex_mode
;
//! number of downlink resource blocks
int
num_rb_dl
;
//! number of samples per frame
...
...
targets/ARCH/EXMIMO/DEFS/pcie_interface.h
View file @
ebeab461
...
...
@@ -316,7 +316,9 @@ typedef struct {
//
// In TDD mode, there are two ways to control the RX/TX switch:
// 1. using the LSB from the TX data (TXRXSWITCH_LSB)
// only the LSB from RF chain set in the ACTIVE_RF register controls the switch on all the chains
// 2. using FPGA logic, based on switch_offset[0..3]
// this mode is not tested well and should be used with care
#define DUPLEXMODE_MASK (1<<0)
#define DUPLEXMODE_FDD 0
#define DUPLEXMODE_TDD (1<<0)
...
...
@@ -330,6 +332,11 @@ typedef struct {
#define SWITCHSTATE_1 (1<<3)
#define TEST_ADACLOOP_MASK (1<<4)
#define TEST_ADACLOOP_EN (1<<4)
#define ACTIVE_RF_MASK (15<<5)
#define ACTIVE_RF_1 (1<<5)
#define ACTIVE_RF_2 (2<<5)
#define ACTIVE_RF_3 (4<<5)
#define ACTIVE_RF_4 (8<<5)
typedef
enum
{
BW5
,
...
...
targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
View file @
ebeab461
...
...
@@ -296,6 +296,7 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
int
ant
,
card
;
int
resampling_factor
=
2
;
int
rx_filter
=
RXLPF25
,
tx_filter
=
TXLPF25
;
int
ACTIVE_RF
=
0
;
exmimo_config_t
*
p_exmimo_config
;
exmimo_id_t
*
p_exmimo_id
;
...
...
@@ -315,8 +316,6 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
else
p_exmimo_config
->
framing
.
eNB_flag
=
!
UE_flag
;
p_exmimo_config
->
framing
.
tdd_config
=
DUPLEXMODE_FDD
+
TXRXSWITCH_LSB
;
if
(
openair0_num_detected_cards
==
1
)
p_exmimo_config
->
framing
.
multicard_syncmode
=
SYNCMODE_FREE
;
else
if
(
card
==
0
)
...
...
@@ -355,6 +354,7 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
for
(
ant
=
0
;
ant
<
4
;
ant
++
)
{
if
(
openair0_cfg
[
card
].
rx_freq
[
ant
]
||
openair0_cfg
[
card
].
tx_freq
[
ant
])
{
ACTIVE_RF
+=
(
1
<<
ant
)
<<
5
;
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
=
RF_MODE_BASE
;
p_exmimo_config
->
rf
.
do_autocal
[
ant
]
=
1
;
//openair0_cfg[card].autocal[ant];
printf
(
"card %d, antenna %d, autocal %d
\n
"
,
card
,
ant
,
openair0_cfg
[
card
].
autocal
[
ant
]);
...
...
@@ -408,6 +408,15 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
}
}
if
(
openair0_cfg
[
card
].
duplex_mode
==
duplex_mode_FDD
)
{
p_exmimo_config
->
framing
.
tdd_config
=
DUPLEXMODE_FDD
;
printf
(
"!!!!!setting FDD (tdd_config=%d)
\n
"
,
p_exmimo_config
->
framing
.
tdd_config
);
}
else
{
p_exmimo_config
->
framing
.
tdd_config
=
DUPLEXMODE_TDD
+
TXRXSWITCH_LSB
+
ACTIVE_RF
;
printf
(
"!!!!!setting TDD (tdd_config=%d)
\n
"
,
p_exmimo_config
->
framing
.
tdd_config
);
}
ret
=
ioctl
(
openair0_fd
,
openair_DUMP_CONFIG
,
card
);
if
(
ret
!=
0
)
...
...
targets/RT/USER/lte-softmodem.c
View file @
ebeab461
...
...
@@ -970,6 +970,25 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB)
phy_vars_eNB
->
lte_eNB_common_vars
.
txdata
[
0
][
aa
][
tx_offset
++
]
=
0x00010001
;
}
}
if
((((
phy_vars_eNB
->
lte_frame_parms
.
tdd_config
==
0
)
||
(
phy_vars_eNB
->
lte_frame_parms
.
tdd_config
==
1
)
||
(
phy_vars_eNB
->
lte_frame_parms
.
tdd_config
==
2
)
||
(
phy_vars_eNB
->
lte_frame_parms
.
tdd_config
==
6
))
&&
(
subframe
==
0
))
||
(
subframe
==
5
))
{
// 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);
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
;
if
(
tx_offset
<
0
)
tx_offset
+=
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
phy_vars_eNB
->
lte_frame_parms
.
samples_per_tti
;
if
(
tx_offset
>=
(
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
phy_vars_eNB
->
lte_frame_parms
.
samples_per_tti
))
tx_offset
-=
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
phy_vars_eNB
->
lte_frame_parms
.
samples_per_tti
;
phy_vars_eNB
->
lte_eNB_common_vars
.
txdata
[
0
][
aa
][
tx_offset
]
=
0x00000000
;
}
}
}
}
}
...
...
@@ -2821,7 +2840,7 @@ int main( int argc, char **argv )
}
#else
//already taken care of in lte-softmodem
//already taken care of in lte-softmodem
.c
PHY_vars_eNB_g
[
0
][
CC_id
]
->
N_TA_offset
=
0
;
#endif
...
...
@@ -2901,7 +2920,12 @@ int main( int argc, char **argv )
openair0_cfg
[
card
].
tx_delay
=
8
;
#endif
}
if
(
frame_parms
[
0
]
->
frame_type
==
TDD
)
openair0_cfg
[
card
].
duplex_mode
=
duplex_mode_TDD
;
else
//FDD
openair0_cfg
[
card
].
duplex_mode
=
duplex_mode_FDD
;
#ifdef ETHERNET
//calib needed
...
...
@@ -2935,7 +2959,7 @@ int main( int argc, char **argv )
openair0_cfg
[
card
].
remote_ip
=
&
rrh_eNB_ip
[
0
];
openair0_cfg
[
card
].
remote_port
=
rrh_eNB_port
;
}
openair0_cfg
[
card
].
num_rb_dl
=
frame_parms
[
0
]
->
N_RB_DL
;
openair0_cfg
[
card
].
num_rb_dl
=
frame_parms
[
0
]
->
N_RB_DL
;
#endif
openair0_cfg
[
card
].
sample_rate
=
sample_rate
;
openair0_cfg
[
card
].
tx_bw
=
bw
;
...
...
@@ -3064,7 +3088,7 @@ openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL;
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
rf_map
[
CC_id
].
card
=
0
;
rf_map
[
CC_id
].
chain
=
CC_id
;
rf_map
[
CC_id
].
chain
=
CC_id
+
1
;
}
// connect the TX/RX buffers
...
...
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