基於二元電阻式記憶體的高線性度記憶體內運算巨集單元設計
Binary RRAM-based In-memory Computing Macro Design with High Linearity
摘要
近年來,人工智慧引起非常大的關注。類神經網路是其中一種具有潛力實現人工智慧的方法,利用軟體運算進行圖像和語音識別的能力逐漸成熟。但由於傳統的馮·諾依曼計算架構中記憶體和運算單元是分開的,在傳輸人工智慧運算所需之大量數據時既費時又耗能。
因此,許多人工智慧晶片使用非揮發性記憶體 (nonvolatile memory, NVM) 來儲存神經網路的權重,以節省傳輸數據消耗的時間和功率。非揮發性記憶體的種類有很多,而其中電阻式記憶體 (resistive random-access memory, RRAM) 具有較短的寫入時間、較大的記憶窗口,以及相對較低的寫入功耗,因此基於電阻式記憶體的記憶體內運算 (in-memory computing, IMC) 系統被視為是解決馮·諾依曼瓶頸的方案之一。
然而,基於電阻式記憶體的記憶體內運算仍面臨許多挑戰,隨著現今人工智慧晶片的應用越來越廣泛,神經網路也變得越來越複雜,周邊電路消耗很大比例的功率及面積。此外,不精確的權重儲存導致精確度大幅下降,過大的位元線電流也在導線上造成明顯的壓降,造成乘加運算的非線性錯誤。最後,很難將參考電路設計的與計算電路對稱。
為了克服這些挑戰,本論文提出下列方法:1)我們使用二進制神經網路來簡化周邊電路。2)使用組融合層 (group fused layer) 的方法來傳輸數據,並使用依序輸入並行權重 (serial-input-parallel-weight, SIPW)設計減少位元線電流並降低功耗;3)依序輸入加法器 (serial-input analog adder, SIAA) 提高參考電路和計算電路的對稱性。
我們完整設計了一基於二進制電阻式記憶體的記憶體內運算巨集單元,並針對電路的非理想特性進行改善,使運算單元具有高線性度。此運算單元最高可以達到97 TOPS/W的能量效率以及12 TOPS/mm2的面積效率,判斷CIFAR-10的準確率高達88.39%。
因此,許多人工智慧晶片使用非揮發性記憶體 (nonvolatile memory, NVM) 來儲存神經網路的權重,以節省傳輸數據消耗的時間和功率。非揮發性記憶體的種類有很多,而其中電阻式記憶體 (resistive random-access memory, RRAM) 具有較短的寫入時間、較大的記憶窗口,以及相對較低的寫入功耗,因此基於電阻式記憶體的記憶體內運算 (in-memory computing, IMC) 系統被視為是解決馮·諾依曼瓶頸的方案之一。
然而,基於電阻式記憶體的記憶體內運算仍面臨許多挑戰,隨著現今人工智慧晶片的應用越來越廣泛,神經網路也變得越來越複雜,周邊電路消耗很大比例的功率及面積。此外,不精確的權重儲存導致精確度大幅下降,過大的位元線電流也在導線上造成明顯的壓降,造成乘加運算的非線性錯誤。最後,很難將參考電路設計的與計算電路對稱。
為了克服這些挑戰,本論文提出下列方法:1)我們使用二進制神經網路來簡化周邊電路。2)使用組融合層 (group fused layer) 的方法來傳輸數據,並使用依序輸入並行權重 (serial-input-parallel-weight, SIPW)設計減少位元線電流並降低功耗;3)依序輸入加法器 (serial-input analog adder, SIAA) 提高參考電路和計算電路的對稱性。
我們完整設計了一基於二進制電阻式記憶體的記憶體內運算巨集單元,並針對電路的非理想特性進行改善,使運算單元具有高線性度。此運算單元最高可以達到97 TOPS/W的能量效率以及12 TOPS/mm2的面積效率,判斷CIFAR-10的準確率高達88.39%。
Artificial intelligence (AI) has attracted significant attention in recent years. At present, the applications of the software-based neural network for image and speech recognition have matured considerably. When handling the huge amount of data in AI computing, the traditional von Neumann computing architecture is time-consuming and energy inefficient in data transfer because of the separation of memory and processing units.
Therefore, many hardware-based AI accelerators use nonvolatile memory (NVM) to store neural network weights to save power and time of data transfer. Among different NVMs, resistive random-access memory (RRAM) possesses short writing time, large memory window, and relatively low writing power consumption. Therefore, RRAM-based in-memory computing (IMC) system is regarded as one of the promising solutions to overcome the von Neumann bottleneck.
However, the design of RRAM-based IMC still faces many challenges. Considering the widespread applications of AI today, the size of neural networks also increases rapidly. The power and area consumption of the peripheral circuit is substantial. In addition, inaccurate weight mapping degrades the network accuracy. The large bit-line (BL) current causes non-negligible IR drop on the interconnect lines, thus resulting in non-linear multiply-accumulation operations. Moreover, it is challenging to design highly matched reference and computing circuit.
To overcome the challenges aforementioned, this thesis proposes the following solutions: 1) Use the binary neural network to reduce the complexity of peripheral circuits; 2) Use the group fused layer architecture to minimize data transfer and the serial-input-parallel-weight (SIPW) to reduce the bit-line current and power consumption; 3) Use the serial-input analog adder (SIAA) circuit to design well-matched reference and computing circuit.
We designed a complete IMC macro using a 40-nm binary RRAM technology. We improved the non-ideal characteristics in circuits and designed an IMC macro with high linearity. This macro achieves a peak energy efficiency of 97 TOPS/W, a peak area efficiency of 12 TOPS/mm2, and high inference accuracy of 88.39% for the CIFAR-10 dataset.
Therefore, many hardware-based AI accelerators use nonvolatile memory (NVM) to store neural network weights to save power and time of data transfer. Among different NVMs, resistive random-access memory (RRAM) possesses short writing time, large memory window, and relatively low writing power consumption. Therefore, RRAM-based in-memory computing (IMC) system is regarded as one of the promising solutions to overcome the von Neumann bottleneck.
However, the design of RRAM-based IMC still faces many challenges. Considering the widespread applications of AI today, the size of neural networks also increases rapidly. The power and area consumption of the peripheral circuit is substantial. In addition, inaccurate weight mapping degrades the network accuracy. The large bit-line (BL) current causes non-negligible IR drop on the interconnect lines, thus resulting in non-linear multiply-accumulation operations. Moreover, it is challenging to design highly matched reference and computing circuit.
To overcome the challenges aforementioned, this thesis proposes the following solutions: 1) Use the binary neural network to reduce the complexity of peripheral circuits; 2) Use the group fused layer architecture to minimize data transfer and the serial-input-parallel-weight (SIPW) to reduce the bit-line current and power consumption; 3) Use the serial-input analog adder (SIAA) circuit to design well-matched reference and computing circuit.
We designed a complete IMC macro using a 40-nm binary RRAM technology. We improved the non-ideal characteristics in circuits and designed an IMC macro with high linearity. This macro achieves a peak energy efficiency of 97 TOPS/W, a peak area efficiency of 12 TOPS/mm2, and high inference accuracy of 88.39% for the CIFAR-10 dataset.