DE112008002158T5 - Method and system for multiplying large numbers - Google Patents
Method and system for multiplying large numbers Download PDFInfo
- Publication number
- DE112008002158T5 DE112008002158T5 DE112008002158T DE112008002158T DE112008002158T5 DE 112008002158 T5 DE112008002158 T5 DE 112008002158T5 DE 112008002158 T DE112008002158 T DE 112008002158T DE 112008002158 T DE112008002158 T DE 112008002158T DE 112008002158 T5 DE112008002158 T5 DE 112008002158T5
- Authority
- DE
- Germany
- Prior art keywords
- column
- word
- rows
- pair
- multiplication
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
- G06F7/52—Multiplying; Dividing
- G06F7/523—Multiplying only
- G06F7/525—Multiplying only in serial-serial fashion, i.e. both operands being entered serially
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Executing Machine-Instructions (AREA)
- Complex Calculations (AREA)
Abstract
Computerimplementiertes Verfahren zum Betreiben einer Multiplikationsschaltung zur Berechnung des Produktes aus zwei Operanden (A und B), von denen wenigstens einer breiter als eine der Multiplikationsschaltung zugeordnete Breite ist, wobei jeder der Operanden einen oder mehrere aneinander angrenzende, geordnete, wortbreite Operandensegmente (Aj und Bi) umfasst, die durch spezifische Gewichtungen j und i charakterisiert sind, wobei j eine ganze Zahl von 0 bis k und i eine ganze Zahl von 0 bis m ist und ein Wort eine spezifizierte Anzahl von Bits (n) ist, und wobei die Multiplikationsschaltung eine Matrix von wortbreiten Operandensegmentpaarmultiplikationsoperationen ausführt, wobei die Matrix m + 1 Reihen und k + m + 2 Spalten umfasst, wobei jede Reihe eine Gewichtung x und jede Spalte eine Gewichtung y aufweist und die Multiplikationsschaltung Zugriff auf einen Speicher hat, wobei das Verfahren umfasst:
Durchführen von Multiplikationsoperationen jeweils an einem Paar von Reihen, wobei für jedes Paar von Reihen ein Paar...A computer-implemented method of operating a multiplier circuit for computing the product of two operands (A and B), at least one width of which is wider than one of the multiplication circuits, each of the operands including one or more contiguous ordered word-wide operand segments (A j and B i ) characterized by specific weights j and i, where j is an integer from 0 to k and i is an integer from 0 to m and one word is a specified number of bits (n), and wherein Multiplier circuit executes a matrix of word-wide operand segment pair multiplication operations, wherein the matrix comprises m + 1 rows and k + m + 2 columns, each row having a weight x and each column having a weight y and the multiplier circuit having access to a memory, the method comprising :
Performing multiplication operations on each pair of rows, with a pair of rows for each pair of rows ...
Description
Technisches GebietTechnical area
Die Erfindung betrifft die Informationsverarbeitung.The The invention relates to information processing.
Hintergrundbackground
Herkömmliche Multiplikationshardware, beispielsweise in einer Festkörpervorrichtung, kann Größenbeschränkungen mit sich bringen, so beispielsweise eine spezifizierte Anzahl von Bits, die gleichzeitig von der Hardware verarbeitet werden können. Typischerweise ist die Multiplikationshardware derart definiert, dass sie ein Paar von Einzelwortoperandeneingaben und eine Zweiwortergebnisausgabe aufweist. Zum Ausführen von Multiplikationsakkumulationsoperationen kann die Multipliziererausgabe mit einem Akkumulator verbunden sein, der typischerweise wenigstens zwei Worte plus ein Bit breit ist. Das zusätzliche Bit kann Teil des Ergebnisses oder auch einfach nur als Trägerinformation vorhanden sein, die entweder einen Overflow für den Fall der Addition oder einen Underflow für den Fall einer Subtraktion in dem Akkumulationsteil der Operation angibt.conventional Multiplication hardware, for example in a solid state device, can size limitations with, for example, a specified number of Bits that can be processed simultaneously by the hardware. typically, the multiplication hardware is defined to be a pair of single-word operand entries and a two-word result output having. To run of multiplication accumulation operations, the multiplier output be connected to an accumulator, which typically at least two words plus one bit wide. The extra bit can be part of the result or just as a carrier information available be either an overflow in the case of addition or an underflow for the case of a subtraction in the accumulation part of the operation indicates.
In der Kryptographie und bei anderen Anwendungen besteht Bedarf an der Multiplikation sehr großer ganzer Zahlen, darunter einer großen Anzahl von Worten. Um diese Operationen unter Verwendung von Operanden, die viel breiter als die Multiplikationshardware sind, durchzuführen, können die Operanden in 1-wortbreite Segmente unterteilt und der Hardware in einer spezifizierten Sequenz zugeführt werden. Die Segmente werden derart verarbeitet, und die Zwischenergebnisse werden derart akkumuliert, dass das Endprodukt als Summe von Kreuzprodukten verschiedener Gewichtungen berechnet wird. Die wortbreiten Operandensegmente wie auch die Teilergebnisse werden in einem Speicher gespeichert, auf den durch einen Operationsequenzierer der Multipliziererhardware zugegriffen wird. So kann beispielsweise eine Sequenz ein erstes Operandensegment konstant halten, während die Operandensegmente Wort für Wort in den Multiplizierer abgetastet werden, woraufhin der erste Operrand zu dem nächsten wortbreiten Segment inkrementiert und die Abtastung des zweiten Operanden wiederholt wird.In Cryptography and in other applications there is a need the multiplication very big whole numbers, including a large number of words. Around Operations using operands that are much wider than If the multiplication hardware is to perform, the operands can be in 1 word width Segments divided and the hardware in a specified sequence supplied become. The segments are processed in this way, and the intermediate results are accumulated in such a way that the end product is the sum of cross products different weights is calculated. The word-wide operand segments as well as the partial results are stored in a memory, by an operation sequencer of the multiplier hardware is accessed. For example, a sequence may have a first one Keep the operand segment constant while the operand segments Word for Be sampled in the multiplier, whereupon the first Opera edge to the next word-width segment is incremented and the sampling of the second Operands is repeated.
ZusammenfassungSummary
Die Erfindung betrifft die Multiplikation großer Zahlen. Im Allgemeinen stellt die Erfindung gemäß einem Aspekt ein computerimplementiertes Verfahren sowie ein solches System und ein Computerprogrammerzeugnis zum Betreiben einer Multiplikationsschaltung zur Berechnung des Produktes aus zwei Operanden (A und B) bereit, von denen wenigstens einer breiter als eine Breite ist, die der Multiplikationsschaltung zugeordnet ist. Jeder der Operanden beinhaltet einen oder mehrere aneinander angrenzende, geordnete, wortbreite Operandensegmente (Aj und Bi), die durch spezifische Gewichtungen j und i charakterisiert sind, wobei j eine ganze Zahl von 0 bis k und i eine ganze Zahl von 0 bis m ist und ein Wort eine spezifizierte Anzahl von Bits (n) ist. Die Multiplikationsschaltung führt eine Matrix von wortbreiten Operandensegmentpaarmultiplikationsoperationen aus, wobei die Matrix m + 1 Reihen und k + m + 2 Spalten beinhaltet, wobei jede Reihe eine Gewichtung x und jede Spalte eine Gewichtung y aufweist. Die Multiplikationsschaltung hat Zugriff auf einen Speicher. Multiplikationsoperationen werden jeweils an einem Paar von Reihen durchgeführt. Für jedes Paar von Reihen wird ein Paar von entsprechenden Bi-wortbreiten Operandensegmenten aus dem Speicher gelesen, und es werden wortbreite Operandensegmentpaarmultiplikationsoperationen (Aj·Bi) iterativ für jede von k + 2 Spalten durchgeführt, sodass für jede Spalte in der Matrix ein Maximum von zwei zusätzlichen Speicherleseoperationen und einer Speicherschreiboperation erforderlich ist. Es sind zudem andere Implementierungen offenbart.The invention relates to the multiplication of large numbers. In general, in one aspect, the invention provides a computer-implemented method and system and computer program product for operating a multiplier circuit for computing the product of two operands (A and B), at least one of which is wider than a width associated with the multiplier circuit is. Each of the operands includes one or more contiguous, ordered, word-wide operand segments (A j and B i ) characterized by specific weights j and i, where j is an integer from 0 to k and i is an integer from 0 to m is and a word is a specified number of bits (n). The multiplication circuit executes a matrix of word-wide operand segment-pair multiplication operations, the matrix including m + 1 rows and k + m + 2 columns, each row having a weight x and each column having a weight y. The multiplication circuit has access to a memory. Multiplication operations are each performed on a pair of rows. For each pair of rows, a pair of corresponding B i word-wide operand segments are read from memory, and word-wide operand segment pair multiplication operations (A j * B i ) are iteratively performed for each of k + 2 columns, such that for each column in the matrix Maximum of two additional memory read operations and one memory write operation is required. In addition, other implementations are disclosed.
Implementierungen der Erfindung können einen oder mehrere der nachfolgenden Vorteile mit sich bringen. Die beschriebene Multiplikationsschaltung kann jeweils ein Paar von Reihen berechnen, während sie nur drei Speicherzugriffe (zweimal lesen und einmal schreiben) pro Spalte (über die anfänglichen Lesevorgänge der wortbreiten Operandensegmente entsprechend jeder Reihe hinausgehend) benötigt, wodurch es möglich wird, eine effizientere Speicherschnittstelle als einzelner Dualport-RAM oder als zwei Einzelport-RAMs auszugestalten. Ein weiterer Vorteil besteht darin, dass die Paare von Reihen aus der Sequenz berechnet werden können. Das zufallsbasierte Erstellen der Reihenfolge der Reihenberechnungen kann einen verbesserten Schutz von schutzwürdigen Daten liefern, die bei den Berechnungen verwendet werden. Der Energieverbrauch durch die Multiplikationsschaltung kann niedriger als bei anderen herkömmlichen Schaltungen sein, was von weniger Speicherzugriffen herrührt.implementations of the invention one or more of the following advantages. The multiplication circuit described can each be a pair calculate from rows while they only have three memory accesses (read twice and write once) per column (over the initial ones reads the word-wide operand segments corresponding to each row) needed making it possible will provide a more efficient memory interface than single dual-port RAM or as two single-port RAMs to design. Another advantage exists in that the pairs of rows are calculated from the sequence can. The Random-based creation of the order of row calculations can provide enhanced protection of sensitive data that is included in the to be used in the calculations. Energy consumption by the Multiplication circuit may be lower than other conventional ones Circuits, which results from fewer memory accesses.
Details eines oder mehrerer Ausführungsbeispiele der Erfindung sind in der nachfolgenden Zeichnung und der nachstehenden Beschreibung niedergelegt. Weitere Merkmale, Aufgaben und Vorteile der Erfindung erschließen sich aus der Beschreibung und Zeichnung sowie aus den Ansprüchen.details one or more embodiments The invention are described in the following drawing and the following Description laid down. Other features, tasks and benefits to open the invention from the description and drawing as well as from the claims.
Kurzbeschreibung der ZeichnungBrief description of the drawing
Gleiche Bezugszeichen in verschiedenen Figuren bezeichnen gleiche Elemente.Same Reference numerals in different figures indicate like elements.
Detailbeschreibungdetailed description
Bestimmte
Anwendungen erfordern das wechselseitige Multiplizieren von Zahlen,
die größer als
eine Maschinengröße der Hardware
sind, die zur Berechnung des Ergebnisses verwendet wird. Bei einem
demonstrativen Beispiel kann ein Mikroprozessor mit einer Maschinengröße von 32
Bit erforderlich sein, um das Ergebnis einer Multiplikation mit 128-Bit-Eingabeoperanden
zu berechnen. Da die Eingabedaten größer als die Maschinengröße des Mikroprozessors
sind, können
die Eingabedaten in einem RAM oder einem anderen ähnlichen
temporären
Ablagespeicher gespeichert werden, oder sie können sich in Caches oder Registern
befinden, die innerhalb des Mikroprozessors angeordnet sind. Sind
zwei 128-Bit-Eingabeoperanden A und B, die in einem RAM gespeichert
sind, gegeben und sollen diese von einem 32-Bit-Mikroprozessor berechnet werden,
wobei
A = 0x11111111222222223333333344444444; und
B =
0x55555555666666667777777788888888
(mit x0 zur Bezeichnung
einer hexadezimalen Zahl)
gilt, so kann die Berechnung folgendermaßen in Worte
in Maschinengröße, in diesem
Beispiel in 32-Bit-wortbreite Operandensegmente, aufgeteilt werden:
A0 =
0x44444444; A1 = 0x33333333; A2 = 0x22222222;
A3 = 0x11111111; und
B0 =
0x88888888; B1 = 0x77777777; B2 = 0x66666666;
B3 = 0x55555555Certain applications require multiplying multiples that are larger than a machine size of the hardware used to calculate the result. In a demonstrative example, a microprocessor with a 32-bit machine size may be required to compute the result of multiplication by 128-bit input operands. Since the input data is larger than the machine size of the microprocessor, the input data may be stored in RAM or other similar temporary storage or may be in caches or registers located within the microprocessor. Given two 128-bit input operands A and B, which are stored in a RAM, and are to be calculated by a 32-bit microprocessor, wherein
A = 0x11111111222222223333333344444444; and
B = 0x55555555666666667777777788888888
(with x0 to denote a hexadecimal number)
the calculation can be divided into words in machine size, in this example in 32-bit word-wide operand segments, as follows:
A 0 = 0x44444444; A 1 = 0x33333333; A 2 = 0x22222222; A 3 = 0x11111111; and
B 0 = 0x88888888; B 1 = 0x77777777; B 2 = 0x66666666; B 3 = 0x55555555
Die Berechnung macht bei jedem 32-Bit-wortbreiten Operandensegment des ersten Operanden A weiter, der mit jedem der wortbreiten Operandensegmente in dem anderen, zweiten Operanden B multipliziert wird. Nachfolgend werden eine Multiplikationsschaltung und ein Prozess zum Betreiben der Multiplikationsschaltung beschrieben, mit dem die Anzahl von Lese- und Schreibzugriffen auf einen Speicher, der die Operanden A und B beinhaltet, verringert werden kann, wodurch eine effizientere Speicherschnittstelle bereitgestellt wird.The Computation does with every 32-bit word-wide operand segment of the first operand A, associated with each of the word-wide operand segments in the other, second operand B is multiplied. following become a multiplication circuit and a process for operating the multiplication circuit with which the number of Read and write access to a memory containing the operands A and B includes, can be reduced, creating a more efficient storage interface provided.
Beispielsystem für die MultiplikationsschaltungExample system for the multiplication circuit
In
Die
Multiplikationsschaltung
Der
Akkumulator
Bei
einigen Implementierungen kann der Akkumulator
Der
Akkumulator
Der
RAM
Das
System
Bei
einigen Implementierungen kann die Zustandsmaschine
Bei
verschiedenen Beispielen kann die Zustandsmaschine
Illustratives Beispiel für den Betrieb der MultiplikationsschaltungIllustrative example of the operation the multiplication circuit
Anhand
Die
Zustandsmaschine
Bei
dem dargestellten Beispiel wählt
die Zustandsmaschine
Bei einer anderen Implementierung kann die Auswahl von Reihenpaaren jedoch auch zufällig erfolgen. Das zufallsbasierte Bilden der Sequenz von Reihenpaarberechnungen kann eine verbesserte Sicherheit von Daten gewährleisten, die bei den Multiplikationsoperationen verwendet werden.at another implementation may be the selection of row pairs but also by chance respectively. The random-based formation of the sequence of row pair calculations can ensure improved security of data during multiplication operations be used.
Wie
wiederum in
Bei
einem Beispiel kann die Zustandsmaschine
Unter
Verwendung des Trägerwertes
C0 und eines zusätzlichen Operandensegmentes
A1 des Lesevorganges aus dem RAM
Leseoperationen:
Lesen von A1 (A0 wurde
vorher gelesen und in dem Cache);
Schreiboperationen: Schreiben
von R1;
R1 =
unteres Wort von (C0 + A0·B1 + A1·B0); und
C1 =
oberes Wort von (C0 + A0·B1 + A1·B0).Using the carrier value C 0 and an additional operand segment A 1 of the read from the RAM
Read operations: read A 1 (A 0 was previously read and in the cache);
Write operations: write R 1 ;
R 1 = lower word of (C 0 + A 0 .B 1 + A 1 .B 0 ); and
C 1 = upper word of (C 0 + A 0 * B 1 + A 1 * B 0 ).
Die
Summe der Gewichtungen der wortbreiten Operandensegmente ist gleich
der Gewichtung der entsprechenden Spalte. Dies bedeutet, dass bei dem
vorstehenden Beispiel für
die Spalte 1
Für die Spalte
2
Leseoperationen:
Lesen von A2 (A1 wurde
vorher gelesen und in dem Cache);
Schreiboperationen: Schreiben
von Int1;
Int2 =
unteres Wort von (C1 + A1·B1 + A2·B0); und
C2 =
oberes Wort von (C1 + A1·B1 + A2·B0).For column 2
Read operations: read A 2 (A 1 was read before and in the cache);
Write operations: Write Int 1 ;
Int 2 = lower word of (C 1 + A 1 * B 1 + A 2 * B 0 ); and
C 2 = upper word of (C 1 + A 1 * B 1 + A 2 * B 0 ).
Auf ähnliche
Weise schreibt für
die Spalte 3
Die
Zustandsmaschine
Als
nächstes
kann die Zustandsmaschine
Die
Zustandsmaschine
Durch
Akkumulieren von Int2 und eines Multiplikationsproduktes
von A0·B2 erhält
die Multiplikationsschaltung
Leseoperationen: Lesen von Int2;
Lesen von A0;
Schreiboperationen: Schreiben
von R2;
R2 =
unteres Wort von [(A0·B2)
+ Int2];
C2 =
oberes Wort von [(A0·B2)
+ Int2]By accumulating Int 2 and a multiplication product of A 0 .B 2 , the multiplication circuit is obtained
Read operations: reading from Int 2 ; Reading A 0 ;
Write operations: Write R 2 ;
R 2 = lower word of [(A 0 .B 2 ) + Int 2 ];
C 2 = upper word of [(A 0 .B 2 ) + Int 2 ]
Für den Multiplikationszyklus
sind pro Spalte also zwei Leseoperationen und eine Schreiboperation
erforderlich. Dies schließt
das Lesen von B2 und B3 nicht
mit ein, da diese zu Anfang gelesen und in den Cache überführt werden
und während
der Berechnungen im Zusammenhang mit den Reihen 2 und 3 Verwendung
finden. Die maximale Anzahl von Speicheroperationen, die bei der
Berechnung der Multiplikationsmatrix
Wie
in
Auf ähnliche
Weise kann die Zustandsmaschine
Da
kein Zwischenspaltenergebnis für
die Spalte
Das
Multiplikationsergebnis von A und B kann aus dem RAM
Beispiel zur Durchführung von Berechnungen für eine MultiplikationsmatrixExample for performing calculations for a multiplication matrix
In
In
Schritt
Der
Prozess
Nach
dem Durchführen
der Multiplikation in Schritt
Nach
dem Lesen von Inti+j aus dem Speicher in
Schritt
Der
Prozess
In
Schritt
In
Schritt
Obwohl
einige Implementierungen des Multiplikationssystems sowie des Prozesses
beschrieben worden sind, können
auch andere Implementierungen zum Einsatz kommen. Bei verschiedenen
Implementierungen kann die Zustandsmaschine
Bei
einigen Implementierungen kann die Zustandsmaschine
Die
Schritte bei dem Prozess
Bei
einigen Implementierungen können
die vorstehend beschriebenen Techniken auch zur Durchführung einer
Reihe von mathematischen Operationen verwendet werden, so beispielsweise
für A·B + Z
oder Z – A·B oder
A·B – Z, obwohl
auch andere Operationen möglich
sind. Als illustratives Beispiel zeigt
A = 0x11111111222222223333333344444444;
und
B = 0x55555555666666667777777788888888; und
Z = 0x999999999101010101212121214141414161616161818181820202020224242424
(mit
x0 zur Bezeichnung einer hexadezimalen Zahl)In some implementations, the techniques described above may also be used to perform a variety of mathematical operations, such as A x B + Z or Z - A x B or A x B - Z, although other operations are possible. As an illustrative example shows
A = 0x11111111222222223333333344444444; and
B = 0x55555555666666667777777788888888; and
Z = 0x99999999910101010121212141414141616161818181820202020224242424
(with x0 to denote a hexadecimal number)
Die
Berechnung kann folgendermaßen
in Worte in Maschinengröße, in diesem
Beispiel in 32-Bit-wortbreite Operandensegmente, aufgeteilt werden:
A0 =
0x44444444; A1 = 0x33333333; A2 = 0x22222222;
A3 = 0x11111111;
B0 =
0x88888888; B1 = 0x77777777; B2 = 0x66666666;
B3 = 0x55555555; und
Z0 =
0x24242424; Z1 = 0x20202020; Z2 = 0x18181818;
Z3 = 0x16161616;
Z4 =
0x14141414; Z5 = 0x12121212; Z6 = 0x10101010;
Z7 = 0x99999999;The calculation can be broken up into machine-sized words, in this example 32-bit word-wide operand segments, as follows:
A 0 = 0x44444444; A 1 = 0x33333333; A 2 = 0x22222222; A 3 = 0x11111111;
B 0 = 0x88888888; B 1 = 0x77777777; B 2 = 0x66666666; B 3 = 0x55555555; and
Z 0 = 0x24242424; Z 1 = 0x20202020; Z 2 = 0x18181818; Z 3 = 0x16161616;
Z 4 = 0x14141414; Z 5 = 0x12121212; Z 6 = 0x10101010; Z 7 = 0x99999999;
Wie
in Matrix
Leseoperationen: Lesen von
Z0 und A0
Schreiboperationen:
Schreiben von R0
wobei R0 =
unteres Wort von (A0·B0 +
Z0); und
Träger C0 =
oberes Wort von (A0·B0 +
Z0).As in matrix
Read operations: reading Z 0 and A 0
Write operations: Write R 0
where R 0 = lower word of (A 0 .B 0 + Z 0 ); and
Carrier C 0 = upper word of (A 0 · B 0 + Z 0 ).
Die
Operationen zur Berechnung von Col 1 (
Leseoperationen:
Lesen von Z1 und A1
Schreiboperationen:
Schreiben von R1
wobei R0 =
unteres Wort von (A1·B0 +
A0·B1 + C0 + Z1); und
Träger C0 =
oberes Wort von (A1·B0 +
A0·B1 + C0 + Z1).The operations for calculating Col 1 (
Read operations: reading Z 1 and A 1
Write operations: Write R 1
wherein R 0 = lower word of (A 1 * B 0 + A 0 * B 1 + C 0 + Z 1 ); and
Carrier C 0 = upper word of (A 1 * B 0 + A 0 * B 1 + C 0 + Z 1 ).
Die Balance der Matrix kann auf ähnliche Weise wie vorstehend beschrieben berechnet werden. Entsprechend können die Berechnungen ohne mehr als zwei Leseoperationen pro Spalte für ein Paar von Reihen ausgeführt werden.The Balance the matrix in a similar way as described above. Accordingly, the Calculations with no more than two read operations per column for a pair executed by rows become.
Die Erfindung und sämtliche in dieser Druckschrift beschriebenen funktionellen Operationen können in einer digitalen elektronischen Schaltung oder einer Computerhardware, Firmware, Software oder in Kombinationen hieraus implementiert sein. Vorrichtungen der Erfindung können in einem Computerprogrammerzeugnis implementiert sein, das physisch in einer maschinenlesbaren Speichervorrichtung zur Ausführung durch einen programmierbaren Prozessor verkörpert ist. Es können Verfahrensschritte der Erfindung durch einen programmierbaren Prozessor durchgeführt werden, der ein Programm von Anweisungen zur Durchführung von Funktionen der Erfindung durch Verarbeiten von Eingabedaten und Erzeugen einer Ausgabe ausführt.The invention and all functional operations described in this document can be used in a digital electronic circuit or computer hardware, firmware, software, or combinations thereof. Devices of the invention may be implemented in a computer program product physically embodied in a machine-readable storage device for execution by a programmable processor. Method steps of the invention may be performed by a programmable processor that executes a program of instructions to perform functions of the invention by processing input data and generating an output.
Die Erfindung kann vorteilhafterweise in einem oder mehreren Computerprogrammen implementiert sein, die auf einem programmierbaren System ausführbar sind, darunter wenigstens ein programmierbarer Prozessor, der zum Empfangen von Daten und Anweisungen von und zum Übertragen von Daten und Anweisungen an ein Speichersystem gekoppelt ist, wenigstens eine Eingabevorrichtung und wenigstens eine Ausgabevorrichtung. Jedes Computerprogramm kann in einer hochabstrakten Prozedur- oder objektorientierten Programmiersprache implementiert sein, oder auch in Assembler oder Maschinensprache, so dies gewünscht ist; in jedem Fall kann die Sprache eine kompilierende oder interpretierende Sprache sein.The Invention may advantageously be implemented in one or more computer programs be implemented on a programmable system, including at least one programmable processor for receiving of data and instructions from and for transmitting data and instructions is coupled to a memory system, at least one input device and at least one dispenser. Any computer program can in a highly abstract procedure or object-oriented programming language be implemented, or in assembler or machine language, so desired is; In any case, the language can be a compiling or interpreting one Be a language.
Zu den geeigneten Prozessoren zählen beispielsweise sowohl Allgemein- als auch Spezialzweckmikroprozessoren. Im Allgemeinen empfangen Prozessoren Anweisungen und Daten aus einem Nurlesespeicher und/oder einem Speicher mit wahlfreiem Zugriff. Im Allgemeinen beinhaltet ein Computer ein oder mehrere Massenspeichervorrichtungen zur Speicherung von Datendateien. Solche Vorrichtungen beinhalten magnetische Platten, so beispielsweise interne Festplatten und herausnehmbare Platten; magnetooptische Platten; und optische Platten. Speichervorrichtungen, die zur physischen Verkörperung der Computerprogrammanweisungen und Daten geeignet sind, beinhalten alle Formen von nichtflüchtigem Speicher, darunter beispielsweise Halbleiterspeichervorrichtungen wie EPROM, EEPROM und Flash-Speichervorrichtungen; magnetische Platten, so beispielsweise interne Festplatten und herausnehmbare Platten; magnetooptische Platten und CD-ROM-Platten. Ein beliebiges von dem Vorgenannten kann durch eine ASIC (anwendungsspezifische integrierte Schaltung) ergänzt oder darin integriert sein.To counting the appropriate processors for example, both general purpose and special purpose microprocessors. In general, processors receive instructions and data from a read-only memory and / or a random access memory. Generally includes a computer has one or more mass storage devices for storage of data files. Such devices include magnetic plates, such as internal hard disks and removable disks; magneto-optical disks; and optical disks. Storage devices, that to the physical embodiment the computer program instructions and data are suitable include all forms of non-volatile Memory, including, for example, semiconductor memory devices such as EPROM, EEPROM and flash memory devices; magnetic plates, such as internal hard disks and removable disks; magneto-optical disks and CD-ROM disks. Any one of that The above can be achieved through an ASIC (application-specific integrated Circuit) added or be integrated in it.
Zur Bereitstellung einer Interaktion mit einem Anwender kann die Erfindung auf einem Computersystem mit einer Anzeigevorrichtung implementiert sein, so beispielsweise einem Monitor oder einem LCD-Schirm zum Anzeigen von Information für den Anwender und einer Tastatur und einer Zeigevorrichtung, so beispielsweise einer Maus oder einem Trackball, durch die der Anwender eine Eingabe für das Computersystem bereitstellen kann. Das Computersystem kann derart programmiert werden, dass eine grafische Anwenderschnittstelle bereitsteht, durch die das Computerprogramm mit Anwendern interagiert.to Providing an interaction with a user may be the invention be implemented on a computer system with a display device, such as a monitor or LCD screen for display of information for the user and a keyboard and a pointing device, such as a mouse or trackball through which the user inputs for the Computer system can provide. The computer system can do this programmed to provide a graphical user interface the computer program interacts with users.
Es ist eine Mehrzahl von Ausführungsbeispielen der Erfindung beschrieben worden. Es sollte einsichtig sein, dass verschiedene Abwandlungen daran vorgenommen werden können, ohne vom Wesen und Umfang der Erfindung abzuweichen. Entsprechend befinden sich auch andere Ausführungsbeispiele innerhalb des Wesens der nachfolgenden Ansprüche.It is a plurality of embodiments the invention has been described. It should be obvious that Various modifications can be made to it without to depart from the spirit and scope of the invention. Correspondingly also other embodiments within the nature of the following claims.
ZusammenfassungSummary
Verfahren und System zur Multiplikation großer ZahlenMethod and system for multiplication greater numbers
Bereitgestellt werden Verfahren, Vorrichtungen und Systeme zur Multiplikation großer Zahlen. Eine Multiplikationsschaltung ist zur Berechnung des Produktes aus zwei Operanden (A und B) vorgesehen, von denen wenigstens einer breiter als eine Breite ist, die der Multiplikationsschaltung zugeordnet ist. Jeder der Operanden beinhaltet aneinander angrenzende, geordnete wortbreite Operandensegmente (Aj und Bi), die durch spezifische Gewichtungen j (ganze Zahl von 0 bis k) und i (ganze Zahl von 0 bis m) charakterisiert sind. Die Multiplikationsschaltung führt eine Matrix von wortbreiten Operandensegmentpaarmultiplikationsoperationen aus. Multiplikationsoperationen werden jeweils an einem Paar von Reihen ausgeführt. Für jedes Paar von Reihen wird ein Paar von entsprechenden Bi-wortbreiten Operandensegmenten aus einem Speicher gelesen, und es werden wortbreite Operandensegmentpaarmultiplikationsoperationen (Aj·Bi) iterativ für jede von k + 2 Spalten durchgeführt. Für jede Spalte ist ein Maximum von zwei zusätzlichen Speicherleseoperationen und einer Speicherschreiboperation erforderlich.Provided are methods, apparatus and systems for multiplying large numbers. A multiplication circuit is provided for calculating the product of two operands (A and B), at least one of which is wider than a width associated with the multiplication circuit. Each of the operands includes contiguous, ordered word-wide operand segments (A j and B i ) characterized by specific weights j (integer from 0 to k) and i (integer from 0 to m). The multiplication circuit executes a matrix of word-wide operand segment pair multiplication operations. Multiplication operations are performed on a pair of rows, respectively. For each pair of rows, a pair of corresponding B i word wide operand segments are read from a memory, and word wide operand segment pair multiplication operations (A j * B i ) are iteratively performed for each of k + 2 columns. Each column requires a maximum of two additional memory read operations and one memory write operation.
Claims (29)
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US11/837,387 | 2007-08-10 | ||
US11/837,387 US8028015B2 (en) | 2007-08-10 | 2007-08-10 | Method and system for large number multiplication |
PCT/US2008/072697 WO2009023595A1 (en) | 2007-08-10 | 2008-08-08 | Method and system for large number multiplication |
Publications (2)
Publication Number | Publication Date |
---|---|
DE112008002158T5 true DE112008002158T5 (en) | 2010-06-17 |
DE112008002158B4 DE112008002158B4 (en) | 2023-05-04 |
Family
ID=40347502
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
DE112008002158.9T Active DE112008002158B4 (en) | 2007-08-10 | 2008-08-08 | Method and system for multiplying large numbers |
Country Status (5)
Country | Link |
---|---|
US (1) | US8028015B2 (en) |
CN (1) | CN101790718B (en) |
DE (1) | DE112008002158B4 (en) |
TW (1) | TWI438678B (en) |
WO (1) | WO2009023595A1 (en) |
Families Citing this family (51)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5097138B2 (en) * | 2009-01-15 | 2012-12-12 | シャープ株式会社 | Arithmetic circuit and encryption circuit for Montgomery multiplication |
EP2365659B1 (en) * | 2010-03-01 | 2017-04-12 | Inside Secure | Method to test the resistance of an integrated circuit to a side channel attack |
US9645974B1 (en) * | 2015-03-11 | 2017-05-09 | Google Inc. | Optimized matrix multiplication using vector multiplication of interleaved matrix values |
CN111090467B (en) * | 2016-04-26 | 2025-05-27 | 中科寒武纪科技股份有限公司 | A device and method for performing matrix multiplication operation |
US10275243B2 (en) | 2016-07-02 | 2019-04-30 | Intel Corporation | Interruptible and restartable matrix multiplication instructions, processors, methods, and systems |
US10140574B2 (en) * | 2016-12-31 | 2018-11-27 | Via Alliance Semiconductor Co., Ltd | Neural network unit with segmentable array width rotator and re-shapeable weight memory to match segment width to provide common weights to multiple rotator segments |
US11080048B2 (en) | 2017-03-20 | 2021-08-03 | Intel Corporation | Systems, methods, and apparatus for tile configuration |
US11275588B2 (en) | 2017-07-01 | 2022-03-15 | Intel Corporation | Context save with variable save state size |
CN112214726B (en) * | 2017-07-07 | 2024-05-03 | 华为技术有限公司 | Operation accelerator |
US11816483B2 (en) | 2017-12-29 | 2023-11-14 | Intel Corporation | Systems, methods, and apparatuses for matrix operations |
US11023235B2 (en) | 2017-12-29 | 2021-06-01 | Intel Corporation | Systems and methods to zero a tile register pair |
US11809869B2 (en) | 2017-12-29 | 2023-11-07 | Intel Corporation | Systems and methods to store a tile register pair to memory |
US11669326B2 (en) | 2017-12-29 | 2023-06-06 | Intel Corporation | Systems, methods, and apparatuses for dot product operations |
US11093247B2 (en) | 2017-12-29 | 2021-08-17 | Intel Corporation | Systems and methods to load a tile register pair |
US11789729B2 (en) | 2017-12-29 | 2023-10-17 | Intel Corporation | Systems and methods for computing dot products of nibbles in two tile operands |
US10664287B2 (en) | 2018-03-30 | 2020-05-26 | Intel Corporation | Systems and methods for implementing chained tile operations |
US11093579B2 (en) | 2018-09-05 | 2021-08-17 | Intel Corporation | FP16-S7E8 mixed precision for deep learning and other algorithms |
US11579883B2 (en) | 2018-09-14 | 2023-02-14 | Intel Corporation | Systems and methods for performing horizontal tile operations |
US10970076B2 (en) | 2018-09-14 | 2021-04-06 | Intel Corporation | Systems and methods for performing instructions specifying ternary tile logic operations |
US10990396B2 (en) | 2018-09-27 | 2021-04-27 | Intel Corporation | Systems for performing instructions to quickly convert and use tiles as 1D vectors |
US10719323B2 (en) | 2018-09-27 | 2020-07-21 | Intel Corporation | Systems and methods for performing matrix compress and decompress instructions |
US10866786B2 (en) | 2018-09-27 | 2020-12-15 | Intel Corporation | Systems and methods for performing instructions to transpose rectangular tiles |
US10929143B2 (en) | 2018-09-28 | 2021-02-23 | Intel Corporation | Method and apparatus for efficient matrix alignment in a systolic array |
US10896043B2 (en) | 2018-09-28 | 2021-01-19 | Intel Corporation | Systems for performing instructions for fast element unpacking into 2-dimensional registers |
US10963256B2 (en) | 2018-09-28 | 2021-03-30 | Intel Corporation | Systems and methods for performing instructions to transform matrices into row-interleaved format |
US10963246B2 (en) | 2018-11-09 | 2021-03-30 | Intel Corporation | Systems and methods for performing 16-bit floating-point matrix dot product instructions |
US10929503B2 (en) | 2018-12-21 | 2021-02-23 | Intel Corporation | Apparatus and method for a masked multiply instruction to support neural network pruning operations |
US11886875B2 (en) | 2018-12-26 | 2024-01-30 | Intel Corporation | Systems and methods for performing nibble-sized operations on matrix elements |
US11294671B2 (en) | 2018-12-26 | 2022-04-05 | Intel Corporation | Systems and methods for performing duplicate detection instructions on 2D data |
US20200210517A1 (en) | 2018-12-27 | 2020-07-02 | Intel Corporation | Systems and methods to accelerate multiplication of sparse matrices |
US10922077B2 (en) | 2018-12-29 | 2021-02-16 | Intel Corporation | Apparatuses, methods, and systems for stencil configuration and computation instructions |
US10942985B2 (en) | 2018-12-29 | 2021-03-09 | Intel Corporation | Apparatuses, methods, and systems for fast fourier transform configuration and computation instructions |
KR102703432B1 (en) * | 2018-12-31 | 2024-09-06 | 삼성전자주식회사 | Calculation method using memory device and memory device performing the same |
US11269630B2 (en) | 2019-03-29 | 2022-03-08 | Intel Corporation | Interleaved pipeline of floating-point adders |
US11016731B2 (en) | 2019-03-29 | 2021-05-25 | Intel Corporation | Using Fuzzy-Jbit location of floating-point multiply-accumulate results |
US10990397B2 (en) | 2019-03-30 | 2021-04-27 | Intel Corporation | Apparatuses, methods, and systems for transpose instructions of a matrix operations accelerator |
US11175891B2 (en) | 2019-03-30 | 2021-11-16 | Intel Corporation | Systems and methods to perform floating-point addition with selected rounding |
CN110262773B (en) * | 2019-04-28 | 2020-08-04 | 阿里巴巴集团控股有限公司 | Computer data processing method and device |
US11403097B2 (en) | 2019-06-26 | 2022-08-02 | Intel Corporation | Systems and methods to skip inconsequential matrix operations |
US11334647B2 (en) | 2019-06-29 | 2022-05-17 | Intel Corporation | Apparatuses, methods, and systems for enhanced matrix multiplier architecture |
US11714875B2 (en) | 2019-12-28 | 2023-08-01 | Intel Corporation | Apparatuses, methods, and systems for instructions of a matrix operations accelerator |
CN111694541B (en) * | 2020-05-06 | 2023-04-21 | 常熟理工学院 | Base 32 operation circuit for number theory transformation multiplication |
US11972230B2 (en) | 2020-06-27 | 2024-04-30 | Intel Corporation | Matrix transpose and multiply |
US12112167B2 (en) | 2020-06-27 | 2024-10-08 | Intel Corporation | Matrix data scatter and gather between rows and irregularly spaced memory locations |
US11227641B1 (en) * | 2020-07-21 | 2022-01-18 | Micron Technology, Inc. | Arithmetic operations in memory |
US11941395B2 (en) | 2020-09-26 | 2024-03-26 | Intel Corporation | Apparatuses, methods, and systems for instructions for 16-bit floating-point matrix dot product instructions |
CN112433760B (en) * | 2020-11-27 | 2022-09-23 | 海光信息技术股份有限公司 | Data sorting method and data sorting circuit |
US12001887B2 (en) | 2020-12-24 | 2024-06-04 | Intel Corporation | Apparatuses, methods, and systems for instructions for aligning tiles of a matrix operations accelerator |
US12001385B2 (en) | 2020-12-24 | 2024-06-04 | Intel Corporation | Apparatuses, methods, and systems for instructions for loading a tile of a matrix operations accelerator |
RU2764876C1 (en) * | 2021-04-13 | 2022-01-21 | Акционерное общество "Концерн "Созвездие" | Accumulating adder-subtractor modulo random natural number |
CN117149129B (en) * | 2023-10-31 | 2024-01-26 | 共模半导体技术(苏州)有限公司 | Special large integer multiplication microcontroller |
Family Cites Families (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR2758195B1 (en) | 1997-01-09 | 1999-02-26 | Sgs Thomson Microelectronics | MODULAR ARITHMETIC CO-PACKER COMPRISING TWO MULTIPLICATION CIRCUITS OPERATING IN PARALLEL |
US6026483A (en) * | 1997-10-23 | 2000-02-15 | Advanced Micro Devices, Inc. | Method and apparatus for simultaneously performing arithmetic on two or more pairs of operands |
DE69828150T2 (en) | 1998-03-30 | 2005-12-15 | Rainbow Technologies Inc., Irvine | Computationally efficient modular multiplication method and device |
US6484194B1 (en) | 1998-06-17 | 2002-11-19 | Texas Instruments Incorporated | Low cost multiplier block with chain capability |
US6633896B1 (en) * | 2000-03-30 | 2003-10-14 | Intel Corporation | Method and system for multiplying large numbers |
JP3709553B2 (en) | 2000-12-19 | 2005-10-26 | インターナショナル・ビジネス・マシーンズ・コーポレーション | Arithmetic circuit and arithmetic method |
US7296049B2 (en) * | 2002-03-22 | 2007-11-13 | Intel Corporation | Fast multiplication circuits |
FR2853424B1 (en) | 2003-04-04 | 2005-10-21 | Atmel Corp | ARCHITECTURE OF COMBINED POLYNOMIAL AND NATURAL MULTIPLIERS |
FR2853425B1 (en) | 2003-04-07 | 2006-01-13 | Atmel Corp | EFFICIENT MULTIPLICATION SEQUENCE FOR OPERANDS HAVING LARGER WHOLE ENTIRE NUMBERS THAN MULTIPLIER EQUIPMENT |
US8194855B2 (en) | 2003-06-30 | 2012-06-05 | Oracle America, Inc. | Method and apparatus for implementing processor instructions for accelerating public-key cryptography |
US7480690B2 (en) | 2003-12-29 | 2009-01-20 | Xilinx, Inc. | Arithmetic circuit with multiplexed addend inputs |
JP4408712B2 (en) | 2004-01-26 | 2010-02-03 | 富士通マイクロエレクトロニクス株式会社 | Multi-precision data product-sum operation processing circuit and Montgomery product-sum operation circuit |
US7672989B2 (en) | 2005-05-09 | 2010-03-02 | Sandisk Il Ltd. | Large number multiplication method and device |
-
2007
- 2007-08-10 US US11/837,387 patent/US8028015B2/en not_active Expired - Fee Related
-
2008
- 2008-08-08 TW TW097130432A patent/TWI438678B/en active
- 2008-08-08 DE DE112008002158.9T patent/DE112008002158B4/en active Active
- 2008-08-08 CN CN200880102372.8A patent/CN101790718B/en active Active
- 2008-08-08 WO PCT/US2008/072697 patent/WO2009023595A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
US8028015B2 (en) | 2011-09-27 |
TWI438678B (en) | 2014-05-21 |
CN101790718A (en) | 2010-07-28 |
CN101790718B (en) | 2013-11-06 |
TW200915174A (en) | 2009-04-01 |
US20090043836A1 (en) | 2009-02-12 |
DE112008002158B4 (en) | 2023-05-04 |
WO2009023595A1 (en) | 2009-02-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
DE112008002158T5 (en) | Method and system for multiplying large numbers | |
DE69130581T2 (en) | Procedure for calculating an operation of type A.X modulo N, in a coding procedure according to the RSA method | |
DE69703085T2 (en) | Coprocessor with two multiplier circuits working in parallel | |
DE60215835T2 (en) | REDUCTION OF COMPONENTS IN A MONTGOMERY MULTIPLICATION CONTROL UNIT | |
DE10393918T5 (en) | Efficient multiplication of small matrices by using SIMD registers | |
DE69329260T2 (en) | Device for multiplying integers by many digits | |
DE69132129T2 (en) | In the basic number 4 working look-ahead trees | |
DE102018105457A1 (en) | Transpose matrices of neural networks in hardware | |
DE69229464T2 (en) | QUASI RADIX-16 PROCESSOR AND METHOD | |
DE19835216A1 (en) | Data parallel processing method by dividing data into data groups and connecting directly to respective processing units, bypassing communication unit | |
DE1524162A1 (en) | Device for parallel-simultaneous processing of related groups of data | |
DE1549476A1 (en) | Order for the execution of divisions | |
DE102007054316A1 (en) | Modular multiplication method, modular multiplier and cryptosystem | |
DE2221693C3 (en) | Circuit arrangement for performing a multiplication between two binary numbers | |
DE102019112186A1 (en) | Double load command | |
DE112016005521T5 (en) | Multifunctional execution track for image processor | |
DE10357661B4 (en) | Modular Montgomery multiplier and associated multiplication method | |
DE102007056104A1 (en) | Method and device for multiplication of binary operands | |
DE102006025569A1 (en) | Modular multiplication process for cryptography uses multiplicand in three bit segments in an multiplication addition operation | |
DE69900142T2 (en) | Procedure for performing modular multiplication according to the Montgomery method | |
DE2830334C2 (en) | ||
DE1935845A1 (en) | Data processing system with several operator family control units | |
DE202014011350U1 (en) | FFT accelerator | |
DE60316342T2 (en) | MULTIPLIER WITH ADDENDUM TABLES | |
DE69906348T2 (en) | MEMORY WITH VECTOR ACCESS |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
8127 | New person/name/address of the applicant |
Owner name: INSIDE CONTACTLESS S.A., AIX-EN-PROVENCE, FR |
|
R081 | Change of applicant/patentee |
Owner name: INSIDE SECURE, FR Free format text: FORMER OWNER: ATMEL CORPORATION, SAN JOSE, CALIF., US Effective date: 20110225 |
|
R082 | Change of representative |
Representative=s name: GRUENECKER, KINKELDEY, STOCKMAIR & SCHWANHAEUS, DE |
|
R081 | Change of applicant/patentee |
Owner name: INSIDE SECURE, FR Free format text: FORMER OWNER: INSIDE CONTACTLESS S.A., AIX-EN-PROVENCE, FR Effective date: 20131111 |
|
R082 | Change of representative |
Representative=s name: GRUENECKER, KINKELDEY, STOCKMAIR & SCHWANHAEUS, DE Effective date: 20131111 Representative=s name: GRUENECKER PATENT- UND RECHTSANWAELTE PARTG MB, DE Effective date: 20131111 |
|
R012 | Request for examination validly filed | ||
R016 | Response to examination communication | ||
R081 | Change of applicant/patentee |
Owner name: VERIMATRIX, FR Free format text: FORMER OWNER: INSIDE SECURE, MEYREUIL, FR Owner name: RAMBUS INC. (N.D.GES.D. STAATES DELAWARE), SUN, US Free format text: FORMER OWNER: INSIDE SECURE, MEYREUIL, FR Owner name: RAMBUS INC. (N.D.GES. DES STAATES DELAWARE), S, US Free format text: FORMER OWNER: INSIDE SECURE, MEYREUIL, FR |
|
R082 | Change of representative |
Representative=s name: GRUENECKER PATENT- UND RECHTSANWAELTE PARTG MB, DE Representative=s name: EISENFUEHR SPEISER PATENTANWAELTE RECHTSANWAEL, DE |
|
R081 | Change of applicant/patentee |
Owner name: RAMBUS INC. (N.D.GES.D. STAATES DELAWARE), SUN, US Free format text: FORMER OWNER: VERIMATRIX, MEYREUIL, FR Owner name: RAMBUS INC. (N.D.GES. DES STAATES DELAWARE), S, US Free format text: FORMER OWNER: VERIMATRIX, MEYREUIL, FR |
|
R082 | Change of representative |
Representative=s name: EISENFUEHR SPEISER PATENTANWAELTE RECHTSANWAEL, DE |
|
R081 | Change of applicant/patentee |
Owner name: RAMBUS INC. (N.D.GES. DES STAATES DELAWARE), S, US Free format text: FORMER OWNER: RAMBUS INC. (N.D.GES.D. STAATES DELAWARE), SUNNYVALE, CA, US |
|
R082 | Change of representative |
Representative=s name: EISENFUEHR SPEISER PATENTANWAELTE RECHTSANWAEL, DE |
|
R016 | Response to examination communication | ||
R018 | Grant decision by examination section/examining division | ||
R020 | Patent grant now final |