Skip to content

Commit e6d2b2a

Browse files
author
Xavier Arteaga
committedJan 16, 2025
Review PRS generator related
1 parent 4f7b0bc commit e6d2b2a

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed
 

‎srsPRSGeneratorUnittest.m

+10-11
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
% addTestDefinitionToHeaderFile - Adds details (e.g., type/variable declarations)
3232
% to the test header file.
3333
%
34-
% See also matlab.unittest.
34+
% See also matlab.unittest, nrPRS, nrPRSIndices, nrPRSConfig.
3535

36-
% Copyright 2021-2024 Software Radio Systems Limited
36+
% Copyright 2021-2025 Software Radio Systems Limited
3737
%
3838
% This file is part of srsRAN-matlab.
3939
%
@@ -81,7 +81,7 @@
8181
Numerology = {0, 1}
8282

8383
%Valid combinations of comb size and duration. Valid combinations
84-
%are given in TS38.211 Section 7.4.1.7.3.
84+
% are given in TS38.211 Section 7.4.1.7.3.
8585
DurationAndCombSize = {[2, 2], [4, 2], [6, 2], [12, 2], [4, 4], [12, 4], [6, 6], [12, 6], [12, 12]}
8686
end
8787

@@ -111,13 +111,12 @@ function initializeClassImpl(obj)
111111
methods (Test, TestTags = {'testvector'})
112112
function testvectorGenerationCases(testCase, Numerology, DurationAndCombSize)
113113
%testvectorGenerationCases Generates a test vector for the given Numerology,
114-
% NumLayers, FrequencyDensity, TimeDensity, and
115-
% REOffset. Other parameters are selected randomly.
114+
% NumLayers, FrequencyDensity, TimeDensity, and REOffset. Other parameters
115+
% are selected randomly.
116+
116117

117118
import srsTest.helpers.cellarray2str
118119
import srsTest.helpers.writeResourceGridEntryFile
119-
import srsTest.helpers.symbolAllocationMask2string
120-
import srsTest.helpers.RBallocationMask2string
121120

122121
% Derive test parameters.
123122
subcarrierSpacing = 15 * pow2(Numerology);
@@ -132,14 +131,14 @@ function testvectorGenerationCases(testCase, Numerology, DurationAndCombSize)
132131

133132
% Select random parameters.
134133
NCellID = randi([0, 504]);
135-
REOffset = randi([0 combSize - 1]);
134+
REOffset = randi([0, combSize - 1]);
136135
numRB = randi([testCase.MinNumRB / testCase.ResNumRB, ...
137136
testCase.MaxNumRB / testCase.ResNumRB]) * testCase.ResNumRB;
138137
symbolStart = randi([0, 14 - numPRSSymbols]);
139138
RBOffset = randi([0, nSizeGrid - numRB]);
140-
NPRSID = randi([0 4095]);
141-
nSlot = randi([0 (10 * pow2(Numerology) - 1)]);
142-
nFrame = randi([0 1023]);
139+
NPRSID = randi([0, 4095]);
140+
nSlot = randi([0, (10 * pow2(Numerology) - 1)]);
141+
nFrame = randi([0, 1023]);
143142
amplitude = 10 * (rand() + 1);
144143
nStartGrid = randi([0, 2176 - numRB - RBOffset]);
145144

0 commit comments

Comments
 (0)
Please sign in to comment.