//NFAPI_TRACE(NFAPI_TRACE_NOTE, "[VNF] BEFORE adjustment - Subframe minor adjustment %dus sf_start.tv_nsec:%d\n", phy->insync_minor_adjustment, sf_start.tv_nsec);
//NFAPI_TRACE(NFAPI_TRACE_NOTE, "[VNF] BEFORE adjustment - Subframe minor adjustment %dus sf_start.tv_nsec:%d\n", phy->insync_minor_adjustment, sf_start.tv_nsec);
if(phy->insync_minor_adjustment>0)
if(phy->insync_minor_adjustment>0){
{
// decrease the subframe duration a little
// decrease the subframe duration a little
if(sf_start.tv_nsec>insync_minor_adjustment_ns)
if(sf_start.tv_nsec>insync_minor_adjustment_ns)
sf_start.tv_nsec-=insync_minor_adjustment_ns;
sf_start.tv_nsec-=insync_minor_adjustment_ns;
else
else{
{
NFAPI_TRACE(NFAPI_TRACE_ERROR,"[VNF] Adjustment would make it negative sf:%d.%ld adjust:%ld\n\n\n",sf_start.tv_sec,sf_start.tv_nsec,insync_minor_adjustment_ns);
NFAPI_TRACE(NFAPI_TRACE_ERROR,"[VNF] Adjustment would make it negative sf:%d.%ld adjust:%ld\n\n\n",sf_start.tv_sec,sf_start.tv_nsec,insync_minor_adjustment_ns);
LOG_D(PHY,"SFN/SF:%04d%d proc:TX:SFN/SF:%04d%d: Programming DLSCH for Format 1 DCI, harq_pid %d\n",frame,subframe,proc->frame_tx,subframe,rel8->harq_process);
LOG_D(PHY,"SFN/SF:%04d%d proc:TX:SFN/SF:%04d%d: Programming DLSCH for Format 1 DCI, harq_pid %d\n",frame,subframe,proc->frame_tx,subframe,rel8->harq_process);
LOG_D(PHY,"Setting DLSCH UEid %d harq_ids[%d] from %d to %d\n",UE_id,dlsch0_harq->subframe,dlsch0->harq_ids[frame%2][dlsch0_harq->subframe],rel13->harq_process);
LOG_D(PHY,"Setting DLSCH UEid %d harq_ids[%d] from %d to %d\n",UE_id,dlsch0_harq->subframe,dlsch0->harq_ids[frame%2][dlsch0_harq->subframe],rel13->harq_process);
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.mpdcch_tansmission_type=1;// imposed (9.1.5 in 213) for Type 2 Common search space
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.mpdcch_tansmission_type=1;// imposed (9.1.5 in 213) for Type 2 Common search space
AssertFatal(cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13!=NULL,"cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n");
AssertFatal(cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13!=NULL,"cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n");