USPatent applicationPatented

Solving linear matrices in an integrated circuit device

Granted 17 Sep 2013 · no office action yet

Assignee: Altera Law Group

Law firm: Law firm · Log in to unlock

Attorney: Attorney · Log in to unlock

Inventors: Kulwinder Dhanoa, Martin Langhammer · Examiner: Tan V. Mai · AU 2193 · TC 2100

Life of the application

8 dated events
⤢ drag to zoom20102012201420162018202020222024202620282030ProsecutionOwnershipTerm & fees
ProsecutionOwnershipTerm & feeshover for detail · click to open

Abstract

Circuitry for solving linear matrix equations involving a resultant matrix, an unknown matrix and a product matrix that is a product of the resultant matrix and the unknown matrix includes matrix decomposition circuitry for triangulating an input matrix to create a resultant matrix having a plurality of resultant matrix elements on a diagonal, and having a further plurality of resultant matrix elements arranged in columns below the resultant matrix elements on the diagonal. The matrix decomposition circuitry includes an inverse square root multiplication path that computes diagonal elements of the resultant matrix having an inverse square root module, and the said inverse square root module computes inverses of the diagonal elements to be used in multiplication in place of division by a diagonal element. Latency is hidden by operating on each nth row of a plurality of matrices prior to any (n+1)th row.

Description

6 parts
›BACKGROUND OF THE INVENTION

This invention relates to solving linear matrices in integrated circuit devices, and particularly in programmable integrated circuit devices such as programmable logic devices (PLDs).

Certain linear matrix equations may take the form RW=Z, where each of R, W and Z is a matrix and W contains the unknowns. This problem decomposes into a group of linear equations involving multiplication of elements of W by elements of R. To solve for the elements of W thus requires division by the elements of R. However, for some matrices, such as a 4×4 matrix typically found in an LTE application, implementing a divide operation in circuitry may consume as much resources as the remainder of the datapath combined. Moreover, latency through the divider can be greater than the latency through the remainder of the datapath.

›SUMMARY OF THE INVENTION

The present invention relates to simplified circuitry for solving certain linear matrix problems by turning the aforementioned division into a multiplication. This eliminates the need for resource-consuming, latency increasing division circuitry. Latency may be further reduced by solving a plurality of matrices at once. The circuitry can be provided in a fixed logic device, or can be configured into a programmable integrated circuit device such as a programmable logic device (PLD).

As explained in copending, commonly-assigned U.S. patent application Ser. No. 12/072,144, filed Feb. 25, 2008, which is hereby incorporated by reference herein in its entirety, certain linear matrix equations may be solved using Cholesky decomposition to factor a matrix, followed by a forward or back substitution. The result of the Cholesky decomposition may be a “triangulated” matrix—i.e., a matrix with no values above the diagonal.

As just one example, The following sequence of equations show an example of forward substitution with a lower triangular matrix R.

RW = Z ′ R = [ 5 0 0 3 2 0 6 4 1 ] W = [ w 1 w 2 w 3 ] Z ′ = [ 10 8 20 ] 5 ⁢ w 1 = 10 ⇒ w 1 = 2 2 ⁢ w 2 + 3 ⁢ w 1 = 8 ⇒ 2 ⁢ w 2 + 3.2 = 8 ⇒ w 2 = 1 w 3 + 4 ⁢ w 2 + 6 ⁢ w 1 = 20 ⇒ w 3 + 4.1 + 6.2 = 20 ⇒ w 3 = 4

Because R is a lower triangular matrix, the first row results in one equation in one unknown, which is on the diagonal. Solving each row reduces the subsequent row to one equation in one unknown, each unknown being on the diagonal. Therefore, each solution requires division by a term on the diagonal.

In Cholesky decomposition, to factor a matrix a, the first element l jj , at the top of each column in the resultant triangulated matrix l, may be calculated as:

l jj =√{square root over ( a jj − L j ,L j )}

