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
ZhouShuya
OpenXG-RAN
Commits
ba020c80
Commit
ba020c80
authored
Apr 21, 2016
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oaisim compilation error, ulsim 20 MHz segfault. ulsim tests.
parent
a0ffa8ca
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
56 additions
and
30 deletions
+56
-30
openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
+2
-0
openair1/PHY/INIT/lte_param_init.c
openair1/PHY/INIT/lte_param_init.c
+1
-0
openair1/PHY/LTE_TRANSPORT/group_hopping.c
openair1/PHY/LTE_TRANSPORT/group_hopping.c
+10
-10
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+30
-10
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+1
-0
openair1/SIMULATION/LTE_PHY/ulsim.c
openair1/SIMULATION/LTE_PHY/ulsim.c
+10
-9
targets/SIMU/USER/init_lte.c
targets/SIMU/USER/init_lte.c
+1
-0
targets/SIMU/USER/oaisim.h
targets/SIMU/USER/oaisim.h
+1
-1
No files found.
openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
View file @
ba020c80
...
...
@@ -1000,6 +1000,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
#if defined(__x86_64__) || defined(__i386__)
// note: this makes valgrind freak
__m128i
avg
=
_mm_set1_epi32
(
0
);
for
(
i
=
0
;
i
<
(
3
*
(
n
>>
4
))
+
1
;
i
++
)
{
...
...
@@ -1503,6 +1504,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
tmp2
=
_mm_and_si128
(
tmp
,
mask
);
tmp2
=
_mm_cmpeq_epi16
(
tmp2
,
mask
);
// printf("decoded_bytes %p\n",decoded_bytes);
decoded_bytes
[
n_128
*
0
+
i
]
=
(
uint8_t
)
_mm_movemask_epi8
(
_mm_packs_epi16
(
tmp2
,
zeros
));
int
j
;
...
...
openair1/PHY/INIT/lte_param_init.c
View file @
ba020c80
...
...
@@ -45,6 +45,7 @@ void lte_param_init(unsigned char N_tx,
lte_frame_parms
->
N_RB_UL
=
N_RB_DL
;
lte_frame_parms
->
threequarter_fs
=
threequarter_fs
;
lte_frame_parms
->
Ncp
=
extended_prefix_flag
;
lte_frame_parms
->
Ncp_UL
=
extended_prefix_flag
;
lte_frame_parms
->
Nid_cell
=
Nid_cell
;
lte_frame_parms
->
nushift
=
Nid_cell
%
6
;
lte_frame_parms
->
nb_antennas_tx
=
N_tx
;
...
...
openair1/PHY/LTE_TRANSPORT/group_hopping.c
View file @
ba020c80
...
...
@@ -52,7 +52,7 @@ void generate_grouphop(LTE_DL_FRAME_PARMS *frame_parms)
x2
=
frame_parms
->
Nid_cell
/
30
;
#ifdef DEBUG_GROUPHOP
msg
(
"[PHY] GroupHop:"
);
printf
(
"[PHY] GroupHop:"
);
#endif
for
(
ns
=
0
;
ns
<
20
;
ns
++
)
{
...
...
@@ -68,12 +68,12 @@ void generate_grouphop(LTE_DL_FRAME_PARMS *frame_parms)
}
#ifdef DEBUG_GROUPHOP
msg
(
"%d."
,
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
grouphop
[
ns
]);
printf
(
"%d."
,
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
grouphop
[
ns
]);
#endif
}
#ifdef DEBUG_GROUPHOP
msg
(
"
\n
"
);
printf
(
"
\n
"
);
#endif
}
...
...
@@ -89,7 +89,7 @@ void generate_seqhop(LTE_DL_FRAME_PARMS *frame_parms)
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
#ifdef DEBUG_GROUPHOP
msg
(
"[PHY] SeqHop:"
);
printf
(
"[PHY] SeqHop:"
);
#endif
for
(
ns
=
0
;
ns
<
20
;
ns
++
)
{
...
...
@@ -100,12 +100,12 @@ void generate_seqhop(LTE_DL_FRAME_PARMS *frame_parms)
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
seqhop
[
ns
]
=
0
;
#ifdef DEBUG_GROUPHOP
msg
(
"%d."
,
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
seqhop
[
ns
]);
printf
(
"%d."
,
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
seqhop
[
ns
]);
#endif
}
#ifdef DEBUG_GROUPHOP
msg
(
"
\n
"
);
printf
(
"
\n
"
);
#endif
}
...
...
@@ -116,7 +116,7 @@ void generate_nPRS(LTE_DL_FRAME_PARMS *frame_parms)
uint8_t
reset
=
1
;
uint32_t
x1
,
x2
,
s
=
0
;
// This is from Section 5.5.1.3
uint8_t
Nsymb_UL
=
(
frame_parms
->
Ncp_UL
==
0
)
?
7
:
6
;
uint8_t
Nsymb_UL
=
(
frame_parms
->
Ncp_UL
==
NORMAL
)
?
7
:
6
;
uint16_t
next
=
0
;
uint8_t
ns
=
0
;
...
...
@@ -124,7 +124,7 @@ void generate_nPRS(LTE_DL_FRAME_PARMS *frame_parms)
x2
=
(
32
*
(
uint32_t
)(
frame_parms
->
Nid_cell
/
30
))
+
fss_pusch
;
#ifdef DEBUG_GROUPHOP
msg
(
"[PHY] nPRS:"
);
printf
(
"[PHY] nPRS:"
);
#endif
for
(
n
=
0
;
n
<
(
20
*
Nsymb_UL
);
n
++
)
{
//loop over total number of bytes to generate
...
...
@@ -137,7 +137,7 @@ void generate_nPRS(LTE_DL_FRAME_PARMS *frame_parms)
if
(
n
==
next
)
{
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
nPRS
[
ns
]
=
((
uint8_t
*
)
&
s
)[
next
&
3
];
#ifdef DEBUG_GROUPHOP
msg
(
"%d."
,
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
nPRS
[
ns
]);
printf
(
"%d."
,
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
nPRS
[
ns
]);
#endif
ns
++
;
next
+=
Nsymb_UL
;
...
...
@@ -145,7 +145,7 @@ void generate_nPRS(LTE_DL_FRAME_PARMS *frame_parms)
}
#ifdef DEBUG_GROUPHOP
msg
(
"
\n
"
);
printf
(
"
\n
"
);
#endif
}
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
View file @
ba020c80
...
...
@@ -142,7 +142,6 @@ LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t max_turbo_iterations,uint8_t N_RB_UL, uin
if
(
abstraction_flag
==
0
)
{
for
(
r
=
0
;
r
<
MAX_NUM_ULSCH_SEGMENTS
/
bw_scaling
;
r
++
)
{
ulsch
->
harq_processes
[
i
]
->
c
[
r
]
=
(
uint8_t
*
)
malloc16
(((
r
==
0
)
?
8
:
0
)
+
3
+
768
);
if
(
ulsch
->
harq_processes
[
i
]
->
c
[
r
])
memset
(
ulsch
->
harq_processes
[
i
]
->
c
[
r
],
0
,((
r
==
0
)
?
8
:
0
)
+
3
+
768
);
else
...
...
@@ -338,6 +337,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
// CLEAR LLR's HERE for first packet in process
}
// printf("after segmentation c[%d] = %p\n",0,ulsch_harq->c[0]);
sumKr
=
0
;
...
...
@@ -449,6 +449,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
// Rmux = Hpp*Q_m/Cmux;
Rmux_prime
=
Hpp
/
Cmux
;
// Clear "tag" interleaving matrix to allow for CQI/DATA identification
memset
(
ytag
,
0
,
Cmux
*
Rmux_prime
);
...
...
@@ -457,6 +458,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
i
=
0
;
memset
(
y
,
LTE_NULL
,
Q_m
*
Hpp
);
// printf("before unscrambling c[%d] = %p\n",0,ulsch_harq->c[0]);
// read in buffer and unscramble llrs for everything but placeholder bits
// llrs stored per symbol correspond to columns of interleaving matrix
...
...
@@ -472,6 +474,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
0
);
}
// printf("after unscrambling c[%d] = %p\n",0,ulsch_harq->c[0]);
if
(
frame_parms
->
Ncp
==
0
)
columnset
=
cs_ri_normal
;
else
...
...
@@ -495,6 +499,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
}
// printf("after RI c[%d] = %p\n",0,ulsch_harq->c[0]);
// HARQ-ACK Bits (Note these overwrite some bits)
if
(
frame_parms
->
Ncp
==
0
)
columnset
=
cs_ack_normal
;
...
...
@@ -664,6 +670,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
j
=
(
j
+
3
)
&
3
;
}
// printf("after ACKNAK c[%d] = %p\n",0,ulsch_harq->c[0]);
// RI BITS
...
...
@@ -708,6 +715,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
j
=
(
j
+
3
)
&
3
;
}
// printf("after RI2 c[%d] = %p\n",0,ulsch_harq->c[0]);
// CQI and Data bits
j
=
0
;
j2
=
0
;
...
...
@@ -736,10 +745,10 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
j2
+=
Q_m
;
}
switch
(
Q_m
)
{
case
2
:
for
(
iprime
=
0
;
iprime
<
G
<<
1
;)
{
for
(
iprime
=
0
;
iprime
<
G
;)
{
while
(
ytag
[
j
]
==
LTE_NULL
)
{
j
++
;
j2
+=
2
;
...
...
@@ -754,7 +763,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
break
;
case
4
:
for
(
iprime
=
0
;
iprime
<
G
<<
2
;)
{
for
(
iprime
=
0
;
iprime
<
G
;)
{
while
(
ytag
[
j
]
==
LTE_NULL
)
{
j
++
;
j2
+=
4
;
...
...
@@ -770,7 +779,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
break
;
case
6
:
for
(
iprime
=
0
;
iprime
<
G
*
6
;)
{
for
(
iprime
=
0
;
iprime
<
G
;)
{
while
(
ytag
[
j
]
==
LTE_NULL
)
{
j
++
;
j2
+=
6
;
...
...
@@ -788,8 +797,11 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
break
;
}
}
}
// Q_RI>0
else
{
for
(
i
=
0
;
i
<
(
Q_CQI
/
Q_m
);
i
++
)
{
for
(
q
=
0
;
q
<
Q_m
;
q
++
)
{
...
...
@@ -804,16 +816,16 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
j2
+=
Q_m
;
}
// printf("after CQI0 c[%d] = %p\n",0,ulsch_harq->c[0]);
switch
(
Q_m
)
{
case
2
:
for
(
iprime
=
0
;
iprime
<
G
<<
1
;)
{
for
(
iprime
=
0
;
iprime
<
G
;)
{
ulsch_harq
->
e
[
iprime
++
]
=
y
[
j2
++
];
ulsch_harq
->
e
[
iprime
++
]
=
y
[
j2
++
];
}
break
;
case
4
:
for
(
iprime
=
0
;
iprime
<
G
<<
2
;)
{
for
(
iprime
=
0
;
iprime
<
G
;)
{
ulsch_harq
->
e
[
iprime
++
]
=
y
[
j2
++
];
ulsch_harq
->
e
[
iprime
++
]
=
y
[
j2
++
];
ulsch_harq
->
e
[
iprime
++
]
=
y
[
j2
++
];
...
...
@@ -821,7 +833,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
}
break
;
case
6
:
for
(
iprime
=
0
;
iprime
<
G
*
6
;)
{
for
(
iprime
=
0
;
iprime
<
G
;)
{
ulsch_harq
->
e
[
iprime
++
]
=
y
[
j2
++
];
ulsch_harq
->
e
[
iprime
++
]
=
y
[
j2
++
];
ulsch_harq
->
e
[
iprime
++
]
=
y
[
j2
++
];
...
...
@@ -832,6 +844,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
break
;
}
}
// printf("after ACKNAK2 c[%d] = %p (iprime %d, G %d)\n",0,ulsch_harq->c[0],iprime,G);
// Do CQI/RI/HARQ-ACK Decoding first and pass to MAC
// HARQ-ACK
...
...
@@ -904,6 +918,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
// CQI
// printf("before cqi c[%d] = %p\n",0,ulsch_harq->c[0]);
if
(
Q_CQI
>
0
)
{
memset
((
void
*
)
&
dummy_w_cc
[
0
],
0
,
3
*
(
ulsch_harq
->
Or1
+
8
+
32
));
...
...
@@ -971,6 +986,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
for
(
r
=
0
;
r
<
ulsch_harq
->
C
;
r
++
)
{
// printf("before subblock deinterleaving c[%d] = %p\n",r,ulsch_harq->c[r]);
// Get Turbo interleaver parameters
if
(
r
<
ulsch_harq
->
Cminus
)
Kr
=
ulsch_harq
->
Kminus
;
...
...
@@ -1043,6 +1059,10 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
for
(
r
=
0
;
r
<
ulsch_harq
->
C
;
r
++
)
{
/* printf("c[%d] : %p\n",r,
ulsch_harq->c[r]);
*/
if
(
ulsch_harq
->
C
==
1
)
crc_type
=
CRC24_A
;
else
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
ba020c80
...
...
@@ -2547,6 +2547,7 @@ void cba_procedures(const unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_eN
const
int
frame
=
phy_vars_eNB
->
proc
[
sched_subframe
].
frame_rx
;
uint16_t
rnti
=
0
;
int
ret
=
0
;
int
i
;
num_active_cba_groups
=
phy_vars_eNB
->
ulsch_eNB
[
UE_id
]
->
num_active_cba_groups
;
...
...
openair1/SIMULATION/LTE_PHY/ulsim.c
View file @
ba020c80
...
...
@@ -308,7 +308,7 @@ int main(int argc, char **argv)
break
;
default:
msg
(
"Unsupported channel model!
\n
"
);
printf
(
"Unsupported channel model!
\n
"
);
exit
(
-
1
);
break
;
}
...
...
@@ -332,7 +332,7 @@ int main(int argc, char **argv)
if
((
transmission_mode
!=
1
)
&&
(
transmission_mode
!=
2
))
{
msg
(
"Unsupported transmission mode %d
\n
"
,
transmission_mode
);
printf
(
"Unsupported transmission mode %d
\n
"
,
transmission_mode
);
exit
(
-
1
);
}
...
...
@@ -382,10 +382,10 @@ int main(int argc, char **argv)
case
'i'
:
input_fdUL
=
fopen
(
optarg
,
"r"
);
msg
(
"Reading in %s (%p)
\n
"
,
optarg
,
input_fdUL
);
printf
(
"Reading in %s (%p)
\n
"
,
optarg
,
input_fdUL
);
if
(
input_fdUL
==
(
FILE
*
)
NULL
)
{
msg
(
"Unknown file %s
\n
"
,
optarg
);
printf
(
"Unknown file %s
\n
"
,
optarg
);
exit
(
-
1
);
}
...
...
@@ -509,7 +509,7 @@ int main(int argc, char **argv)
// r_re0 = malloc(2*sizeof(double*));
// r_im0 = malloc(2*sizeof(double*));
nsymb
=
(
PHY_vars_eNB
->
lte_frame_parms
.
Ncp
==
0
)
?
14
:
12
;
nsymb
=
(
PHY_vars_eNB
->
lte_frame_parms
.
Ncp
==
NORMAL
)
?
14
:
12
;
sprintf
(
bler_fname
,
"ULbler_mcs%d_nrb%d_ChannelModel%d_nsim%d.csv"
,
mcs
,
nb_rb
,
chMod
,
n_frames
);
...
...
@@ -760,9 +760,9 @@ int main(int argc, char **argv)
PHY_vars_eNB
->
proc
[
sf
].
subframe_rx
=
sf
;
}
msg
(
"Init UL hopping UE
\n
"
);
printf
(
"Init UL hopping UE
\n
"
);
init_ul_hopping
(
&
PHY_vars_UE
->
lte_frame_parms
);
msg
(
"Init UL hopping eNB
\n
"
);
printf
(
"Init UL hopping eNB
\n
"
);
init_ul_hopping
(
&
PHY_vars_eNB
->
lte_frame_parms
);
PHY_vars_eNB
->
proc
[
subframe
].
frame_rx
=
PHY_vars_UE
->
frame_tx
;
...
...
@@ -1063,7 +1063,7 @@ int main(int argc, char **argv)
start_meas
(
&
PHY_vars_UE
->
ofdm_mod_stats
);
for
(
aa
=
0
;
aa
<
1
;
aa
++
)
{
if
(
frame_parms
->
Ncp
==
1
)
if
(
frame_parms
->
Ncp
==
EXTENDED
)
PHY_ofdm_mod
(
&
PHY_vars_UE
->
lte_ue_common_vars
.
txdataF
[
aa
][
subframe
*
nsymb
*
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX
],
// input
&
txdata
[
aa
][
PHY_vars_eNB
->
lte_frame_parms
.
samples_per_tti
*
subframe
],
// output
PHY_vars_UE
->
lte_frame_parms
.
ofdm_symbol_size
,
...
...
@@ -1257,6 +1257,7 @@ int main(int argc, char **argv)
*/
start_meas
(
&
PHY_vars_eNB
->
ulsch_decoding_stats
);
ret
=
ulsch_decoding
(
PHY_vars_eNB
,
0
,
// UE_id
subframe
,
...
...
@@ -1293,7 +1294,7 @@ int main(int argc, char **argv)
if
(
PHY_vars_eNB
->
ulsch_eNB
[
0
]
->
harq_processes
[
harq_pid
]
->
o_ACK
[
0
]
!=
PHY_vars_UE
->
ulsch_ue
[
0
]
->
o_ACK
[
0
])
ack_errors
++
;
//
msg
("ulsch_coding: O[%d] %d\n",i,o_flip[i]);
//
printf
("ulsch_coding: O[%d] %d\n",i,o_flip[i]);
if
(
ret
<=
PHY_vars_eNB
->
ulsch_eNB
[
0
]
->
max_turbo_iterations
)
{
...
...
targets/SIMU/USER/init_lte.c
View file @
ba020c80
...
...
@@ -247,6 +247,7 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
(
frame_parms
[
CC_id
])
->
phich_config_common
.
phich_resource
=
oneSixth
;
(
frame_parms
[
CC_id
])
->
phich_config_common
.
phich_duration
=
normal
;
(
frame_parms
[
CC_id
])
->
Ncp
=
extended_prefix_flag
;
(
frame_parms
[
CC_id
])
->
Ncp_UL
=
extended_prefix_flag
;
(
frame_parms
[
CC_id
])
->
Nid_cell
=
Nid_cell
;
(
frame_parms
[
CC_id
])
->
nushift
=
(
Nid_cell
%
6
);
(
frame_parms
[
CC_id
])
->
nb_antennas_tx
=
(
transmission_mode
==
1
)
?
1
:
2
;
...
...
targets/SIMU/USER/oaisim.h
View file @
ba020c80
...
...
@@ -73,7 +73,7 @@ int ulsch_abstraction(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nb_rb, ui
void
calc_path_loss
(
node_desc_t
*
node_tx
,
node_desc_t
*
node_rx
,
channel_desc_t
*
ch_desc
,
Environment_System_Config
env_desc
,
double
**
SF
);
void
do_OFDM_mod
(
mod_sym
_t
**
txdataF
,
int32_t
**
txdata
,
frame_t
frame
,
uint16_t
next_slot
,
LTE_DL_FRAME_PARMS
*
frame_parms
);
void
do_OFDM_mod
(
int32
_t
**
txdataF
,
int32_t
**
txdata
,
frame_t
frame
,
uint16_t
next_slot
,
LTE_DL_FRAME_PARMS
*
frame_parms
);
void
reset_opp_meas
(
void
);
void
print_opp_meas
(
void
);
...
...
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