|RIV(Resource Indication Value)|
RIV is a number to specify PDSCH or PUSCH resource allocation. In more intuitive form, we normally use two values (i.e, Number of RBs and Start RB) for the resource allocation. But with RIV, we can represent Number of RBs and Start RB in a single value. It would have some advantage in terms of number of bits to carry the information.. but it causes some confusion for us to convert RIV into Number of RBs and Start RB.
Followings are couple of examples showing how RIV is specified in DCI.
The conversion from the number of RB and Start RB to RIV is defined as shown below.
For downlink, there are a couple of different mathematical definition for RIV depending on a specific DCI format. It is specified in 36.213 - 22.214.171.124 Resource allocation type 2 as follows.
For PDCCH DCI format 1A, 1B or 1D, or for EPDCCH DCI format 1A, 1B, or 1D, a type 2 resource allocation field
For PDCCH DCI format 1C, a type 2 resource block assignment field
For Uplink, it is defined in 36.213 - 8.1.1 Uplink resource allocation type 0 as shown below.
As you see, it is pretty simple to get RIV from Number of RBs (L_CRB) and Start RB(RB_Start), but it is not easy to figure out Number of RBs (L_CRB) and Start RB(RB_Start) from RIV.
One way to find N_RB and Start_RB from RIV value is to try all the possible values of N_RB and Start_RB and find the combination to meet any one of the equation (1) or (2). Following is an example of the algorithm showing the method of finding N_RB and Start_RB from OpenLTE project.
% Copyright 2012 Ben Wojtowicz
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU Affero General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU Affero General Public License for more details.
% You should have received a copy of the GNU Affero General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
% Following is from lte_dci_1a_unpack.m file in /octave folder
if((n-1) <= floor(N_rb_dl/2))
if(RIV == N_rb_dl*(n-1)+m)
L_crb = n;
RB_start = m;
if(RIV == N_rb_dl*(N_rb_dl-n+1)+(N_rb_dl-1-m))
L_crb = n;
RB_start = m;