Determine CCEs of each PDCCH Candidate

100 篇文章 0 订阅
32 篇文章 3 订阅

NRRG tool update to R17(2022-12)

直接上代码,算法参见38.213 vh40 10.1节描述。

10.1	UE procedure for determining physical downlink control channel assignment 
// detCcesPerPdcchCand determines the CCE indexes for aggregation level L corresponding to PDCCH candidate m of the search space set in slot n for an active DL BWP of a serving cell corresponding to carrier indicator field value n_CI For a search space set s associated with CORESET p
//  p: CORESET index
//  L: aggregation level
//  m: PDCCH candidate index
//  n: slot index
//  sst: search space type, which can be type0, type0a, type1, type2, type3 or uss
//  nRNTI: the n_RNTI
//  NCCE: the N_CCE
//  nCI: the n_CI
//  Mmax: the M_max
func detCcesPerPdcchCand(p int, L int, m int, n int, sst string, nRNTI int, NCCE int, nCI int, Mmax int) ([]int, error) {
	if sst == "uss" && nRNTI == 0 {
		return nil, errors.New(fmt.Sprintf("For a USS, the nRNTI must not be 0!"))
	}

	var Y int
	if sst != "uss" {
		Y = 0
	} else {
		var Ap int
		if p%3 == 0 {
			Ap = 39827
		} else if p%3 == 1 {
			Ap = 39829
		} else {
			Ap = 39839
		}
		D := 65537
		for k := -1; k <= n; k++ {
			if k == -1 {
				Y = nRNTI
			} else {
				Y = (Ap * Y) % D
			}
		}
	}

	v1 := Y + utils.FloorInt(float64(m*NCCE)/float64(L*Mmax)) + nCI
	v2 := utils.FloorInt(float64(NCCE) / float64(L))
	v3 := v1 % v2

	var cces []int
	for i := 0; i < L; i++ {
		cces = append(cces, L*v3+i)
	}

	return cces, nil
}

用于计算CSS0 per PDCCH candidate TD/FD位置:

            M, _ := strconv.Atoi(flags.gridsetting._css0NumCandidates[1:])
			for m := 0; m < M; m++ {
				cces, err := detCcesPerPdcchCand(0, flags.gridsetting._css0AggLevel, m, nc, "type0", 0, rgd.coreset0NumCces, 0, M)
				if err != nil {
					return err
				}

				rgd.css0PdcchCandidates[key] = append(rgd.css0PdcchCandidates[key], nrgrid.Css0PdcchCandidate{sfnc, nc, firstSymb, m, cces})
				fmt.Printf("SSB/SIB1 PDCCH candidate: issb=%v, sfnc=%v, nc=%v, firstSymb=%v, m=%v, cces=%v\n", issb, sfnc, nc, firstSymb, m, cces)
			}

打印如下:

issb=0, ssbLastSymbsMinus1=[1]
SSB/SIB1 PDCCH candidate: issb=0, sfnc=0, nc=5, firstSymb=0, m=0, cces=[0 1 2 3]
SSB/SIB1 PDCCH candidate: issb=0, sfnc=0, nc=5, firstSymb=0, m=1, cces=[4 5 6 7]
SSB/SIB1 PDCCH candidate: issb=0, sfnc=0, nc=6, firstSymb=0, m=0, cces=[0 1 2 3]
SSB/SIB1 PDCCH candidate: issb=0, sfnc=0, nc=6, firstSymb=0, m=1, cces=[4 5 6 7]
issb=1, ssbLastSymbsMinus1=[7]
SSB/SIB1 PDCCH candidate: issb=1, sfnc=0, nc=6, firstSymb=0, m=0, cces=[0 1 2 3]
SSB/SIB1 PDCCH candidate: issb=1, sfnc=0, nc=6, firstSymb=0, m=1, cces=[4 5 6 7]
SSB/SIB1 PDCCH candidate: issb=1, sfnc=0, nc=7, firstSymb=0, m=0, cces=[0 1 2 3]
SSB/SIB1 PDCCH candidate: issb=1, sfnc=0, nc=7, firstSymb=0, m=1, cces=[4 5 6 7]
issb=2, ssbLastSymbsMinus1=[15]
SSB/SIB1 PDCCH candidate: issb=2, sfnc=0, nc=7, firstSymb=0, m=0, cces=[0 1 2 3]
SSB/SIB1 PDCCH candidate: issb=2, sfnc=0, nc=7, firstSymb=0, m=1, cces=[4 5 6 7]
SSB/SIB1 PDCCH candidate: issb=2, sfnc=0, nc=8, firstSymb=0, m=0, cces=[0 1 2 3]
SSB/SIB1 PDCCH candidate: issb=2, sfnc=0, nc=8, firstSymb=0, m=1, cces=[4 5 6 7]
issb=3, ssbLastSymbsMinus1=[21]
SSB/SIB1 PDCCH candidate: issb=3, sfnc=0, nc=8, firstSymb=0, m=0, cces=[0 1 2 3]
SSB/SIB1 PDCCH candidate: issb=3, sfnc=0, nc=8, firstSymb=0, m=1, cces=[4 5 6 7]
SSB/SIB1 PDCCH candidate: issb=3, sfnc=0, nc=9, firstSymb=0, m=0, cces=[0 1 2 3]
SSB/SIB1 PDCCH candidate: issb=3, sfnc=0, nc=9, firstSymb=0, m=1, cces=[4 5 6 7]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值