1 %/******************************************************************************
3 %* Copyright (c) 2019 Intel.
5 %* Licensed under the Apache License, Version 2.0 (the "License");
6 %* you may not use this file except in compliance with the License.
7 %* You may obtain a copy of the License at
9 %* http://www.apache.org/licenses/LICENSE-2.0
11 %* Unless required by applicable law or agreed to in writing, software
12 %* distributed under the License is distributed on an "AS IS" BASIS,
13 %* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 %* See the License for the specific language governing permissions and
15 %* limitations under the License.
17 %*******************************************************************************/
22 %select mu and bw to generate test files
25 bw=100; %5,10,20,100 MHz
27 nSlots=160; % any 40 and 160
29 % 5MHz 10MHz 15MHz 20 MHz 25 MHz 30 MHz 40 MHz 50MHz 60 MHz 70 MHz 80 MHz 90 MHz 100 MHz
32 % 5MHz 10MHz 15MHz 20 MHz 25 MHz 30 MHz 40 MHz 50MHz 60 MHz 70 MHz 80 MHz 90 MHz 100 MHz
33 [25, 52, 79, 106, 133, 160, 216, 270, 0, 0, 0, 0, 0] % Numerology 0 (15KHz)
34 [11, 24, 38, 51, 65, 78, 106, 133, 162, 0, 217, 245, 273] % Numerology 1 (30KHz)
35 [0, 11, 18, 24, 31, 38, 51, 65, 79, 0, 107, 121, 135] % Numerology 2 (60KHz)
40 % 50Mhz 100MHz 200MHz 400MHz
41 [66, 132, 264, 0] % Numerology 2 (60KHz)
42 [32, 66, 132, 264] % Numerology 3 (120KHz)
51 numRBs = nNumRbsPerSymF1(nNumerology,0+1);
53 numRBs = nNumRbsPerSymF1(nNumerology,1+1);
55 numRBs = nNumRbsPerSymF1(nNumerology,2+1);
57 numRBs = nNumRbsPerSymF1(nNumerology,3+1);
59 numRBs = nNumRbsPerSymF1(nNumerology,4+1);
61 numRBs = nNumRbsPerSymF1(nNumerology,5+1);
63 numRBs = nNumRbsPerSymF1(nNumerology,6+1);
65 numRBs = nNumRbsPerSymF1(nNumerology,7+1);
67 numRBs = nNumRbsPerSymF1(nNumerology,8+1);
69 numRBs = nNumRbsPerSymF1(nNumerology,9+1);
71 numRBs = nNumRbsPerSymF1(nNumerology,10+1);
73 numRBs = nNumRbsPerSymF1(nNumerology,11+1);
75 numRBs = nNumRbsPerSymF1(nNumerology,12+1);
77 disp('Unknown BW && mu')
82 if (mu >=2) && (mu <= 3)
86 numRBs = nNumRbsPerSymF2(nNumerology-1,0+1);
88 numRBs = nNumRbsPerSymF2(nNumerology-1,1+1);
90 numRBs = nNumRbsPerSymF2(nNumerology-1,2+1);
92 numRBs = nNumRbsPerSymF2(nNumerology-1,3+1);
94 disp('Unknown BW && mu')
100 disp('Incorrect Numerology and BW combination.')
109 %ifft_in = load('ifft_in.txt')
112 ifft_in = [[1:1:(numRBs*12)]', [1:1:(numRBs*12)]'];
115 for (i=1:1:nSlots*14-1)
116 ifft_in_1 = ifft_in + i;
117 ant_c = [ant_c; ifft_in_1];
138 ant0_16=int16(ant0.');
139 fileID = fopen('ant_0.bin','w');
140 fwrite(fileID,ant0_16, 'int16');
143 ant1_16=int16(ant1.');
144 fileID = fopen('ant_1.bin','w');
145 fwrite(fileID,ant1_16, 'int16');
148 ant2_16=int16(ant2.');
149 fileID = fopen('ant_2.bin','w');
150 fwrite(fileID,ant2_16, 'int16');
153 ant3_16=int16(ant3.');
154 fileID = fopen('ant_3.bin','w');
155 fwrite(fileID,ant3_16, 'int16');
158 ant4_16=int16(ant4.');
159 fileID = fopen('ant_4.bin','w');
160 fwrite(fileID,ant4_16, 'int16');
163 ant5_16=int16(ant5.');
164 fileID = fopen('ant_5.bin','w');
165 fwrite(fileID,ant5_16, 'int16');
168 ant6_16=int16(ant6.');
169 fileID = fopen('ant_6.bin','w');
170 fwrite(fileID,ant6_16, 'int16');
173 ant7_16=int16(ant7.');
174 fileID = fopen('ant_7.bin','w');
175 fwrite(fileID,ant7_16, 'int16');
178 ant8_16=int16(ant8.');
179 fileID = fopen('ant_8.bin','w');
180 fwrite(fileID,ant8_16, 'int16');
183 ant9_16=int16(ant9.');
184 fileID = fopen('ant_9.bin','w');
185 fwrite(fileID,ant9_16, 'int16');
188 ant10_16=int16(ant10.');
189 fileID = fopen('ant_10.bin','w');
190 fwrite(fileID,ant10_16, 'int16');
193 ant11_16=int16(ant11.');
194 fileID = fopen('ant_11.bin','w');
195 fwrite(fileID,ant11_16, 'int16');
198 ant12_16=int16(ant12.');
199 fileID = fopen('ant_12.bin','w');
200 fwrite(fileID,ant12_16, 'int16');
203 ant13_16=int16(ant13.');
204 fileID = fopen('ant_13.bin','w');
205 fwrite(fileID,ant13_16, 'int16');
208 ant14_16=int16(ant14.');
209 fileID = fopen('ant_14.bin','w');
210 fwrite(fileID,ant14_16, 'int16');
213 ant15_16=int16(ant15.');
214 fileID = fopen('ant_15.bin','w');
215 fwrite(fileID,ant15_16, 'int16');