Commit 0ac69fb1 authored by Remi Hardy's avatar Remi Hardy

integration_2021_wk48

branch : integration_2021_wk48_d

MR !1308 : Nr add ue improvements-

MR !1310 : parallelization of LDPC decoding on UE side
-fixes the issue of parallelization of LDPC decoding on UE side

MR !1331 : T tracer: trace MAC DL retransmission PDUs in the gnb
-trace MAC DL retransmission PDUs in the gnb
-adapt macpdu2wireshark to deal with them

MR !1306 : fix for harq value in fapi indication according to scf
-We were using harq value in the wrong way. According to SCF it is 0 for pass and 1 for fail


CI fixes : 
proper way to address B200 serial number for eNB/gNB
missing library when running uhd_find_devices in container
parents a9c03e32 d5c37938
...@@ -263,7 +263,7 @@ L1s = ( ...@@ -263,7 +263,7 @@ L1s = (
{ {
num_cc = 1; num_cc = 1;
tr_n_preference = "local_mac"; tr_n_preference = "local_mac";
pusch_proc_threads = 2; pusch_proc_threads = 4;
prach_dtx_threshold = 120; prach_dtx_threshold = 120;
# pucch0_dtx_threshold = 150; # pucch0_dtx_threshold = 150;
} }
......
...@@ -250,6 +250,7 @@ RUs = ( ...@@ -250,6 +250,7 @@ RUs = (
max_pdschReferenceSignalPower = -27; max_pdschReferenceSignalPower = -27;
max_rxgain = 111; max_rxgain = 111;
eNB_instances = [0]; eNB_instances = [0];
# sdr_addrs = "serial=30C51D4";
# clock_src = "external"; # clock_src = "external";
} }
); );
......
...@@ -100,7 +100,7 @@ class SSHConnection(): ...@@ -100,7 +100,7 @@ class SSHConnection():
time.sleep(1) time.sleep(1)
count += 1 count += 1
if connect_status: if connect_status:
pass self.command('unset HISTFILE', '\$', 5, silent=True)
else: else:
sys.exit('SSH Connection Failed') sys.exit('SSH Connection Failed')
self.ipaddress = ipaddress self.ipaddress = ipaddress
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<testCase id="040000"> <testCase id="040000">
<class>Initialize_eNB</class> <class>Initialize_eNB</class>
<desc>Initialize gNB</desc> <desc>Initialize gNB</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q --usrp-args "serial=30C51D4"</Initialize_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q --RUs.[0].sdr_addrs "serial=30C51D4"</Initialize_eNB_args>
<eNB_instance>1</eNB_instance> <eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId> <eNB_serverId>1</eNB_serverId>
<air_interface>nr</air_interface> <air_interface>nr</air_interface>
......
...@@ -26,7 +26,7 @@ services: ...@@ -26,7 +26,7 @@ services:
FLEXRAN_INTERFACE_NAME: eth0 FLEXRAN_INTERFACE_NAME: eth0
FLEXRAN_IPV4_ADDRESS: 192.168.18.210 FLEXRAN_IPV4_ADDRESS: 192.168.18.210
THREAD_PARALLEL_CONFIG: PARALLEL_RU_L1_TRX_SPLIT THREAD_PARALLEL_CONFIG: PARALLEL_RU_L1_TRX_SPLIT
USE_ADDITIONAL_OPTIONS: '-E -q --usrp-args "serial=30C51D4"' USE_ADDITIONAL_OPTIONS: -E -q --RUs.[0].sdr_addrs serial=30C51D4
volumes: volumes:
- /dev:/dev - /dev:/dev
networks: networks:
......
...@@ -155,6 +155,10 @@ ID = GNB_MAC_DL_RAR_PDU_WITH_DATA ...@@ -155,6 +155,10 @@ ID = GNB_MAC_DL_RAR_PDU_WITH_DATA
DESC = NR MAC downlink PDU for RAR DESC = NR MAC downlink PDU for RAR
GROUP = ALL:MAC:GNB:WIRESHARK GROUP = ALL:MAC:GNB:WIRESHARK
FORMAT = int,gNB_ID : int,CC_id : int,rnti : int,frame : int,slot : int,harq_pid : buffer,data FORMAT = int,gNB_ID : int,CC_id : int,rnti : int,frame : int,slot : int,harq_pid : buffer,data
ID = GNB_MAC_RETRANSMISSION_DL_PDU_WITH_DATA
DESC = NR MAC downlink retransmitted PDU for an UE
GROUP = ALL:MAC:GNB:WIRESHARK
FORMAT = int,gNB_ID : int,CC_id : int,rnti : int,frame : int,slot : int,harq_pid : int,round : buffer,data
#RLC logs #RLC logs
ID = ENB_RLC_DL ID = ENB_RLC_DL
......
...@@ -59,12 +59,20 @@ typedef struct { ...@@ -59,12 +59,20 @@ typedef struct {
int nr_ul_rnti; int nr_ul_rnti;
int nr_ul_frame; int nr_ul_frame;
int nr_ul_slot; int nr_ul_slot;
int nr_ul_harq_pid;
int nr_ul_data; int nr_ul_data;
/* NR dl */ /* NR dl */
int nr_dl_rnti; int nr_dl_rnti;
int nr_dl_frame; int nr_dl_frame;
int nr_dl_slot; int nr_dl_slot;
int nr_dl_harq_pid;
int nr_dl_data; int nr_dl_data;
/* NR dl retx */
int nr_dl_retx_rnti;
int nr_dl_retx_frame;
int nr_dl_retx_slot;
int nr_dl_retx_harq_pid;
int nr_dl_retx_data;
/* NR mib */ /* NR mib */
int nr_mib_frame; int nr_mib_frame;
int nr_mib_slot; int nr_mib_slot;
...@@ -254,6 +262,7 @@ void sr(void *_d, event e) ...@@ -254,6 +262,7 @@ void sr(void *_d, event e)
#define MAC_NR_PAYLOAD_TAG 0x01 #define MAC_NR_PAYLOAD_TAG 0x01
#define MAC_NR_RNTI_TAG 0x02 #define MAC_NR_RNTI_TAG 0x02
#define MAC_NR_UEID_TAG 0x03 #define MAC_NR_UEID_TAG 0x03
#define MAC_NR_HARQID 0x06
#define MAC_NR_FRAME_SLOT_TAG 0x07 #define MAC_NR_FRAME_SLOT_TAG 0x07
#define NR_FDD_RADIO 1 #define NR_FDD_RADIO 1
...@@ -267,7 +276,8 @@ void sr(void *_d, event e) ...@@ -267,7 +276,8 @@ void sr(void *_d, event e)
#define NR_C_RNTI 3 #define NR_C_RNTI 3
void trace_nr(ev_data *d, int direction, int rnti_type, int rnti, void trace_nr(ev_data *d, int direction, int rnti_type, int rnti,
int frame, int slot, void *buf, int bufsize, int preamble) int frame, int slot, int harq_pid, void *buf, int bufsize,
int preamble)
{ {
ssize_t ret; ssize_t ret;
int i; int i;
...@@ -307,6 +317,8 @@ void trace_nr(ev_data *d, int direction, int rnti_type, int rnti, ...@@ -307,6 +317,8 @@ void trace_nr(ev_data *d, int direction, int rnti_type, int rnti,
PUTC(&d->buf, frame & 255); PUTC(&d->buf, frame & 255);
PUTC(&d->buf, (slot>>8) & 255); PUTC(&d->buf, (slot>>8) & 255);
PUTC(&d->buf, slot & 255); PUTC(&d->buf, slot & 255);
PUTC(&d->buf, MAC_NR_HARQID);
PUTC(&d->buf, harq_pid);
#endif #endif
PUTC(&d->buf, MAC_NR_PAYLOAD_TAG); PUTC(&d->buf, MAC_NR_PAYLOAD_TAG);
...@@ -326,7 +338,8 @@ void nr_ul(void *_d, event e) ...@@ -326,7 +338,8 @@ void nr_ul(void *_d, event e)
trace_nr(d, NR_DIRECTION_UPLINK, NR_C_RNTI, e.e[d->nr_ul_rnti].i, trace_nr(d, NR_DIRECTION_UPLINK, NR_C_RNTI, e.e[d->nr_ul_rnti].i,
e.e[d->nr_ul_frame].i, e.e[d->nr_ul_slot].i, e.e[d->nr_ul_frame].i, e.e[d->nr_ul_slot].i,
e.e[d->nr_ul_data].b, e.e[d->nr_ul_data].bsize, NO_PREAMBLE); e.e[d->nr_ul_harq_pid].i, e.e[d->nr_ul_data].b,
e.e[d->nr_ul_data].bsize, NO_PREAMBLE);
} }
void nr_dl(void *_d, event e) void nr_dl(void *_d, event e)
...@@ -335,7 +348,18 @@ void nr_dl(void *_d, event e) ...@@ -335,7 +348,18 @@ void nr_dl(void *_d, event e)
trace_nr(d, NR_DIRECTION_DOWNLINK, NR_C_RNTI, e.e[d->nr_dl_rnti].i, trace_nr(d, NR_DIRECTION_DOWNLINK, NR_C_RNTI, e.e[d->nr_dl_rnti].i,
e.e[d->nr_dl_frame].i, e.e[d->nr_dl_slot].i, e.e[d->nr_dl_frame].i, e.e[d->nr_dl_slot].i,
e.e[d->nr_dl_data].b, e.e[d->nr_dl_data].bsize, NO_PREAMBLE); e.e[d->nr_dl_harq_pid].i, e.e[d->nr_dl_data].b,
e.e[d->nr_dl_data].bsize, NO_PREAMBLE);
}
void nr_dl_retx(void *_d, event e)
{
ev_data *d = _d;
trace_nr(d, NR_DIRECTION_DOWNLINK, NR_C_RNTI, e.e[d->nr_dl_retx_rnti].i,
e.e[d->nr_dl_retx_frame].i, e.e[d->nr_dl_retx_slot].i,
e.e[d->nr_dl_retx_harq_pid].i, e.e[d->nr_dl_retx_data].b,
e.e[d->nr_dl_retx_data].bsize, NO_PREAMBLE);
} }
void nr_mib(void *_d, event e) void nr_mib(void *_d, event e)
...@@ -349,7 +373,7 @@ void nr_mib(void *_d, event e) ...@@ -349,7 +373,7 @@ void nr_mib(void *_d, event e)
d->cur_mib++; d->cur_mib++;
trace_nr(d, NR_DIRECTION_DOWNLINK, NR_NO_RNTI, 0, trace_nr(d, NR_DIRECTION_DOWNLINK, NR_NO_RNTI, 0,
e.e[d->nr_mib_frame].i, e.e[d->nr_mib_slot].i, e.e[d->nr_mib_frame].i, e.e[d->nr_mib_slot].i, 0 /* harq pid */,
e.e[d->nr_mib_data].b, e.e[d->nr_mib_data].bsize, NO_PREAMBLE); e.e[d->nr_mib_data].b, e.e[d->nr_mib_data].bsize, NO_PREAMBLE);
} }
...@@ -358,7 +382,7 @@ void nr_rar(void *_d, event e) ...@@ -358,7 +382,7 @@ void nr_rar(void *_d, event e)
ev_data *d = _d; ev_data *d = _d;
trace_nr(d, NR_DIRECTION_DOWNLINK, NR_RA_RNTI, e.e[d->nr_rar_rnti].i, trace_nr(d, NR_DIRECTION_DOWNLINK, NR_RA_RNTI, e.e[d->nr_rar_rnti].i,
e.e[d->nr_rar_frame].i, e.e[d->nr_rar_slot].i, e.e[d->nr_rar_frame].i, e.e[d->nr_rar_slot].i, 0 /* harq pid */,
e.e[d->nr_rar_data].b, e.e[d->nr_rar_data].bsize, NO_PREAMBLE); e.e[d->nr_rar_data].b, e.e[d->nr_rar_data].bsize, NO_PREAMBLE);
} }
...@@ -367,7 +391,8 @@ void nr_rar(void *_d, event e) ...@@ -367,7 +391,8 @@ void nr_rar(void *_d, event e)
void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id, void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
int preamble_id, int rar_id, int sr_id, int preamble_id, int rar_id, int sr_id,
int nr_ul_id, int nr_dl_id, int nr_mib_id, int nr_rar_id) int nr_ul_id, int nr_dl_id, int nr_dl_retx_id, int nr_mib_id,
int nr_rar_id)
{ {
database_event_format f; database_event_format f;
int i; int i;
...@@ -396,11 +421,18 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id, ...@@ -396,11 +421,18 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
d->nr_ul_rnti = -1; d->nr_ul_rnti = -1;
d->nr_ul_frame = -1; d->nr_ul_frame = -1;
d->nr_ul_slot = -1; d->nr_ul_slot = -1;
d->nr_ul_harq_pid = -1;
d->nr_ul_data = -1; d->nr_ul_data = -1;
d->nr_dl_rnti = -1; d->nr_dl_rnti = -1;
d->nr_dl_frame = -1; d->nr_dl_frame = -1;
d->nr_dl_slot = -1; d->nr_dl_slot = -1;
d->nr_dl_harq_pid = -1;
d->nr_dl_data = -1; d->nr_dl_data = -1;
d->nr_dl_retx_rnti = -1;
d->nr_dl_retx_frame = -1;
d->nr_dl_retx_slot = -1;
d->nr_dl_retx_harq_pid = -1;
d->nr_dl_retx_data = -1;
d->nr_mib_frame = -1; d->nr_mib_frame = -1;
d->nr_mib_slot = -1; d->nr_mib_slot = -1;
d->nr_mib_data = -1; d->nr_mib_data = -1;
...@@ -490,32 +522,50 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id, ...@@ -490,32 +522,50 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
if (d->sr_rnti == -1 || d->sr_frame == -1 || d->sr_subframe == -1) if (d->sr_rnti == -1 || d->sr_frame == -1 || d->sr_subframe == -1)
goto error; goto error;
/* NR ul: rnti, frame, slot, data */ /* NR ul: rnti, frame, slot, harq_pid, data */
f = get_format(database, nr_ul_id); f = get_format(database, nr_ul_id);
for (i = 0; i < f.count; i++) { for (i = 0; i < f.count; i++) {
G("rnti", "int", d->nr_ul_rnti); G("rnti", "int", d->nr_ul_rnti);
G("frame", "int", d->nr_ul_frame); G("frame", "int", d->nr_ul_frame);
G("slot", "int", d->nr_ul_slot); G("slot", "int", d->nr_ul_slot);
G("harq_pid", "int", d->nr_ul_harq_pid);
G("data", "buffer", d->nr_ul_data); G("data", "buffer", d->nr_ul_data);
} }
if (d->nr_ul_rnti == -1 || d->nr_ul_frame == -1 || d->nr_ul_slot == -1 || if (d->nr_ul_rnti == -1 || d->nr_ul_frame == -1 || d->nr_ul_slot == -1 ||
d->nr_ul_data == -1) d->nr_ul_harq_pid == -1 || d->nr_ul_data == -1)
goto error; goto error;
/* NR dl: rnti, frame, slot, data */ /* NR dl: rnti, frame, slot, harq_pid, data */
f = get_format(database, nr_dl_id); f = get_format(database, nr_dl_id);
for (i = 0; i < f.count; i++) { for (i = 0; i < f.count; i++) {
G("rnti", "int", d->nr_dl_rnti); G("rnti", "int", d->nr_dl_rnti);
G("frame", "int", d->nr_dl_frame); G("frame", "int", d->nr_dl_frame);
G("slot", "int", d->nr_dl_slot); G("slot", "int", d->nr_dl_slot);
G("harq_pid", "int", d->nr_dl_harq_pid);
G("data", "buffer", d->nr_dl_data); G("data", "buffer", d->nr_dl_data);
} }
if (d->nr_dl_rnti == -1 || d->nr_dl_frame == -1 || d->nr_dl_slot == -1 || if (d->nr_dl_rnti == -1 || d->nr_dl_frame == -1 || d->nr_dl_slot == -1 ||
d->nr_dl_data == -1) d->nr_dl_harq_pid == -1 || d->nr_dl_data == -1)
goto error;
/* NR dl retx: rnti, frame, slot, harq_pid, data */
f = get_format(database, nr_dl_retx_id);
for (i = 0; i < f.count; i++) {
G("rnti", "int", d->nr_dl_retx_rnti);
G("frame", "int", d->nr_dl_retx_frame);
G("slot", "int", d->nr_dl_retx_slot);
G("harq_pid", "int", d->nr_dl_retx_harq_pid);
G("data", "buffer", d->nr_dl_retx_data);
}
if (d->nr_dl_retx_rnti == -1 || d->nr_dl_retx_frame == -1 ||
d->nr_dl_retx_slot == -1 || d->nr_dl_retx_harq_pid == -1 ||
d->nr_dl_retx_data == -1)
goto error; goto error;
/* NR MIB: frame, slot, data */ /* NR MIB: frame, slot, data */
...@@ -612,7 +662,7 @@ int main(int n, char **v) ...@@ -612,7 +662,7 @@ int main(int n, char **v)
int in; int in;
int i; int i;
int ul_id, dl_id, mib_id, preamble_id, rar_id; int ul_id, dl_id, mib_id, preamble_id, rar_id;
int nr_ul_id, nr_dl_id, nr_mib_id, nr_rar_id; int nr_ul_id, nr_dl_id, nr_dl_retx_id, nr_mib_id, nr_rar_id;
int sr_id; int sr_id;
ev_data d; ev_data d;
char *ip = DEFAULT_IP; char *ip = DEFAULT_IP;
...@@ -692,6 +742,7 @@ int main(int n, char **v) ...@@ -692,6 +742,7 @@ int main(int n, char **v)
on_off(database, "GNB_MAC_UL_PDU_WITH_DATA", is_on, 1); on_off(database, "GNB_MAC_UL_PDU_WITH_DATA", is_on, 1);
on_off(database, "GNB_MAC_DL_PDU_WITH_DATA", is_on, 1); on_off(database, "GNB_MAC_DL_PDU_WITH_DATA", is_on, 1);
on_off(database, "GNB_MAC_RETRANSMISSION_DL_PDU_WITH_DATA", is_on, 1);
on_off(database, "GNB_PHY_MIB", is_on, 1); on_off(database, "GNB_PHY_MIB", is_on, 1);
on_off(database, "GNB_MAC_DL_RAR_PDU_WITH_DATA", is_on, 1); on_off(database, "GNB_MAC_DL_RAR_PDU_WITH_DATA", is_on, 1);
...@@ -715,11 +766,12 @@ int main(int n, char **v) ...@@ -715,11 +766,12 @@ int main(int n, char **v)
nr_ul_id = event_id_from_name(database, "GNB_MAC_UL_PDU_WITH_DATA"); nr_ul_id = event_id_from_name(database, "GNB_MAC_UL_PDU_WITH_DATA");
nr_dl_id = event_id_from_name(database, "GNB_MAC_DL_PDU_WITH_DATA"); nr_dl_id = event_id_from_name(database, "GNB_MAC_DL_PDU_WITH_DATA");
nr_dl_retx_id = event_id_from_name(database, "GNB_MAC_RETRANSMISSION_DL_PDU_WITH_DATA");
nr_mib_id = event_id_from_name(database, "GNB_PHY_MIB"); nr_mib_id = event_id_from_name(database, "GNB_PHY_MIB");
nr_rar_id = event_id_from_name(database, "GNB_MAC_DL_RAR_PDU_WITH_DATA"); nr_rar_id = event_id_from_name(database, "GNB_MAC_DL_RAR_PDU_WITH_DATA");
setup_data(&d, database, ul_id, dl_id, mib_id, preamble_id, rar_id, sr_id, setup_data(&d, database, ul_id, dl_id, mib_id, preamble_id, rar_id, sr_id,
nr_ul_id, nr_dl_id, nr_mib_id, nr_rar_id); nr_ul_id, nr_dl_id, nr_dl_retx_id, nr_mib_id, nr_rar_id);
register_handler_function(h, ul_id, ul, &d); register_handler_function(h, ul_id, ul, &d);
register_handler_function(h, dl_id, dl, &d); register_handler_function(h, dl_id, dl, &d);
...@@ -730,6 +782,7 @@ int main(int n, char **v) ...@@ -730,6 +782,7 @@ int main(int n, char **v)
register_handler_function(h, nr_ul_id, nr_ul, &d); register_handler_function(h, nr_ul_id, nr_ul, &d);
register_handler_function(h, nr_dl_id, nr_dl, &d); register_handler_function(h, nr_dl_id, nr_dl, &d);
register_handler_function(h, nr_dl_retx_id, nr_dl_retx, &d);
register_handler_function(h, nr_mib_id, nr_mib, &d); register_handler_function(h, nr_mib_id, nr_mib, &d);
register_handler_function(h, nr_rar_id, nr_rar, &d); register_handler_function(h, nr_rar_id, nr_rar, &d);
...@@ -756,7 +809,8 @@ int main(int n, char **v) ...@@ -756,7 +809,8 @@ int main(int n, char **v)
if (!(e.type == ul_id || e.type == dl_id || e.type == mib_id || if (!(e.type == ul_id || e.type == dl_id || e.type == mib_id ||
e.type == preamble_id || e.type == rar_id || e.type == sr_id || e.type == preamble_id || e.type == rar_id || e.type == sr_id ||
e.type == nr_ul_id || e.type == nr_dl_id || e.type == nr_ul_id || e.type == nr_dl_id ||
e.type == nr_mib_id || e.type == nr_rar_id)) continue; e.type == nr_dl_retx_id || e.type == nr_mib_id ||
e.type == nr_rar_id)) continue;
handle_event(h, e); handle_event(h, e);
} }
......
...@@ -96,6 +96,7 @@ COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 . ...@@ -96,6 +96,7 @@ COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 . COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 . COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 . COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 .
RUN ldconfig RUN ldconfig
......
...@@ -100,6 +100,7 @@ COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 . ...@@ -100,6 +100,7 @@ COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 . COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 . COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 . COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 .
RUN ldconfig RUN ldconfig
......
...@@ -101,6 +101,7 @@ COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 . ...@@ -101,6 +101,7 @@ COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 . COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 . COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 . COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 .
RUN ldconfig RUN ldconfig
......
...@@ -102,6 +102,7 @@ COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 . ...@@ -102,6 +102,7 @@ COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 . COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 . COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 . COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 .
RUN ldconfig RUN ldconfig
......
...@@ -778,12 +778,6 @@ void init_NR_UE_threads(int nb_inst) { ...@@ -778,12 +778,6 @@ void init_NR_UE_threads(int nb_inst) {
LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]); LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]);
threadCreate(&threads[inst], UE_thread, (void *)UE, "UEthread", -1, OAI_PRIORITY_RT_MAX); threadCreate(&threads[inst], UE_thread, (void *)UE, "UEthread", -1, OAI_PRIORITY_RT_MAX);
if(get_nrUE_params()->nr_dlsch_parallel)
{
pthread_t dlsch0_threads;
threadCreate(&dlsch0_threads, dlsch_thread, (void *)UE, "DLthread", -1, OAI_PRIORITY_RT_MAX-1);
}
} }
} }
......
...@@ -429,8 +429,8 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, ...@@ -429,8 +429,8 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
uci_pdu->harq->num_harq = 1; uci_pdu->harq->num_harq = 1;
uci_pdu->harq->harq_confidence_level = no_conf ? 1 : 0; uci_pdu->harq->harq_confidence_level = no_conf ? 1 : 0;
uci_pdu->harq->harq_list = (nfapi_nr_harq_t*)malloc(1); uci_pdu->harq->harq_list = (nfapi_nr_harq_t*)malloc(1);
uci_pdu->harq->harq_list[0].harq_value = index&0x01; uci_pdu->harq->harq_list[0].harq_value = !(index&0x01);
LOG_D(PHY, "[DLSCH/PDSCH/PUCCH] %d.%d HARQ value %d with confidence level (0 is good, 1 is bad) %d xrt_mag %d xrt_mag_next %d n0 %d (%d,%d) pucch0_thres %d, cqi %d, SNRtimes10 %d, energy %f, sync_pos %d\n", LOG_D(PHY, "[DLSCH/PDSCH/PUCCH] %d.%d HARQ value %d (0 pass, 1 fail) with confidence level %d (0 is good, 1 is bad) xrt_mag %d xrt_mag_next %d n0 %d (%d,%d) pucch0_thres %d, cqi %d, SNRtimes10 %d, energy %f, sync_pos %d\n",
frame,slot,uci_pdu->harq->harq_list[0].harq_value,uci_pdu->harq->harq_confidence_level,xrtmag_dBtimes10,xrtmag_next_dBtimes10,max_n0,uci_stats->pucch0_n00,uci_stats->pucch0_n01,uci_stats->pucch0_thres,cqi,SNRtimes10,10*log10((double)sigenergy),gNB->ulsch_stats[0].sync_pos); frame,slot,uci_pdu->harq->harq_list[0].harq_value,uci_pdu->harq->harq_confidence_level,xrtmag_dBtimes10,xrtmag_next_dBtimes10,max_n0,uci_stats->pucch0_n00,uci_stats->pucch0_n01,uci_stats->pucch0_thres,cqi,SNRtimes10,10*log10((double)sigenergy),gNB->ulsch_stats[0].sync_pos);
if (pucch_pdu->sr_flag == 1) { if (pucch_pdu->sr_flag == 1) {
uci_pdu->sr = calloc(1,sizeof(*uci_pdu->sr)); uci_pdu->sr = calloc(1,sizeof(*uci_pdu->sr));
...@@ -445,9 +445,9 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, ...@@ -445,9 +445,9 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
uci_pdu->harq->num_harq = 2; uci_pdu->harq->num_harq = 2;
uci_pdu->harq->harq_confidence_level = (no_conf) ? 1 : 0; uci_pdu->harq->harq_confidence_level = (no_conf) ? 1 : 0;
uci_pdu->harq->harq_list = (nfapi_nr_harq_t*)malloc(2); uci_pdu->harq->harq_list = (nfapi_nr_harq_t*)malloc(2);
uci_pdu->harq->harq_list[1].harq_value = index&0x01; uci_pdu->harq->harq_list[1].harq_value = !(index&0x01);
uci_pdu->harq->harq_list[0].harq_value = (index>>1)&0x01; uci_pdu->harq->harq_list[0].harq_value = !((index>>1)&0x01);
LOG_D(PHY, "[DLSCH/PDSCH/PUCCH] %d.%d HARQ values %d and %d with confidence level (0 is good, 1 is bad) %d, xrt_mag %d xrt_mag_next %d n0 %d (%d,%d) pucch0_thres %d, cqi %d, SNRtimes10 %d,sync_pos %d\n", LOG_D(PHY, "[DLSCH/PDSCH/PUCCH] %d.%d HARQ values %d (0 pass, 1 fail) and %d with confidence level %d (0 is good, 1 is bad), xrt_mag %d xrt_mag_next %d n0 %d (%d,%d) pucch0_thres %d, cqi %d, SNRtimes10 %d,sync_pos %d\n",
frame,slot,uci_pdu->harq->harq_list[1].harq_value,uci_pdu->harq->harq_list[0].harq_value,uci_pdu->harq->harq_confidence_level,xrtmag_dBtimes10,xrtmag_next_dBtimes10,max_n0,uci_stats->pucch0_n00,uci_stats->pucch0_n01,uci_stats->pucch0_thres,cqi,SNRtimes10,gNB->ulsch_stats[0].sync_pos); frame,slot,uci_pdu->harq->harq_list[1].harq_value,uci_pdu->harq->harq_list[0].harq_value,uci_pdu->harq->harq_confidence_level,xrtmag_dBtimes10,xrtmag_next_dBtimes10,max_n0,uci_stats->pucch0_n00,uci_stats->pucch0_n01,uci_stats->pucch0_thres,cqi,SNRtimes10,gNB->ulsch_stats[0].sync_pos);
if (pucch_pdu->sr_flag == 1) { if (pucch_pdu->sr_flag == 1) {
uci_pdu->sr = calloc(1,sizeof(*uci_pdu->sr)); uci_pdu->sr = calloc(1,sizeof(*uci_pdu->sr));
......
...@@ -1087,22 +1087,6 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE, ...@@ -1087,22 +1087,6 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
uint8_t Nl); uint8_t Nl);
uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
UE_nr_rxtx_proc_t *proc,
int eNB_id,
short *dlsch_llr,
NR_DL_FRAME_PARMS *frame_parms,
NR_UE_DLSCH_t *dlsch,
NR_DL_UE_HARQ_t *harq_process,
uint32_t frame,
uint16_t nb_symb_sch,
uint8_t nr_slot_rx,
uint8_t harq_pid,
uint8_t is_crnti,
uint8_t llr8_flag);
void *nr_dlsch_decoding_2thread0(void *arg); void *nr_dlsch_decoding_2thread0(void *arg);
void *nr_dlsch_decoding_2thread1(void *arg); void *nr_dlsch_decoding_2thread1(void *arg);
...@@ -1750,8 +1734,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -1750,8 +1734,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t subframe); int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t subframe);
void dump_nrdlsch(PHY_VARS_NR_UE *ue,uint8_t gNB_id,uint8_t nr_slot_rx,unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid); void dump_nrdlsch(PHY_VARS_NR_UE *ue,uint8_t gNB_id,uint8_t nr_slot_rx,unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid);
void *dlsch_thread(void *arg);
/**@}*/ /**@}*/
#endif #endif
...@@ -1078,5 +1078,27 @@ typedef struct nr_rxtx_thread_data_s { ...@@ -1078,5 +1078,27 @@ typedef struct nr_rxtx_thread_data_s {
notifiedFIFO_t txFifo; notifiedFIFO_t txFifo;
} nr_rxtx_thread_data_t; } nr_rxtx_thread_data_t;
typedef struct LDPCDecode_ue_s {
PHY_VARS_NR_UE *phy_vars_ue;
NR_DL_UE_HARQ_t *harq_process;
t_nrLDPC_dec_params decoderParms;
NR_UE_DLSCH_t *dlsch;
short* dlsch_llr;
int dlsch_id;
int harq_pid;
int rv_index;
int A;
int E;
int Kc;
int Qm;
int Kr_bytes;
int nbSegments;
int segment_r;
int r_offset;
int offset;
int Tbslbrm;
int decodeIterations;
} ldpcDecode_ue_t;
#include "SIMULATION/ETH_TRANSPORT/defs.h" #include "SIMULATION/ETH_TRANSPORT/defs.h"
#endif #endif
...@@ -981,8 +981,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, ...@@ -981,8 +981,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
start_meas(&ue->dlsch_decoding_stats[proc->thread_id]); start_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
if( dlsch_parallel) { ret = nr_dlsch_decoding(ue,
ret = nr_dlsch_decoding_mthread(ue,
proc, proc,
gNB_id, gNB_id,
pdsch_vars->llr[0], pdsch_vars->llr[0],
...@@ -995,23 +994,10 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, ...@@ -995,23 +994,10 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
harq_pid, harq_pid,
pdsch==PDSCH?1:0, pdsch==PDSCH?1:0,
dlsch0->harq_processes[harq_pid]->TBS>256?1:0); dlsch0->harq_processes[harq_pid]->TBS>256?1:0);
if( dlsch_parallel) {
LOG_T(PHY,"dlsch decoding is parallelized, ret = %d\n", ret); LOG_T(PHY,"dlsch decoding is parallelized, ret = %d\n", ret);
} }
else { else {
ret = nr_dlsch_decoding(ue,
proc,
gNB_id,
pdsch_vars->llr[0],
&ue->frame_parms,
dlsch0,
dlsch0->harq_processes[harq_pid],
frame_rx,
nb_symb_sch,
nr_slot_rx,
harq_pid,
pdsch==PDSCH?1:0,
dlsch0->harq_processes[harq_pid]->TBS>256?1:0);
LOG_T(PHY,"Sequential dlsch decoding , ret = %d\n", ret); LOG_T(PHY,"Sequential dlsch decoding , ret = %d\n", ret);
} }
...@@ -1083,8 +1069,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, ...@@ -1083,8 +1069,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
start_meas(&ue->dlsch_decoding_stats[proc->thread_id]); start_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
if(dlsch_parallel) { ret1 = nr_dlsch_decoding(ue,
ret1 = nr_dlsch_decoding_mthread(ue,
proc, proc,
gNB_id, gNB_id,
pdsch_vars->llr[1], pdsch_vars->llr[1],
...@@ -1095,24 +1080,13 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, ...@@ -1095,24 +1080,13 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
nb_symb_sch, nb_symb_sch,
nr_slot_rx, nr_slot_rx,
harq_pid, harq_pid,
pdsch==PDSCH?1:0, pdsch==PDSCH?1:0,//proc->decoder_switch,
dlsch1->harq_processes[harq_pid]->TBS>256?1:0); dlsch1->harq_processes[harq_pid]->TBS>256?1:0);
if(dlsch_parallel) {
LOG_T(PHY,"CW dlsch decoding is parallelized, ret1 = %d\n", ret1); LOG_T(PHY,"CW dlsch decoding is parallelized, ret1 = %d\n", ret1);
} }
else { else {
ret1 = nr_dlsch_decoding(ue,
proc,
gNB_id,
pdsch_vars->llr[1],
&ue->frame_parms,
dlsch1,
dlsch1->harq_processes[harq_pid],
frame_rx,
nb_symb_sch,
nr_slot_rx,
harq_pid,
pdsch==PDSCH?1:0,//proc->decoder_switch,
dlsch1->harq_processes[harq_pid]->TBS>256?1:0);
LOG_T(PHY,"CWW sequential dlsch decoding, ret1 = %d\n", ret1); LOG_T(PHY,"CWW sequential dlsch decoding, ret1 = %d\n", ret1);
} }
......
...@@ -109,6 +109,7 @@ int main(int argc, char **argv) ...@@ -109,6 +109,7 @@ int main(int argc, char **argv)
int ret; int ret;
//int run_initial_sync=0; //int run_initial_sync=0;
int loglvl = OAILOG_WARNING; int loglvl = OAILOG_WARNING;
uint8_t dlsch_threads = 0;
float target_error_rate = 0.01; float target_error_rate = 0.01;
uint64_t SSB_positions=0x01; uint64_t SSB_positions=0x01;
uint16_t nb_symb_sch = 12; uint16_t nb_symb_sch = 12;
...@@ -138,9 +139,9 @@ int main(int argc, char **argv) ...@@ -138,9 +139,9 @@ int main(int argc, char **argv)
break;*/ break;*/
/*case 'd': case 'd':
frame_type = 1; dlsch_threads = atoi(optarg);
break;*/ break;
case 'g': case 'g':
switch ((char) *optarg) { switch ((char) *optarg) {
...@@ -320,6 +321,7 @@ int main(int argc, char **argv) ...@@ -320,6 +321,7 @@ int main(int argc, char **argv)
//printf("-C Generate Calibration information for Abstraction (effective SNR adjustment to remove Pe bias w.r.t. AWGN)\n"); //printf("-C Generate Calibration information for Abstraction (effective SNR adjustment to remove Pe bias w.r.t. AWGN)\n");
//printf("-f Output filename (.txt format) for Pe/SNR results\n"); //printf("-f Output filename (.txt format) for Pe/SNR results\n");
printf("-F Input filename (.txt format) for RX conformance testing\n"); printf("-F Input filename (.txt format) for RX conformance testing\n");
printf("-d number of dlsch threads, 0: no dlsch parallelization\n");
exit(-1); exit(-1);
break; break;
} }
...@@ -331,6 +333,7 @@ int main(int argc, char **argv) ...@@ -331,6 +333,7 @@ int main(int argc, char **argv)
if (snr1set == 0) if (snr1set == 0)
snr1 = snr0 + 10; snr1 = snr0 + 10;
init_dlsch_tpool(dlsch_threads);
if (ouput_vcd) if (ouput_vcd)
vcd_signal_dumper_init("/tmp/openair_dump_nr_dlschsim.vcd"); vcd_signal_dumper_init("/tmp/openair_dump_nr_dlschsim.vcd");
......
...@@ -688,7 +688,7 @@ int main(int argc, char **argv) ...@@ -688,7 +688,7 @@ int main(int argc, char **argv)
if (snr1set==0) if (snr1set==0)
snr1 = snr0+10; snr1 = snr0+10;
init_dlsch_tpool(dlsch_threads);
RC.gNB = (PHY_VARS_gNB**) malloc(sizeof(PHY_VARS_gNB *)); RC.gNB = (PHY_VARS_gNB**) malloc(sizeof(PHY_VARS_gNB *));
...@@ -980,11 +980,7 @@ int main(int argc, char **argv) ...@@ -980,11 +980,7 @@ int main(int argc, char **argv)
reset_meas(&msgDataTx->phy_proc_tx); reset_meas(&msgDataTx->phy_proc_tx);
gNB->phy_proc_tx_0 = &msgDataTx->phy_proc_tx; gNB->phy_proc_tx_0 = &msgDataTx->phy_proc_tx;
pushTpool(gNB->threadPool,msgL1Tx); pushTpool(gNB->threadPool,msgL1Tx);
if (dlsch_threads ) {
init_dlsch_tpool(dlsch_threads);
pthread_t dlsch0_threads;
threadCreate(&dlsch0_threads, dlsch_thread, (void *)UE, "DLthread", -1, OAI_PRIORITY_RT_MAX-1);
}
for (SNR = snr0; SNR < snr1; SNR += .2) { for (SNR = snr0; SNR < snr1; SNR += .2) {
varArray_t *table_tx=initVarArray(1000,sizeof(double)); varArray_t *table_tx=initVarArray(1000,sizeof(double));
......
...@@ -662,13 +662,18 @@ int main(int argc, char **argv) ...@@ -662,13 +662,18 @@ int main(int argc, char **argv)
if (uci_pdu.sr->sr_indication == 0 || uci_pdu.sr->sr_confidence_level == 1) if (uci_pdu.sr->sr_indication == 0 || uci_pdu.sr->sr_confidence_level == 1)
sr_errors+=1; sr_errors+=1;
} }
// harq value 0 -> pass
// confidence value 0 -> good confidence
const int harq_value0 = uci_pdu.harq->harq_list[0].harq_value;
const int harq_value1 = uci_pdu.harq->harq_list[1].harq_value;
const int confidence_lvl = uci_pdu.harq->harq_confidence_level;
if(nr_bit>0){ if(nr_bit>0){
if (nr_bit==1 && do_DTX == 0) if (nr_bit==1 && do_DTX == 0)
ack_nack_errors+=(actual_payload^uci_pdu.harq->harq_list[0].harq_value); ack_nack_errors+=(actual_payload^(!harq_value0));
else if (do_DTX == 0) else if (do_DTX == 0)
ack_nack_errors+=(((actual_payload&1)^uci_pdu.harq->harq_list[0].harq_value)+((actual_payload>>1)^uci_pdu.harq->harq_list[1].harq_value)); ack_nack_errors+=(((actual_payload&1)^(!harq_value0))+((actual_payload>>1)^(!harq_value1)));
else if ((uci_pdu.harq->harq_confidence_level == 0 && uci_pdu.harq->harq_list[0].harq_value == 1) || else if ((!confidence_lvl && !harq_value0) ||
(uci_pdu.harq->harq_confidence_level == 0 && nr_bit == 2 && uci_pdu.harq->harq_list[1].harq_value==1)) (!confidence_lvl && nr_bit == 2 && !harq_value1))
ack_nack_errors++; ack_nack_errors++;
free(uci_pdu.harq->harq_list); free(uci_pdu.harq->harq_list);
} }
......
...@@ -610,12 +610,25 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, ...@@ -610,12 +610,25 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
UE_info->CellGroup[UE_id] = CellGroup; UE_info->CellGroup[UE_id] = CellGroup;
LOG_I(NR_MAC,"Modified UE_id %d/%x with CellGroup\n",UE_id,rnti); LOG_I(NR_MAC,"Modified UE_id %d/%x with CellGroup\n",UE_id,rnti);
process_CellGroup(CellGroup,&UE_info->UE_sched_ctrl[UE_id]); process_CellGroup(CellGroup,&UE_info->UE_sched_ctrl[UE_id]);
const NR_ServingCellConfig_t *servingCellConfig = CellGroup ? CellGroup->spCellConfig->spCellConfigDedicated : NULL;
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
const NR_PDSCH_ServingCellConfig_t *pdsch = servingCellConfig ? servingCellConfig->pdsch_ServingCellConfig->choice.setup : NULL;
if (sched_ctrl->available_dl_harq.len == 0) {
// add all available DL HARQ processes for this UE in SA
create_dl_harq_list(sched_ctrl, pdsch);
}
else {
const int nrofHARQ = pdsch && pdsch->nrofHARQ_ProcessesForPDSCH ?
get_nrofHARQ_ProcessesForPDSCH(*pdsch->nrofHARQ_ProcessesForPDSCH) : 8;
AssertFatal(sched_ctrl->available_dl_harq.len==nrofHARQ,
"Reconfiguration of available harq processes not yet supported\n");
}
// update coreset/searchspace // update coreset/searchspace
void *bwpd = NULL; void *bwpd = NULL;
target_ss = NR_SearchSpace__searchSpaceType_PR_common; target_ss = NR_SearchSpace__searchSpaceType_PR_common;
if ((UE_info->UE_sched_ctrl[UE_id].active_bwp)) { if ((sched_ctrl->active_bwp)) {
target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific; target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific;
bwpd = (void*)UE_info->UE_sched_ctrl[UE_id].active_bwp->bwp_Dedicated; bwpd = (void*)sched_ctrl->active_bwp->bwp_Dedicated;
} }
else if (CellGroup->spCellConfig && else if (CellGroup->spCellConfig &&
CellGroup->spCellConfig->spCellConfigDedicated && CellGroup->spCellConfig->spCellConfigDedicated &&
...@@ -623,9 +636,9 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, ...@@ -623,9 +636,9 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific; target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific;
bwpd = (void*)CellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP; bwpd = (void*)CellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP;
} }
UE_info->UE_sched_ctrl[UE_id].search_space = get_searchspace(scc, bwpd, target_ss); sched_ctrl->search_space = get_searchspace(scc, bwpd, target_ss);
UE_info->UE_sched_ctrl[UE_id].coreset = get_coreset(Mod_idP, scc, bwpd, UE_info->UE_sched_ctrl[UE_id].search_space, target_ss); sched_ctrl->coreset = get_coreset(Mod_idP, scc, bwpd, sched_ctrl->search_space, target_ss);
UE_info->UE_sched_ctrl[UE_id].maxL = 2; sched_ctrl->maxL = 2;
} }
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
......
...@@ -1198,6 +1198,9 @@ void nr_schedule_ue_spec(module_id_t module_id, ...@@ -1198,6 +1198,9 @@ void nr_schedule_ue_spec(module_id_t module_id,
"UE %d mismatch between scheduled TBS and buffered TB for HARQ PID %d\n", "UE %d mismatch between scheduled TBS and buffered TB for HARQ PID %d\n",
UE_id, UE_id,
current_harq_pid); current_harq_pid);
T(T_GNB_MAC_RETRANSMISSION_DL_PDU_WITH_DATA, T_INT(module_id), T_INT(CC_id), T_INT(rnti),
T_INT(frame), T_INT(slot), T_INT(current_harq_pid), T_INT(harq->round), T_BUFFER(harq->tb, TBS));
} else { /* initial transmission */ } else { /* initial transmission */
LOG_D(NR_MAC, "[%s] Initial HARQ transmission in %d.%d\n", __FUNCTION__, frame, slot); LOG_D(NR_MAC, "[%s] Initial HARQ transmission in %d.%d\n", __FUNCTION__, frame, slot);
......
...@@ -1971,8 +1971,8 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG ...@@ -1971,8 +1971,8 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG
if (bwpList) AssertFatal(bwpList->list.count == 1, if (bwpList) AssertFatal(bwpList->list.count == 1,
"downlinkBWP_ToAddModList has %d BWP!\n", "downlinkBWP_ToAddModList has %d BWP!\n",
bwpList->list.count); bwpList->list.count);
const int bwp_id = 1; const int bwp_id = servingCellConfig ? *servingCellConfig->firstActiveDownlinkBWP_Id : 0;
sched_ctrl->active_bwp = bwpList ? bwpList->list.array[bwp_id - 1] : NULL; sched_ctrl->active_bwp = bwpList && bwp_id > 0 ? bwpList->list.array[bwp_id - 1] : NULL;
const int target_ss = sched_ctrl->active_bwp ? NR_SearchSpace__searchSpaceType_PR_ue_Specific : NR_SearchSpace__searchSpaceType_PR_common; const int target_ss = sched_ctrl->active_bwp ? NR_SearchSpace__searchSpaceType_PR_ue_Specific : NR_SearchSpace__searchSpaceType_PR_common;
sched_ctrl->search_space = get_searchspace(scc, sched_ctrl->search_space = get_searchspace(scc,
sched_ctrl->active_bwp ? sched_ctrl->active_bwp->bwp_Dedicated : NULL, sched_ctrl->active_bwp ? sched_ctrl->active_bwp->bwp_Dedicated : NULL,
...@@ -1984,23 +1984,20 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG ...@@ -1984,23 +1984,20 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG
if (ubwpList) AssertFatal(ubwpList->list.count == 1, if (ubwpList) AssertFatal(ubwpList->list.count == 1,
"uplinkBWP_ToAddModList has %d BWP!\n", "uplinkBWP_ToAddModList has %d BWP!\n",
ubwpList->list.count); ubwpList->list.count);
sched_ctrl->active_ubwp = ubwpList ? ubwpList->list.array[bwp_id - 1] : NULL; const int ul_bwp_id = servingCellConfig ? *servingCellConfig->uplinkConfig->firstActiveUplinkBWP_Id : 0;
sched_ctrl->active_ubwp = ubwpList && ul_bwp_id > 0 ? ubwpList->list.array[ul_bwp_id - 1] : NULL;
/* get Number of HARQ processes for this UE */ /* get Number of HARQ processes for this UE */
if (servingCellConfig) AssertFatal(servingCellConfig->pdsch_ServingCellConfig->present == NR_SetupRelease_PDSCH_ServingCellConfig_PR_setup, if (servingCellConfig) AssertFatal(servingCellConfig->pdsch_ServingCellConfig->present == NR_SetupRelease_PDSCH_ServingCellConfig_PR_setup,
"no pdsch-ServingCellConfig found for UE %d\n", "no pdsch-ServingCellConfig found for UE %d\n",
UE_id); UE_id);
const NR_PDSCH_ServingCellConfig_t *pdsch = servingCellConfig ? servingCellConfig->pdsch_ServingCellConfig->choice.setup : NULL; const NR_PDSCH_ServingCellConfig_t *pdsch = servingCellConfig ? servingCellConfig->pdsch_ServingCellConfig->choice.setup : NULL;
const int nrofHARQ = pdsch ? (pdsch->nrofHARQ_ProcessesForPDSCH ? // add DL HARQ processes for this UE only in NSA
get_nrofHARQ_ProcessesForPDSCH(*pdsch->nrofHARQ_ProcessesForPDSCH) : 8) : 8; // (SA still doesn't have information on nrofHARQ_ProcessesForPDSCH at this stage)
// add all available DL HARQ processes for this UE if (!get_softmodem_params()->sa)
create_nr_list(&sched_ctrl->available_dl_harq, nrofHARQ); create_dl_harq_list(sched_ctrl,pdsch);
for (int harq = 0; harq < nrofHARQ; harq++)
add_tail_nr_list(&sched_ctrl->available_dl_harq, harq);
create_nr_list(&sched_ctrl->feedback_dl_harq, nrofHARQ);
create_nr_list(&sched_ctrl->retrans_dl_harq, nrofHARQ);
// add all available UL HARQ processes for this UE // add all available UL HARQ processes for this UE
// nb of ul harq processes not configurable
create_nr_list(&sched_ctrl->available_ul_harq, 16); create_nr_list(&sched_ctrl->available_ul_harq, 16);
for (int harq = 0; harq < 16; harq++) for (int harq = 0; harq < 16; harq++)
add_tail_nr_list(&sched_ctrl->available_ul_harq, harq); add_tail_nr_list(&sched_ctrl->available_ul_harq, harq);
...@@ -2020,6 +2017,19 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG ...@@ -2020,6 +2017,19 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG
return -1; return -1;
} }
void create_dl_harq_list(NR_UE_sched_ctrl_t *sched_ctrl,
const NR_PDSCH_ServingCellConfig_t *pdsch) {
const int nrofHARQ = pdsch && pdsch->nrofHARQ_ProcessesForPDSCH ?
get_nrofHARQ_ProcessesForPDSCH(*pdsch->nrofHARQ_ProcessesForPDSCH) : 8;
// add all available DL HARQ processes for this UE
create_nr_list(&sched_ctrl->available_dl_harq, nrofHARQ);
for (int harq = 0; harq < nrofHARQ; harq++)
add_tail_nr_list(&sched_ctrl->available_dl_harq, harq);
create_nr_list(&sched_ctrl->feedback_dl_harq, nrofHARQ);
create_nr_list(&sched_ctrl->retrans_dl_harq, nrofHARQ);
}
/* hack data to remove UE in the phy */ /* hack data to remove UE in the phy */
int rnti_to_remove[10]; int rnti_to_remove[10];
volatile int rnti_to_remove_count; volatile int rnti_to_remove_count;
......
...@@ -1099,7 +1099,7 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id, ...@@ -1099,7 +1099,7 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
DevAssert(harq->is_waiting); DevAssert(harq->is_waiting);
const int8_t pid = sched_ctrl->feedback_dl_harq.head; const int8_t pid = sched_ctrl->feedback_dl_harq.head;
remove_front_nr_list(&sched_ctrl->feedback_dl_harq); remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
handle_dl_harq(mod_id, UE_id, pid, harq_value == 1 && harq_confidence == 0); handle_dl_harq(mod_id, UE_id, pid, harq_value == 0 && harq_confidence == 0);
if (harq_confidence == 1) UE_info->mac_stats[UE_id].pucch0_DTX++; if (harq_confidence == 1) UE_info->mac_stats[UE_id].pucch0_DTX++;
} }
} }
......
...@@ -306,6 +306,8 @@ int get_spf(nfapi_nr_config_request_scf_t *cfg); ...@@ -306,6 +306,8 @@ int get_spf(nfapi_nr_config_request_scf_t *cfg);
int to_absslot(nfapi_nr_config_request_scf_t *cfg,int frame,int slot); int to_absslot(nfapi_nr_config_request_scf_t *cfg,int frame,int slot);
int get_nrofHARQ_ProcessesForPDSCH(e_NR_PDSCH_ServingCellConfig__nrofHARQ_ProcessesForPDSCH n);
void nr_get_tbs_dl(nfapi_nr_dl_tti_pdsch_pdu *pdsch_pdu, void nr_get_tbs_dl(nfapi_nr_dl_tti_pdsch_pdu *pdsch_pdu,
int x_overhead, int x_overhead,
uint8_t numdmrscdmgroupnodata, uint8_t numdmrscdmgroupnodata,
...@@ -409,6 +411,9 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, ...@@ -409,6 +411,9 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
const uint8_t ul_cqi, const uint8_t ul_cqi,
const uint16_t rssi); const uint16_t rssi);
void create_dl_harq_list(NR_UE_sched_ctrl_t *sched_ctrl,
const NR_PDSCH_ServingCellConfig_t *pdsch);
void handle_nr_ul_harq(const int CC_idP, void handle_nr_ul_harq(const int CC_idP,
module_id_t mod_id, module_id_t mod_id,
frame_t frame, frame_t frame,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment