31
31
% addTestDefinitionToHeaderFile - Adds details (e.g., type/variable declarations)
32
32
% to the test header file.
33
33
%
34
- % See also matlab.unittest.
34
+ % See also matlab.unittest, nrPRS, nrPRSIndices, nrPRSConfig .
35
35
36
- % Copyright 2021-2024 Software Radio Systems Limited
36
+ % Copyright 2021-2025 Software Radio Systems Limited
37
37
%
38
38
% This file is part of srsRAN-matlab.
39
39
%
81
81
Numerology = {0 , 1 }
82
82
83
83
% 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.
85
85
DurationAndCombSize = {[2 , 2 ], [4 , 2 ], [6 , 2 ], [12 , 2 ], [4 , 4 ], [12 , 4 ], [6 , 6 ], [12 , 6 ], [12 , 12 ]}
86
86
end
87
87
@@ -111,13 +111,12 @@ function initializeClassImpl(obj)
111
111
methods (Test , TestTags = {' testvector' })
112
112
function testvectorGenerationCases(testCase , Numerology , DurationAndCombSize )
113
113
% 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
+
116
117
117
118
import srsTest .helpers .cellarray2str
118
119
import srsTest .helpers .writeResourceGridEntryFile
119
- import srsTest .helpers .symbolAllocationMask2string
120
- import srsTest .helpers .RBallocationMask2string
121
120
122
121
% Derive test parameters.
123
122
subcarrierSpacing = 15 * pow2(Numerology );
@@ -132,14 +131,14 @@ function testvectorGenerationCases(testCase, Numerology, DurationAndCombSize)
132
131
133
132
% Select random parameters.
134
133
NCellID = randi([0 , 504 ]);
135
- REOffset = randi([0 combSize - 1 ]);
134
+ REOffset = randi([0 , combSize - 1 ]);
136
135
numRB = randi([testCase .MinNumRB / testCase .ResNumRB , ...
137
136
testCase .MaxNumRB / testCase .ResNumRB ]) * testCase .ResNumRB ;
138
137
symbolStart = randi([0 , 14 - numPRSSymbols ]);
139
138
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 ]);
143
142
amplitude = 10 * (rand() + 1 );
144
143
nStartGrid = randi([0 , 2176 - numRB - RBOffset ]);
145
144
0 commit comments