Commit 8c2bb969 authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/enhancement-dlsim-format1A-testing' into...

Merge remote-tracking branch 'origin/enhancement-dlsim-format1A-testing' into develop_integration_2018_w51
parents 81e81ab4 13198628
...@@ -169,7 +169,6 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -169,7 +169,6 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
s = lte_gold_generic(&x1, &x2, 0); s = lte_gold_generic(&x1, &x2, 0);
e += 32; e += 32;
} }
......
...@@ -52,6 +52,13 @@ ...@@ -52,6 +52,13 @@
#include "../LTE_TRANSPORT/transport_common_proto.h" #include "../LTE_TRANSPORT/transport_common_proto.h"
#include "SCHED/sched_common.h" #include "SCHED/sched_common.h"
/*
#undef LOG_D
#define LOG_D(A,B...) printf(B)
#undef LOG_I
#define LOG_I(A,B...) printf(B)
*/
extern uint16_t beta_cqi[16]; extern uint16_t beta_cqi[16];
extern uint16_t beta_ri[16]; extern uint16_t beta_ri[16];
extern uint16_t beta_ack[16]; extern uint16_t beta_ack[16];
...@@ -1274,7 +1281,7 @@ void compute_llr_offset(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -1274,7 +1281,7 @@ void compute_llr_offset(LTE_DL_FRAME_PARMS *frame_parms,
symbol_mod = (symbol >= (7-frame_parms->Ncp))? (symbol-(7-frame_parms->Ncp)) : symbol; symbol_mod = (symbol >= (7-frame_parms->Ncp))? (symbol-(7-frame_parms->Ncp)) : symbol;
if((symbol_mod == 0) || symbol_mod == (4-frame_parms->Ncp)) if((symbol_mod == 0) || symbol_mod == (4-frame_parms->Ncp))
{ {
if (frame_parms->nb_antennas_tx == 2) if (frame_parms->nb_antenna_ports_eNB == 2)
crs_re = 4; crs_re = 4;
else else
crs_re = 2; crs_re = 2;
......
...@@ -38,8 +38,7 @@ ...@@ -38,8 +38,7 @@
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h" #include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
//#define DEBUG_DLSCH_DECODING //#define DEBUG_DLSCH_DECODING
#define UE_DEBUG_TRACE 1 //#define UE_DEBUG_TRACE 1
void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch) void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch)
{ {
...@@ -626,7 +625,7 @@ decoder_if_t *tc; ...@@ -626,7 +625,7 @@ decoder_if_t *tc;
if (err_flag == 1) { if (err_flag == 1) {
#if UE_DEBUG_TRACE #if UE_DEBUG_TRACE
LOG_I(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d\n", LOG_D(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d\n",
phy_vars_ue->Mod_id, frame, subframe, harq_pid,harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs,Kr,r,harq_process->round); phy_vars_ue->Mod_id, frame, subframe, harq_pid,harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs,Kr,r,harq_process->round);
#endif #endif
dlsch->harq_ack[subframe].ack = 0; dlsch->harq_ack[subframe].ack = 0;
...@@ -650,7 +649,7 @@ decoder_if_t *tc; ...@@ -650,7 +649,7 @@ decoder_if_t *tc;
return((1+dlsch->max_turbo_iterations)); return((1+dlsch->max_turbo_iterations));
} else { } else {
#if UE_DEBUG_TRACE #if UE_DEBUG_TRACE
LOG_I(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d TBS %d mcs %d nb_rb %d\n", LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d TBS %d mcs %d nb_rb %d\n",
phy_vars_ue->Mod_id,subframe,harq_process->TBS,harq_process->mcs,harq_process->nb_rb); phy_vars_ue->Mod_id,subframe,harq_process->TBS,harq_process->mcs,harq_process->nb_rb);
#endif #endif
......
...@@ -4334,7 +4334,7 @@ void dlsch_channel_aver_band(int **dl_ch_estimates_ext, ...@@ -4334,7 +4334,7 @@ void dlsch_channel_aver_band(int **dl_ch_estimates_ext,
else else
nre=12; nre=12;
for (aatx=0; aatx<frame_parms->nb_antennas_tx; aatx++){ for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++){
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
dl_ch128=(__m128i *)&dl_ch_estimates_ext[aatx*frame_parms->nb_antennas_rx + aarx][symbol*frame_parms->N_RB_DL*12]; dl_ch128=(__m128i *)&dl_ch_estimates_ext[aatx*frame_parms->nb_antennas_rx + aarx][symbol*frame_parms->N_RB_DL*12];
avg128D = _mm_setzero_si128(); avg128D = _mm_setzero_si128();
......
...@@ -673,14 +673,14 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -673,14 +673,14 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
} }
/* LOG_D(PHY,"[p %d : symb %d / FirstSym %d / Length %d]: @LLR Buff %p, @LLR Buff(symb) %p \n",
LOG_I(PHY,"dlsch_qpsk_llr: [symb %d / FirstSym %d / Length %d]: @LLR Buff %x, @LLR Buff(symb) %x \n", frame_parms->nb_antenna_ports_eNB,
symbol, symbol,
first_symbol_flag, first_symbol_flag,
len, len,
dlsch_llr, dlsch_llr,
llr32); llr32);
*/
qpsk_llr((short *)rxF, qpsk_llr((short *)rxF,
(short *)llr32, (short *)llr32,
......
...@@ -349,6 +349,7 @@ fill_dlsch_config(nfapi_dl_config_request_body_t * dl_req, ...@@ -349,6 +349,7 @@ fill_dlsch_config(nfapi_dl_config_request_body_t * dl_req,
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = transmission_mode; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = transmission_mode;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = num_bf_prb_per_subband; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = num_bf_prb_per_subband;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = num_bf_vector; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = num_bf_vector;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF;
dl_req->number_pdu++; dl_req->number_pdu++;
} }
...@@ -379,6 +380,7 @@ void fill_DCI(PHY_VARS_eNB *eNB, ...@@ -379,6 +380,7 @@ void fill_DCI(PHY_VARS_eNB *eNB,
nfapi_dl_config_request_body_t *dl_req=&sched_resp->DL_req->dl_config_request_body; nfapi_dl_config_request_body_t *dl_req=&sched_resp->DL_req->dl_config_request_body;
nfapi_dl_config_request_pdu_t *dl_config_pdu; nfapi_dl_config_request_pdu_t *dl_config_pdu;
nfapi_tx_request_body_t *TX_req=&sched_resp->TX_req->tx_request_body; nfapi_tx_request_body_t *TX_req=&sched_resp->TX_req->tx_request_body;
int NB_RB4TBS = common_flag == 0 ? NB_RB : (2+TPC);
dl_req->number_dci=0; dl_req->number_dci=0;
dl_req->number_pdu=0; dl_req->number_pdu=0;
...@@ -391,26 +393,24 @@ void fill_DCI(PHY_VARS_eNB *eNB, ...@@ -391,26 +393,24 @@ void fill_DCI(PHY_VARS_eNB *eNB,
case 2: case 2:
case 7: case 7:
if (common_flag == 0) {
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu]; dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *) dl_config_pdu, 0, memset((void *) dl_config_pdu, 0,
sizeof(nfapi_dl_config_request_pdu_t)); sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu)); dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = (common_flag == 0) ? NFAPI_DL_DCI_FORMAT_1 : NFAPI_DL_DCI_FORMAT_1A;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = 4; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = 4;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = n_rnti+k; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = (common_flag == 0) ? n_rnti+k : SI_RNTI;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = (common_flag ==0 ) ? 1: 2; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = TPC; // dont adjust power when retransmitting dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = TPC; // dont adjust power when retransmitting
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = ndi; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = (common_flag == 0) ? ndi : 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs1; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs1;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = rv; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = rv;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = DLSCH_RB_ALLOC; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = (common_flag == 0) ? DLSCH_RB_ALLOC : computeRIV(eNB->frame_parms.N_RB_DL,0,NB_RB);
//deactivate second codeword //deactivate second codeword
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_2 = 0; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_2 = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_2 = 1; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_2 = 1;
...@@ -422,11 +422,12 @@ void fill_DCI(PHY_VARS_eNB *eNB, ...@@ -422,11 +422,12 @@ void fill_DCI(PHY_VARS_eNB *eNB,
dl_req->number_pdu++; dl_req->number_pdu++;
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG; dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
AssertFatal(TPC>=0 && TPC<2, "TPC should be 0 or 1\n");
fill_dlsch_config(dl_req, fill_dlsch_config(dl_req,
get_TBS_DL(mcs1,NB_RB), get_TBS_DL(mcs1,NB_RB4TBS),
(retrans > 0) ? -1 : 0, /* retransmission, no pdu_index */ (retrans > 0) ? -1 : 0, /* retransmission, no pdu_index */
n_rnti, (common_flag == 0) ? n_rnti : SI_RNTI,
0, // type 0 allocation from 7.1.6 in 36.213 0, // type 0 allocation from 7.1.6 in 36.213
0, // virtual_resource_block_assignment_flag, unused here 0, // virtual_resource_block_assignment_flag, unused here
DLSCH_RB_ALLOC, // resource_block_coding, DLSCH_RB_ALLOC, // resource_block_coding,
...@@ -449,13 +450,10 @@ void fill_DCI(PHY_VARS_eNB *eNB, ...@@ -449,13 +450,10 @@ void fill_DCI(PHY_VARS_eNB *eNB,
); );
fill_tx_req(TX_req, fill_tx_req(TX_req,
(frame * 10) + subframe, (frame * 10) + subframe,
get_TBS_DL(mcs1,NB_RB), get_TBS_DL(mcs1,NB_RB4TBS),
0, 0,
input_buffer[k]); input_buffer[k]);
}
else {
}
break; break;
...@@ -566,8 +564,7 @@ int main(int argc, char **argv) ...@@ -566,8 +564,7 @@ int main(int argc, char **argv)
int eNB_id = 0; int eNB_id = 0;
unsigned char round; unsigned char round;
unsigned char i_mod = 2; unsigned char i_mod = 2;
unsigned short NB_RB; int NB_RB;
SCM_t channel_model=Rayleigh1; SCM_t channel_model=Rayleigh1;
// unsigned char *input_data,*decoded_output; // unsigned char *input_data,*decoded_output;
...@@ -982,7 +979,6 @@ int main(int argc, char **argv) ...@@ -982,7 +979,6 @@ int main(int argc, char **argv)
// alternatively you can disable ITTI completely in CMakeLists.txt // alternatively you can disable ITTI completely in CMakeLists.txt
//itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL); //itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL);
if (common_flag == 0) { if (common_flag == 0) {
switch (N_RB_DL) { switch (N_RB_DL) {
case 6: case 6:
...@@ -1003,9 +999,13 @@ int main(int argc, char **argv) ...@@ -1003,9 +999,13 @@ int main(int argc, char **argv)
break; break;
} }
NB_RB=conv_nprb(0,DLSCH_RB_ALLOC,N_RB_DL); NB_RB = conv_nprb(0,DLSCH_RB_ALLOC,N_RB_DL);
} else }
NB_RB = 4; else {
if (rballocset==0) NB_RB = 8;
else NB_RB = DLSCH_RB_ALLOC;
AssertFatal(NB_RB <= N_RB_DL,"illegal NB_RB %d\n",NB_RB);
}
if (xforms==1) { if (xforms==1) {
fl_initialize (&argc, argv, NULL, 0, 0); fl_initialize (&argc, argv, NULL, 0, 0);
...@@ -1504,7 +1504,7 @@ int main(int argc, char **argv) ...@@ -1504,7 +1504,7 @@ int main(int argc, char **argv)
// Simulate HARQ procedures!!! // Simulate HARQ procedures!!!
memset(CCE_table,0,800*sizeof(int)); memset(CCE_table,0,800*sizeof(int));
if (common_flag == 0) { if (/*common_flag == 0*/ 1) {
num_dci=0; num_dci=0;
num_common_dci=0; num_common_dci=0;
...@@ -1636,7 +1636,7 @@ int main(int argc, char **argv) ...@@ -1636,7 +1636,7 @@ int main(int argc, char **argv)
if (generate_ue_dlsch_params_from_dci(proc->frame_rx, if (generate_ue_dlsch_params_from_dci(proc->frame_rx,
proc->subframe_rx, proc->subframe_rx,
(void *)&dci_alloc[0].dci_pdu, (void *)&dci_alloc[0].dci_pdu,
n_rnti, common_flag == 0 ? n_rnti : SI_RNTI,
dci_alloc[0].format, dci_alloc[0].format,
UE->pdcch_vars[UE->current_thread_id[proc->subframe_rx]][eNB_id], UE->pdcch_vars[UE->current_thread_id[proc->subframe_rx]][eNB_id],
UE->pdsch_vars[UE->current_thread_id[proc->subframe_rx]][eNB_id], UE->pdsch_vars[UE->current_thread_id[proc->subframe_rx]][eNB_id],
......
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