where a jj is the jjth element of the original matrix a, and L j is vector representing the jth row of matrix l up to the (j−1)th column. The subsequent elements in the jth column may be calculated as:

l ij = a ij - 〈 L i , L j 〉 l jj

where a ij is the ijth element of the original matrix a, and L i is vector representing the portion of the ith row of matrix 1 up to the (j−1)th column.

As disclosed in copending, commonly-assigned U.S. patent application Ser. No. 12/557,846, filed Sep. 11, 2009 and hereby incorporated by reference herein in its entirety, if the first of the two equations above is substituted into the second equation, the result is the following:

l ij = a ij - 〈 L i , L j 〉 a jj - 〈 L j , L j 〉

When any l ij term is calculated this way, the latency in calculating the l jj term in the denominator has little or no effect on the l ij term calculation, if the quantity that whose square root is being taken for the l jj term is identical in structure to the numerator (although having different values). The denominator term (before the square root is taken) and all of the following numerator terms can be burst into the same datapath, while the denominator term is latched and used as the input to a second datapath. The second datapath multiplies the datapath output by the inverse square root of the latched value. And if the calculations are properly pipelined, once the pipeline is filled, a new term can be output on each clock cycle.

The diagonal of the resulting lower triangular matrix has all real terms l jj , even if the remaining terms are complex. Therefore, there is unused memory allocated to each term of the diagonal, intended to store a nonexistent imaginary part. This unused memory can be used to store the inverse of each term of the diagonal, turning the required division described above for solution of each unknown into a multiplication, which is consumes fewer resources than a division. Moreover, each term of the diagonal is in the form l jj =x/(x 0.5 ) which is equal to x 0.5 , meaning that 1/l jj is equal to x −0.5 , which is already computed in the calculation of l jj . Therefore, no additional resources are used in either the calculation or storage of the 1/l jj terms.

Therefore, in accordance with the present invention, there is provided circuitry for solving linear matrix equations involving a resultant matrix, an unknown matrix and a product matrix that is a product of said resultant matrix and said unknown matrix. The circuitry includes matrix decomposition circuitry for triangulating an input matrix to create a resultant matrix having a plurality of resultant matrix elements on a diagonal, and having a further plurality of resultant matrix elements arranged in columns below the resultant matrix elements on the diagonal. The matrix decomposition circuitry includes an inverse square root multiplication path that computes diagonal elements of the resultant matrix. The circuitry for solving linear matrix equations further includes first, second and third matrix memories for respectively storing the resultant matrix, the unknown matrix and the product matrix. The inverse square root multiplication path includes an inverse square root module, and the said inverse square root module computes inverses of the diagonal elements. When solution of a linear matrix equation involves division by a diagonal element, multiplication by the inverse of that diagonal element may be used instead.

A method of configuring a programmable integrated circuit device as such circuitry, and a programmable integrated circuit device so programmed, are also provided. In addition, a machine-readable data storage medium encoded with machine-executable instructions for so configuring a programmable integrated circuit device is provided.

Finally, a method of operating the circuitry to hide latency is provided, in which a respective plurality of at least one of the resultant matrix and the product matrix is stored in a respective one of the first and third matrix memories. Each row of each matrix in the first and third matrix memories has a row index, with row indices repeating from one matrix in each respective plurality of matrices to another matrix in that respective plurality of matrices. For each row index, all rows in each matrix in at least one of the respective plurality of matrices having that row index are processed prior to processing any rows of any matrix in that at least one of the respective plurality of matrices having any other row index.

›BRIEF DESCRIPTION OF THE DRAWINGS

Further features of the invention, its nature and various advantages will be apparent upon consideration of the following detailed description, taken in conjunction with the accompanying drawings, in which like reference characters refer to like parts throughout, and in which:

FIG. 1 shows one embodiment of a datapath arrangement for Cholesky decomposition;

FIG. 2 shows one embodiment, according to the invention, of a circuit arrangement used in the performance of Cholesky decomposition;

FIG. 3 shows one embodiment, according to the invention, of a datapath arrangement, which may be implemented in circuitry, for solving matrices using back/forward substitution;

FIG. 4 is a cross-sectional view of a magnetic data storage medium encoded with a set of machine-executable instructions for performing the method according to the present invention;

FIG. 5 is a cross-sectional view of an optically readable data storage medium encoded with a set of machine executable instructions for performing the method according to the present invention; and

FIG. 6 is a simplified block diagram of an illustrative system employing a programmable logic device incorporating the present invention.

›DETAILED DESCRIPTION OF THE INVENTION · 1 of 3

Taking an example of lower triangular matrix l of dimensions 6×6, the elements on the diagonal are l 11 , . . . , l 66 . In each jth column, the elements under l jj are l ij , i=j+1, . . . , i max (in this case, i max =6). The matrix may be considered to be empty above the diagonal, or the elements above the diagonal may be considered to be zeroes.

Each element l ij can be calculated using two datapaths. The first datapath calculates the following result:

l x =a x − L x ,L x

where for l and a, x=ij; for the L vectors, x=i or j, respectively; and L x ,L x denotes the inner product of the L vectors.

The first output (x=jj) of the first datapath is latched at the input of a second datapath, which calculates the actual l ij . The first element of the column (l jj ) is calculated as the inverse square root of the input (a jj − L j ,L j ), multiplied by the input, generating the square root of the input. The inverse square root is used instead of a direct square root calculation, because it can be reused for the following elements in the column using multiplication, which is easier to implement than division.

To calculate all of the subsequent values in the column, the latched first datapath output is used for the inverse square root input which is a first multiplier input, and the other multiplier input is, for each subsequent term, the corresponding output of the first datapath. The entire column can therefore be calculated without waiting for any individual element to be finished.

FIG. 1 shows how the matrix values can be stored for fast access. Each a ij value is a single number that can be addressed in a single clock cycle, but each L i or L j row vector is j−1 numbers which would require j−1 clock cycles to address if all values were stored in a single memory. However, in accordance with an embodiment of the present invention, matrix a may be stored in a single memory 201 , while each column of matrix l may be stored in one of a plurality of i max separate memories 202 . The ith element of each of the separate column memories can be addressed simultaneously, allowing the entire row vector to be read out within a single clock cycle. This may be referred to as a “column-wise” memory architecture.

For example, programmable logic devices available from Altera Corporation, of San Jose, Calif., may have a smaller number of larger memory blocks (e.g., 144 kb memory blocks), one of which could be used as memory 201 to store matrix a, and a larger number of smaller memory blocks (e.g., 9 kb memory blocks), i max of which could be used as memories 202 to separately store the columns of matrix l. Of course, it is not necessary to use different sizes of memories for memories 201 , 202 ; if a sufficient number of larger memories is available, any one or more of the memories used as column memories 202 to separately store the columns of matrix l may be the same size as (or even larger than) the memory used as memory 201 to store matrix a.

Thus, in a single clock cycle, address input 211 may be applied to memory 201 to read out matrix element a ij at 221 for input to calculation datapath 300 , while address input 212 may be applied to the appropriate j−1 memories 202 on path 203 to read out vector L i , and address input 222 may be applied to the appropriate j−1 memories 202 on path 213 to read out vector L j . The outputs 221 , 203 , 213 maybe input to calculation datapath 300 , described in more detail in connection with FIG. 2 , which outputs the individual l ij values at 204 , and also feeds each back at 205 into the respective jth column memory 202 .

Datapath 300 , which may be implemented in fixed or programmable logic, includes inner product datapath 301 and inverse square root datapath 302 .

Inner product datapath 301 includes inner product generator 311 and subtractor 321 to subtract the inner product from a ij . Inner product generator 311 may include a sufficient plurality of multipliers and adders to simultaneously multiply i max pairs of values, and then add those products together.

For complex vectors, inner product generator 311 may include sufficient multipliers and adders to simultaneously multiply 2(i max ) pairs of values, and also may include the necessary components to compute the complex conjugate values for L j in the case where the values are complex. The L j term is latched in register 331 at the beginning of a column process and is not changed until the next column is started.

Starting with the second column, the first output of inner product datapath 301 for each column—i.e., each l jj —is latched into register 312 as the input to inverse square root datapath 302 for the duration of calculation of that column. Inverse square root datapath 302 includes inverse square root module 322 for calculating the inverse square root of l jj , and multiplier 332 for multiplying the inverse square root by the current l ij . The latching of l jj into register 312 delays its input to multiplier 332 by one clock cycle. Therefore, the input of l ij to multiplier 332 also is delayed, by register 342 , so that latency is the same for both inputs.

For the first column, terms are generated using simple division. The top term, l 11 is a 11 —0.5 and all the subsequent inputs for the first column are also divided by a 11 —i.e., l i1 =a i1 /a 11 −0.5 . This is accomplished using multiplexer 350 to allow the a ij inputs 351 to bypass inner product datapath 301 .

In addition to increasing the number of multipliers and adders in inner product generator 311 , as discussed above, some other relatively minor additions (not shown) would be made to datapath 300 where the inputs are complex. In such a case, the L i , L j vector values will be complex. This will require generating the complex conjugate of the vector value latched in register 331 . That can be done by providing logic to invert the sign bit of the imaginary portion of each value. The changes required in inverse square root datapath 302 are simplified by the nature of matrix l.

›DETAILED DESCRIPTION OF THE INVENTION · 2 of 3

As discussed above, the diagonal value—i.e., the first value at the top of each column in the Cholesky decomposition—is always real, meaning that inverse square root calculation 322 will always be real. Therefore, while the other multiplicand at multiplier 332 is complex, the multiplication will be one of a complex value by a real scalar value, so only two multipliers—i.e., one additional multiplier—are required. Moreover, a memory location for the imaginary part of each diagonal value l jj will be unused, and available for storing 1/l jj . That value can be extracted from inverse square root calculation 322 at 323 whenever i=j, and can be multiplexed together at 333 with the output of multiplier 332 for storage in place of the imaginary part of l jj .

As discussed above, for any given row of the RW=Z matrix calculation example given above, the w element calculation can be described as:

w ⁡ ( k ) = z ⁡ ( k ) - r ⁡ ( k , 1 : k - 1 ) ⁢ w ⁡ ( 1 : k - 1 ) r ⁡ ( k , k )

This can be rewritten as follows:

w ⁡ ( k ) = ( z ⁡ ( k ) - r ⁡ ( k , 1 : k - 1 ) ⁢ w ⁡ ( 1 : k - 1 ) ) * 1 r ⁡ ( k , k )

turning the division into a multiplication.

FIG. 3 shows the architecture of an embodiment 400 of substitution datapath/circuitry in accordance with the invention. The R matrix may stored in columns, with one memory 401 provided per column, and each row containing one entry per column memory. Multiple matrixes may be stored, and preferably are processed together. The W memory 402 does not have to be initialized. The Z memory 403 may be loaded with one Z vector per R matrix in memories 401 . Alternatively, one Z vector can be used for multiple R matrices, or vice-versa.

A row of the R matrix may be loaded by loading similarly indexed elements from each of the R column memories 401 , along with the entire W vector from memory 402 , and a single element with the same row index from the Z memory 403 . The number of elements from both the R row and the W matrix that are read into the vector core 404 is row_index−1 (the remaining elements may be zeroed).

Multipliers 414 , summer 424 and subtractor 434 of core 404 compute the equation set forth above for each element of W, as multiplexer 405 selects the appropriate inverted diagonal value from the row_indexedth element of the Rth row.

AND gates 444 can be used to zero columns that are not used in the current row. For example if there are four rows in each triangulated matrix, the first row will have one element, the second row will have two elements, and so on. If for Row 1 , one zeroes out columns 2 , 3 , 4 , for Row 2 one zeroes out columns 3 , 4 and so on, then it is not necessary to initialize the upper half of R memory 401 with zeroes, but only the lower half with the values of the triangulated matrix R.

Preferably, the first row index for each of the R matrices in R memory is processed first, then the second row index, then the third, and so on. If the number of R matrices processed at any given time is greater than the datapath and memory latency, which may be about typically about 14 clock cycles for a multiplier-based calculation shown in FIG. 3 using the multipliers and adders of digital signal processing blocks of FPGAs in the STRATIX® family of FPGAs from Altera Corporation, of San Jose, Calif., then processing all nth rows together will hide the datapath latency. By comparison, if a divider were used, datapath latency would be about 30 clock cycles, requiring a larger matrix memory, and resulting in a longer processing delay because of the large number of matrices needed to hide datapath latency.

The W vectors can be unloaded from W memory. Alternatively, the W values can be written to a W output memory (not shown), which can be loaded sequentially from output 406 , which would save the requirement for a multiplexer on the output of the W memories when unloading.

The various operators used for the calculations described above can be configured in a programmable device using, e.g., the techniques described in copending, commonly-assigned U.S. patent application Ser. No. 11/625,655, filed Jan. 22, 2007, which is hereby incorporated by reference herein in its entirety.

One potential use for the present invention may be in programmable integrated circuit devices such as programmable logic devices, where programming software can be provided to allow users to configure a programmable device to perform matrix operations. The result would be that fewer logic resources of the programmable device would be consumed. And where the programmable device is provided with a certain number of dedicated blocks for arithmetic functions (to spare the user from having to configure arithmetic functions from general-purpose logic), the number of dedicated blocks needed to be provided (which may be provided at the expense of additional general-purpose logic) can be reduced (or sufficient dedicated blocks for more operations, without further reducing the amount of general-purpose logic, can be provided).

Instructions for carrying out a method according to this invention for programming a programmable device to perform matrix decomposition may be encoded on a machine-readable medium, to be executed by a suitable computer or similar device to implement the method of the invention for programming or configuring PLDs or other programmable devices to perform addition and subtraction operations as described above. For example, a personal computer may be equipped with an interface to which a PLD can be connected, and the personal computer can be used by a user to program the PLD using a suitable software tool, such as the QUARTUS® II software available from Altera Corporation, of San Jose, Calif.

FIG. 4 presents a cross section of a magnetic data storage medium 800 which can be encoded with a machine executable program that can be carried out by systems such as the aforementioned personal computer, or other computer or similar device. Medium 800 can be a floppy diskette or hard disk, or magnetic tape, having a suitable substrate 801 , which may be conventional, and a suitable coating 802 , which may be conventional, on one or both sides, containing magnetic domains (not visible) whose polarity or orientation can be altered magnetically. Except in the case where it is magnetic tape, medium 800 may also have an opening (not shown) for receiving the spindle of a disk drive or other data storage device.

›DETAILED DESCRIPTION OF THE INVENTION · 3 of 3

The magnetic domains of coating 802 of medium 800 are polarized or oriented so as to encode, in manner which may be conventional, a machine-executable program, for execution by a programming system such as a personal computer or other computer or similar system, having a socket or peripheral attachment into which the PLD to be programmed may be inserted, to configure appropriate portions of the PLD, including its specialized processing blocks, if any, in accordance with the invention.

FIG. 5 shows a cross section of an optically-readable data storage medium 810 which also can be encoded with such a machine-executable program, which can be carried out by systems such as the aforementioned personal computer, or other computer or similar device. Medium 810 can be a conventional compact disk read-only memory (CD-ROM) or digital video disk read-only memory (DVD-ROM) or a rewriteable medium such as a CD-R, CD-RW, DVD-R, DVD-RW, DVD+R, DVD+RW, or DVD-RAM or a magneto-optical disk which is optically readable and magneto-optically rewriteable. Medium 810 preferably has a suitable substrate 811 , which may be conventional, and a suitable coating 812 , which may be conventional, usually on one or both sides of substrate 811 .

In the case of a CD-based or DVD-based medium, as is well known, coating 812 is reflective and is impressed with a plurality of pits 813 , arranged on one or more layers, to encode the machine-executable program. The arrangement of pits is read by reflecting laser light off the surface of coating 812 . A protective coating 814 , which preferably is substantially transparent, is provided on top of coating 812 .

In the case of magneto-optical disk, as is well known, coating 812 has no pits 813 , but has a plurality of magnetic domains whose polarity or orientation can be changed magnetically when heated above a certain temperature, as by a laser (not shown). The orientation of the domains can be read by measuring the polarization of laser light reflected from coating 812 . The arrangement of the domains encodes the program as described above.

A PLD 90 programmed according to the present invention may be used in many kinds of electronic devices. One possible use is in a data processing system 900 shown in FIG. 6 . Data processing system 900 may include one or more of the following components: a processor 901 ; memory 902 ; I/O circuitry 903 ; and peripheral devices 904 . These components are coupled together by a system bus 905 and are populated on a circuit board 906 which is contained in an end-user system 907 .

System 900 can be used in a wide variety of applications, such as computer networking, data networking, instrumentation, video processing, digital signal processing, or any other application where the advantage of using programmable or reprogrammable logic is desirable. PLD 90 can be used to perform a variety of different logic functions. For example, PLD 90 can be configured as a processor or controller that works in cooperation with processor 901 . PLD 90 may also be used as an arbiter for arbitrating access to a shared resources in system 900 . In yet another example, PLD 90 can be configured as an interface between processor 901 and one of the other components in system 900 . It should be noted that system 900 is only exemplary, and that the true scope and spirit of the invention should be indicated by the following claims.

Various technologies can be used to implement PLDs 90 as described above and incorporating this invention.

It will be understood that the foregoing is only illustrative of the principles of the invention, and that various modifications can be made by those skilled in the art without departing from the scope and spirit of the invention. For example, the various elements of this invention can be provided on a PLD in any desired number and/or arrangement. One skilled in the art will appreciate that the present invention can be practiced by other than the described embodiments, which are presented for purposes of illustration and not of limitation, and the present invention is limited only by the claims that follow.

Claims as granted

13 claims

Log in to read the claims of this application.

Log in to unlock

Classifications

2 codes
IPC · International Patent Classification
Section G — Physics
  • G06F7/38
USPC · US Patent Classification
708/446

Claim changes

Soon
Coming soonHow the claims changed between publication and grant

See which claims were amended, added or cancelled during examination, with every added and removed word marked.

AmendedAddedCancelledUnchanged

The published claims of this application are not paired with the granted ones in what we hold.

File wrapper

⤢ drag to zoomJul 2010Jan 2011Jul 2011Jan 2012Jul 2012Jan 2013Jul 2013USPTOApplicantNotice of allowanceNotice of allowance
USPTOApplicanthover for detail · click to open
Pendency
3.5 y
1,272 days filing → grant
Office actions
0
none on record
Responses
0
1 RCE
Examiner
Tan V. Mai
art unit 2193 · TC 2100
Citations: 441 back · 3 forward

See the full prosecution history — every USPTO and applicant action on this file, in order.

Log in to unlock

Documents

Log in to open the documents of this file: the application as filed, every office action and response, the notice of allowance.

Log in to unlock

Chain of title

⤢ drag to zoom20102012201420162018202020222024202620282030Owner 1
Titlehover for detail · click to open

See the full assignment history — every owner this patent has passed through, with recordation dates and reel/frame numbers.

Log in to unlock