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
wangjie
OpenXG-RAN
Commits
0fbe0e79
Commit
0fbe0e79
authored
May 28, 2018
by
Matthieu Kanj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix for scheduling
parent
fc831af9
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
540 additions
and
126 deletions
+540
-126
openair1/PHY/LTE_TRANSPORT/first_sc_NB_IoT.h
openair1/PHY/LTE_TRANSPORT/first_sc_NB_IoT.h
+120
-0
openair1/PHY/LTE_TRANSPORT/nprach_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/nprach_NB_IoT.c
+55
-7
openair1/PHY/defs.h
openair1/PHY/defs.h
+1
-1
openair1/PHY/defs_common.h
openair1/PHY/defs_common.h
+6
-2
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+357
-115
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/defs.h
+1
-1
No files found.
openair1/PHY/LTE_TRANSPORT/first_sc_NB_IoT.h
0 → 100644
View file @
0fbe0e79
This source diff could not be displayed because it is too large. You can
view the blob
instead.
openair1/PHY/LTE_TRANSPORT/nprach_NB_IoT.c
View file @
0fbe0e79
...
...
@@ -33,6 +33,7 @@
#include "PHY/defs_NB_IoT.h"
#include "PHY/TOOLS/defs.h" // to take into account the dft functions
#include "tables_nprach_NB_IoT.h"
#include "first_sc_NB_IoT.h"
//#include "PHY/extern.h"
//#include "prach.h"
//#include "PHY/LTE_TRANSPORT/if4_tools.h"
...
...
@@ -295,7 +296,48 @@ err
return TA_sample_estimated;
} */
} */
uint16_t
subcarrier_estimation
(
int16_t
*
input_buffer
){
uint16_t
estimated_sc
;
int16_t
*
s_n_re
,
*
s_n_im
;
uint16_t
k
,
m
,
n
;
int64_t
max_correl_sc_m
=
0
;
int64_t
max_correl_sc_k
=
0
;
int64_t
max_correl_sc_glob
=
0
;
int
n_start_offset
=
1920
;
// start at t=8 ms
for
(
k
=
0
;
k
<
12
;
k
++
){
s_n_re
=
&
s_n_12_re
[
k
*
336
];
s_n_im
=
&
s_n_12_im
[
k
*
336
];
for
(
m
=
0
;
m
<
20
;
m
++
){
for
(
n
=
0
;
n
<
336
;
n
++
){
max_correl_sc_m
=
max_correl_sc_m
+
(
int16_t
)(((
int32_t
)
input_buffer
[(
m
<<
1
)
+
((
n
+
n_start_offset
)
<<
1
)]
*
(
int32_t
)
s_n_re
[
n
]
)
>>
15
)
+
(
int16_t
)(((
int32_t
)
input_buffer
[(
m
<<
1
)
+
((
n
+
n_start_offset
)
<<
1
)
+
1
]
*
(
int32_t
)
s_n_im
[
n
])
>>
15
);
}
if
(
max_correl_sc_m
>
max_correl_sc_k
){
max_correl_sc_k
=
max_correl_sc_m
;
}
max_correl_sc_m
=
0
;
}
//printf("correl = %li\n",max_correl_sc_k);
if
(
max_correl_sc_k
>
max_correl_sc_glob
){
max_correl_sc_glob
=
max_correl_sc_k
;
estimated_sc
=
k
;
}
max_correl_sc_k
=
0
;
}
return
estimated_sc
;
}
int16_t
*
sub_sampling_NB_IoT
(
int16_t
*
input_buffer
,
uint32_t
length_input
,
uint32_t
*
length_ouput
,
uint16_t
sub_sampling_rate
){
// void function ////// adding flag for switching between output_buffers
...
...
@@ -338,9 +380,14 @@ void filtering_signal(int16_t *input_buffer, int16_t *filtered_buffer, uint32_t
+
input_buffer
[(
n
<<
1
)
+
1
]
*
(
int32_t
)(
sin_x
[
n
]))
>>
15
);
signal_compensed_im
[
n
]
=
(
int16_t
)((
-
input_buffer
[
n
<<
1
]
*
(
int32_t
)(
sin_x
[
n
])
+
input_buffer
[(
n
<<
1
)
+
1
]
*
(
int32_t
)(
cos_x
[
n
]))
>>
15
);
filtered_buffer
[
n
<<
1
]
=
signal_compensed_re
[
n
];
filtered_buffer
[(
n
<<
1
)
+
1
]
=
signal_compensed_im
[
n
];
}
for
(
n
=
0
;
n
<
FRAME_LENGTH_COMPLEX_SAMPLESx
-
10
;
n
++
){
/*
for (n=0;n<FRAME_LENGTH_COMPLEX_SAMPLESx-10;n++){
if (n<20){
for (k=-n;k<20;k++){
filtered_buffer[n<<1] = filtered_buffer[n<<1] + (int16_t)(((int32_t)filter_xx[20+k]*(int32_t)signal_compensed_re[n+k])>>15);
...
...
@@ -352,7 +399,7 @@ void filtering_signal(int16_t *input_buffer, int16_t *filtered_buffer, uint32_t
filtered_buffer[(n<<1)+1] = filtered_buffer[(n<<1)+1] + (int16_t)(((int32_t)filter_xx[20+k]*(int32_t)signal_compensed_im[n+k])>>15);
}
}
}
}
*/
}
...
...
@@ -377,7 +424,7 @@ uint32_t RX_NPRACH_NB_IoT(PHY_VARS_eNB *eNB, int frame){
FRAME_LENGTH_COMPLEX_SAMPLESx
=
10
*
eNB
->
frame_parms
.
samples_per_tti
;
Rx_buffer
=
(
int16_t
*
)
&
eNB
->
common_vars
.
rxdata
[
0
][
0
][
0
];
// get the whole frame
memcpy
(
&
buffer_nprach
[
0
],
&
Rx_buffer
[
0
],
307200
);
memcpy
(
&
buffer_nprach
[
0
],
&
Rx_buffer
[
0
],
307200
);
//filtered_buffer = (int16_t *)calloc(2*FRAME_LENGTH_COMPLEX_SAMPLESx,sizeof(int16_t)); // calcule du taille exacte du tableau 76800
...
...
@@ -394,7 +441,7 @@ uint32_t RX_NPRACH_NB_IoT(PHY_VARS_eNB *eNB, int frame){
if
(
NPRACH_detection_NB_IoT
(
Rx_sub_sampled_buffer_128
,
*
length_ouput
)){
/*estimated_TA_coarse = TA_estimation_NB_IoT(eNB,
Rx_sub_sampled_buffer_128,
sub_sampling_rate,
...
...
@@ -427,8 +474,9 @@ uint32_t RX_NPRACH_NB_IoT(PHY_VARS_eNB *eNB, int frame){
//fprintf(f,"%i \n",Rx_buffer[2*n+1]);
//}*/
printf
(
"
\n
detection !!! est_TA = %i ---- %i
\n
"
,
estimated_TA_coarse
,
estimated_TA
);
printf
(
"
\n
detection !!! at frame %i
\n
"
,
frame
);
eNB
->
preamble_index_NB_IoT
=
subcarrier_estimation
(
Rx_sub_sampled_buffer_128
);
// c'est un uint16_t
printf
(
"estimated subaccier = %i
\n
"
,
eNB
->
preamble_index_NB_IoT
);
return
1
;
//estimated_TA;
}
else
{
...
...
openair1/PHY/defs.h
View file @
0fbe0e79
...
...
@@ -509,7 +509,7 @@ typedef struct PHY_VARS_eNB_s {
/////////////// NB-IoT testing ////////////////////////////
volatile
uint16_t
preamble_index_NB_IoT
;
NB_IoT_eNB_NPBCH_t
npbch
;
NB_IoT_eNB_NDLSCH_t
*
ndlsch
[
NUMBER_OF_UE_MAX
];
NB_IoT_eNB_NDLSCH_t
ndlsch_SIB
;
...
...
openair1/PHY/defs_common.h
View file @
0fbe0e79
...
...
@@ -77,12 +77,16 @@ typedef struct {
uint8_t
dci_to_transmit
;
uint8_t
rar_to_transmit
;
uint8_t
subframe_SP
;
int
next_frame_tx
;
int
next_subframe_tx
;
uint8_t
SP
;
uint8_t
there_is_sib23
;
int
next_frame_tx_DCI
;
int
next_subframe_tx_DCI
;
uint32_t
sheduling_info_rar
;
uint8_t
flag_scrambling
;
uint8_t
remaining_dci
;
uint8_t
remaining_rar
;
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
0fbe0e79
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/defs.h
View file @
0fbe0e79
...
...
@@ -822,7 +822,7 @@ typedef struct {
/// RA RNTI allocated from received PRACH
volatile
uint16_t
RA_rnti
;
/// Received preamble_index
uint8_t
preamble_index
;
volatile
uint8_t
preamble_index
;
/// Received UE Contention Resolution Identifier
uint8_t
cont_res_id
[
6
];
/// Timing offset indicated by PHY
...
...
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