Search This Blog

Monday, November 25, 2013

HashFast Open Sources Bitcoin ASIC

Today HashFast announced they are open sourcing the interface protocol used for controlling their bitcoin mining ASICs.


Open sourcing this design gives significant insight into how their bitcoin miners operate and provides a platform for driver developers. More users collaborating in driver development should allow for a more diverse set of options, and a better experience for HashFast customers.


In July HashFast announced a partnership with Uniquify to design the 400 GH/s “Golden Nonce” ASIC, and on September 5 they announced tapeout of their chips with Taiwan Semiconductor. In order to prepare driver developers for the ASICs mid-November arrival, HashFast released an 84-page document explaining how their ASICs are used and details about their interface protocol design. Avalon released a similar open source description of their chip communication spec in April, which lead to a large variety of collaborative projects.


HashFast Batch Sales

HashFast completed preorders of the Batch 1 ASICs at the beginning of September, selling an estimated 225 TH/s at $3M (563 Baby Jets running at 400 GH/s for $5,600). HashFast will likely be second to market with their 28nm ASICs, following KNC’s shipments earlier this month. Despite reports of several of KNC’s capacitors exploding and hosted miners not reaching their promised speeds, it seems a majority of KNC’s Batch 1 customers have received their units.


HashFast publicly publishes the Order Chain for their Batch 1 sales on their website. From there it is evident that out of the 563 Baby Jets sold in their first batch, they have 157 unique orders, a majority of which are single unit orders. This large percentage of retail sales has engendered a community of tinkerers eager to assist the development of the hardware and software related to HashFast’s miners. HashFast’s batch 2 and 3 sales are significantly larger than their batch 1 sales and scheduled to arrive in December. Batch 2 has recently closed out and is expected to be delivered weeks after batch 1 ships.


With HashFast open sourcing their protocol, a community of advanced driver designs may develop by the time their Batch 1 begins shipping in a few weeks. John Skrodenis, VP of Marketing and Sales for HashFast, stated that “the customer base exceeds 350 users including batch 1, 2 and 3,” so there is clearly a large customer base in need of robust software.


ASIC Mining

ASICs, application specific integrated circuits, are customized chips designed for one specific purpose. In the case of bitcoin mining, it’s to perform the double SHA256 hash required to discover new bitcoin blocks. Each of HashFast’s ASIC chips contain four dies, with each die containing 96 cores, for a total of 384 cores per chip. The complexity of designing a robust interface protocol revolves around ensuring each of these cores has a constant queue of work to perform, and efficiently reports back when an acceptable value is found.


In order to mine a block, bitcoin uses hashes of the block header to determine if a block is found. Bitcoin uses the equation SHA256( SHA256( Block_Header ) ), where SHA256 is a hashing function that returns a 256-bit hash, for example: ’00000000000000001e8d6829a8a21adc5d38d0a473b144b6765798e61f98bd1d’.


block_header

Block header information used for hashing


The difficulty is adjusted by determining the number of leading 0’s required, where more 0’s increases the difficulty of finding an acceptable hash. In order to continue trying new hashes while maintaining the block header, a “nonce” field is used which can be incremented. Hashing the same header while gradually incrementing the nonce allows new hashes to be generated without changing important header information. When an acceptable hash is found, it is published in the block header along with the relevant transactions.


The Hashing Operation

HashFast open sourcing their protocol has given insight into the operations driving their ASICs hashing. Cores are controlled through operations sent from a host’s CPU. HashFast provides each core with messages from the host CPU through an operation bus (the data link), which provide the cores with commands such as configuring clock speed (the OP_PLL_CONFIG operation), restarting the core (OP_RESET), and providing work information for hashing (OP_HASH).


hash_core

from page 14 of the Protocol Interface Guide


Hashing commands are among the most important aspects of chip design. In HashFast’s design, if an OP_HASH command is received while the core is currently hashing, it is stored in an input queue. This allows the core to have continuous work after finding an acceptable hash. Each OP_HASH operation also contains a unique sequence number used for retrieving relevant information about the hash later on.


When a hash is found that meets the difficulty requirement in the OP_HASH operation, the hash core returns back the nonce that was used, as well as the OP_HASH’s sequence number. The host can then look up the sequence number to find the block header information without having to constantly transmit it back and forth.


USB Protocol

In practice, all of these operations are controlled through HashFast’s open source USB Communications Protocol. Within their USB protocol there’s a higher level protocol, called the Global Work Queue (GWQ). The GWQ allows developers to control the operation of ASIC cores at a more abstract level, allowing the low-level work details described above to be handled internally. The goal being to provide driver developers tasks that are light on CPU power required, and to enable modest CPUs to control large scale systems.


CGMiner is an open source bitcoin mining driver that has been developed for a wide range of GPU, FPGA and ASIC miners. Adrian Port, one of HashFast’s Lead ASIC Engineers has been working with the CGMiner team to implement HashFast’s protocol. They have been using the CGMiner drivers internally while developing the GWQ interface.



Along with the release of their documentation, HashFast will also release header files they have been using. Within a few days they expect to publish the CGMiner driver they developed onto github as an example for future developers. Adrian sated, “We expect to use this protocol for the foreseeable future, through several generations of ASIC. If additions are needed, the protocol is very extensible.” Accordingly, any design work spent on HashFast’s protocol should be usable for several generations of products.


source: http://thegenesisblock.com/hashfash-announces-open-sourcing-bitcoin-mining-asic-interface-protocol/




Guugll Search


http://www.guugll.eu/hashfast-open-sources-bitcoin-asic/

No comments:

Post a Comment