Commit ffda9c75 authored by Raymond Knopp's avatar Raymond Knopp

removed logs and added a bit more temporary debugging for SCI2

parent 60a7eb32
......@@ -27,7 +27,7 @@
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
#include <common/utils/LOG/log.h>
#define DEBUG_FEP
//#define DEBUG_FEP
/*#ifdef LOG_I
#undef LOG_I
......
......@@ -36,7 +36,7 @@
//#define DEBUG_CH
#define DEBUG_PUSCH
//#define DEBUG_PUSCH
//#define SRS_DEBUG
#define NO_INTERP 1
......
......@@ -9,15 +9,15 @@
#include "PHY/defs_nr_common.h"
#include "common/utils/nr/nr_common.h"
#define DEBUG_CH_COMP
#define DEBUG_RB_EXT
//#define DEBUG_CH_COMP
//#define DEBUG_RB_EXT
//#define DEBUG_CH_MAG
//#define ML_DEBUG
#define INVALID_VALUE 255
void nr_idft(int32_t *z, uint32_t Msc_PUSCH)
{
void nr_idft(int32_t *z, uint32_t Msc_PUSCH) {
#if defined(__x86_64__) || defined(__i386__)
__m128i idft_in128[1][3240], idft_out128[1][3240];
......@@ -341,7 +341,7 @@ void nr_ulsch_extract_rbs(int rxFSz,
rxF = (int16_t *)&rxdataF[aarx][soffset+(symbol * frame_parms->ofdm_symbol_size)];
rxF_ext = (int16_t *)&pusch_vars->rxdataF_ext[aarx][symbol * nb_re_pusch2]; // [hna] rxdataF_ext isn't contiguous in order to solve an alignment problem ib llr computation in case of mod_order = 4, 6
LOG_I(NR_PHY,"symbol %d : rxF energy %d\n",symbol,dB_fixed(signal_energy_nodc((int32_t*)rxF,frame_parms->ofdm_symbol_size)));
LOG_D(NR_PHY,"symbol %d : rxF energy %d\n",symbol,dB_fixed(signal_energy_nodc((int32_t*)rxF,frame_parms->ofdm_symbol_size)));
if (is_dmrs_symbol == 0) {
if (start_re + nb_re_pusch <= frame_parms->ofdm_symbol_size) {
memcpy1((void*)rxF_ext, (void*)&rxF[start_re*2], nb_re_pusch*sizeof(int32_t));
......@@ -2086,7 +2086,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
//--------------------- RBs extraction ---------------------
//----------------------------------------------------------
if (nb_re_pusch > 0) {
LOG_I(NR_PHY,"extract RBs : frame %d, slot %d symbol %d nb_re_pusch %d\n", frame,slot,symbol, nb_re_pusch);
LOG_D(NR_PHY,"extract RBs : frame %d, slot %d symbol %d nb_re_pusch %d\n", frame,slot,symbol, nb_re_pusch);
if (gNB) start_meas(&gNB->ulsch_rbs_extraction_stats);
nr_ulsch_extract_rbs(rxFSz,rxdataF, pusch_vars, slot, symbol, dmrs_symbol_flag, bwp_start,rb_start,rb_size,nrOfLayers, num_dmrs_cdm_grps_no_data, dmrs_config_type, frame_parms);
if (gNB) stop_meas(&gNB->ulsch_rbs_extraction_stats);
......@@ -2238,7 +2238,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
slsch_res_in_symbol=available_sci2_res_in_symb-sci2_left;
LOG_I(NR_PHY,"SCI2 taking %d REs, SLSCH taking %d\n",sci2_left,slsch_res_in_symbol);
sci2_left=0;
for (int i=0;i<sci2_re;i++) LOG_I(NR_PHY,"sci2_llrs [%d] %d,%d\n",i,sci2_llrs[i<<1],sci2_llrs[1+(i<<1)]);
//for (int i=0;i<sci2_re;i++) LOG_I(NR_PHY,"sci2_llrs [%d] %d,%d\n",i,sci2_llrs[i<<1],sci2_llrs[1+(i<<1)]);
//unscramble the SCI2 payload
nr_pdcch_unscrambling(sci2_llrs, 1010,sci2_re*2,pssch_pdu->Nid,unscrambled_sci2_llrs,1);
// for (int i=0;i<sci2_re;i++) LOG_I(NR_PHY,"sci2_llrs [%d] %d,%d\n",i,unscrambled_sci2_llrs[i<<1],unscrambled_sci2_llrs[1+(i<<1)]);
......
......@@ -242,10 +242,12 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
if (nr_ulsch_encoding(UE, ulsch_ue, pscch_pssch_pdu,frame_parms, harq_pid, G) == -1)
return;
uint32_t sci2_encoded_output[sci2_re*2];
if (pscch_pssch_pdu) {
LOG_I(NR_PHY,"Generating SCI2/PSSCH with %d RE, payload %llx\n",sci2_re,*(unsigned long long*)pscch_pssch_pdu->sci2_payload);
// do SCI2 encoding
polar_encoder_fast((uint64_t*)pscch_pssch_pdu->sci2_payload, (void*)sci2_encoded_output, NULL,0, 1,
NR_POLAR_SCI2_MESSAGE_TYPE,
......@@ -297,7 +299,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
Gsci2,
2,
(int16_t *)d_mod);
for (int i=0;i<Gsci2;i+=2) LOG_I(NR_PHY,"SCI2 RE %d/%d: (%d,%d)\n",i/2,Gsci2/2,((int16_t*)d_mod)[i],((int16_t*)d_mod)[i+1]);
//for (int i=0;i<Gsci2;i+=2) LOG_I(NR_PHY,"SCI2 RE %d/%d: (%d,%d)\n",i/2,Gsci2/2,((int16_t*)d_mod)[i],((int16_t*)d_mod)[i+1]);
int32_t d_mod2[max_num_re] __attribute__ ((aligned(16)));
nr_modulation(scrambled_output, // assume one codeword for the moment
available_bits,
......
......@@ -443,7 +443,7 @@ void psbch_pscch_pssch_processing(PHY_VARS_NR_UE *ue,
}
nr_ue_pdcch_procedures(ue, proc, 1, pscch_est_size, pscch_dl_ch_estimates, phy_data, 0, rxdataF);
LOG_I(NR_PHY,"returned from nr_ue_pdcch_procedures\n");
LOG_D(NR_PHY,"returned from nr_ue_pdcch_procedures\n");
}
if (phy_data->sl_rx_action == SL_NR_CONFIG_TYPE_RX_PSSCH_SCI && !get_nrUE_params()->sync_ref){
......@@ -474,7 +474,7 @@ void psbch_pscch_pssch_processing(PHY_VARS_NR_UE *ue,
phy_data->nr_sl_pssch_sci_pdu.l_subch,
phy_data->nr_sl_pssch_sci_pdu.subchannel_size,
phy_data->nr_sl_pssch_sci_pdu.targetCodeRate);
LOG_I(NR_PHY,"Starting slot FEP for SLSCH (symbol %d to %d) pscch_numsym %d pssch_numsym %d\n",1+phy_data->nr_sl_pssch_sci_pdu.pscch_numsym,phy_data->nr_sl_pssch_sci_pdu.pssch_numsym,phy_data->nr_sl_pssch_sci_pdu.pscch_numsym,phy_data->nr_sl_pssch_sci_pdu.pssch_numsym);
LOG_D(NR_PHY,"Starting slot FEP for SLSCH (symbol %d to %d) pscch_numsym %d pssch_numsym %d\n",1+phy_data->nr_sl_pssch_sci_pdu.pscch_numsym,phy_data->nr_sl_pssch_sci_pdu.pssch_numsym,phy_data->nr_sl_pssch_sci_pdu.pscch_numsym,phy_data->nr_sl_pssch_sci_pdu.pssch_numsym);
for (int sym=1+phy_data->nr_sl_pssch_sci_pdu.pscch_numsym; sym<=phy_data->nr_sl_pssch_sci_pdu.pssch_numsym;sym++) {
nr_slot_fep(ue,
fp,
......
......@@ -59,14 +59,14 @@ bool nr_schedule_slsch(nr_sci_pdu_t *sci_pdu,nr_sci_pdu_t *sci2_pdu,uint8_t *sls
// Fill SCI2A
sci2_pdu->harq_pid = 0;
sci2_pdu->ndi = 0;
sci2_pdu->ndi = (1-sci2_pdu->ndi)&1;
sci2_pdu->rv_index=0;
sci2_pdu->source_id=0;
sci2_pdu->dest_id=1;
sci2_pdu->harq_feedback=0;
sci2_pdu->source_id=0x12;
sci2_pdu->dest_id=0xabcd;
sci2_pdu->harq_feedback=1;
sci2_pdu->cast_type=0;
if (format2==NR_SL_SCI_FORMAT_2C || format2==NR_SL_SCI_FORMAT_2A)
sci2_pdu->csi_req=0;
sci2_pdu->csi_req=1;
if (format2==NR_SL_SCI_FORMAT_2B)
sci2_pdu->zone_id=0;
// Fill in for R17: communication_range
......
......@@ -738,13 +738,11 @@ int nr_ue_process_sci2_indication_pdu(NR_UE_MAC_INST_t *mac,module_id_t mod_id,f
nr_sci_pdu_t *sci_pdu = &mac->sci_pdu_rx; //&mac->def_sci_pdu[slot][sci->sci_format_type];
const NR_SL_BWP_ConfigCommon_r16_t *sl_bwp = mac->sl_bwp;
const NR_SL_ResourcePool_r16_t *sl_res_pool = mac->sl_rx_res_pool;
static int ndi=0;
LOG_I(NR_MAC,"Received sci indication (sci format %d, Nid %x, subChannelIndex %d, payloadSize %d,payload %llx)\n",
sci->sci_format_type,sci->Nid,sci->subch_index,sci->sci_payloadlen,*(unsigned long long*)sci->sci_payloadBits);
AssertFatal(sci->sci_format_type == SL_SCI_FORMAT_2_ON_PSSCH, "need to have format 2 here only\n");
extract_pssch_sci_pdu((uint64_t *)sci->sci_payloadBits, sci->sci_payloadlen,sl_bwp, sl_res_pool, sci_pdu);
LOG_I(NR_MAC,"SCI2A: harq_pid %d ndi %d RV %d SRC %x DST %x HARQ_FB %d Cast %d CSI_Req %d\n", 0/*sci_pdu->harq_pid*/,ndi/*sci_pdu->ndi*/,0/*sci_pdu->rv_index*/,0x12/*sci_pdu->source_id*/,0xabdc/*sci_pdu->dest_id*/,1/*sci_pdu->harq_feedback*/,0/*sci_pdu->cast_type*/,1/*sci_pdu->csi_req*/);
ndi=1-ndi;
LOG_I(NR_MAC,"SCI2A: harq_pid %d ndi %d RV %d SRC %x DST %x HARQ_FB %d Cast %d CSI_Req %d\n", sci_pdu->harq_pid,sci_pdu->ndi,sci_pdu->rv_index,sci_pdu->source_id,sci_pdu->dest_id,sci_pdu->harq_feedback,sci_pdu->cast_type,sci_pdu->csi_req);
// send schedule response
sl_nr_rx_config_request_t rx_config;
......
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