NG Toolset開發筆記--5GNR Resource Grid(33)
10/23~10/28完成:
*PT-RS for PDSCH (<-- should be put together with #6-PDSCH resource allocation)
*PT-RS for PUSCH (<-- should be put together with #7-PUSCH resource allocation)
*SRS configuration
*PRACH configuration
*PUCCH configuration
Notes:
a), Remaining part:
*CSI-RS configuration
b), Coding can begin soon since all essential parts are ready! Although Data_Structures are illustrated in C++, actual implementation will use Python based on the NG Toolset framework.
(6.1) PDSCH resource allocation, part 2----PTRS for PDSCH
struct NrPtrsPdschConfig { int timeDensity; // the LPTRS can be 1/2/4, int freqDensity; //the KPTRS, can be 2/4 int reOffset; // the resourceElementOffset, can be 0/1/2/3 int dmrsPort; // For simplicity, assume PTRS for PUSCH use the lowest index of DMRS antenna ports of CW0 in both one CW and two CWs scenarios. };
In 'Dedicated active DL BWP' part, we introduce NrDedicatedPdschConfig:
struct NrDedicatedPdschConfig
{
int aggFactor; //can be {1,2,4,8}, limited to a single layer transmission
int rbgConfig; //rbg-Size, can be {config1, config2}
int rbgSize; //the nominal size of RBG P
};
(7.1) PUSCH resource allocation,part 2-------PTRS for PUSCH
When transform precoding is enabled for PUSCH, use NrPtrsPuschTpConfig; otherwise, use NrPtrsPuschConfig.
struct NrPtrsPuschConfig
{
int timeDensity; //can be 1/2/4
int freqDensity; //can be 2/4
int reOffset; //can be 0/1/2/3
int maxNumPorts; //can be 1/2
std::map<int, std::vector<int> > ptrsDmrsMapping; //[PTRS port, list of DMRS port(s)], and PTRS port = 0/1
};
struct NrPtrsPuschTpConfig
{
int timeDensity; //can be 1/2
int numGroups; //can be 2/4/8 as specified in 38.214 Table 6.2.3.2-1
int samplesPerGroup; //can be 2/4 as specified in 38.214 Table 6.2.3.2-1
std::map<int, std::vector<int> > ptrsDmrsMapping; //[PTRS port, list of DMRS port(s)] and PTRS port = 0
};
Further CB/nonCB PUSCH settings are included in NrDedicatedPuschConfig.
In 'Dedicated active UL BWP' part, we introduce NrDedicatedPuschConfig:
struct NrDedicatedPuschConfig
{
NrPuschTxConfig txConfig;
NrPuschCodebookSubset cbSubset;
int cbMaxRank; //can be 1~4
int nonCbMaxLayers; //can be 1~4, the Lmax in 38.212 Table 7.3.1.1.2-28~ Table 7.3.1.1.2-31
int aggFactor; //can be {1,2,4,8}, limited to a single layer transmission
int freqOffset; //frequency offset of 2nd hop in case of intra-slot FH
NrPuschTransformPercoding tp;
int rbgConfig; //rbg-Size, can be {config1, config2}
int rbgSize; //the nominal size of RBG P
};
enum NrPuschTxConfig
{
//{codebook, nonCodebook}
}
enum NrPuschCodebookSubset
{
//{ fullyAndPartialAndNonCoherent, partialAndNonCoherent, nonCoherent}
};
we also updated NrDmrsPuschConfig to distinguish CB PUSCH and NonCB PUSCH:
(11) SRS configuration
struct NrSrsConfig
{
NrSrsResourceSet cbSrsSet;
NrSrsResourceSet nonCbSrsSet;
};
struct NrSrsResourceSet
{
int id; //can be 0~15
std::vector<int> resourceList; //one set with at most 2 resources for CB PUSCH, and one set with at most 4 resources for nonCB PUSCH
NrSrsResourceType type; //only periodic is supported!
NrSrsUsage usage; //only codebook/nonCodebook are supported!
};
enum NrSrsResourceType
{
//{aperiodic, semi-persistent, periodic}
}
enum NrSrsUsage
{
//{beamManagement, codebook, nonCodebook, antennaSwitching}
}
struct NrSrsResource
{
int id; //can be 0~63
int numPorts; //can be 1/2/4
int numTcs; //the number of transmission combs, can be 2/4
int combOffset; //can be 0~1 when numTcs=2, and 0~3 when numTcs=4
int startPosition; //can be 0~5
int numSymbs; //can be 1/2/4
int repetitionFactor; //can be 1/2/4, fulfills repetitionFactor <= numSymbs
int freqPosition; //can be 0~67
int freqOffset; //can be 0~268
int cSrs; //can be 0~63
int bSrs; //can be 0~3
int bHop; //can be 0~3, FH is enabled when bHop < bSrs
NrSrsResourceType type; //only periodic is supported!
NrSrsPeriodicity period;
int offset; //can be [0, period-1]
};
enum NrSrsPeriodicity
{
//{sl1, sl2, sl4, sl5, sl8, sl10, sl16, sl20, sl32, sl40, sl64, sl80, sl160, sl320, sl640, sl1280, sl2560}
}
(12) PUCCH configuration
struct NrPucchConfig
{
NrPucchFormatConfig fmtConfig;
std::vector<NrPucchResourceSet> resourceSetList; //max 4 resource sets
std::vector<NrSrResourceConfig> srResourceList; //max 8 dsr resources
};
struct NrPucchResourceSet
{
int id; //0~3, set0 can be used for format 0/1 only
std::vector<NrPucchResource> resourceList; //max 32 resources for set0, and max 8 resources for other sets
};
struct NrPucchResource
{
int id; //0~55
NrPucchFormat format;
int startingPrb;
bool intraSlotFreqHop;
int secondHopPrb;
int numPrbs; //can be 1~16, applicable for format 2/3, =1 for format 0/1/4
int startingSymb; //can be 0~13 for format 0/2, and 0~10 for format 1/3/4
int numSymbs; //can be 1~2 for format 0/2, and 4~14 for format 1/3/4
};
enum NrPucchFormat
{
//{format0, format1, format2, format3, format4}
}
struct NrPucchFormatConfig
{
int numSlots; //can be 1/2/4/8, only applicable to format 1/3/4
bool interSlotFreqHop; //only applicable to format 1/3/4
bool additionalDmrs; //only applicable to format 3/4
bool simultanousAckCsi; //only applicable to format 2/3/4
};
struct NrSrResourceConfig
{
int id;
int resId; //the id of NrPucchResource
NrSrPeriodicity period; //in slots
int offset; //in slots, can be [0, period-1], =0 for period={sym2, sym6or7, sl1}
};
enum NrSrPeriodicity
{
//{sym2, sym6or7, sl1, sl2, sl4, sl5, sl8, sl10, sl16, sl20, sl40, sl80, sl160, sl320, sl640}
}
(13) PRACH configuration
struct NrPrachConfig
{
NrPrachGeneric prachGeneric;
int numRaPreambles; //can be 1~64
NrSsbPrachAssociation ssbPrachMapping;
NrPrachTimeAlloc timeAlloc;
NrPrachFreqAlloc freqAlloc;
};
struct NrPrachGeneric
{
int prachConfInd; //0~255
NrPrachFormat prachFmt;
NrPrachSubcarrierSpacing prachScs;
int msg1FreqStart; //0~274
int msg1Fdm; //can be {1, 2, 4, 8}
};
struct NrPrachTimeAlloc
{
int x; //n_SFN mod x = y
std::vector<int> y;
std::vector<int> subfsFr1OrSlotsFr2;
int startingSymb;
int nRaTime; //the prach occasion index in time domain within a prach slot
int raDuration; //prach duration
int nRaSlots; //the number of prach slots within a subframe for FR1, or the number of prach slots within a 60khz slot for FR2
int numGap; //the N_Gap as specified in 38.213 8.1; numGap = 0 for 1.25k/5k and = 2 otherwise; and numGap = 0 for B4
};
struct NrPrachFreqAlloc
{
int numPrachRb; //N_RA_RB in 38.211 Table 6.3.3.2-1
int kBar; //k- in 38.211 Table 6.3.3.2-1
int nRaFreq; //the prach occasion index in frequency domain of one time instance
};
enum NrPrachFormat
{
//{0, 1, 2, 3, A1, A2, A3, B1, B2, B3, B4, C0, C2}
}
enum NrPrachSubcarrierSpacing
{
//{1.25k, 5k, 15k, 30k, 60k, 120k}
};
struct NrSsbPrachAssociation
{
double ssbPerPrachOccasion; //can be {1/8, 1/4, 1/2, 1, 2, 4, 8, 16}
int cbPreamblesPerSsb; //depends on ssbPerPrachOccasion
};