Embodiment
Describe with reference to the accompanying drawings according to principle of the present invention and preferred embodiment thereof.
Ovsf code tree user mode storage means based on basic bit rate according to the present invention is that the data rate that can provide between the generating principle, each layer of OVSF sign indicating number according to ovsf code concerns, the basic allocation criteria of ovsf code, a kind of memory space efficient of efficiently utilizing that puts forward is beneficial to and simplifies handling process and reduce the ovsf code tree management using method of handling complexity.
The generating principle of ovsf code has shown that the yardage that can provide on the sublayer of each different length sign indicating number just equals the ovsf code length of this layer, and for example the ovsf code tree can provide the ovsf code of 8 SF=8 altogether.Here the number that has shown sign indicating number with yard length between relation.
And total sign indicating number number that whole ovsf code tree can provide is 4+8+...+256+512=1020 in theory, but because the basic allocation criteria of ovsf code and the orthogonality requirement between the ovsf code, then the number of code tree sign indicating number that can provide will significantly reduce simultaneously.According to the basic allocation criteria of ovsf code, promptly after a sign indicating number was assigned with use, in order to keep the orthogonality of intersymbol, the subcode of its former generation's sign indicating number that passes up to the ovsf code tree root and the following code tree leaf that traces back all can not be re-used.And utilize the code tree generating principle, the sign indicating number that we can have been distributed and can not being re-used of getting clogged yard between exist certain corresponding relation.
The data rate that each layer sign indicating number can provide in the ovsf code tree can be converted into the multiple of the speed that leaf node provided (basic bit rate) of the code tree bottom in addition, and also satisfies following relation between them: the ovsf code of n layer (2≤n≤9) (is SF=2
n) data rate that provided is 2 of the data rate (basic bit rate R) that provided of the ovsf code (being SF=512) of leaf node
9-nDoubly.And the maximum data rate that whole code tree can provide is exactly the summation of the basic bit rate that ovsf code provided of leaf node, i.e. 512 * R, and wherein R is a basic bit rate.
The present invention utilizes the structure of arrays CTree[512 of 512 Boolean type data of an one dimension] represent the ovsf code tree state of a sub-district, it is on the one-dimension array of benchmark that whole code tree is corresponded to the basic bit rate.
The descending ovsf code of supposing WCDMA is expressed as C
SF, NCode, wherein SF represents the spreading factor length of this yard, and span is 4~512, and NCode represents the sign indicating number sequence number of this yard this sublayer on code tree, and span is 0~SF-1.C then
SF, NCodeThe data rate that can provide is 512/SF * R.
State for an ovsf code has available (Free), takies (Occupied), blocks (Blocked) three kinds, but it all just shows as available and unavailable two kinds for follow-up use, so the available and down state of the pairing sign indicating number in this position that we represent with Boolean TRUE and FALSE.We utilize the structure of arrays CTree[512 of 512 Boolean type data of an one dimension] represent the ovsf code tree state of a sub-district, it is on the one-dimension array of benchmark that whole code tree is corresponded to the basic bit rate.
For principle of the present invention is described simply, shown in Figure 2 one 5 layers, ovsf code tree state the one-dimension array based on basic bit rate corresponding with it of maximum SF=16 are represented example.
The circle of the circle of the black code tree node representing to have taken, grey represents that the code tree node that gets clogged and the circle of white represent available code tree node in the drawings.
Except the leaf node (being the layer of SF=16) of the bottom, other each nodes all have two child nodes.According to principle mentioned above, in order to keep the orthogonality of intersymbol, all former generation's sign indicating numbers of occupied sign indicating number and its all subcodes all can not be re-used, and we represent these nodes with gray circles.
Set up one with the state of the leaf node of bottom one-dimension array one to one, whether the corresponding leaf node in each unit of judging this array is node occupied or that get clogged, if be node occupied or that block, then the numerical value of corresponding array location is set to " F " (False), perhaps be set to " 0 ", represent that this leaf node is unavailable; And be set to " T " (True) corresponding to the numerical value of the array location of available leaf node, and perhaps be set to " 1 ", represent that this node can use.
As can be seen from the figure, if former generation's node can be used, then its pairing all leaf node all is in upstate, numbering corresponding to all leaf nodes of former generation's node is continuous, and has certain numerical relation with the number of corresponding all leaf nodes of former generation's node and the number of plies of this former generation's node.
Fig. 3 illustrates the flow chart of the method for storing the ovsf code tree state in accordance with the principles of the present invention.As shown in Figure 3, in order to store the upstate of each yard in the code tree, at first in step 301, be provided for storing the memory cell of upstate of the leaf sign indicating number of ovsf code tree, and the numerical value that this memory cell is stored is initialized as upstate (T); In step 302, during each yard in distributing this ovsf code tree, be set to down state and when discharging each yard corresponding to numerical value, be set to upstate corresponding to numerical value as the memory cell of the leaf node that is released yard as the memory cell of the leaf node of occupied sign indicating number; The last memory cell that in step 303, obtains the user mode of the whole code tree of expression, and be used for sign indicating number distribution subsequently and discharge handling.Hereinafter, this memory cell is represented with array.
According to the WCDMA standard, always have 512 leaf nodes, can be 512 one-dimension array CTree[with a unit number] represent the state of whole code tree.
A kind of method that code tree state according to the present invention is represented is:
● each yard in the ovsf code tree all occupies 512/SF continuous memory space and represents the user mode that it is current in this array.
● do not have available codes occupied and that block, its state representation is available (T)
● the occupied or unavailable sign indicating number that blocks, its state representation is for taking (F).
● when length is after the SF sign indicating number of L is assigned with, the continuous memory space state representation of 512/L that corresponds to basic bit rate is for blocking unavailable (F).
Like this at one-dimension array CTree[] in comprised complete code tree user mode information.
For each yard C
SF, NCodeIf, at CTree[] in original position be CTree[NCode * 512/SF], and from CTree[NCode * 512/SF] value of continuous 512/SF cell data of beginning is " available (T) ", then represents this yard C
SF, NCodeState be available; Else if from CTree[NCode * 512/SF] there is the value of a cell data to be " unavailable (F) " the value of continuous 512/SF cell data of beginning, represent C
SF, NCodeThe state of sign indicating number is unavailable.
The whole code tree of initial state is all available, then array CTree[] in value all be T.
Be assigned with C as sign indicating number
SF, NCodeThe time, then array CTree[] in from CTree[NCode * 512/SF] value of 512/SF sequential cells of beginning is F, expression this moment is owing to having distributed C
SF, NCodeSign indicating number causes 512/SF leaf node sign indicating number of bottom to get clogged, and has taken the speed of R * 512/SF.
For the basic code tree management function of supporting that solid size distributes,, in this data structure, can both foolproofly realize as the distribution of sign indicating number, the release of sign indicating number etc.
Fig. 4 illustrates the flow chart according to the processing method of the required sign indicating number of the distribution of principle of the present invention.At first in step 401, according to required message transmission rate, the length of the sign indicating number that calculating should distribute; Then in step 402, according to the length that institute is calculated yard, utilize the array of memory code tree state, search whether there is such sign indicating number with length of being calculated, the state of feasible all leaf sign indicating numbers corresponding to this yard all is " available "; If find the sign indicating number that has the length of being calculated like this, then distribute this sign indicating number, expression is set to unavailable (step 403) corresponding to the state of all leaf nodes of this yard, and finishes allocation process (step 404); Otherwise return the information (step 405) of the sign indicating number that does not find Len req.
Fig. 5 illustrates the flow chart of solid size allocation process method according to an embodiment of the invention in further detail.As shown in the drawing, in
step 501, be the data rate requirement that benchmark calculates new request with the basic bit rate, the result is expressed as the multiple relation of basic bit rate, i.e. m * R; In
step 502, calculate the length of the SF sign indicating number that needs distribution according to the m that obtains * R, because the code check of SF=512 length is R, and is the relation of 2 exponential depth between the code check of other length and the basic bit rate,, the m * R of required request doubly is so being converted into the smallest positive integral of 2 exponential depth of basic bit rate
Then need the length of the SF sign indicating number that distributes to be
It is the sign indicating number of SF=L.
Length is that the SF sign indicating number of L at most also just has only L in system, carries out the circular treatment on L rank below then, and retrieval code tree state array is searched the SF sign indicating number of available length L.
In step 503, sign indicating number number circular treatment variable initial value is set to i=0.
In step 504, from i=0 to L-1, carry out circulation searching and handle.Withdraw from if be recycled to i=L, then the sign indicating number of available SF=L is not found in expression, leaps to step 515, withdraws from processing.
Sign indicating number for SF=L is each time searched, and need be code tree state array starting point with i * 512/L, judges that whether having a continuous 512/L value thereafter is the data cell of T.If wherein have the unit that value is the data of F, represent that then the sign indicating number of this SF=L is unavailable, carry out the sign indicating number of next i and search circulation.
In step 505, the initial value of searching available cell circular treatment variable of code tree state array is set to j=0.And whether sign exists sign indicating number Status Flag occupied or that block to be set to K=0 in this circular treatment.If having value in the circulating treatment procedure is the data cell of F, the value of then revising K is 1, represents that the sign indicating number of the pairing SF=L in this group unit is unavailable.
In step 506, for each i * 512/L is the array location group of the SF=L sign indicating number correspondence of starting point, when cyclic variable j does not surpass unit group length 512/L, and when not finding that value is the data cell of F, proceed the judgment processing of next data cell, promptly cycling condition is j<512/L and K=0.
In step 507, to during each data cell judge whether its value is T.
Step 508 if its value does not represent that for T the sign indicating number of this data cell correspondence is occupied or block that then K is set to 1, jumps out this circular treatment when being circulated back to condition judgment naturally, is represented the i number C of SF=L of this i * 512/L correspondence
L, iUnavailable.
In step 509, continue circular treatment variable j value is added 1, get back to step 506 and carry out the condition judgment of circular treatment next time.
In step 510, when withdrawing from this C
L, iAfter the availability of sign indicating number is judged circular treatment, need to check the sign indicating number that whether has found required distribution, check promptly whether the value of available flag K is still 0.
In step 511, if K is not equal to 0 expression C
L, iSign indicating number is occupied or block unavailablely, and the cycle counter i of sign indicating number number is added 1, gets back to step 504 and proceeds next C
L, iThe judgment processing of sign indicating number.
In step 512, if K=0 represents this C
L, iSign indicating number is exactly to satisfy the sign indicating number that we require, and then ends the processing of sign indicating number number circulation, jumps out circulation.
In step 513, found the sign indicating number that needs the SF=L of distribution, a sign indicating number state array index is the i number C of the SF=L of i * 512/L correspondence exactly
L, i
In step 514, to having found behind the SF=L sign indicating number that needs to distribute to code tree state array CTree[] data upgrade processing, write down the code tree state after current having assigned.Begin to revise CTree[from the subscript i * 512/L unit of array] the data cell value, need to revise CTree[i * 512/L]~CTree[(i+1) * and 512/L-1] value of this 512/L data unit is F, represent currently distributing the i number CL of SF=L, behind the i, this 512/L the leaf sign indicating number that corresponds to SF=512 all is to block down state.
In step 515, if sign indicating number number circular treatment withdraws from circulation to i=L, represent that then the sign indicating number of all SF=L is all unavailable, so current system can not provide the sign indicating number of SF=L, current system can not support this new request.
In the step of above-mentioned Fig. 5, step 501~502nd is corresponding to the embodiment of the step 401 among Fig. 4; Step 503~512nd is corresponding to the embodiment of the step 402 among Fig. 4; Step 513~514th is corresponding to the embodiment of the step 403 among Fig. 4; And step 515 is corresponding to the step 405 among Fig. 4.
Those of ordinary skill in the art except specific embodiment shown in Figure 5, can also realize the method for the present invention shown in Fig. 4 with other modes obviously as can be seen.For example, used searching method is to judge corresponding to a sign indicating number that meets required code check (promptly earlier in Fig. 5, whether first leaf node sign indicating number of SF=L layer) is upstate, if this first leaf node can be used, judge successively subsequently continuously then whether 512/L leaf node all is upstate, if all be upstate then the sign indicating number of judging their pairing SF=L layers for available, otherwise select the sign indicating number of next SF=L layer to carry out same judgement; But also can judge earlier (promptly corresponding to a sign indicating number that meets required code check, whether last leaf node sign indicating number of SF=L layer) is upstate, if this last leaf node can be used, whether continuous 512/L leaf node before then judging successively all is upstate.
The release processing method of sign indicating number is described below.This release processing method is fairly simple, mainly is to upgrade the code tree state array according to the sign indicating number SF length that discharges with the sign indicating number serial number information, uses to subsequent request in order to this sign indicating number, and its basic handling flow process as shown in Figure 6.
In step 601, the sign indicating number sequence number that discharges in the SF=L layer is the sign indicating number C of K
L, K
In step 602~605, the numerical value of array corresponding to all leaf sign indicating numbers of the sign indicating number that is discharged all is set to " available (T) ", represent d/d yard upstate, so that redistribute subsequently.
Specifically, in step 602, the initial value of cyclic variable is set to i=0;
In step 603, judge whether cyclic variable satisfies i<512/L;
If do not satisfy the condition of i<512/L, then think and also the state of all leaf sign indicating numbers of the sign indicating number that is discharged is not become upstate, thereby forward step 604 to, the next leaf sign indicating number corresponding to the sign indicating number that is discharged become upstate, i.e. CTree[K*512/L+i]=T;
Then in step 605, cyclic variable is added 1, and turn back to step 603 and judge whether end loop;
If in step 603, judge loop ends, then finish the release of sign indicating number and handle.
The SF sign indicating number C that discharges
L, KIts SF length L exists certain relation with sign indicating number sequence number K on the data cell of determining the code tree state array is corresponding.For sign indicating number C
L, K, its state is embodied in the following K of the being designated as * 512/L of code tree state array on this 512/L of (K+1) * 512/L-1 continuous data cell, so the value for this section continuous data unit is revised as expression available " T " in the handling process of Fig. 6.
Though store the state of each leaf sign indicating number in the above-described embodiments in continuous successively mode, as long as but can determine corresponding relation between each yard and the leaf sign indicating number, also can store the state of each leaf sign indicating number with discontinuous memory cell, can realize purpose of the present invention equally.
Storage means, distribution method and method for releasing according to variable bandspread factor code of the present invention, can design corresponding variable bandspread factor code storage, distribution and/or releasing device, this storage, distribution and/or releasing device can be realized by device or a plurality of discrete device of an integral body.
For example can comprise memory, computing unit and judging unit according to variable bandspread factor code storage of the present invention, release and/or distributor.The memory of this device has a plurality of memory cell, wherein stores the state information corresponding to the leaf sign indicating number of variable spread-spectrum factor code tree respectively.When receiving request for allocation, computing unit calculates the length of the sign indicating number that will distribute according to required code check, whether judging unit is all available by judging with corresponding all the leaf sign indicating numbers of sign indicating number with Len req, if there is the sign indicating number of all available Len req of its all leaf sign indicating numbers, then distribute this sign indicating number; After distributing a sign indicating number, this computing unit calculates position with the corresponding one or more memory cell of this yard according to the length of the sign indicating number that is distributed and sign indicating number sequence number, and becomes down state with the numerical value of the corresponding memory cell of sign indicating number that is assigned with; When discharging a sign indicating number, this computing unit calculates the position with the memory cell of the pairing leaf sign indicating number of d/d sign indicating number, and the numerical value of this corresponding memory cell is become upstate.
In sum, protection scope of the present invention is not limited to disclosed embodiment in specification, but is limited by claims.Those of ordinary skill in the art does not break away from the protection range that claims limit can make various modification and improvement under inspiration of the present invention.