
micromachines Article A RISC-V Processor with Area-Efficient Memristor-Based In-Memory Computing for Hash Algorithm in Blockchain Applications Xiaoyong Xue 1, Chenzedai Wang 1, Wenjun Liu 1,*, Hangbing Lv 2,*, Mingyu Wang 1,* and Xiaoyang Zeng 1 1 State Key Laboratory of ASIC and System, Fudan University, Shanghai 201203, China 2 Key Laboratory of Microelectronics Devices and Integrated Technology, Institute of Microelectronics of the Chinese Academy of Sciences, Beijing 100029, China * Correspondence: [email protected] (W.L.); [email protected] (H.L.); [email protected] (M.W.); Tel.: +86-021-51355200-987 (W.L.) Received: 31 May 2019; Accepted: 16 August 2019; Published: 16 August 2019 Abstract: Blockchain technology is increasingly being used in Internet of things (IoT) devices for information security and data integrity. However, it is challenging to implement complex hash algorithms with limited resources in IoT devices owing to large energy consumption and a long processing time. This paper proposes a RISC-V processor with memristor-based in-memory computing (IMC) for blockchain technology in IoT applications. The IMC-adapted instructions were designed for the Keccak hash algorithm by virtue of the extendibility of the RISC-V instruction set architecture (ISA). Then, a RISC-V processor with area-efficient memristor-based IMC was developed based on an open-source core for IoT applications, Hummingbird E200. The general compiling policy with the data allocation method is also disclosed for the IMC implementation of the Keccak hash algorithm. An evaluation shows that >70% improvements in both performance and energy saving were achieved with limited area overhead after introducing IMC in the RISC-V processor. Keywords: in-memory computing; memristor; RISC-V; Internet of things; blockchain 1. Introduction Internet of things (IoT) refers to the network of different physical devices, which enables them to collect and exchange data [1,2]. With the development of telecommunication, computers, and integrated circuits, IoT is being increasingly applied in commercial fields such as modern agriculture, driverless vehicles, smart cities, etc., which promise to become vital parts of global economics [3]. However, as billions of IoT devices are connected to the continuously growing networks, security appears to be a major concern. IoT devices collect a great amount of private information, which is vulnerable to attacks if not well protected. Moreover, most of the devices are resource-constrained and, thus, heavy cryptographic approaches are difficult to implement. Recently, a trend emerged to exploit the blockchain technology in IoT devices for information security and data integrity [4]. The blockchain is a peer-to-peer (P2P) ledger which was first used in the Bitcoin cryptocurrency for economic transactions [5]. Bitcoin users that are known by a changeable public key generate and broadcast transactions to the network to transfer money. These transactions are pushed into a block by users. Once a block is full, the block is appended to the blockchain by performing a mining process. To mine a block, some specific nodes known as miners try to solve a cryptographic puzzle named proof of work (POW), and the node that solves the puzzle first mines the new block to the blockchain, as shown in Figure1. Because of its distributed, secure, and private nature, the blockchain can enable secure messaging between devices in an IoT network. In this approach, the Micromachines 2019, 10, 541; doi:10.3390/mi10080541 www.mdpi.com/journal/micromachines Micromachines 2019,, 10,, 541x FOR PEER REVIEW 22 of of 1615 and private nature, the blockchain can enable secure messaging between devices in an IoT network. blockchainIn this approach, treats messagethe blockchain exchanges treat betweens message devices exchanges similar between to financial devices transactions similar to in afinancial Bitcoin network.transactions To enablein a Bitcoin message network exchanges,. To enable devices message leverage exchanges, smart contracts devices which leverage model smart the agreement contracts betweenwhich model two the parties. agreement The distributed between two datasets parties maintained. The distributed by blockchain datasets technologymaintained alsoby blockchain allow the datatechnology to be safely also allow stored the by data different to be peers, safely and stored people by different are not required peers, and to entrustpeople are IoT not data required produced to byentrust their IoT devices data toproduced centralized by their companies devices [6 to]. Moreover,centralized the companies blockchain [6]. technology Moreover, lowersthe blockchain the cost oftechnology the deployment lowers the of the cost IoT of devicesthe deployment and makes of the it safe IoT anddevices easy and for usersmakes to it paysafefor and the easy data for on users IoT devicesto pay for [7 ].the data on IoT devices [7]. Take hash of Verify Bundle previous block transactions are transactions in a and insert it into valid block new block When solution is Propagate Solve proof of found, add new blockchain to work block to network blockchain Figure 1. BitcoinBitcoin mining mining process using blockchain technology technology.. However, the the hardware hardware for for mining mining in IoT in IoTdevices devices has to has be tolightweight, be lightweight, low-cost low-cost,, and energy and- energy-eefficient toffi cientadapt to the adapt block thechain blockchain technology technology.. IoT devices IoT are devices often deployed are often in deployed nonhuman in nonhuman conditions conditionsto a great extent to a great and extentare powered and are through powered batteries, through call batteries,ing for extremely calling for low extremely cost and low low cost energy and lowconsumption energy consumption [8]. However, [8]. when However, using when a general using processor a general, processor,i.e., central i.e., processing central processing unit (CPU unit) or (CPU)graphics or processing graphics processing unit (GPU) unit, to implement (GPU), to implementthe blockchain, the it blockchain, is likely to consume it is likely too to much consume energy, too muchresulting energy, in frequent resulting recharging in frequent orrecharging a short battery or a shortlifetime. battery Resorting lifetime. to a Resorting conventional to a conventional application- application-specificspecific integrated circuit integrated (ASIC circuit) or coprocessor (ASIC) or can coprocessor help to reduce can help energy to reduce consumption energy consumptionand improve andspeed, improve but will speed, induce but considerable will induce considerablearea cost [9]. area cost [9]. In-memoryIn-memory computing (IMC) provides a promising alternative. In a general processor, the data transfer on the bus between the central processing unit (CPU) and the memory leads to large power consumption and limited performance,performance, i.e.,i.e., memory bottleneck.bottleneck. To address this issue, IMC modifiesmodifies the memory to be able to perform some regular logic operations such as AND, OR,OR, and exclusive or (XOR)(XOR) [[9].9]. Especially for data vectors with l largearge bit width, IMC can accomplish the ANDAND/OR/XOR/OR/XOR operation inin oneone read read access, access, saving saving both both execution execution time time and and power power consumption. consumption. Static Static random-access random- memoryaccess memor (SRAM)y (SRAM) can be employedcan be employed in IMC, butin IMC, its cell but size its iscell too size large is withtoo large 6–10 transistorswith 6–10 transistors and it also needsand it also constant needs power constant to hold power the to data, hold incurring the data, incurring considerable considerable area cost andarea standby cost and power standby [10 power]. [10]. Emerging memory technologies, especially memristors, feature a simple cell structure, highEmerging density, memory three-dimensional technologies, (3D) especially stackability, memristor goods, compatibilityfeature a simple with cell complementarystructure, high metal–oxide–semiconductordensity, three-dimensional (3D (CMOS)) stackability, processes, good and compatibility non-volatility with [11 complementary]. Recently, memristors metal–oxide were– investigatedsemiconductor to (CMOS realize) IMCprocess usinges, and a one-transistor-one-memristor non-volatility [11]. Recently, memristor (1T1R) arrays were accompanied investigated byto modifiedrealize IMC peripheral using a one circuits-transistor [12].- However,one-memristor it is still (1T1R) diffi cultarray to accompanied rely on memristor-based by modified IMCperipheral alone tocircuits implement [12]. However, the hash it algorithm is still difficult in blockchain to rely on technology. memristor- Abased processor IMC alone is still to requiredimplement to performthe hash thealgorithm data allocation, in blockchain as well technology. as other complexed A processor logic is operations.still required For to resource-limited perform the data IoT allocation devices,, the as processorwell as other should complexed be flexible logic to supportoperations memory. For resource computation-limited instructions IoT devices, while the incurring processor small should power be consumptionflexible to support and area memory cost. Thankscomputation to its simplicity,instructions scalability, while incurring fast speed, small and power low power,consumption the RISC-V and processorarea cost. isThanks believed to its to besimplicity, competent scalability, for the abovementioned
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages16 Page
-
File Size-