METHOD AND SYSTEM FOR REDUCING POWER CONSUMPTION IN BITCOIN MINING VIA WATERFALL STRUCTURE
20170242475 · 2017-08-24
Inventors
- Assaf GILBOA (Rehovot, IL)
- Zvi SHTEINGART (Jerusalem, IL)
- Kobi LEVIN (Rishon le-Zion, IL)
- Guy COREM (Netanya, IL)
Cpc classification
H04L2209/125
ELECTRICITY
G06F1/3287
PHYSICS
International classification
G06Q20/06
PHYSICS
H04L9/06
ELECTRICITY
Abstract
A method and engine for hash calculation, the method comprising receiving data blocks via an input module, providing clock cycles by a clock module, calculating a hash from a received data block by a process module including a data pipeline and a state pipeline, the hash calculation comprising: an input data block to the data pipeline, the data block includes a sequence of data words including X data words, wherein X is a known number, calculating, in every other clock cycle of the clock module, an new data word based on the last calculated X data words, and performing a stage of the state pipeline in each clock cycle of the clock module, in which a state is calculated based on input from the data pipeline, the input includes the last calculated X data words, and outputting the hash via an output module every predetermined number of clock cycles.
Claims
1. A hash engine comprising: an input module for receiving data blocks; a memory; a clock module to provide clock cycles; a process module including a data pipeline and a state pipeline for calculating a hash from a received data block, the process module is configured to: receive an input data block to the data pipeline, the data block includes a sequence of data words including X data words, wherein X is a known number; calculate, in every clock cycle of the clock module, a new data word based on the last calculated X data words; and perform a stage of the state pipeline in each clock cycle of the clock module, in which a state is calculated based on input from the data pipeline, the input includes the last calculated X data words; and an output module to output the hash every predetermined number of clock cycles.
2. The engine of claim 1, wherein X is equal 16, and wherein each data word is of 32 bits.
3. The engine of claim 1, wherein the calculated state includes a sequence of eight state words, wherein the process module is further configured to calculate, in each clock cycle, a first and fifth new state words of the sequence, in order to form a new state of sequenced eight words based of the previous state's words.
4. The engine of claim 1, wherein after X clock cycles, a new input data block is inserted instead of the first X data words of the previously inserted input data block.
5. The engine of claim 1, wherein the engine has an array arrangement, the array has X columns to which input data blocks can be inserted, wherein the engine is configured to receive a new input data blocks to another of the X columns on every clock cycle, once the first X data words in the column become irrelevant.
6. The engine of claim 5, wherein each column may include up to four different input data blocks in process.
7. The engine of claim 5, further configured to provide to a row in said array arrangement, in each clock cycle, multiplexed values from previous rows, to demultiplex the multiplexed values in order to create a new data word in a selected column, and to generate multiplexed word values by multiplexing data words of the row, for generating new words in following rows.
8. The engine of claim 3, wherein the engine has an array arrangement in the state pipeline, the array has four columns, to which state sequences can be inserted, each state sequence is represented by four couples of a first and a fifth words, wherein the engine is further configured to receive a new state sequence to another of the four columns on every clock cycle, once the first four couples in the column become irrelevant.
9. The engine of claim 8, further configured to provide to a row in said array arrangement, in each clock cycle, multiplexed values from previous rows, to demultiplex the multiplexed values in order to create a new state word in a selected column, and to generate multiplexed word values by multiplexing state words of the row, for generating new words in following rows.
10. A method for hash calculation, the method comprising: receiving data blocks via an input module; providing clock cycles by a clock module; calculating a hash from a received data block by a process module including a data pipeline and a state pipeline, the hash calculation comprising: receiving an input data block to the data pipeline, the data block includes a sequence of data words including X data words, wherein X is a known number; calculating, in every clock cycle of the clock module, a new data word based on the last calculated X data words; and performing a stage of the state pipeline in each clock cycle of the clock module, in which a state is calculated based on input from the data pipeline, the input includes the last calculated X data words; and outputting the hash via an output module every predetermined number of clock cycles.
11. The method of claim 10, wherein X is equal 16, and wherein each data word is of 32 bits.
12. The method of claim 10, wherein the calculated state includes a sequence of eight state words, wherein the method further comprises calculating, in each clock cycle, a first and fifth new state words of the sequence, in order to form a new state of sequenced eight words based of the previous state's words.
13. The method of claim 10, further comprising inserting, after X clock cycles, a new input data block instead of the first X data words of the previously inserted input data block.
14. The method of claim 10, wherein the engine has an array arrangement, the array has X columns to which input data blocks can be inserted, wherein the method further comprises receiving a new input data blocks to another of the X columns on every clock cycle, once the first X data words in the column become irrelevant.
15. The method of claim 14, wherein each column may include up to four different input data blocks in process.
16. The method of claim 14, further comprising providing to a row in said array arrangement, in each clock cycle, multiplexed values from previous rows, demultiplexing the multiplexed values in order to create a new data word in a selected column, and generating multiplexed word values by multiplexing data words of the row, for generating new words in following rows.
17. The method of claim 12, wherein the engine has an array arrangement in the state pipeline, the array has four columns, to which state sequences can be inserted, each state sequence is represented by four couples of a first and a fifth words, wherein the method further comprises receiving a new state sequence to another of the four columns on every clock cycle, once the first four couples in the column become irrelevant.
18. The method of claim 17, further comprising providing to a row in said array arrangement, in each clock cycle, multiplexed values from previous rows, demultiplexing the multiplexed values in order to create a new state word in a selected column, and generating multiplexed word values by multiplexing state words of the row, for generating new words in following rows.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0025] For a better understanding of embodiments of the invention and to show how the same may be carried into effect, reference will now be made, purely by way of example, to the accompanying drawings in which like numerals designate corresponding elements or sections throughout.
[0026] In the accompanying drawings:
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038] The drawings together with the following detailed description make apparent to those skilled in the art how the invention may be embodied in practice.
DETAILED DESCRIPTION OF THE INVENTION
[0039] With specific reference now to the drawings in detail, it is stressed that the particulars shown are by way of example and for purposes of illustrative discussion of the preferred embodiments of the present invention only, and are presented in the cause of providing what is believed to be the most useful and readily understood description of the principles and conceptual aspects of the invention. In this regard, no attempt is made to show structural details of the invention in more detail than is necessary for a fundamental understanding of the invention, the description taken with the drawings making apparent to those skilled in the art how the several forms of the invention may be embodied in practice.
[0040] Before explaining at least one embodiment of the invention in detail, it is to be understood that the invention is not limited in its application to the details of construction and the arrangement of the components set forth in the following description or illustrated in the drawings. The invention is applicable to other embodiments or of being practiced or carried out in various ways. Also, it is to be understood that the phraseology and terminology employed herein is for the purpose of description and should not be regarded as limiting.
[0041] Reference is now made to
[0042] Reference is now made to
[0043] Input data block 100 induces data blocks 101-163, each induced according to a logic algorithm (described in detail with reference to
[0044] Input data block 100 is provided to W pipeline 24, which feeds state pipeline 22 with W0 of input data block 100. A first state 200 is produced based on W0 of input data block 100. Each of the following states 201-263 is produced in the respective stage based on the previous state and on the first word, i.e. W0, of the respective induced data block of the respective stage. For example, a state [i] is produced in stage [i] based on state [i−1] and on W0[i] of data block [i]. Stage [i] gets W0 from data block [i], and the following stage [i+1] get W0[i+1] from data block [i+1].
[0045] As described in detail herein, embodiments of the present invention enables loading, in each clock cycle, i.e. in each stage, of a new 32 bit word only, rather than copying 16 such words in each cycle. Therefore, the overall power consumption of the Bitcoin mining engine is reduced. Such implementation is called herein “the waterfall implementation”, and it may be applied to the W section 24 as well as to the state section 22.
[0046]
[0047]
[0048] Reference is now made to
[0049] Reference is now made to
[0050] Accordingly, in the efficient W waterfall array implementation of
[0051] Reference is now made to
[0052] Reference is now made to
[0053] Reference is now made to
[0054] Reference is now made to
[0055] Reference is now made to
[0056] In some embodiments of the present invention, the calculated state includes a sequence of eight state words, wherein the method further comprises calculating, in each clock cycle, a first and fifth new state words of the sequence, in order to form a new state of sequenced eight words based of the previous state's words
[0057] In some embodiments of the present invention, the method may further include inserting, after X clock cycles, a new input data block instead of the first X data words of the previously inserted input data block.
[0058] In some embodiments of the present invention, the engine has an array arrangement, the array has X columns to which input data blocks can be inserted, wherein the method further comprises receiving a new input data blocks to another of the X columns on every clock cycle, once the first X data words in the column become irrelevant. Each column may include up to four different input data blocks in process.
[0059] In some embodiments of the present invention, the method may further include providing to a row in said array arrangement, in each clock cycle, multiplexed values from previous rows, demultiplexing the multiplexed values in order to create a new data word in a selected column, and generating multiplexed word values by multiplexing data words of the row, for generating new words in following rows.
[0060] In some embodiments of the present invention, the engine has an array arrangement in the state pipeline, the array has four columns, to which state sequences can be inserted, each state sequence is represented by four couples of a first and a fifth words, wherein the method further comprises receiving a new state sequence to another of the four columns on every clock cycle, once the first four couples in the column become irrelevant.
[0061] In some embodiments of the present invention, the method may further include providing to a row in said array arrangement, in each clock cycle, multiplexed values from previous rows, demultiplexing the multiplexed values in order to create a new state word in a selected column, and generating multiplexed word values by multiplexing state words of the row, for generating new words in following rows.
[0062] Although various features of the invention may be described in the context of a single embodiment, the features may also be provided separately or in any suitable combination. Conversely, although the invention may be described herein in the context of separate embodiments for clarity, the invention may also be implemented in a single embodiment.
[0063] Reference in the specification to “some embodiments”, “an embodiment”, “one embodiment” or “other embodiments” means that a particular feature, structure, or characteristic described in connection with the embodiments is included in at least some embodiments, but not necessarily all embodiments, of the inventions.
[0064] It is to be understood that the phraseology and terminology employed herein is not to be construed as limiting and are for descriptive purpose only.
[0065] The principles and uses of the teachings of the present invention may be better understood with reference to the accompanying description, figures and examples.
[0066] It is to be understood that the details set forth herein do not construe a limitation to an application of the invention.
[0067] Furthermore, it is to be understood that the invention can be carried out or practiced in various ways and that the invention can be implemented in embodiments other than the ones outlined in the description above.
[0068] It is to be understood that the terms “including”, “comprising”, “consisting” and grammatical variants thereof do not preclude the addition of one or more components, features, steps, or integers or groups thereof and that the terms are to be construed as specifying components, features, steps or integers.
[0069] If the specification or claims refer to “an additional” element, that does not preclude there being more than one of the additional element.
[0070] It is to be understood that where the claims or specification refer to “a” or “an” element, such reference is not be construed that there is only one of that element.
[0071] It is to be understood that where the specification states that a component, feature, structure, or characteristic “may”, “might”, “can” or “could” be included, that particular component, feature, structure, or characteristic is not required to be included.
[0072] The descriptions, examples, methods and materials presented in the claims and the specification are not to be construed as limiting but rather as illustrative only.
[0073] Meanings of technical and scientific terms used herein are to be commonly understood as by one of ordinary skill in the art to which the invention belongs, unless otherwise defined.
[0074] The present invention may be implemented in the testing or practice with methods and materials equivalent or similar to those described herein.
[0075] While the invention has been described with respect to a limited number of embodiments, these should not be construed as limitations on the scope of the invention, but rather as exemplifications of some of the preferred embodiments. Other possible variations, modifications, and applications are also within the scope of the invention.