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
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,
...
@@ -1000,6 +1000,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
#if defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
// note: this makes valgrind freak
__m128i
avg
=
_mm_set1_epi32
(
0
);
__m128i
avg
=
_mm_set1_epi32
(
0
);
for
(
i
=
0
;
i
<
(
3
*
(
n
>>
4
))
+
1
;
i
++
)
{
for
(
i
=
0
;
i
<
(
3
*
(
n
>>
4
))
+
1
;
i
++
)
{
...
@@ -1503,6 +1504,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
...
@@ -1503,6 +1504,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
tmp2
=
_mm_and_si128
(
tmp
,
mask
);
tmp2
=
_mm_and_si128
(
tmp
,
mask
);
tmp2
=
_mm_cmpeq_epi16
(
tmp2
,
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
));
decoded_bytes
[
n_128
*
0
+
i
]
=
(
uint8_t
)
_mm_movemask_epi8
(
_mm_packs_epi16
(
tmp2
,
zeros
));
int
j
;
int
j
;
...
...
openair1/PHY/INIT/lte_param_init.c
View file @
ba020c80
...
@@ -45,6 +45,7 @@ void lte_param_init(unsigned char N_tx,
...
@@ -45,6 +45,7 @@ void lte_param_init(unsigned char N_tx,
lte_frame_parms
->
N_RB_UL
=
N_RB_DL
;
lte_frame_parms
->
N_RB_UL
=
N_RB_DL
;
lte_frame_parms
->
threequarter_fs
=
threequarter_fs
;
lte_frame_parms
->
threequarter_fs
=
threequarter_fs
;
lte_frame_parms
->
Ncp
=
extended_prefix_flag
;
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
->
Nid_cell
=
Nid_cell
;
lte_frame_parms
->
nushift
=
Nid_cell
%
6
;
lte_frame_parms
->
nushift
=
Nid_cell
%
6
;
lte_frame_parms
->
nb_antennas_tx
=
N_tx
;
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)
...
@@ -52,7 +52,7 @@ void generate_grouphop(LTE_DL_FRAME_PARMS *frame_parms)
x2
=
frame_parms
->
Nid_cell
/
30
;
x2
=
frame_parms
->
Nid_cell
/
30
;
#ifdef DEBUG_GROUPHOP
#ifdef DEBUG_GROUPHOP
msg
(
"[PHY] GroupHop:"
);
printf
(
"[PHY] GroupHop:"
);
#endif
#endif
for
(
ns
=
0
;
ns
<
20
;
ns
++
)
{
for
(
ns
=
0
;
ns
<
20
;
ns
++
)
{
...
@@ -68,12 +68,12 @@ void generate_grouphop(LTE_DL_FRAME_PARMS *frame_parms)
...
@@ -68,12 +68,12 @@ void generate_grouphop(LTE_DL_FRAME_PARMS *frame_parms)
}
}
#ifdef DEBUG_GROUPHOP
#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
#endif
}
}
#ifdef DEBUG_GROUPHOP
#ifdef DEBUG_GROUPHOP
msg
(
"
\n
"
);
printf
(
"
\n
"
);
#endif
#endif
}
}
...
@@ -89,7 +89,7 @@ void generate_seqhop(LTE_DL_FRAME_PARMS *frame_parms)
...
@@ -89,7 +89,7 @@ void generate_seqhop(LTE_DL_FRAME_PARMS *frame_parms)
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
#ifdef DEBUG_GROUPHOP
#ifdef DEBUG_GROUPHOP
msg
(
"[PHY] SeqHop:"
);
printf
(
"[PHY] SeqHop:"
);
#endif
#endif
for
(
ns
=
0
;
ns
<
20
;
ns
++
)
{
for
(
ns
=
0
;
ns
<
20
;
ns
++
)
{
...
@@ -100,12 +100,12 @@ void generate_seqhop(LTE_DL_FRAME_PARMS *frame_parms)
...
@@ -100,12 +100,12 @@ void generate_seqhop(LTE_DL_FRAME_PARMS *frame_parms)
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
seqhop
[
ns
]
=
0
;
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
seqhop
[
ns
]
=
0
;
#ifdef DEBUG_GROUPHOP
#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
#endif
}
}
#ifdef DEBUG_GROUPHOP
#ifdef DEBUG_GROUPHOP
msg
(
"
\n
"
);
printf
(
"
\n
"
);
#endif
#endif
}
}
...
@@ -116,7 +116,7 @@ void generate_nPRS(LTE_DL_FRAME_PARMS *frame_parms)
...
@@ -116,7 +116,7 @@ void generate_nPRS(LTE_DL_FRAME_PARMS *frame_parms)
uint8_t
reset
=
1
;
uint8_t
reset
=
1
;
uint32_t
x1
,
x2
,
s
=
0
;
uint32_t
x1
,
x2
,
s
=
0
;
// This is from Section 5.5.1.3
// 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
;
uint16_t
next
=
0
;
uint8_t
ns
=
0
;
uint8_t
ns
=
0
;
...
@@ -124,7 +124,7 @@ void generate_nPRS(LTE_DL_FRAME_PARMS *frame_parms)
...
@@ -124,7 +124,7 @@ void generate_nPRS(LTE_DL_FRAME_PARMS *frame_parms)
x2
=
(
32
*
(
uint32_t
)(
frame_parms
->
Nid_cell
/
30
))
+
fss_pusch
;
x2
=
(
32
*
(
uint32_t
)(
frame_parms
->
Nid_cell
/
30
))
+
fss_pusch
;
#ifdef DEBUG_GROUPHOP
#ifdef DEBUG_GROUPHOP
msg
(
"[PHY] nPRS:"
);
printf
(
"[PHY] nPRS:"
);
#endif
#endif
for
(
n
=
0
;
n
<
(
20
*
Nsymb_UL
);
n
++
)
{
//loop over total number of bytes to generate
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)
...
@@ -137,7 +137,7 @@ void generate_nPRS(LTE_DL_FRAME_PARMS *frame_parms)
if
(
n
==
next
)
{
if
(
n
==
next
)
{
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
nPRS
[
ns
]
=
((
uint8_t
*
)
&
s
)[
next
&
3
];
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
nPRS
[
ns
]
=
((
uint8_t
*
)
&
s
)[
next
&
3
];
#ifdef DEBUG_GROUPHOP
#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
#endif
ns
++
;
ns
++
;
next
+=
Nsymb_UL
;
next
+=
Nsymb_UL
;
...
@@ -145,7 +145,7 @@ void generate_nPRS(LTE_DL_FRAME_PARMS *frame_parms)
...
@@ -145,7 +145,7 @@ void generate_nPRS(LTE_DL_FRAME_PARMS *frame_parms)
}
}
#ifdef DEBUG_GROUPHOP
#ifdef DEBUG_GROUPHOP
msg
(
"
\n
"
);
printf
(
"
\n
"
);
#endif
#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
...
@@ -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
)
{
if
(
abstraction_flag
==
0
)
{
for
(
r
=
0
;
r
<
MAX_NUM_ULSCH_SEGMENTS
/
bw_scaling
;
r
++
)
{
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
);
ulsch
->
harq_processes
[
i
]
->
c
[
r
]
=
(
uint8_t
*
)
malloc16
(((
r
==
0
)
?
8
:
0
)
+
3
+
768
);
if
(
ulsch
->
harq_processes
[
i
]
->
c
[
r
])
if
(
ulsch
->
harq_processes
[
i
]
->
c
[
r
])
memset
(
ulsch
->
harq_processes
[
i
]
->
c
[
r
],
0
,((
r
==
0
)
?
8
:
0
)
+
3
+
768
);
memset
(
ulsch
->
harq_processes
[
i
]
->
c
[
r
],
0
,((
r
==
0
)
?
8
:
0
)
+
3
+
768
);
else
else
...
@@ -338,6 +337,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -338,6 +337,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
// CLEAR LLR's HERE for first packet in process
// CLEAR LLR's HERE for first packet in process
}
}
// printf("after segmentation c[%d] = %p\n",0,ulsch_harq->c[0]);
sumKr
=
0
;
sumKr
=
0
;
...
@@ -449,6 +449,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -449,6 +449,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
// Rmux = Hpp*Q_m/Cmux;
// Rmux = Hpp*Q_m/Cmux;
Rmux_prime
=
Hpp
/
Cmux
;
Rmux_prime
=
Hpp
/
Cmux
;
// Clear "tag" interleaving matrix to allow for CQI/DATA identification
// Clear "tag" interleaving matrix to allow for CQI/DATA identification
memset
(
ytag
,
0
,
Cmux
*
Rmux_prime
);
memset
(
ytag
,
0
,
Cmux
*
Rmux_prime
);
...
@@ -457,6 +458,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -457,6 +458,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
i
=
0
;
i
=
0
;
memset
(
y
,
LTE_NULL
,
Q_m
*
Hpp
);
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
// read in buffer and unscramble llrs for everything but placeholder bits
// llrs stored per symbol correspond to columns of interleaving matrix
// llrs stored per symbol correspond to columns of interleaving matrix
...
@@ -472,6 +474,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -472,6 +474,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
0
);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
0
);
}
}
// printf("after unscrambling c[%d] = %p\n",0,ulsch_harq->c[0]);
if
(
frame_parms
->
Ncp
==
0
)
if
(
frame_parms
->
Ncp
==
0
)
columnset
=
cs_ri_normal
;
columnset
=
cs_ri_normal
;
else
else
...
@@ -495,6 +499,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -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)
// HARQ-ACK Bits (Note these overwrite some bits)
if
(
frame_parms
->
Ncp
==
0
)
if
(
frame_parms
->
Ncp
==
0
)
columnset
=
cs_ack_normal
;
columnset
=
cs_ack_normal
;
...
@@ -664,6 +670,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -664,6 +670,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
j
=
(
j
+
3
)
&
3
;
j
=
(
j
+
3
)
&
3
;
}
}
// printf("after ACKNAK c[%d] = %p\n",0,ulsch_harq->c[0]);
// RI BITS
// RI BITS
...
@@ -708,6 +715,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -708,6 +715,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
j
=
(
j
+
3
)
&
3
;
j
=
(
j
+
3
)
&
3
;
}
}
// printf("after RI2 c[%d] = %p\n",0,ulsch_harq->c[0]);
// CQI and Data bits
// CQI and Data bits
j
=
0
;
j
=
0
;
j2
=
0
;
j2
=
0
;
...
@@ -736,10 +745,10 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -736,10 +745,10 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
j2
+=
Q_m
;
j2
+=
Q_m
;
}
}
switch
(
Q_m
)
{
switch
(
Q_m
)
{
case
2
:
case
2
:
for
(
iprime
=
0
;
iprime
<
G
<<
1
;)
{
for
(
iprime
=
0
;
iprime
<
G
;)
{
while
(
ytag
[
j
]
==
LTE_NULL
)
{
while
(
ytag
[
j
]
==
LTE_NULL
)
{
j
++
;
j
++
;
j2
+=
2
;
j2
+=
2
;
...
@@ -754,7 +763,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -754,7 +763,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
break
;
break
;
case
4
:
case
4
:
for
(
iprime
=
0
;
iprime
<
G
<<
2
;)
{
for
(
iprime
=
0
;
iprime
<
G
;)
{
while
(
ytag
[
j
]
==
LTE_NULL
)
{
while
(
ytag
[
j
]
==
LTE_NULL
)
{
j
++
;
j
++
;
j2
+=
4
;
j2
+=
4
;
...
@@ -770,7 +779,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -770,7 +779,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
break
;
break
;
case
6
:
case
6
:
for
(
iprime
=
0
;
iprime
<
G
*
6
;)
{
for
(
iprime
=
0
;
iprime
<
G
;)
{
while
(
ytag
[
j
]
==
LTE_NULL
)
{
while
(
ytag
[
j
]
==
LTE_NULL
)
{
j
++
;
j
++
;
j2
+=
6
;
j2
+=
6
;
...
@@ -788,8 +797,11 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -788,8 +797,11 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
break
;
break
;
}
}
}
}
// Q_RI>0
else
{
else
{
for
(
i
=
0
;
i
<
(
Q_CQI
/
Q_m
);
i
++
)
{
for
(
i
=
0
;
i
<
(
Q_CQI
/
Q_m
);
i
++
)
{
for
(
q
=
0
;
q
<
Q_m
;
q
++
)
{
for
(
q
=
0
;
q
<
Q_m
;
q
++
)
{
...
@@ -804,16 +816,16 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -804,16 +816,16 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
j2
+=
Q_m
;
j2
+=
Q_m
;
}
}
// printf("after CQI0 c[%d] = %p\n",0,ulsch_harq->c[0]);
switch
(
Q_m
)
{
switch
(
Q_m
)
{
case
2
:
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
++
];
ulsch_harq
->
e
[
iprime
++
]
=
y
[
j2
++
];
ulsch_harq
->
e
[
iprime
++
]
=
y
[
j2
++
];
}
}
break
;
break
;
case
4
:
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
++
];
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,
...
@@ -821,7 +833,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
}
}
break
;
break
;
case
6
:
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
++
];
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,
...
@@ -832,6 +844,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
break
;
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
// Do CQI/RI/HARQ-ACK Decoding first and pass to MAC
// HARQ-ACK
// HARQ-ACK
...
@@ -904,6 +918,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -904,6 +918,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
// CQI
// CQI
// printf("before cqi c[%d] = %p\n",0,ulsch_harq->c[0]);
if
(
Q_CQI
>
0
)
{
if
(
Q_CQI
>
0
)
{
memset
((
void
*
)
&
dummy_w_cc
[
0
],
0
,
3
*
(
ulsch_harq
->
Or1
+
8
+
32
));
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,
...
@@ -971,6 +986,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
for
(
r
=
0
;
r
<
ulsch_harq
->
C
;
r
++
)
{
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
// Get Turbo interleaver parameters
if
(
r
<
ulsch_harq
->
Cminus
)
if
(
r
<
ulsch_harq
->
Cminus
)
Kr
=
ulsch_harq
->
Kminus
;
Kr
=
ulsch_harq
->
Kminus
;
...
@@ -1043,6 +1059,10 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -1043,6 +1059,10 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
for
(
r
=
0
;
r
<
ulsch_harq
->
C
;
r
++
)
{
for
(
r
=
0
;
r
<
ulsch_harq
->
C
;
r
++
)
{
/* printf("c[%d] : %p\n",r,
ulsch_harq->c[r]);
*/
if
(
ulsch_harq
->
C
==
1
)
if
(
ulsch_harq
->
C
==
1
)
crc_type
=
CRC24_A
;
crc_type
=
CRC24_A
;
else
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
...
@@ -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
;
const
int
frame
=
phy_vars_eNB
->
proc
[
sched_subframe
].
frame_rx
;
uint16_t
rnti
=
0
;
uint16_t
rnti
=
0
;
int
ret
=
0
;
int
ret
=
0
;
int
i
;
num_active_cba_groups
=
phy_vars_eNB
->
ulsch_eNB
[
UE_id
]
->
num_active_cba_groups
;
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)
...
@@ -308,7 +308,7 @@ int main(int argc, char **argv)
break
;
break
;
default:
default:
msg
(
"Unsupported channel model!
\n
"
);
printf
(
"Unsupported channel model!
\n
"
);
exit
(
-
1
);
exit
(
-
1
);
break
;
break
;
}
}
...
@@ -332,7 +332,7 @@ int main(int argc, char **argv)
...
@@ -332,7 +332,7 @@ int main(int argc, char **argv)
if
((
transmission_mode
!=
1
)
&&
if
((
transmission_mode
!=
1
)
&&
(
transmission_mode
!=
2
))
{
(
transmission_mode
!=
2
))
{
msg
(
"Unsupported transmission mode %d
\n
"
,
transmission_mode
);
printf
(
"Unsupported transmission mode %d
\n
"
,
transmission_mode
);
exit
(
-
1
);
exit
(
-
1
);
}
}
...
@@ -382,10 +382,10 @@ int main(int argc, char **argv)
...
@@ -382,10 +382,10 @@ int main(int argc, char **argv)
case
'i'
:
case
'i'
:
input_fdUL
=
fopen
(
optarg
,
"r"
);
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
)
{
if
(
input_fdUL
==
(
FILE
*
)
NULL
)
{
msg
(
"Unknown file %s
\n
"
,
optarg
);
printf
(
"Unknown file %s
\n
"
,
optarg
);
exit
(
-
1
);
exit
(
-
1
);
}
}
...
@@ -509,7 +509,7 @@ int main(int argc, char **argv)
...
@@ -509,7 +509,7 @@ int main(int argc, char **argv)
// r_re0 = malloc(2*sizeof(double*));
// r_re0 = malloc(2*sizeof(double*));
// r_im0 = 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
);
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)
...
@@ -760,9 +760,9 @@ int main(int argc, char **argv)
PHY_vars_eNB
->
proc
[
sf
].
subframe_rx
=
sf
;
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
);
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
);
init_ul_hopping
(
&
PHY_vars_eNB
->
lte_frame_parms
);
PHY_vars_eNB
->
proc
[
subframe
].
frame_rx
=
PHY_vars_UE
->
frame_tx
;
PHY_vars_eNB
->
proc
[
subframe
].
frame_rx
=
PHY_vars_UE
->
frame_tx
;
...
@@ -1063,7 +1063,7 @@ int main(int argc, char **argv)
...
@@ -1063,7 +1063,7 @@ int main(int argc, char **argv)
start_meas
(
&
PHY_vars_UE
->
ofdm_mod_stats
);
start_meas
(
&
PHY_vars_UE
->
ofdm_mod_stats
);
for
(
aa
=
0
;
aa
<
1
;
aa
++
)
{
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
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
&
txdata
[
aa
][
PHY_vars_eNB
->
lte_frame_parms
.
samples_per_tti
*
subframe
],
// output
PHY_vars_UE
->
lte_frame_parms
.
ofdm_symbol_size
,
PHY_vars_UE
->
lte_frame_parms
.
ofdm_symbol_size
,
...
@@ -1257,6 +1257,7 @@ int main(int argc, char **argv)
...
@@ -1257,6 +1257,7 @@ int main(int argc, char **argv)
*/
*/
start_meas
(
&
PHY_vars_eNB
->
ulsch_decoding_stats
);
start_meas
(
&
PHY_vars_eNB
->
ulsch_decoding_stats
);
ret
=
ulsch_decoding
(
PHY_vars_eNB
,
ret
=
ulsch_decoding
(
PHY_vars_eNB
,
0
,
// UE_id
0
,
// UE_id
subframe
,
subframe
,
...
@@ -1293,7 +1294,7 @@ int main(int argc, char **argv)
...
@@ -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
])
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
++
;
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
)
{
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],
...
@@ -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_resource
=
oneSixth
;
(
frame_parms
[
CC_id
])
->
phich_config_common
.
phich_duration
=
normal
;
(
frame_parms
[
CC_id
])
->
phich_config_common
.
phich_duration
=
normal
;
(
frame_parms
[
CC_id
])
->
Ncp
=
extended_prefix_flag
;
(
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
])
->
Nid_cell
=
Nid_cell
;
(
frame_parms
[
CC_id
])
->
nushift
=
(
Nid_cell
%
6
);
(
frame_parms
[
CC_id
])
->
nushift
=
(
Nid_cell
%
6
);
(
frame_parms
[
CC_id
])
->
nb_antennas_tx
=
(
transmission_mode
==
1
)
?
1
:
2
;
(
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
...
@@ -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
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
reset_opp_meas
(
void
);
void
print_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