Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
openairinterface5G
Commits
ad2da99d
Commit
ad2da99d
authored
Jan 18, 2018
by
William Johnson
Browse files
testing of Discovery transmission/reception
parent
ccdc09c8
Changes
9
Hide whitespace changes
Inline
Side-by-side
openair1/PHY/LTE_TRANSPORT/defs.h
View file @
ad2da99d
...
...
@@ -252,7 +252,7 @@ typedef struct {
// decode phich
uint8_t
decode_phich
;
}
LTE_UL_UE_HARQ_t
;
}
LTE_UL_UE_HARQ_t
;
#ifdef Rel14
typedef
enum
{
...
...
@@ -265,7 +265,7 @@ typedef struct {
/// TX buffers for UE-spec transmission (antenna ports 5 or 7..14, prior to precoding)
int32_t
*
txdataF
[
8
];
/// beamforming weights for UE-spec transmission (antenna ports 5 or 7..14), for each codeword, maximum 4 layers?
int32_t
**
ue_spec_bf_weights
[
4
];
int32_t
**
ue_spec_bf_weights
[
4
];
/// dl channel estimates (estimated from ul channel estimates)
int32_t
**
calib_dl_ch_estimates
;
/// Allocated RNTI (0 means DLSCH_t is not currently used)
...
...
@@ -413,7 +413,7 @@ typedef struct {
/// is done after a new scheduling
uint16_t
previous_first_rb
;
/// Current Number of RBs
uint16_t
nb_rb
;
uint16_t
nb_rb
;
/// Current Modulation order
uint8_t
Qm
;
/// Transport block size
...
...
@@ -531,7 +531,7 @@ typedef enum {
HARQ_SR
,
HARQ_CQI
,
SR_CQI
,
HARQ_SR_CQI
HARQ_SR_CQI
}
UCI_type_t
;
#ifdef Rel14
...
...
@@ -556,7 +556,7 @@ typedef struct {
uint8_t
srs_active
;
/// PUCCH format to use
PUCCH_FMT_t
pucch_fmt
;
/// number of PUCCH antenna ports
/// number of PUCCH antenna ports
uint8_t
num_antenna_ports
;
/// number of PUCCH resources
uint8_t
num_pucch_resources
;
...
...
@@ -878,7 +878,7 @@ typedef struct {
typedef
struct
{
// SL Configuration
/// Number of SL resource blocks (1-100)
/// Number of SL resource blocks (1-100)
uint32_t
N_SL_RB
;
/// prb-start (0-99)
uint32_t
prb_Start
;
...
...
@@ -911,7 +911,7 @@ typedef struct {
// SLSCH Parameters
/// Number of Subbands (36.213 14.1.1.2)
uint32_t
Nsb
;
uint32_t
Nsb
;
/// N_RB_HO (36.213 14.1.1.2)
uint32_t
N_RB_HO
;
/// n_ss_PSSCH (36.211 9.2.4)
...
...
@@ -930,17 +930,16 @@ typedef struct {
uint32_t
n_prime_PRB
;
/// m_nprime_PRB_PSSCH (36.213 14.1.3)
uint32_t
m_nprime_PRB_PSCCH
;
/// payload length
/// payload length
int
payload_length
;
/// pointer to payload
uint8_t
*
payload
;
}
SLSCH_t
;
typedef
struct
{
/// payload length
/// payload length
int
payload_length
;
/// pointer to payload
uint8_t
*
payload
;
uint8_t
payload
[
100
];
}
SLDCH_t
;
#define TTI_SYNC 0
...
...
@@ -954,13 +953,13 @@ typedef struct UE_tport_header_s {
}
UE_tport_header_t
;
typedef
struct
UE_tport_s
{
UE_tport_header_t
header
;
UE_tport_header_t
header
;
union
{
SLSS_t
slss
;
SLDCH_t
sldch
;
SLSCH_t
slsch
;
};
uint8_t
payload
[
1500
];
uint8_t
payload
[
1500
];
}
UE_tport_t
;
#endif
...
...
openair1/PHY/LTE_TRANSPORT/sldch.c
View file @
ad2da99d
...
...
@@ -42,14 +42,13 @@ void generate_sldch(PHY_VARS_UE *ue,SLDCH_t *sldch,int frame_tx,int subframe_tx)
pdu
.
header
.
packet_type
=
SLDCH
;
pdu
.
header
.
absSF
=
(
frame_tx
*
10
)
+
subframe_tx
;
memcpy
((
void
*
)
&
pdu
.
sldch
,(
void
*
)
sldch
,
sizeof
(
SLDCH_t
)
-
sizeof
(
uint8_t
*
));
AssertFatal
(
sldch
->
payload_length
<=
1500
-
sldch_header_len
-
sizeof
(
SLDCH_t
)
+
sizeof
(
uint8_t
*
),
"SLDCH payload length > %d
\n
"
,
1500
-
sldch_header_len
-
sizeof
(
SLDCH_t
)
+
sizeof
(
uint8_t
*
));
memcpy
((
void
*
)
&
pdu
.
payload
[
0
]
,
(
void
*
)
sldch
->
payload
,
s
ldch
->
payload_length
);
memcpy
((
void
*
)
&
pdu
.
sldch
,
(
void
*
)
sldch
,
s
izeof
(
SLDCH_t
)
);
LOG_I
(
PHY
,
"SLDCH configuration %d bytes, TBS payload %d bytes => %d bytes
\n
"
,
sizeof
(
SLDCH_t
)
-
sizeof
(
uint8_t
*
),
...
...
@@ -58,7 +57,7 @@ void generate_sldch(PHY_VARS_UE *ue,SLDCH_t *sldch,int frame_tx,int subframe_tx)
multicast_link_write_sock
(
0
,
&
pdu
,
sldch_header_len
+
sizeof
(
SLDCH_t
)
-
sizeof
(
uint8_t
*
)
+
sldch
->
payload_length
);
sldch_header_len
+
sizeof
(
SLDCH_t
));
}
...
...
openair2/LAYER2/MAC/defs.h
View file @
ad2da99d
...
...
@@ -134,7 +134,7 @@
/*!\brief size of buffer status report table */
#define BSR_TABLE_SIZE 64
/*!\brief The power headroom reporting range is from -23 ...+40 dB and beyond, with step 1 */
#define PHR_MAPPING_OFFSET 23 // if ( x>= -23 ) val = floor (x + 23)
#define PHR_MAPPING_OFFSET 23 // if ( x>= -23 ) val = floor (x + 23)
/*!\brief maximum number of resource block groups */
#define N_RBG_MAX 25 // for 20MHz channel BW
/*!\brief minimum value for channel quality indicator */
...
...
@@ -142,9 +142,9 @@
/*!\brief maximum value for channel quality indicator */
#define MAX_CQI_VALUE 15
/*!\briefmaximum number of supported bandwidth (1.4, 5, 10, 20 MHz) */
#define MAX_SUPPORTED_BW 4
#define MAX_SUPPORTED_BW 4
/*!\brief CQI values range from 1 to 15 (4 bits) */
#define CQI_VALUE_RANGE 16
#define CQI_VALUE_RANGE 16
/*!\brief value for indicating BSR Timer is not running */
#define MAC_UE_BSR_TIMER_NOT_RUNNING (0xFFFF)
...
...
@@ -159,16 +159,16 @@
#define MIN_MAC_HDR_RLC_SIZE (1 + MIN_RLC_PDU_SIZE)
/*!\brief maximum number of slices / groups */
#define MAX_NUM_SLICES 4
#define MAX_NUM_SLICES 4
/*
* eNB part
*/
/*
* eNB part
*/
/*
* UE/ENB common part
*/
/*
* UE/ENB common part
*/
/*!\brief MAC header of Random Access Response for Random access preamble identifier (RAPID) */
typedef
struct
{
uint8_t
RAPID
:
6
;
...
...
@@ -241,7 +241,7 @@ typedef struct {
/*!\brief MAC subheader long with 24bit DST field */
typedef
struct
{
uint8_t
R0
:
4
;
uint8_t
R0
:
4
;
uint8_t
V
:
4
;
//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
uint8_t
SRC07
;
//Prose UE source ID. Size 24 bits.
uint8_t
SRC815
;
//Prose UE source ID. Size 24 bits.
...
...
@@ -252,13 +252,13 @@ typedef struct {
uint8_t
LCID
:
5
;
uint8_t
E
:
1
;
uint8_t
R1
:
2
;
uint8_t
L
:
7
;
// Length field indicating the size of the corresponding SDU in bytes.
uint8_t
L
:
7
;
// Length field indicating the size of the corresponding SDU in bytes.
uint8_t
F
:
1
;
}
__attribute__
((
__packed__
))
SLSCH_SUBHEADER_24_Bit_DST_SHORT
;
/*!\brief MAC subheader long with 24bit DST field */
typedef
struct
{
uint8_t
R0
:
4
;
uint8_t
R0
:
4
;
uint8_t
V
:
4
;
//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
uint8_t
SRC07
;
//Prose UE source ID. Size 24 bits.
uint8_t
SRC815
;
//Prose UE source ID. Size 24 bits.
...
...
@@ -269,14 +269,14 @@ typedef struct {
uint8_t
LCID
:
5
;
uint8_t
E
:
1
;
uint8_t
R1
:
2
;
uint8_t
L_MSB
:
7
;
// Length field indicating the size of the corresponding SDU in bytes.
uint8_t
L_MSB
:
7
;
// Length field indicating the size of the corresponding SDU in bytes.
uint8_t
F
:
1
;
uint8_t
L_LSB
:
8
;
}
__attribute__
((
__packed__
))
SLSCH_SUBHEADER_24_Bit_DST_LONG
;
/*!\brief MAC subheader long with 24bit DST field */
typedef
struct
{
uint8_t
R0
:
4
;
uint8_t
R0
:
4
;
uint8_t
V
:
4
;
//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
uint8_t
SRC07
;
//Prose UE source ID. Size 24 bits.
uint8_t
SRC815
;
//Prose UE source ID. Size 24 bits.
...
...
@@ -285,13 +285,13 @@ typedef struct {
uint8_t
LCID
:
5
;
uint8_t
E
:
1
;
uint8_t
R1
:
2
;
uint8_t
L
:
7
;
// Length field indicating the size of the corresponding SDU in bytes.
uint8_t
L
:
7
;
// Length field indicating the size of the corresponding SDU in bytes.
uint8_t
F
:
1
;
}
__attribute__
((
__packed__
))
SLSCH_SUBHEADER_16_Bit_DST_SHORT
;
/*!\brief MAC subheader long with 24bit DST field */
typedef
struct
{
uint8_t
R0
:
4
;
uint8_t
R0
:
4
;
uint8_t
V
:
4
;
//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
uint8_t
SRC07
;
//Prose UE source ID. Size 24 bits.
uint8_t
SRC815
;
//Prose UE source ID. Size 24 bits.
...
...
@@ -301,7 +301,7 @@ typedef struct {
uint8_t
LCID
:
5
;
uint8_t
E
:
1
;
uint8_t
R1
:
2
;
uint8_t
L_MSB
:
7
;
// Length field indicating the size of the corresponding SDU in bytes.
uint8_t
L_MSB
:
7
;
// Length field indicating the size of the corresponding SDU in bytes.
uint8_t
F
:
1
;
uint8_t
L_LSB
:
8
;
}
__attribute__
((
__packed__
))
SLSCH_SUBHEADER_16_Bit_DST_LONG
;
...
...
@@ -401,18 +401,18 @@ typedef struct {
uint8_t
stop_sf_LSB
:
8
;
}
__attribute__
((
__packed__
))
MSI_ELEMENT
;
#endif
/*! \brief Values of CCCH LCID for DLSCH */
/*! \brief Values of CCCH LCID for DLSCH */
#define CCCH_LCHANID 0
/*!\brief Values of BCCH logical channel (fake)*/
#define BCCH 3 // SI
#define BCCH 3 // SI
/*!\brief Values of PCCH logical channel (fake)*/
#define PCCH 4 // Paging
#define PCCH 4 // Paging
/*!\brief Values of PCCH logical channel (fake) */
#define MIBCH 5 // MIB
#define MIBCH 5 // MIB
/*!\brief Values of BCCH SIB1_BR logical channel (fake) */
#define BCCH_SIB1_BR 6 // SIB1_BR
#define BCCH_SIB1_BR 6 // SIB1_BR
/*!\brief Values of BCCH SIB_BR logical channel (fake) */
#define BCCH_SI_BR 7 // SI-BR
#define BCCH_SI_BR 7 // SI-BR
/*!\brief Value of CCCH / SRB0 logical channel */
#define CCCH 0 // srb0
/*!\brief DCCH / SRB1 logical channel */
...
...
@@ -422,9 +422,9 @@ typedef struct {
/*!\brief DTCH DRB1 logical channel */
#define DTCH 3 // LCID
/*!\brief MCCH logical channel */
#define MCCH 4
#define MCCH 4
/*!\brief MTCH logical channel */
#define MTCH 1
#define MTCH 1
// DLSCH LCHAN ID
/*!\brief LCID of UE contention resolution identity for DLSCH*/
#define UE_CONT_RES 28
...
...
@@ -545,20 +545,20 @@ typedef struct {
}
eNB_DLSCH_INFO
;
/*! \brief eNB overall statistics */
typedef
struct
{
/// num BCCH PDU per CC
/// num BCCH PDU per CC
uint32_t
total_num_bcch_pdu
;
/// BCCH buffer size
/// BCCH buffer size
uint32_t
bcch_buffer
;
/// total BCCH buffer size
/// total BCCH buffer size
uint32_t
total_bcch_buffer
;
/// BCCH MCS
uint32_t
bcch_mcs
;
/// num CCCH PDU per CC
/// num CCCH PDU per CC
uint32_t
total_num_ccch_pdu
;
/// BCCH buffer size
/// BCCH buffer size
uint32_t
ccch_buffer
;
/// total BCCH buffer size
/// total BCCH buffer size
uint32_t
total_ccch_buffer
;
/// BCCH MCS
uint32_t
ccch_mcs
;
...
...
@@ -585,22 +585,22 @@ typedef struct {
uint32_t
total_dlsch_bytes_tx
;
//
uint32_t
total_dlsch_pdus_tx
;
// here for RX
//
uint32_t
ulsch_bitrate
;
//
uint32_t
ulsch_bytes_rx
;
//
uint64_t
ulsch_pdus_rx
;
uint64_t
ulsch_pdus_rx
;
uint32_t
total_ulsch_bitrate
;
//
uint32_t
total_ulsch_bytes_rx
;
//
uint32_t
total_ulsch_pdus_rx
;
/// MAC agent-related stats
/// total number of scheduling decisions
int
sched_decisions
;
...
...
@@ -704,9 +704,9 @@ typedef struct {
uint32_t
rbs_used_retx_rx
;
/// total rb used for a new uplink transmission
uint32_t
total_rbs_used_rx
;
/// normalized rx power
/// normalized rx power
int32_t
normalized_rx_power
;
/// target rx power
/// target rx power
int32_t
target_rx_power
;
/// num rx pdu
...
...
@@ -717,7 +717,7 @@ typedef struct {
// uint32_t tti_goodput[NB_RB_MAX];
/// errors
uint32_t
num_errors_rx
;
uint64_t
overhead_bytes_rx
;
/// headers+ CE + padding bytes for a MAC PDU
uint64_t
total_overhead_bytes_rx
;
...
...
@@ -832,12 +832,12 @@ typedef struct {
uint32_t
dl_buffer_head_sdu_creation_time
[
MAX_NUM_LCID
];
/// maximum creation time of the downlink buffer head across all LCID
uint32_t
dl_buffer_head_sdu_creation_time_max
;
/// a flag indicating that the downlink head SDU is segmented
/// a flag indicating that the downlink head SDU is segmented
uint8_t
dl_buffer_head_sdu_is_segmented
[
MAX_NUM_LCID
];
/// size of remaining size to send for the downlink head SDU
uint32_t
dl_buffer_head_sdu_remaining_size_to_send
[
MAX_NUM_LCID
];
/// total uplink buffer size
/// total uplink buffer size
uint32_t
ul_total_buffer
;
/// uplink buffer creation time for each LCID
uint32_t
ul_buffer_creation_time
[
MAX_NUM_LCGID
];
...
...
@@ -898,7 +898,7 @@ typedef struct {
uint16_t
priority
[
MAX_NUM_LCID
];
// resource scheduling information
/// Current DL harq round per harq_pid on each CC
uint8_t
round
[
MAX_NUM_CCs
][
10
];
/// Current Active TBs per harq_pid on each CC
...
...
@@ -914,7 +914,7 @@ typedef struct {
int32_t
context_active_timer
;
int32_t
cqi_req_timer
;
int32_t
ul_inactivity_timer
;
int32_t
ul_failure_timer
;
int32_t
ul_failure_timer
;
int32_t
ul_scheduled
;
int32_t
ra_pdcch_order_sent
;
int32_t
ul_out_of_sync
;
...
...
@@ -1031,31 +1031,31 @@ typedef struct {
/*! \brief subband bitmap confguration (for ALU icic algo purpose), in test phase */
typedef
struct
{
uint8_t
sbmap
[
13
];
uint8_t
sbmap
[
13
];
uint8_t
periodicity
;
uint8_t
first_subframe
;
uint8_t
sb_size
;
uint8_t
nb_active_sb
;
}
SBMAP_CONF
;
/*! \brief UE list used by eNB to order UEs/CC for scheduling*/
/*! \brief UE list used by eNB to order UEs/CC for scheduling*/
typedef
struct
{
/// Dedicated information for UEs
struct
PhysicalConfigDedicated
*
physicalConfigDedicated
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
/// DLSCH pdu
/// DLSCH pdu
DLSCH_PDU
DLSCH_pdu
[
MAX_NUM_CCs
][
2
][
NUMBER_OF_UE_MAX
];
/// DCI template and MAC connection parameters for UEs
UE_TEMPLATE
UE_template
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
/// DCI template and MAC connection for RA processes
int
pCC_id
[
NUMBER_OF_UE_MAX
];
/// sorted downlink component carrier for the scheduler
/// sorted downlink component carrier for the scheduler
int
ordered_CCids
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
/// number of downlink active component carrier
/// number of downlink active component carrier
int
numactiveCCs
[
NUMBER_OF_UE_MAX
];
/// sorted uplink component carrier for the scheduler
/// sorted uplink component carrier for the scheduler
int
ordered_ULCCids
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
/// number of uplink active component carrier
/// number of uplink active component carrier
int
numactiveULCCs
[
NUMBER_OF_UE_MAX
];
/// number of downlink active component carrier
/// number of downlink active component carrier
uint8_t
dl_CC_bitmap
[
NUMBER_OF_UE_MAX
];
/// eNB to UE statistics
eNB_UE_STATS
eNB_UE_stats
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
...
...
@@ -1070,7 +1070,7 @@ typedef struct {
boolean_t
active
[
NUMBER_OF_UE_MAX
];
}
UE_list_t
;
/*! \brief eNB common channels */
/*! \brief eNB common channels */
typedef
struct
{
int
physCellId
;
int
p_eNB
;
...
...
@@ -1080,7 +1080,7 @@ typedef struct {
BCCH_BCH_Message_t
*
mib
;
RadioResourceConfigCommonSIB_t
*
radioResourceConfigCommon
;
#ifdef Rel14
RadioResourceConfigCommonSIB_t
*
radioResourceConfigCommon_BR
;
RadioResourceConfigCommonSIB_t
*
radioResourceConfigCommon_BR
;
#endif
TDD_Config_t
*
tdd_Config
;
SchedulingInfoList_t
*
schedulingInfoList
;
...
...
@@ -1137,7 +1137,7 @@ typedef struct {
BCCH_PDU
BCCH_BR_pdu
[
20
];
#endif
}
COMMON_channels_t
;
/*! \brief top level eNB MAC structure */
/*! \brief top level eNB MAC structure */
typedef
struct
eNB_MAC_INST_s
{
/// Ethernet parameters for northbound midhaul interface
eth_params_t
eth_params_n
;
...
...
@@ -1170,7 +1170,7 @@ typedef struct eNB_MAC_INST_s {
nfapi_ul_config_request_t
UL_req
[
MAX_NUM_CCs
];
/// NFAPI "Temporary" UL Config Request Structure, holds future UL_config requests
nfapi_ul_config_request_t
UL_req_tmp
[
MAX_NUM_CCs
][
10
];
/// Preallocated HI_DCI0 pdu list
/// Preallocated HI_DCI0 pdu list
nfapi_hi_dci0_request_pdu_t
hi_dci0_pdu_list
[
MAX_NUM_CCs
][
MAX_NUM_HI_DCI0_PDU
];
/// NFAPI HI/DCI0 Config Request Structure
nfapi_hi_dci0_request_t
HI_DCI0_req
[
MAX_NUM_CCs
];
...
...
@@ -1191,29 +1191,29 @@ typedef struct eNB_MAC_INST_s {
/// eNB stats
eNB_STATS
eNB_stats
[
MAX_NUM_CCs
];
// MAC function execution peformance profiler
/// processing time of eNB scheduler
/// processing time of eNB scheduler
time_stats_t
eNB_scheduler
;
/// processing time of eNB scheduler for SI
/// processing time of eNB scheduler for SI
time_stats_t
schedule_si
;
/// processing time of eNB scheduler for Random access
time_stats_t
schedule_ra
;
/// processing time of eNB ULSCH scheduler
/// processing time of eNB ULSCH scheduler
time_stats_t
schedule_ulsch
;
/// processing time of eNB DCI generation
time_stats_t
fill_DLSCH_dci
;
/// processing time of eNB MAC preprocessor
time_stats_t
schedule_dlsch_preprocessor
;
/// processing time of eNB DLSCH scheduler
/// processing time of eNB DLSCH scheduler
time_stats_t
schedule_dlsch
;
// include rlc_data_req + MAC header + preprocessor
/// processing time of eNB MCH scheduler
/// processing time of eNB MCH scheduler
time_stats_t
schedule_mch
;
/// processing time of eNB ULSCH reception
time_stats_t
rx_ulsch_sdu
;
// include rlc_data_ind
}
eNB_MAC_INST
;
/*
* UE part
*/
/*
* UE part
*/
typedef
enum
{
TYPE0
,
...
...
@@ -1378,7 +1378,6 @@ typedef struct {
int
sltx_active
;
SLSCH_t
slsch
;
SLDCH_t
sldch
;
ULDCH_PDU
sldch_pdu
;
ULSCH_PDU
slsch_pdu
;
int
slsch_lcid
;
#endif
...
...
@@ -1447,24 +1446,24 @@ typedef struct {
uint8_t
msi_status
;
// could be an array if there are >1 MCH in one MBSFN area
#endif
//#ifdef CBA
/// CBA RNTI for each group
/// CBA RNTI for each group
uint16_t
cba_rnti
[
NUM_MAX_CBA_GROUP
];
/// last SFN for CBA channel access
/// last SFN for CBA channel access
uint8_t
cba_last_access
[
NUM_MAX_CBA_GROUP
];
//#endif
/// total UE scheduler processing time
/// total UE scheduler processing time
time_stats_t
ue_scheduler
;
// total
/// UE ULSCH tx processing time inlcuding RLC interface (rlc_data_req) and mac header generation
time_stats_t
tx_ulsch_sdu
;
/// UE ULSCH tx processing time inlcuding RLC interface (rlc_data_req) and mac header generation
time_stats_t
tx_ulsch_sdu
;
/// UE DLSCH rx processing time inlcuding RLC interface (mac_rrc_data_ind or mac_rlc_status_ind+mac_rlc_data_ind) and mac header parser
time_stats_t
rx_dlsch_sdu
;
/// UE query for MCH subframe processing time
time_stats_t
rx_dlsch_sdu
;
/// UE query for MCH subframe processing time
time_stats_t
ue_query_mch
;
/// UE MCH rx processing time
/// UE MCH rx processing time
time_stats_t
rx_mch_sdu
;
/// UE BCCH rx processing time including RLC interface (mac_rrc_data_ind)
time_stats_t
rx_si
;
/// UE PCCH rx processing time including RLC interface (mac_rrc_data_ind)
/// UE BCCH rx processing time including RLC interface (mac_rrc_data_ind)
time_stats_t
rx_si
;
/// UE PCCH rx processing time including RLC interface (mac_rrc_data_ind)
time_stats_t
rx_p
;
/// Panos: Mutex for nfapi UL_INFO
pthread_mutex_t
UL_INFO_mutex
;
...
...
@@ -1498,6 +1497,3 @@ typedef struct {
#include
"proto.h"
/*@}*/
#endif
/*__LAYER2_MAC_DEFS_H__ */
openair2/LAYER2/MAC/ue_procedures.c
View file @
ad2da99d
...
...
@@ -117,7 +117,7 @@ void ue_init_mac(module_id_t module_idP)
UE_mac_inst
[
module_idP
].
scheduling_info
.
periodicBSR_SF
=
MAC_UE_BSR_TIMER_NOT_RUNNING
;
UE_mac_inst
[
module_idP
].
scheduling_info
.
retxBSR_SF
=
MAC_UE_BSR_TIMER_NOT_RUNNING
;
UE_mac_inst
[
module_idP
].
BSR_reporting_active
=
BSR_TRIGGER_NONE
;
UE_mac_inst
[
module_idP
].
scheduling_info
.
periodicPHR_SF
=
get_sf_perioidicPHR_Timer
(
UE_mac_inst
[
module_idP
].
scheduling_info
.
periodicPHR_Timer
);
UE_mac_inst
[
module_idP
].
scheduling_info
.
prohibitPHR_SF
=
get_sf_prohibitPHR_Timer
(
UE_mac_inst
[
module_idP
].
scheduling_info
.
prohibitPHR_Timer
);
UE_mac_inst
[
module_idP
].
scheduling_info
.
PathlossChange_db
=
get_db_dl_PathlossChange
(
UE_mac_inst
[
module_idP
].
scheduling_info
.
PathlossChange
);
...
...
@@ -463,7 +463,7 @@ ue_send_sdu(
#ifdef DEBUG_HEADER_PARSING
LOG_D
(
MAC
,
"[UE] SDU %d : LCID %d, length %d
\n
"
,
i
,
rx_lcids
[
i
],
rx_lengths
[
i
]);
#endif
if
(
rx_lcids
[
i
]
==
CCCH
)
{
LOG_D
(
MAC
,
"[UE %d] rnti %x Frame %d : DLSCH -> DL-CCCH, RRC message (eNB %d, %d bytes)
\n
"
,
...
...
@@ -506,9 +506,9 @@ ue_send_sdu(
rx_lengths
[
i
],
1
,
NULL
);
}
else
if
((
rx_lcids
[
i
]
<
NB_RB_MAX
)
&&
(
rx_lcids
[
i
]
>
DCCH1
))
{
LOG_D
(
MAC
,
"[UE %d] Frame %d : DLSCH -> DL-DTCH%d (eNB %d, %d bytes)
\n
"
,
module_idP
,
frameP
,
rx_lcids
[
i
],
eNB_index
,
rx_lengths
[
i
]);
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
...
...
@@ -534,7 +534,7 @@ ue_send_sdu(
payload_ptr
+=
rx_lengths
[
i
];
}
}
// end if (payload_ptr != NULL)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU
,
VCD_FUNCTION_OUT
);
#if UE_TIMING_TRACE
stop_meas
(
&
UE_mac_inst
[
module_idP
].
rx_dlsch_sdu
);
...
...
@@ -1416,7 +1416,7 @@ void ue_get_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subf
int
highest_priority
=
16
;
int
num_lcg_id_with_data
=
0
;
rlc_buffer_occupancy_t
lcid_buffer_occupancy_old
=
0
,
lcid_buffer_occupancy_new
=
0
;
LOG_D
(
MAC
,
"[UE %d] MAC PROCESS UL TRANSPORT BLOCK at frame%d subframe %d TBS=%d
\n
"
,
module_idP
,
frameP
,
subframe
,
buflen
);
...
...
@@ -1919,7 +1919,7 @@ for (lcid=DCCH; (lcid < MAX_NUM_LCID) && (is_all_lcid_processed == FALSE) ; lcid
#if UE_TIMING_TRACE
stop_meas
(
&
UE_mac_inst
[
module_idP
].
tx_ulsch_sdu
);
#endif
if
(
opt_enabled
)
{
trace_pdu
(
0
,
ulsch_buffer
,
buflen
,
module_idP
,
3
,
UE_mac_inst
[
module_idP
].
crnti
,
UE_mac_inst
[
module_idP
].
txFrame
,
UE_mac_inst
[
module_idP
].
txSubframe
,
0
,
0
);
...
...
@@ -2118,9 +2118,9 @@ ue_scheduler(
/*
if (lcid == DCCH) {
LOG_D(MAC,"[UE %d][SR] Frame %d subframe %d Pending data for SRB1=%d for LCGID %d \n",
module_idP, txFrameP,txSubframeP,UE_mac_inst[module_idP].scheduling_info.BSR[UE_mac_inst[module_idP].scheduling_info.LCGID[lcid]],
if (lcid == DCCH) {
LOG_D(MAC,"[UE %d][SR] Frame %d subframe %d Pending data for SRB1=%d for LCGID %d \n",
module_idP, txFrameP,txSubframeP,UE_mac_inst[module_idP].scheduling_info.BSR[UE_mac_inst[module_idP].scheduling_info.LCGID[lcid]],
// UE_mac_inst[module_idP].scheduling_info.LCGID[lcid]);
}
*/
...
...
@@ -2748,24 +2748,27 @@ SLSS_t *ue_get_slss(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t su
}
SLDCH_t
*
ue_get_sldch
(
module_id_t
Mod_id
,
int
CC_id
,
frame_t
frame_tx
,
sub_frame_t
subframe_tx
)
{
/* int sdu_length;
UE_MAC_INST
*
ue
=
&
UE_mac_inst
[
Mod_id
];
SLDCH_t
*
sldch
=
&
UE_mac_inst
[
Mod_id
].
sldch
;
LOG_I(MAC, "[ue_get_sldch]");
int sdu
_length = mac_rrc_data_req(Mod_id,
sldch
->
payload
_length
=
mac_rrc_data_req
(
Mod_id
,
CC_id
,
frame_tx
,
SL_DISCOVERY
,
1
,
(char*)(
ue->
sldch
_pdu.
payload), //&UE_mac_inst[Mod_id].SL_Discovery[0].Tx_buffer.Payload[0],
(
char
*
)(
sldch
->
payload
),
//&UE_mac_inst[Mod_id].SL_Discovery[0].Tx_buffer.Payload[0],
0
,
0
,
//eNB_indexP
0
);
if (sdu_length >0 ) return (&ue->sldch);
if
(
sldch
->
payload_length
>
0
)
{
LOG_I
(
MAC
,
"Got %d bytes from RRC for SLDCH @ %p
\n
"
,
sldch
->
payload_length
,
sldch
);
return
(
sldch
);
}
else
*/
return
((
SLDCH_t
*
)
NULL
);
}
...
...
@@ -2807,7 +2810,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
ue
->
slsch_lcid
=
3
;
}
}
// we're not in the SCCH period
else
if
(((
absSF
&
3
)
==
0
)
&&