cuMAC API 参考#
cuMAC API 数据结构#
CumacCellGrpPrms#
API 数据结构,包含协同小区的蜂窝小区组信息。
字段 |
类型 |
描述 |
---|---|---|
nUe |
uint16_t |
所有协同小区 TTI 中选定 UE 的总数。 值:0 -> 65535 |
nActiveUe |
uint16_t |
所有协同小区的活动 UE 总数。 值:0 -> 65535 |
numUeSchdPerCellTTI |
uint8_t |
每个小区每个 TTI 选择/调度的 UE 数量。 值:0 -> 255 |
nCell |
uint16_t |
协同小区的总数。 值:0 -> 65535 |
nPrbGrp |
uint16_t |
每个小区的 PRG 总数。 值:0 -> 65535 |
nBsAnt |
uint8_t |
BS 天线端口数。 值:0 -> 255 |
nUeAnt |
uint8_t |
UE 天线端口数。 值:0 -> 255 |
W |
float |
PRG 的频率带宽 (Hz)。 值:12 * 子载波间隔 * 每个 PRG 的 PRB 数量 |
sigmaSqrd |
float |
噪声方差。 值:瓦特为单位的噪声方差值 |
precodingScheme |
uint8_t |
预编码器类型。 值 0:无预编码 1:SVD 预编码器 |
receiverScheme |
uint8_t |
接收器/均衡器类型。 值:目前仅支持 1:MMSE-IRC 接收器 |
allocType |
uint8_t |
PRG 分配类型。 值 0:非连续 type-0 分配 1:连续 type-1 分配 |
betaCoeff |
float |
用于调整多小区调度中小区边缘 UE 性能的系数 值:非负实数。默认值为 1.0,表示经典比例公平调度。 |
sinValThr |
float |
层选择的奇异值阈值。 值:在 (0, 1) 范围内。默认值为 0.1 |
prioWeightStep |
uint16_t |
用于基于优先级权重的调度算法。如果 UE 未被调度,则每个 TTI 的 UE 优先级权重增量步长。 值:默认值 100 |
cellId |
uint16_t[nCell] |
协同小区的 ID。 一维数组。 每个元素的值 将 cIdx = 0, 1, …, nCell-1 表示为协同小区索引。 cellId[cIdx] 是第 cIdx 个协同小区的 ID |
cellAssoc |
uint8_t[nCell* nUe] |
协同小区所有选定 UE 的小区-UE 关联指示。 一维数组。 每个元素的值 将 cIdx = 0, 1, …, nCell-1 表示为协同小区索引。 将 uIdx = 0, 1, …, nUe-1 表示为协同小区中选定的 UE 索引。cellAssoc[cIdx*nUe + uIdx] == 1 表示第 uIdx 个选定 UE 与第 cIdx 个协同小区关联,否则为 0。 |
cellAssocActUe |
uint8_t[nCell* nActiveUe] |
协同小区所有活动 UE 的小区-UE 关联指示。 一维数组。 每个元素的值 将 cIdx = 0, 1, …, nCell-1 表示为协同小区索引。 将 uIdx = 0, 1, …, nActiveUe-1 表示为协同小区中的全局活动 UE 索引。 cellAssocActUe[cIdx*nUe + uIdx] == 1 表示第 uIdx 个活动 UE 与第 cIdx 个协同小区关联,否则为 0。 |
prgMsk |
uint8_t[nCell] [nPrbGrp] |
每个小区的位图,用于指示每个 PRG 的可用性以进行分配 二维数组。 每个元素的值 将 cIdx = 0, 1, … nCell-1 表示为协同小区索引 将 prgIdx = 0, 1, …, nPrbGrp-1 表示为 PRG 索引 prgMsk[cIdx][prgIdx] 是第 cIdx 个协同小区中第 prgIdx 个 PRG 的可用性指示符 0 - 不可用,1 - 可用 |
postEqSinr |
float[nActiveUe* nPrbGrp*nUeAnt] |
协同小区中所有活动 UE 的每个 PRG 每层后均衡器 SINR 数组。 一维数组。 每个元素的值 将 uIdx = 0, 1, …, nActiveUe-1 表示为协同小区中的全局活动 UE 索引。 将 prgIdx = 0, 1, …, nPrbGrp-1 表示为 PRG 索引。 将 layerIdx = 0, 1, …, nUeAnt-1 表示为层索引。 postEqSinr[uIdx*nPrbGrp* nUeAnt + prgIdx*nUeAnt + layerIdx] 是第 uIdx 个活动 UE 在第 prgIdx 个 PRG 和第 layerIdx 层上的后均衡器 SINR。 |
wbSinr |
float[nActiveUe* nUeAnt] |
协同小区中所有活动 UE 的宽带每层后均衡器 SINR 数组。 一维数组。 每个元素的值 将 uIdx = 0, 1, …, nActiveUe-1 表示为协同小区中的全局活动 UE 索引。 将 layerIdx = 0, 1, …, nUeAnt-1 表示为层索引。 wbSinr[uIdx*nUeAnt + layerIdx] 是第 uIdx 个活动 UE 在第 layerIdx 层上的宽带后均衡器 SINR。 |
FP32 estH_fr 或 FP16 estH_fr_half |
FP32 cuComplex[nCell] [nUe*nPrbGrp* nBsAnt*nUeAnt] 或 FP16 __nv_bfloat162 [nCell][nUe* nPrbGrp*nBsAnt* nUeAnt] |
每个小区的窄带 SRS 信道估计系数数组,用于协同小区中选定的 UE。 二维数组:第一个维度用于小区,第二个维度用于 UE、PRG 和天线端口。 每个元素的值 将 cIdx = 0, 1, …, nCell-1 表示为协同小区索引。 将 uIdx = 0, 1, …, nUe-1 表示为协同小区中选定的 UE 索引。 将 prgIdx = 0, 1, …, nPrbGrp-1 表示为 PRG 索引。 将 bsAntIdx = 0, 1, …, nBsAnt-1 表示为 BS 天线端口索引 将 ueAntIdx = 0, 1, …, nUeAnt 表示为 UE 天线端口索引 estH_fr[cIdx][uIdx* nPrbGrp*nBsAnt*nUeAnt + prgIdx* nBsAnt*nUeAnt + bsAntIdx*nUeAnt + ueAntIdx] 是第 cIdx 个小区和第 uIdx 个选定 UE 之间在蜂窝小区组中,在第 prgIdx 个 PRG、第 bsAntIdx 个 BS 天线端口和第 ueAntIdx 个 UE 天线端口之间的复信道系数。 (以上也适用于 FP16 版本) |
prdMat |
cuComplex[nUe* nPrbGrp* nBsAnt* nBsAnt] |
协同小区中选定 UE 的预编码器/波束成形权重数组。 一维数组。 每个元素的值 将 uIdx = 0, 1, …, nUe-1 表示为协同小区中选定的 UE 索引。 将 prgIdx = 0, 1, …, nPrbGrp-1 表示为 PRG 索引。 将 inPortIdx = 0, 1, …, nBsAnt-1 表示为预编码器输入端口索引 将 outPortIdx = 0, 1, …, nBsAnt-1 表示为预编码器输出端口索引 prdMat[uIdx*nPrbGrp* nBsAnt*nBsAnt + prgIdx* nBsAnt*nBsAnt + inPortIdx *nBsAnt + outPortIdx] 是第 uIdx 个选定 UE 在协同小区中,在第 prgIdx 个 PRG 上以及在第 inPortIdx 个输入端口和第 outPortIdx 个输出端口之间的预编码器/波束成形权重。 |
detMat |
cuComplex[nUe* nPrbGrp* nUeAnt* nUeAnt] |
协同小区中选定 UE 的检测器/波束成形权重数组。 一维数组。 每个元素的值 将 uIdx = 0, 1, …, nUe-1 表示为协同小区中选定的 UE 索引。 将 prgIdx = 0, 1, …, nPrbGrp-1 表示为 PRG 索引。 将 inPortIdx = 0, 1, …, nUeAnt-1 表示为检测器输入端口索引。 将 outPortIdx = 0, 1, …, nUeAnt-1 表示为检测器输出端口索引。 detMat[uIdx*nPrbGrp*nUeAnt*nUeAnt + prgIdx*nUeAnt*nUeAnt + inPortIdx*nUeAnt + outPortIdx] 是第 uIdx 个选定 UE 在第 prgIdx 个 PRG 上以及在第 inPortIdx 个输入端口和第 outPortIdx 个输出端口之间的检测器权重。 |
sinVal |
float[nUe* nPrbGrp*nUeAnt] |
从 SVD 获得的每个 UE、每个 PRG、每层的奇异值数组。 一维数组。 每个元素的值 将 uIdx = 0, 1, …, nUe-1 表示为协同小区中选定 UE 的从 0 开始的 UE 索引。 将 prgIdx = 0, 1, …, nPrbGrp-1 表示为 PRG 索引。 将 layerIdx = 0, 1, …, nUeAnt-1 表示为层索引。 sinVal[uIdx*nPrbGrp*nUeAnt + prgIdx*nUeAnt + layerIdx] 是 UE uIdx 在 PRG prgIdx 上的第 layerIdx 个最大奇异值 对于每个 UE 和每个 PRG,奇异值按降序存储。 |
cumacCellGrpUeStatus#
API 数据结构,包含协同小区组的每个 UE 信息。
字段 |
类型 |
描述 |
---|---|---|
avgRates |
float[nUe] |
协同小区中选定 UE 的长期平均数据速率数组。 一维数组。 每个元素的值 将 uIdx = 0, 1, …, nUe-1 表示为协同小区中选定的 UE 索引。 avgRates[uIdx] 是协同小区中第 uIdx 个选定 UE 的长期平均吞吐量。 |
avgRatesActUe |
float[nActiveUe] |
协同小区中所有活动 UE 的长期平均数据速率数组 一维数组。 每个元素的值 将 uIdx = 0, 1, …, nActiveUe-1 表示为协同小区中的全局活动 UE 索引。 avgRatesActUe[uIdx] 是协同小区中第 uIdx 个活动 UE 的长期平均吞吐量。 |
prioWeightActUe |
uint16_t [nActiveUe] |
用于基于优先级的 UE 选择。协同小区中所有活动 UE 的优先级权重 一维数组。 每个元素的值 将 uIdx = 0, 1, …, nActiveUe-1 表示为协同小区中所有活动 UE 的全局 UE 索引。 prioWeightActUe[uIdx] 是第 uIdx 个活动 UE 的优先级权重。 0xFFFF 表示无效元素。 |
tbErrLast |
int8_t[nUe] |
选定 UE 的上次传输的传输块 (TB) 解码错误指示器数组 一维数组。 每个元素的值 将 uIdx = 0, 1, …, nUe-1 表示为协同小区中选定的 UE 索引。 tbErrLast[uIdx] 是第 uIdx 个选定 UE 的上次传输的 TB 解码错误指示器。 -1 - 上次传输不是新传输(是重传) 0 - 正确解码 1 - 解码错误 ** 注意,如果 UE 的上次传输不是新传输,则该 UE 的 tbErrLast 应设置为 -1。 |
tbErrLastActUe |
int8_t[nActiveUe] |
协同小区中所有活动 UE 的 TB 解码错误指示器。 一维数组。 每个元素的值 将 uIdx = 0, 1, …, nActiveUe-1 表示为协同小区中所有活动 UE 的全局 UE 索引。 tbErrLastActUe[uIdx] 是第 uIdx 个活动 UE 的 TB 解码错误指示器 -1 - 上次传输不是新传输(是重传) 0 - 正确解码 1 - 解码错误 ** 注意,如果 UE 的上次传输不是新传输,则该 UE 的 tbErrLastActUe 应设置为 -1。 |
newDataActUe |
int8_t[nActiveUe] |
所有活动 UE 的初始传输/重传指示器。 一维数组。 每个元素的值 将 uIdx = 0, 1, …, nActiveUe-1 表示为协同小区中所有活动 UE 的全局 UE 索引。 newDataActUe[uIdx] 是协同小区中第 uIdx 个活动 UE 的初始传输/重传指示器 0 – 重传 1 - 新数据/初始传输 -1 表示无效元素 |
allocSolLastTx |
对于 type-0 PRG 分配 int16 _t[nCell*nPrbGrp] 对于 type-1 PRG 分配 int16_t[2*nUe] |
协同小区中选定/调度 UE 的上次传输的 PRG 分配解决方案 格式参考 cumacSchdSol 结构中 allocSol 的描述 |
mcsSelSolLastTx |
int16_t[nUe] |
协同小区中选定/调度 UE 的上次传输的 MCS 选择解决方案。 格式参考 mcsSelSol 的描述 在 cumacSchdSol 结构中 |
layerSelSolLastTx |
uint8_t[nUe] |
协同小区中选定/调度 UE 的上次传输的层选择解决方案。 格式参考 cumacSchdSol 结构中 layerSelSol 的描述 |
cumacSchdSol#
API 数据结构,包含调度解决方案。
字段 |
类型 |
描述 |
---|---|---|
setSchdUePerCellTTI |
uint16_t[nCell* numUeSchdPerCellTTI] |
每个小区每个 TTI 选定 UE 的全局 ID 集合。 一维数组。 每个元素的值 将 cIdx = 0, 1, …, nCell-1 表示为协同小区索引。 将 i = 0, 1, …, numUeSchdPerCellTTI-1 表示为给定小区中第 i 个选定 UE。 setSchdUePerCel lTTI[cIdx*numUeSchdPerCellTTI + i] 在 {0, 1, …, nActiveUe-1} 范围内,表示第 cIdx 个协同小区中第 i 个选定 UE 的全局活动 UE 索引。 |
allocSol |
对于 type-0 PRG 分配 int1 6_t[nCell*nPrbGrp] 对于 type-1 PRG 分配 int16_t[2*nUe] |
每个 TTI 在协同小区中为选定 UE 提供的 PRB 组分配解决方案 一维数组。 每个元素的值 对于 type-0 PRG 分配 将 prgIdx = 0, 1, …, nPrbGrp-1 表示为 PRG 索引。 将 cIdx = 0, 1, …, nCell-1 表示为协同小区索引。 allocSol[prgIdx*nCell + cIdx] 指示分配给第 cIdx 个协同小区中第 prgIdx 个 PRG 的选定 UE 索引 (0, 1, …, nUe-1)。 -1 表示小区中的给定 PRG 未分配给任何 UE。 对于 type-1 PRG 分配 将 uIdx = 0, 1, …, nUe-1 表示为协同小区中选定的 UE 索引。 allocSol[2*uIdx] 是第 uIdx 个选定 UE 的起始 PRG 索引。 allocSol[2*uIdx + 1] 是第 uIdx 个选定 UE 的结束 PRG 索引加一。 -1 表示给定 UE 未分配给任何 PRG。 |
pfMetricArr |
float[array_size] array_size = nCell * 不小于 nPrbGrp*n umUeSchdPerCellTTI 的最小 2 的幂 |
用于存储每个 UE 和每个 PRG 计算的 PF 指标的数组。仅用于 type-1 PRG 分配。 一维数组。 为 CUDA 内核执行分配的 GPU 内存。外部不使用。 应在初始化 cuMAC API 时分配内存。 每个元素的值:计算的 PF 指标的浮点类型值。 |
pfIdArr |
uint16_t [array_size] array_size = nCell * 不小于 nPrbGrp*n umUeSchdPerCellTTI 的最小 2 的幂 |
用于指示排序后的 PF 指标的 PRG 和 UE 索引的数组。仅用于 type-1 PRG 分配。 一维数组。 为 CUDA 内核执行分配的 GPU 内存。外部不使用。 应在初始化 cuMAC API 时分配内存。 每个元素的值:0 -> 65535 |
mcsSelSol |
int16_t[nUe] |
每个 TTI 在协同小区中为选定 UE 提供的 MCS 选择解决方案 一维数组。 每个元素的值 将 uIdx = 0, 1, …, nUe-1 表示为协同小区中选定的 UE 索引。 mcsSelSol[uIdx] 指示协同小区中第 uIdx 个选定 UE 的 MCS 级别。 每个元素的范围 0, 1, …, 27(目前仅支持表 5.1.3.1-2:MCS 索引表 2,3GPP TS 38.214)。 -1 表示元素无效。 |
layerSelSol |
uint8_t[nUe] |
每个 TTI 在协同小区中为选定 UE 提供的层选择解决方案。 一维数组。 每个元素的值 将 uIdx = 0, 1, …, nUe-1 表示为协同小区中选定的 UE 索引。 layerSelSol[uIdx] 指示协同小区中第 uIdx 个选定 UE 选择的层数。 每个元素的范围:0, 1, …, nUeAnt-1 所选层具有从最大值开始降序排列的奇异值。 |
cuMAC 调度器模块 API#
多小区比例公平 UE 下行选择#
包装类和公共成员函数
class cumac::multiCellUeSelection
public:
// constructor
multiCellUeSelection();
// destructor
~multiCellUeSelection();
// setup() function for per-TTI algorithm execution
void setup(cumac::cumacCellGrpUeStatus\* cellGrpUeStatus,
cumac::cumacSchdSol\* schdSol,
cumac::cumacCellGrpPrms\* cellGrpPrms,
uint8_t in_enableHarq,
cudaStream_t strm);
// requires external synchronization
// set in_enableHarq to 1 if HARQ is enabled; 0 otherwise
// run() function for per-TTI algorithm execution
void run(cudaStream_t strm);
// requires external synchronization
// parameter/data buffer logging function for debugging purpose
void debugLog();
// for debugging only, printing out dynamic descriptor parameters
多小区比例公平 PRB 调度器#
包装类和公共成员函数
class cumac::multiCellScheduler
public:
// constructor
multiCellScheduler();
// destructor
~multiCellScheduler();
// setup() function for per-TTI algorithm execution
void setup(cumac::cumacCellGrpUeStatus\* cellGrpUeStatus,
cumac::cumacSchdSol\* schdSol,
cumac::cumacCellGrpPrms\* cellGrpPrms,
uint8_t in_DL,
uint8_t in_columnMajor,
uint8_t in_halfPrecision,
uint8_t in_lightWeight,
cudaStream_t strm);
// set in_DL to 1 if setup for DL scheduling; 0 otherwise
// in_columnMajor: 0 - row-major channel access, 1 - column-major channel access
// in_halfPrecision: 0 - call FP32 floating type kernel, 1 - call FP16 (bfloat162) half-precision kernel
// in_lightWeight: 0 - call heavy-weight kernel, 1 - call light-weight kernel
// in_enableHarq: 0 - HARQ disabled, 1 - HARQ enabled
// requires external synchronization
// run() function for per-TTI algorithm execution
void run(cudaStream_t strm);
// requires external synchronization
// parameter/data buffer logging function for debugging purpose
void debugLog();
// for debugging only, printing out dynamic descriptor parameters
多小区层选择#
包装类和公共成员函数
class cumac::multiCellLayerSel
public:
// constructor
multiCellLayerSel();
// desctructor
~multiCellLayerSel();
// setup() function for per-TTI algorithm execution
void setup(cumacCellGrpUeStatus\* cellGrpUeStatus,
cumacSchdSol\* schdSol,
cumacCellGrpPrms\* cellGrpPrms,
uint8_t in_enableHarq,
cudaStream_t strm);
// in_enableHarq: 0 - HARQ disabled, 1 - HARQ enabled
// requires external synchronization
// run() function for per-TTI algorithm execution
void run(cudaStream_t strm);
// requires external synchronization
// parameter/data buffer logging function for debugging purpose
void debugLog();
// for debugging only, printing out dynamic descriptor parameters
多小区 MCS 选择 + 外环链路自适应 (OLLA)#
包装类和公共成员函数
class cumac::mcsSelectionLUT
public:
// constructor
mcsSelectionLUT(uint16_t nActiveUe, cudaStream_t strm);
// requires external synchronization
// uint16_t nActiveUe is the (maximum) total number of active UEs in all
coordinated cells
// destructor
~mcsSelectionLUT();
// setup() function for per-TTI algorithm execution
void setup(cumacCellGrpUeStatus\* cellGrpUeStatus,
cumacSchdSol\* schdSol,
cumacCellGrpPrms\* cellGrpPrms,
uint8_t in_DL,
uint8_t in_baseline,
cudaStream_t strm);
// in_DL: 0 - UL, 1 - DL
// in_baseline: 0 - not using baseline algorithm, 1 - using baseline
algorithm
// requires external synchronization
// run() function for per-TTI algorithm execution
void run(cudaStream_t strm);
// parameter/data buffer logging function for debugging purpose
void debugLog();
// for debugging only, printing out dynamic descriptor parameters
外环链路自适应 (OLLA) 数据结构
// structure containing outer-loop link adaptation algorithm parameters
struct ollaParam {
float delta; // offset to SINR estimation
float delta_ini; // initial value for delta parameter
float delta_up; // step size for increasing delta parameter
float delta_down; // step size for decreasing delta parameter
};