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
72c38798
Commit
72c38798
authored
Mar 28, 2017
by
Cedric Roux
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/bugfix-229' into develop_integration_w13
parents
26f06f35
adf920b6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
8 deletions
+51
-8
openair1/PHY/LTE_TRANSPORT/rar_tools.c
openair1/PHY/LTE_TRANSPORT/rar_tools.c
+1
-1
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+2
-1
openair2/LAYER2/MAC/proto.h
openair2/LAYER2/MAC/proto.h
+3
-1
openair2/LAYER2/MAC/rar_tools.c
openair2/LAYER2/MAC/rar_tools.c
+44
-4
openair2/PHY_INTERFACE/defs.h
openair2/PHY_INTERFACE/defs.h
+1
-1
No files found.
openair1/PHY/LTE_TRANSPORT/rar_tools.c
View file @
72c38798
...
...
@@ -258,7 +258,7 @@ int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *ue,
if
(
ulsch
->
harq_processes
[
harq_pid
]
->
nb_rb
>
4
)
{
msg
(
"rar_tools.c: unlikely rb count for RAR grant : nb_rb > 3
\n
"
);
return
(
-
1
);
//
return(-1);
}
// ulsch->harq_processes[harq_pid]->Ndi = 1;
...
...
openair1/SCHED/phy_procedures_lte_ue.c
View file @
72c38798
...
...
@@ -3242,7 +3242,8 @@ void process_rar(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, runmode_t mo
ue
->
prach_resources
[
eNB_id
]
->
ra_RNTI
,
dlsch0
->
harq_processes
[
0
]
->
b
,
&
ue
->
pdcch_vars
[
subframe_rx
&
0x1
][
eNB_id
]
->
crnti
,
ue
->
prach_resources
[
eNB_id
]
->
ra_PreambleIndex
);
ue
->
prach_resources
[
eNB_id
]
->
ra_PreambleIndex
,
dlsch0
->
harq_processes
[
0
]
->
b
);
// alter the 'b' buffer so it contains only the selected RAR header and RAR payload
ue
->
pdcch_vars
[(
subframe_rx
+
1
)
&
0x1
][
eNB_id
]
->
crnti
=
ue
->
pdcch_vars
[
subframe_rx
&
0x1
][
eNB_id
]
->
crnti
;
...
...
openair2/LAYER2/MAC/proto.h
View file @
72c38798
...
...
@@ -454,6 +454,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP,u
@param t_crnti Pointer to PHY variable containing the T_CRNTI
@param preamble_index Preamble Index used by PHY to transmit the PRACH. This should match the received RAR to trigger the rest of
random-access procedure
@param selected_rar_buffer the output buffer for storing the selected RAR header and RAR payload
@returns timing advance or 0xffff if preamble doesn't match
*/
uint16_t
...
...
@@ -464,7 +465,8 @@ ue_process_rar(
const
rnti_t
ra_rnti
,
uint8_t
*
const
dlsch_buffer
,
rnti_t
*
const
t_crnti
,
const
uint8_t
preamble_index
const
uint8_t
preamble_index
,
uint8_t
*
selected_rar_buffer
);
...
...
openair2/LAYER2/MAC/rar_tools.c
View file @
72c38798
...
...
@@ -136,15 +136,48 @@ ue_process_rar(
const
rnti_t
ra_rnti
,
uint8_t
*
const
dlsch_buffer
,
rnti_t
*
const
t_crnti
,
const
uint8_t
preamble_index
const
uint8_t
preamble_index
,
uint8_t
*
selected_rar_buffer
// output argument for storing the selected RAR header and RAR payload
)
//------------------------------------------------------------------------------
{
uint16_t
ret
=
0
;
// return value
RA_HEADER_RAPID
*
rarh
=
(
RA_HEADER_RAPID
*
)
dlsch_buffer
;
// RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1);
uint8_t
*
rar
=
(
uint8_t
*
)(
dlsch_buffer
+
1
);
// get the last RAR payload for working with CMW500
uint8_t
n_rarpy
=
0
;
// number of RAR payloads
uint8_t
n_rarh
=
0
;
// number of MAC RAR subheaders
uint8_t
best_rx_rapid
=
-
1
;
// the closest RAPID receive from all RARs
while
(
1
)
{
n_rarh
++
;
if
(
rarh
->
T
==
1
)
{
n_rarpy
++
;
LOG_D
(
MAC
,
"RAPID %d
\n
"
,
rarh
->
RAPID
);
}
if
(
rarh
->
RAPID
==
preamble_index
)
{
LOG_D
(
PHY
,
"Found RAR with the intended RAPID %d
\n
"
,
rarh
->
RAPID
);
rar
=
(
uint8_t
*
)(
dlsch_buffer
+
n_rarh
+
(
n_rarpy
-
1
)
*
6
);
break
;
}
if
(
abs
((
int
)
rarh
->
RAPID
-
(
int
)
preamble_index
)
<
abs
((
int
)
best_rx_rapid
-
(
int
)
preamble_index
))
{
best_rx_rapid
=
rarh
->
RAPID
;
rar
=
(
uint8_t
*
)(
dlsch_buffer
+
n_rarh
+
(
n_rarpy
-
1
)
*
6
);
}
if
(
rarh
->
E
==
0
)
{
LOG_I
(
PHY
,
"No RAR found with the intended RAPID. The closest RAPID in all RARs is %d
\n
"
,
best_rx_rapid
);
break
;
}
else
{
rarh
++
;
}
};
LOG_D
(
MAC
,
"number of RAR subheader %d; number of RAR pyloads %d
\n
"
,
n_rarh
,
n_rarpy
);
if
(
CC_id
>
0
)
{
LOG_W
(
MAC
,
"Should not have received RAR on secondary CCs!
\n
"
);
return
(
0xffff
);
...
...
@@ -172,7 +205,7 @@ ue_process_rar(
if
(
opt_enabled
)
{
LOG_D
(
OPT
,
"[UE %d][RAPROC] CC_id %d RAR Frame %d trace pdu for ra-RNTI %x
\n
"
,
module_idP
,
CC_id
,
frameP
,
ra_rnti
);
trace_pdu
(
1
,
(
uint8_t
*
)
rarh
,
7
,
module_idP
,
2
,
ra_rnti
,
trace_pdu
(
1
,
(
uint8_t
*
)
dlsch_buffer
,
n_rarh
+
n_rarpy
*
6
,
module_idP
,
2
,
ra_rnti
,
UE_mac_inst
[
module_idP
].
rxFrame
,
UE_mac_inst
[
module_idP
].
rxSubframe
,
0
,
0
);
}
...
...
@@ -180,9 +213,16 @@ ue_process_rar(
*
t_crnti
=
(
uint16_t
)
rar
[
5
]
+
(
rar
[
4
]
<<
8
);
//rar->t_crnti;
UE_mac_inst
[
module_idP
].
crnti
=
*
t_crnti
;
//rar->t_crnti;
//return(rar->Timing_Advance_Command);
ret
urn
((((
uint16_t
)(
rar
[
0
]
&
0x7f
))
<<
4
)
+
(
rar
[
1
]
>>
4
));
ret
=
((((
uint16_t
)(
rar
[
0
]
&
0x7f
))
<<
4
)
+
(
rar
[
1
]
>>
4
));
}
else
{
UE_mac_inst
[
module_idP
].
crnti
=
0
;
ret
urn
(
0xffff
);
ret
=
(
0xffff
);
}
// move the selected RAR to the front of the RA_PDSCH buffer
memcpy
(
selected_rar_buffer
+
0
,
(
uint8_t
*
)
rarh
,
1
);
memcpy
(
selected_rar_buffer
+
1
,
(
uint8_t
*
)
rar
,
6
);
return
ret
;
}
openair2/PHY_INTERFACE/defs.h
View file @
72c38798
...
...
@@ -170,7 +170,7 @@ typedef struct {
PRACH_RESOURCES_t
*
(
*
ue_get_rach
)(
module_id_t
Mod_id
,
int
CC_id
,
frame_t
frameP
,
uint8_t
Msg3_flag
,
sub_frame_t
subframe
);
/// Process Random-Access Response
uint16_t
(
*
ue_process_rar
)(
module_id_t
Mod_id
,
int
CC_id
,
frame_t
frameP
,
uint16_t
ra_rnti
,
uint8_t
*
dlsch_buffer
,
uint16_t
*
t_crnti
,
uint8_t
preamble_index
);
uint16_t
(
*
ue_process_rar
)(
module_id_t
Mod_id
,
int
CC_id
,
frame_t
frameP
,
uint16_t
ra_rnti
,
uint8_t
*
dlsch_buffer
,
uint16_t
*
t_crnti
,
uint8_t
preamble_index
,
uint8_t
*
selected_rar_buffer
);
/// Get SR payload (0,1) from UE MAC
uint32_t
(
*
ue_get_SR
)(
module_id_t
Mod_id
,
int
CC_id
,
frame_t
frameP
,
uint8_t
eNB_id
,
rnti_t
rnti
,
sub_frame_t
subframe
);
...
...
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