Applications of and techniques for quickly computing a modulo operation by a Mersenne or a Fermat number

US11455145B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11455145-B2
Application numberUS-202016941409-A
CountryUS
Kind codeB2
Filing dateJul 28, 2020
Priority dateJul 28, 2020
Publication dateSep 27, 2022
Grant dateSep 27, 2022

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Various embodiments include a modulo operation generator associated with a cache memory in a computer-based system. The modulo operation generator generates a first sum by performing an addition and/or a subtraction function on an input address. A first portion of the first sum is applied to a lookup table that generates a correction value. The correction value is then added to a second portion of the first sum to generate a second sum. The second sum is adjusted, as needed, to be less than the divisor. The adjusted second sum forms a residue value that identifies a cache memory slice in which the input data value corresponding to the input address is stored. By generating the residue value in this manner, the cache memory distributes input data values among the slices in a cache memory even when the number of slices is not a power of two.

First claim

Opening claim text (preview).

What is claimed is: 1. A computer-implemented method for performing a modulo operation, the method comprising: performing, via an accumulation circuit, a first set of summations on an input value associated with the modulo operation to generate a first sum; accessing, via a lookup and correction circuit, a correction value associated with a first portion of the first sum; performing, via the lookup and correction circuit, a second set of summations on the correction value and a second portion of the first sum to generate a second sum; and generating, via a test and correction circuit, a result of the modulo operation based on the second sum. 2. The computer-implemented method of claim 1 , wherein a divisor of the modulo operation is a Mersenne number, and wherein performing the first set of summations on the input value comprises: dividing the input value into a set of coefficients; and adding a first coefficient included in the set of coefficients to a second coefficient included in the set of coefficients. 3. The computer-implemented method of claim 1 , wherein a divisor of the modulo operation is a Mersenne number, and wherein accessing the correction value comprises retrieving the correction value from a lookup table, wherein the correction value represents a number to add to the second portion of the first sum. 4. The computer-implemented method of claim 1 , wherein a divisor of the modulo operation is a Mersenne number, and wherein performing the second set of summations on the correction value and the second portion of the first sum comprises adding the correction value to the second portion of the first sum. 5. The computer-implemented method of claim 1 , wherein a divisor of the modulo operation is a Fermat number, and wherein performing the first set of summations on the input value comprises: dividing the input value into a first set of coefficients corresponding to even powers of two and a second set of the coefficients corresponding to odd powers of two; and subtracting a first coefficient included in the second set of coefficients from a second coefficient included in the first set of coefficients. 6. The computer-implemented method of claim 1 , wherein a divisor of the modulo operation is a Fermat number, and wherein accessing the correction value comprises retrieving the correction value from a lookup table, wherein the correction value represents a number to subtract from the second portion of the first sum. 7. The computer-implemented method of claim 1 , wherein a divisor of the modulo operation is a Fermat number, and wherein performing the second set of summations on the correction value and the second portion of the first sum comprises subtracting the correction value from the second portion of the first sum. 8. The computer-implemented method of claim 1 , wherein generating the result of the modulo operation comprises: determining that the second sum is less than a divisor of the modulo operation; and setting the result to the second sum. 9. The computer-implemented method of claim 1 , wherein generating the result of the modulo operation comprises: determining that the second sum is greater than or equal to a divisor of the modulo operation; computing a difference by subtracting the divisor from the second sum; and setting the result of the modulo operation to the difference. 10. A modulo operation generator, comprising: an accumulation circuit that: performs a first set of summations on an input value to generate a first sum; a lookup and correction circuit that: accesses a correction value associated with a first portion of the first sum, and performs a second set of summations on the correction value and a second portion of the first sum to generate a second sum; and a test and correct circuit that: generates a result of a modulo operation based on the second sum. 11. The modulo operation generator of claim 10 , further comprising: receiving a selection of a first divisor included in a plurality of divisors; and configuring at least one of the accumulation circuit, the lookup and correction circuit, or the test and correct circuit to perform the modulo operation based on the first divisor. 12. The modulo operation generator of claim 11 , wherein the first divisor and a second divisor included in the plurality of divisors are Mersenne numbers. 13. The modulo operation generator of claim 11 , wherein the first divisor and a second divisor included in the plurality of divisors are Fermat numbers. 14. The modulo operation generator of claim 11 , wherein the first divisor is a Mersenne number and a second divisor included in the plurality of divisors is a Fermat number. 15. The modulo operation generator of claim 10 , wherein a divisor of the modulo operation is a Mersenne number, and wherein performing the first set of summations on the input value comprises: dividing the input value into a set of coefficients; and adding a first coefficient included in the set of coefficients to a second coefficient included in the set of coefficients. 16. The modulo operation generator of claim 10 , wherein a divisor of the modulo operation is a Mersenne number, and wherein accessing the correction value comprises retrieving the correction value from a lookup table, wherein the correction value represents a number to add to the second portion of the first sum. 17. The modulo operation generator of claim 10 , wherein a divisor of the modulo operation is a Mersenne number, and wherein performing the second set of summations on the correction value and the second portion of the first sum comprises adding the correction value to the second portion of the first sum. 18. The modulo operation generator of claim 10 , wherein a divisor of the modulo operation is a Fermat number, and wherein performing the first set of summations on the input value comprises: dividing the input value into a first set of coefficients corresponding to even powers of two and a second set of the coefficients corresponding to odd powers of two; and subtracting a first coefficient included in the second set of coefficients from a second coefficient included in the first set of coefficients. 19. The modulo operation generator of claim 10 , wherein a divisor of the modulo operation is a Fermat number, and wherein accessing the correction value comprises retrieving the correction value from a lookup table, wherein the correction value represents a number to subtract from the second portion of the first sum. 20. A system, comprising: a processor that transmits a memory address and a data value to a memory management unit (MMU); a cache memory that comprises a plurality of cache memory slices; and the MMU that: receives the memory address and the data value from the processor, performs a first set of summations on the memory address to generate a first sum, accesses a correction value associated with a first portion of the first sum, performs a second set of summations on the correction value and a second portion of the first sum to generate a second sum, generates a result of a modulo operation based on the second sum, wherein the result of the modulo operation identifies a first cache memory slice in the plurality of cache memory slices; and stores the data value in the first cache memory slice.

Assignees

Inventors

Classifications

  • Adding; Subtracting (G06F7/483 - G06F7/491, G06F7/544 - G06F7/556 take precedence) · CPC title

  • G06F7/727Primary

    Modulo N arithmetic, with N being either (2**n)-1,2**n or (2**n)+1, e.g. mod 3, mod 4 or mod 5 (G06F7/728 takes precedence) · CPC title

  • Dividing only · CPC title

  • using representation by a residue number system · CPC title

  • G06F15/781Primary

    On-chip cache; Off-chip memory · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11455145B2 cover?
Various embodiments include a modulo operation generator associated with a cache memory in a computer-based system. The modulo operation generator generates a first sum by performing an addition and/or a subtraction function on an input address. A first portion of the first sum is applied to a lookup table that generates a correction value. The correction value is then added to a second portion…
Who is the assignee on this patent?
Nvidia Corp
What technology area does this patent fall under?
Primary CPC classification G06F7/727. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Sep 27 2022 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 2 related publications on this page (citations in our corpus or others sharing the same primary CPC).