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
Michael Black
OpenXG-RAN
Commits
4ad71064
Commit
4ad71064
authored
Apr 11, 2022
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review comments
parent
95a58d64
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
31 additions
and
72 deletions
+31
-72
openair1/PHY/CODING/nr_rate_matching.c
openair1/PHY/CODING/nr_rate_matching.c
+3
-5
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+1
-1
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
+6
-1
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+6
-7
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+11
-55
targets/ARCH/rfsimulator/apply_channelmod.c
targets/ARCH/rfsimulator/apply_channelmod.c
+2
-1
targets/ARCH/rfsimulator/rfsimulator.h
targets/ARCH/rfsimulator/rfsimulator.h
+1
-1
No files found.
openair1/PHY/CODING/nr_rate_matching.c
View file @
4ad71064
...
...
@@ -313,14 +313,12 @@ void nr_deinterleaving_ldpc(uint32_t E, uint8_t Qm, int16_t *e,int16_t *f)
switch
(
Qm
)
{
case
2
:
{
AssertFatal
(
E
%
4
==
0
,
""
);
AssertFatal
(
E
%
2
==
0
,
""
);
int16_t
*
e1
=
e
+
(
E
/
2
);
int16_t
*
end
=
f
+
E
-
3
;
int16_t
*
end
=
f
+
E
-
1
;
while
(
f
<
end
){
*
e
++
=
*
f
++
;
*
e1
++
=
*
f
++
;
*
e
++
=
*
f
++
;
*
e1
++
=
*
f
++
;
}
}
break
;
...
...
@@ -360,7 +358,7 @@ void nr_deinterleaving_ldpc(uint32_t E, uint8_t Qm, int16_t *e,int16_t *f)
break
;
case
8
:
{
AssertFatal
(
E
%
8
==
0
,
"
zob
"
);
AssertFatal
(
E
%
8
==
0
,
""
);
int16_t
*
e1
=
e
+
(
E
/
8
);
int16_t
*
e2
=
e1
+
(
E
/
8
);
int16_t
*
e3
=
e2
+
(
E
/
8
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
4ad71064
...
...
@@ -390,7 +390,7 @@ void nr_processDLSegment(void* arg) {
no_iteration_ldpc
=
nrLDPC_decoder
(
p_decoderParms
,
(
int8_t
*
)
&
pl
[
0
],
llrProcBuf
,
p_
procTime
);
&
procTime
);
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_LDPC, VCD_FUNCTION_OUT);
// Fixme: correct type is unsigned, but nrLDPC_decoder and all called behind use signed int
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
View file @
4ad71064
...
...
@@ -118,9 +118,13 @@ typedef struct {
uint8_t
R
:
2
;
// octet 1 [7:6]
}
__attribute__
((
__packed__
))
NR_MAC_SUBHEADER_FIXED
;
static
inline
void
getMacLen
(
uint8_t
*
pdu
,
uint16_t
*
mac_ce_len
,
uint16_t
*
mac_subheader_len
)
{
static
inline
int
get_mac_len
(
uint8_t
*
pdu
,
int
pdu_len
,
uint16_t
*
mac_ce_len
,
uint16_t
*
mac_subheader_len
)
{
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_SHORT
))
return
false
;
NR_MAC_SUBHEADER_SHORT
*
s
=
(
NR_MAC_SUBHEADER_SHORT
*
)
pdu
;
NR_MAC_SUBHEADER_LONG
*
l
=
(
NR_MAC_SUBHEADER_LONG
*
)
pdu
;
if
(
s
->
F
&&
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_LONG
))
return
false
;
if
(
s
->
F
)
{
*
mac_subheader_len
=
sizeof
(
*
l
);
*
mac_ce_len
=
ntohs
(
l
->
L
);
...
...
@@ -128,6 +132,7 @@ static inline void getMacLen(uint8_t* pdu, uint16_t *mac_ce_len, uint16_t *mac_s
*
mac_subheader_len
=
sizeof
(
*
s
);
*
mac_ce_len
=
s
->
L
;
}
return
true
;
}
// BSR MAC CEs
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
4ad71064
...
...
@@ -3364,13 +3364,14 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
uint8_t
rx_lcid
=
((
NR_MAC_SUBHEADER_FIXED
*
)
pduP
)
->
LCID
;
LOG_D
(
MAC
,
"[UE] LCID %d, PDU length %d
\n
"
,
rx_lcid
,
pdu_len
);
bool
ret
;
switch
(
rx_lcid
){
// MAC CE
case
DL_SCH_LCID_CCCH
:
// MSG4 RRC Setup 38.331
// variable length
getMacLen
(
pduP
,
&
mac_len
,
&
mac_subheader_len
);
AssertFatal
(
pdu_len
>
mac_len
,
"The mac_len (%d) has an invalid size. PDU len = %d!
\n
"
,
ret
=
get_mac_len
(
pduP
,
pdu_len
,
&
mac_len
,
&
mac_subheader_len
);
AssertFatal
(
ret
,
"The mac_len (%d) has an invalid size. PDU len = %d!
\n
"
,
mac_len
,
pdu_len
);
// Check if it is a valid CCCH message, we get all 00's messages very often
...
...
@@ -3404,7 +3405,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
// 38.321 Ch6.1.3.14
// varialbe length
get
MacLen
(
pduP
,
&
mac_len
,
&
mac_subheader_len
);
get
_mac_len
(
pduP
,
pdu_len
,
&
mac_len
,
&
mac_subheader_len
);
break
;
case
DL_SCH_LCID_RECOMMENDED_BITRATE
:
...
...
@@ -3508,10 +3509,8 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
// check if LCID is valid at current time.
default:
{
// check if LCID is valid at current time.
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_SHORT
))
return
;
getMacLen
(
pduP
,
&
mac_len
,
&
mac_subheader_len
);
if
(
!
get_mac_len
(
pduP
,
pdu_len
,
&
mac_len
,
&
mac_subheader_len
))
return
;
LOG_D
(
NR_MAC
,
"[UE %d] %4d.%2d : DLSCH -> DL-DTCH %d (gNB %d, %d bytes)
\n
"
,
module_idP
,
frameP
,
slot
,
rx_lcid
,
gNB_index
,
mac_len
);
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
4ad71064
...
...
@@ -1426,7 +1426,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
/* limit requested number of bytes to what preprocessor specified, or
* such that TBS is full */
const
rlc_buffer_occupancy_t
ndata
=
min
(
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
,
bufEnd
-
buf
-
+
sizeof
(
NR_MAC_SUBHEADER_LONG
));
bufEnd
-
buf
-
sizeof
(
NR_MAC_SUBHEADER_LONG
));
tbs_size_t
len
=
mac_rlc_data_req
(
module_id
,
rnti
,
module_id
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
4ad71064
...
...
@@ -213,6 +213,7 @@ int nr_process_mac_pdu(module_id_t module_idP,
int
pdu_len
)
{
uint8_t
done
=
0
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
module_idP
]
->
UE_info
;
...
...
@@ -279,16 +280,8 @@ int nr_process_mac_pdu(module_id_t module_idP,
to be a partial PDU at the end of this buffer, so here
we gracefully ignore that by returning 0. See:
https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues/534 */
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_SHORT
))
return
0
;
mac_ce_len
|=
(
uint16_t
)((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
L
;
mac_subheader_len
=
2
;
if
(((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
F
){
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_LONG
))
return
0
;
mac_ce_len
=
ntohs
((
NR_MAC_SUBHEADER_LONG
*
)
pduP
)
->
L
);
mac_subheader_len
=
3
;
}
if
(
!
get_mac_len
(
pduP
,
pdu_len
,
&
mac_len
,
&
mac_subheader_len
))
return
0
;
/* Extract long BSR value */
ce_ptr
=
&
pduP
[
mac_subheader_len
];
NR_BSR_LONG
*
bsr_l
=
(
NR_BSR_LONG
*
)
ce_ptr
;
...
...
@@ -362,32 +355,16 @@ int nr_process_mac_pdu(module_id_t module_idP,
case
UL_SCH_LCID_MULTI_ENTRY_PHR_1_OCT
:
//38.321 section 6.1.3.9
// varialbe length
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_SHORT
))
return
0
;
mac_ce_len
|=
(
uint16_t
)((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
L
;
mac_subheader_len
=
2
;
if
(((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
F
){
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_LONG
))
return
0
;
mac_ce_len
=
ntohs
((
NR_MAC_SUBHEADER_LONG
*
)
pduP
)
->
L
);
mac_subheader_len
=
3
;
}
if
(
!
get_mac_len
(
pduP
,
pdu_len
,
&
mac_len
,
&
mac_subheader_len
))
return
0
;
/* Extract MULTI ENTRY PHR elements from single octet bitmap for PHR calculation */
break
;
case
UL_SCH_LCID_MULTI_ENTRY_PHR_4_OCT
:
//38.321 section 6.1.3.9
// varialbe length
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_SHORT
))
return
0
;
mac_ce_len
|=
(
uint16_t
)((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
L
;
mac_subheader_len
=
2
;
if
(((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
F
){
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_LONG
))
return
0
;
mac_ce_len
=
ntohs
((
NR_MAC_SUBHEADER_LONG
*
)
pduP
)
->
L
);
mac_subheader_len
=
3
;
}
if
(
!
get_mac_len
(
pduP
,
pdu_len
,
&
mac_len
,
&
mac_subheader_len
))
return
0
;
/* Extract MULTI ENTRY PHR elements from four octets bitmap for PHR calculation */
break
;
...
...
@@ -398,18 +375,8 @@ int nr_process_mac_pdu(module_id_t module_idP,
case
UL_SCH_LCID_SRB1
:
case
UL_SCH_LCID_SRB2
:
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_SHORT
))
return
0
;
if
(((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
F
){
//mac_sdu_len |= (uint16_t)(((NR_MAC_SUBHEADER_LONG *)pduP)->L2)<<8;
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_LONG
))
return
0
;
mac_subheader_len
=
3
;
mac_sdu_len
=
ntohs
(
NR_MAC_SUBHEADER_LONG
*
)
pduP
)
->
L
);
}
else
{
mac_sdu_len
=
(
uint16_t
)((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
L
;
mac_subheader_len
=
2
;
}
if
(
!
get_mac_len
(
pduP
,
pdu_len
,
&
mac_len
,
&
mac_subheader_len
))
return
0
;
rnti_t
crnti
=
UE_info
->
rnti
[
UE_id
];
int
UE_idx
=
UE_id
;
...
...
@@ -486,19 +453,8 @@ int nr_process_mac_pdu(module_id_t module_idP,
case
UL_SCH_LCID_DTCH
:
// check if LCID is valid at current time.
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_SHORT
))
return
0
;
if
(((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
F
)
{
// mac_sdu_len |= (uint16_t)(((NR_MAC_SUBHEADER_LONG *)pduP)->L2)<<8;
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_LONG
))
return
0
;
mac_subheader_len
=
3
;
mac_sdu_len
=
ntohs
((
NR_MAC_SUBHEADER_LONG
*
)
pduP
)
->
L
);
}
else
{
mac_sdu_len
=
(
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
L
;
mac_subheader_len
=
2
;
}
if
(
!
get_mac_len
(
pduP
,
pdu_len
,
&
mac_len
,
&
mac_subheader_len
))
return
0
;
LOG_D
(
NR_MAC
,
"In %s: [UE %d] %d.%d : ULSCH -> UL-%s %d (gNB %d, %d bytes)
\n
"
,
__func__
,
...
...
targets/ARCH/rfsimulator/apply_channelmod.c
View file @
4ad71064
...
...
@@ -52,7 +52,8 @@
either we regenerate the channel (call again random_channel(desc,0)), or we keep it over subframes
legacy: we regenerate each sub frame in UL, and each frame only in DL
*/
void
rxAddInput
(
c16_t
*
input_sig
,
c16_t
*
after_channel_sig
,
void
rxAddInput
(
const
c16_t
*
input_sig
,
c16_t
*
after_channel_sig
,
int
rxAnt
,
channel_desc_t
*
channelDesc
,
int
nbSamples
,
...
...
targets/ARCH/rfsimulator/rfsimulator.h
View file @
4ad71064
...
...
@@ -25,7 +25,7 @@
#define __RFSIMULATOR_H
double
gaussZiggurat
(
double
mean
,
double
variance
);
void
tableNor
(
unsigned
long
seed
);
void
rxAddInput
(
c16_t
*
input_sig
,
void
rxAddInput
(
c
onst
c
16_t
*
input_sig
,
c16_t
*
after_channel_sig
,
int
rxAnt
,
channel_desc_t
*
channelDesc
,
...
...
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